e2b
Version:
E2B SDK that give agents cloud environments
12,341 lines • 365 kB
text/typescript
import createClient from "openapi-fetch";
import { Client, Code, Transport } from "@connectrpc/connect";
import { GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { Timestamp } from "@bufbuild/protobuf/wkt";
import { PathLike } from "node:fs";
import { Message } from "@bufbuild/protobuf";
//#region src/api/schema.gen.d.ts
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
interface paths {
"/sandboxes": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List running sandboxes
* @deprecated
* @description List all running sandboxes. Use GET /v2/sandboxes instead.
*/
get: {
parameters: {
query?: {
/** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */
metadata?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned all running sandboxes */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ListedSandbox"][];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
/**
* Create sandbox
* @description Create a sandbox from the template
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["NewSandbox"];
};
};
responses: {
/** @description The sandbox was created successfully */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Sandbox"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
503: components["responses"]["503"];
504: components["responses"]["504"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Sandbox
* @description Get a sandbox by id
*/
get: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the sandbox */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SandboxDetail"];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
/**
* Kill sandbox
* @description Kill a sandbox
*/
delete: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The sandbox was killed successfully */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/connect": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Connect sandbox
* @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ConnectSandbox"];
};
};
responses: {
/** @description The sandbox was already running */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Sandbox"];
};
};
/** @description The sandbox was resumed successfully */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Sandbox"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
500: components["responses"]["500"];
503: components["responses"]["503"];
504: components["responses"]["504"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/fork": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Fork sandbox
* @description Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": components["schemas"]["SandboxForkRequest"];
};
};
responses: {
/** @description The sandbox was snapshotted and the forks were attempted; each entry reports one fork's outcome */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SandboxForkResult"][];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
500: components["responses"]["500"];
503: components["responses"]["503"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/logs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Sandbox logs
* @deprecated
* @description Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
*/
get: {
parameters: {
query?: {
/** @description Maximum number of logs that should be returned */
limit?: number;
/** @description Starting timestamp of the logs that should be returned in milliseconds */
start?: number;
};
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the sandbox logs */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SandboxLogs"];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/metrics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Sandbox metrics
* @description Get sandbox metrics
*/
get: {
parameters: {
query?: {
end?: number;
/** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
start?: number;
};
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the sandbox metrics */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SandboxMetric"][];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/network": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
/**
* Update sandbox network
* @description Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
*/
put: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["SandboxNetworkUpdateConfig"];
};
};
responses: {
/** @description Successfully updated the sandbox network configuration */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
500: components["responses"]["500"];
};
};
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/pause": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Pause sandbox
* @description Pause the sandbox
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": components["schemas"]["SandboxPauseRequest"];
};
};
responses: {
/** @description The sandbox was paused successfully and can be resumed */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/refreshes": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Refresh sandbox
* @description Refresh the sandbox extending its time to live
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": components["schemas"]["SandboxRefreshRequest"];
};
};
responses: {
/** @description Successfully refreshed the sandbox */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
404: components["responses"]["404"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/resume": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Resume sandbox
* @deprecated
* @description Resume the sandbox
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ResumedSandbox"];
};
};
responses: {
/** @description The sandbox was resumed successfully */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Sandbox"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
500: components["responses"]["500"];
503: components["responses"]["503"];
504: components["responses"]["504"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/snapshots": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create snapshot
* @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["SandboxSnapshotRequest"];
};
};
responses: {
/** @description Snapshot created successfully */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SnapshotInfo"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/{sandboxID}/timeout": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Set sandbox timeout
* @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": components["schemas"]["SandboxTimeoutRequest"];
};
};
responses: {
/** @description Successfully set the sandbox timeout */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sandboxes/metrics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List sandbox metrics
* @description List metrics for given sandboxes
*/
get: {
parameters: {
query: {
/** @description Comma-separated list of sandbox IDs to get metrics for */
sandbox_ids: string[];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned all running sandboxes with metrics */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SandboxesWithMetrics"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/secrets": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List project secrets
* @description List the project's secrets. No response carries a secret value.
*/
get: {
parameters: {
query?: {
/** @description Maximum number of items to return per page */
limit?: components["parameters"]["paginationLimit"];
/** @description Cursor to start the list from */
nextToken?: components["parameters"]["paginationNextToken"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully listed the project's secrets */
200: {
headers: {
"X-Next-Token": components["headers"]["XNextToken"];
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Secret"][];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
409: components["responses"]["409"];
429: components["responses"]["429"];
500: components["responses"]["500"];
502: components["responses"]["502"];
504: components["responses"]["504"];
};
};
put?: never;
/**
* Create a secret
* @description Create a secret by storing a runtime marker as its first version. The response carries metadata only.
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["NewSecret"];
};
};
responses: {
/** @description Successfully created the secret */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Secret"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
409: components["responses"]["409"];
429: components["responses"]["429"];
500: components["responses"]["500"];
502: components["responses"]["502"];
504: components["responses"]["504"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/secrets/{secretID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get a secret
* @description Get one secret's metadata, selected by identifier or name.
*/
get: {
parameters: {
query?: never;
header?: never;
path: {
secretID: components["parameters"]["secretID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully retrieved the secret */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Secret"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
409: components["responses"]["409"];
429: components["responses"]["429"];
500: components["responses"]["500"];
502: components["responses"]["502"];
504: components["responses"]["504"];
};
};
put?: never;
/**
* Update a secret
* @description Replace the secret's stored marker by appending a new version. The response carries metadata only.
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
secretID: components["parameters"]["secretID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["SecretUpdate"];
};
};
responses: {
/** @description Successfully updated the secret */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Secret"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
409: components["responses"]["409"];
429: components["responses"]["429"];
500: components["responses"]["500"];
502: components["responses"]["502"];
504: components["responses"]["504"];
};
};
/**
* Delete a secret
* @description Revoke the secret and schedule its versions for cleanup.
*/
delete: {
parameters: {
query?: never;
header?: never;
path: {
secretID: components["parameters"]["secretID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully deleted the secret */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
409: components["responses"]["409"];
429: components["responses"]["429"];
500: components["responses"]["500"];
502: components["responses"]["502"];
504: components["responses"]["504"];
};
};
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/snapshots": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List snapshots
* @description List all snapshots for the team
*/
get: {
parameters: {
query?: {
/** @description Maximum number of items to return per page */
limit?: components["parameters"]["paginationLimit"];
/** @description Filter snapshots by name or ID, optionally tag-qualified (e.g. "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1"). */
name?: string;
/** @description Cursor to start the list from */
nextToken?: components["parameters"]["paginationNextToken"];
sandboxID?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned snapshots */
200: {
headers: {
"X-Next-Token": components["headers"]["XNextToken"];
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SnapshotInfo"][];
};
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/teams": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List teams
* @description List all teams
*/
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned all teams */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Team"][];
};
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/teams/{teamID}/metrics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Team metrics
* @description Get metrics for the team
*/
get: {
parameters: {
query?: {
end?: number;
/** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
start?: number;
};
header?: never;
path: {
teamID: components["parameters"]["teamID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the team metrics */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TeamMetric"][];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/teams/{teamID}/metrics/max": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Maximum team metrics
* @description Get the maximum metrics for the team in the given interval
*/
get: {
parameters: {
query: {
end?: number;
/** @description Metric to retrieve the maximum value for */
metric: "concurrent_sandboxes" | "sandbox_start_rate";
/** @description Unix timestamp for the start of the interval, in seconds, for which the metrics */
start?: number;
};
header?: never;
path: {
teamID: components["parameters"]["teamID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the team metrics */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MaxTeamMetric"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List templates
* @deprecated
* @description List all templates
*/
get: {
parameters: {
query?: {
teamID?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned all templates */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Template"][];
};
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
/**
* Create template
* @deprecated
* @description Create a new template
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateBuildRequest"];
};
};
responses: {
/** @description The build was accepted */
202: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateLegacy"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/{templateID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List template builds
* @description List all builds for a template
*/
get: {
parameters: {
query?: {
/** @description Maximum number of items to return per page */
limit?: components["parameters"]["paginationLimit"];
/** @description Cursor to start the list from */
nextToken?: components["parameters"]["paginationNextToken"];
};
header?: never;
path: {
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the template with its builds */
200: {
headers: {
"X-Next-Token": components["headers"]["XNextToken"];
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateWithBuilds"];
};
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
/**
* Rebuild template
* @deprecated
* @description Rebuild an template
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateBuildRequest"];
};
};
responses: {
/** @description The build was accepted */
202: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateLegacy"];
};
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
/**
* Delete template
* @description Delete a template
*/
delete: {
parameters: {
query?: never;
header?: never;
path: {
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The template was deleted successfully */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
options?: never;
head?: never;
/**
* Update template
* @deprecated
* @description Update template
*/
patch: {
parameters: {
query?: never;
header?: never;
path: {
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateUpdateRequest"];
};
};
responses: {
/** @description The template was updated successfully */
200: {
headers: {
[name: string]: unknown;
};
content?: never;
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
trace?: never;
};
"/templates/{templateID}/builds/{buildID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Start template build
* @deprecated
* @description Start the build
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
buildID: components["parameters"]["buildID"];
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The build has started */
202: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/{templateID}/builds/{buildID}/logs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Template build logs
* @description Get template build logs
*/
get: {
parameters: {
query?: {
/** @description Starting timestamp of the logs that should be returned in milliseconds */
cursor?: number;
direction?: components["schemas"]["LogsDirection"];
level?: components["schemas"]["LogLevel"];
/** @description Maximum number of logs that should be returned */
limit?: number;
/** @description Source of the logs that should be returned from */
source?: components["schemas"]["LogsSource"];
};
header?: never;
path: {
buildID: components["parameters"]["buildID"];
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the template build logs */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateBuildLogsResponse"];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/{templateID}/builds/{buildID}/status": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Template build status
* @description Get template build info
*/
get: {
parameters: {
query?: {
level?: components["schemas"]["LogLevel"];
/** @description Maximum number of logs that should be returned */
limit?: number;
/** @description Index of the starting build log that should be returned with the template */
logsOffset?: number;
};
header?: never;
path: {
buildID: components["parameters"]["buildID"];
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the template */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateBuildInfo"];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/{templateID}/files/{hash}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Template build file upload URL
* @description Get an upload link for a tar file containing build layer files
*/
get: {
parameters: {
query?: never;
header?: never;
path: {
hash: string;
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The upload link where to upload the tar file */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateBuildFileUpload"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/{templateID}/tags": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List template tags
* @description List all tags for a template
*/
get: {
parameters: {
query?: never;
header?: never;
path: {
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the template tags */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateTag"][];
};
};
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/aliases/{alias}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Check template alias
* @description Check if template with given alias exists
*/
get: {
parameters: {
query?: never;
header?: never;
path: {
alias: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully queried template by alias */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateAliasResponse"];
};
};
400: components["responses"]["400"];
403: components["responses"]["403"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/templates/tags": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Assign template tags
* @description Assign tag(s) to a template build
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["AssignTemplateTagsRequest"];
};
};
responses: {
/** @description Tag assigned successfully */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["AssignedTemplateTags"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
/**
* Delete template tags
* @description Delete multiple tags from templates
*/
delete: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["DeleteTemplateTagsRequest"];
};
};
responses: {
/** @description Tags deleted successfully */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v2/sandboxes": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List sandboxes (v2)
* @description List all sandboxes
*/
get: {
parameters: {
query?: {
/** @description Maximum number of items to return per page */
limit?: components["parameters"]["paginationLimit"];
/** @description Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded. */
metadata?: string;
/** @description Cursor to start the list from */
nextToken?: components["parameters"]["paginationNextToken"];
/** @description Sort direction by sandbox start time. Defaults to desc (newest first). */
order?: components["schemas"]["OrderDirection"];
/** @description Return sandboxes started at or after this timestamp. */
startedAfter?: string;
/** @description Filter sandboxes by one or more states */
state?: components["schemas"]["SandboxState"][];
/** @description Filter sandboxes by a template ID or alias. */
template?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned all running sandboxes */
200: {
headers: {
"X-Next-Token": components["headers"]["XNextToken"];
"X-Total-Running": components["headers"]["XTotalRunning"];
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ListedSandbox"][];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v2/sandboxes/{sandboxID}/logs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Sandbox logs (v2)
* @description Get sandbox logs
*/
get: {
parameters: {
query?: {
/** @description Starting timestamp of the logs that should be returned in milliseconds */
cursor?: number;
/** @description Direction of the logs that should be returned */
direction?: components["schemas"]["LogsDirection"];
/** @description Minimum log level to return. Logs below this level are excluded */
level?: components["schemas"]["LogLevel"];
/** @description Maximum number of logs that should be returned */
limit?: number;
/** @description Case-sensitive substring match on log message content */
search?: string;
};
header?: never;
path: {
sandboxID: components["parameters"]["sandboxID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned the sandbox logs */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SandboxLogsV2Response"];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v2/templates": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List templates (v2)
* @description List all templates
*/
get: {
parameters: {
query?: {
/** @description Maximum number of items to return per page */
limit?: components["parameters"]["paginationLimit"];
/** @description Cursor to start the list from */
nextToken?: components["parameters"]["paginationNextToken"];
teamID?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully returned all templates */
200: {
headers: {
"X-Next-Token": components["headers"]["XNextToken"];
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Template"][];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
500: components["responses"]["500"];
};
};
put?: never;
/**
* Create template (v2)
* @deprecated
* @description Create a new template
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateBuildRequestV2"];
};
};
responses: {
/** @description The build was requested successfully */
202: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateLegacy"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v2/templates/{templateID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
/**
* Update template (v2)
* @description Update template
*/
patch: {
parameters: {
query?: never;
header?: never;
path: {
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateUpdateRequest"];
};
};
responses: {
/** @description The template was updated successfully */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateUpdateResponse"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
trace?: never;
};
"/v2/templates/{templateID}/builds/{buildID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Start template build (v2)
* @description Start the build
*/
post: {
parameters: {
query?: never;
header?: never;
path: {
buildID: components["parameters"]["buildID"];
templateID: components["parameters"]["templateID"];
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateBuildStartV2"];
};
};
responses: {
/** @description The build has started */
202: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v3/templates": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create template (v3)
* @description Create a new template
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TemplateBuildRequestV3"];
};
};
responses: {
/** @description The build was requested successfully */
202: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TemplateRequestResponseV3"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/volumes": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List team volumes
* @description List all team volumes
*/
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully listed all team volumes */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Volume"][];
};
};
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
put?: never;
/**
* Create team volume
* @description Create a new team volume
*/
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["NewVolume"];
};
};
responses: {
/** @description Successfully created a new team volume */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["VolumeAndToken"];
};
};
400: components["responses"]["400"];
401: components["responses"]["401"];
500: components["responses"]["500"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/volumes/{volumeID}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Team volume
* @description Get team volume info
*/
get: {
parameters: {
query?: never;
header?: never;
path: {
volumeID: components["parameters"]["volumeID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully retrieved a team volume */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["VolumeAndToken"];
};
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
put?: never;
post?: never;
/**
* Delete team volume
* @description Delete a team volume
*/
delete: {
parameters: {
query?: never;
header?: never;
path: {
volumeID: components["parameters"]["volumeID"];
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successfully deleted a team volume */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
401: components["responses"]["401"];
404: components["responses"]["404"];
500: components["responses"]["500"];
};
};
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
interface components {
schemas: {
AdminBuildCancelResult: {
/** @description Number of builds successfully cancelled */
cancelledCount: number;
/** @description Number of builds that failed to cancel */
failedCount: number;
};
AdminSandboxKillResult: {
/** @description Number of sandboxes that failed to kill */
failedCount: number;
/** @description Number of sandboxes successfully killed */
killedCount: number;
};
/** @description Cached live sandbox index count keyed by team ID. Counts may briefly
* include sandboxes transitioning out of running; teams without indexed
* sandboxes are omitted.
* */
AdminTeamRunningSandboxCounts: {
[key: string]: number;
};
AssignedTemplateTags: {
/**
* Format: uuid
* @description Identifier of the build associated with these tags
*/
buildID: string;
/** @description Assigned tags of the template */
tags: string[];
};
AssignTemplateTagsRequest: {
/** @description Tags to assign to the template */
tags: string[];
/** @description Target template in "name:tag" format */
target: string;
};
AWSRegistry: {
/** @description AWS Access Key ID for ECR authentication */
awsAccessKeyId: string;
/** @description AWS Region where the ECR registry is located */
awsRegion: string;
/** @description AWS Secret Access Key for ECR authentication */
awsSecretAccessKey: string;
/**
* @description Type of registry authentication (enum property replaced by openapi-typescript)
* @enum {string}
*/
type: "aws";
};
BuildLogEntry: {
level: components["schemas"]["LogLevel"];
/** @description Log message content */
message: string;
/** @description Step in the build process related to the log entry */
step?: string;
/**
* Format: date-time
* @description Timestamp of the log entry
*/
timestamp: string;
};
BuildStatusReason: {
/**
* @description Log entries related to the status reason
* @default []
*/
logEntries?: components["schemas"]["BuildLogEntry"][];
/** @description Message with the status reason, currently reporting only for error status */
message: string;
/** @description Step that failed */
step?: string;
};
ConnectSandbox: {
/**
* Format: int32
* @description Timeout in seconds from the current time after which the sandbox should expire
*/
timeout: number;
};
/**
* Format: int32
* @description CPU cores for the sandbox
*/
CPUCount: number;
CreatedAccessToken: {
/**
* Format: date-time
* @description Timestamp of access token creation
*/
createdAt: string;
/**
* Format: uuid
* @description Identifier of the access token
*/
id: string;
mask: components["schemas"]["IdentifierMaskingDetails"];
/** @description Name of the access token */
name: string;
/** @description The fully created access token */
token: string;
};
CreatedTeamAPIKey: {
/**
* Format: date-time
* @description Timestamp of API key creation
*/
createdAt: string;
createdBy?: components["schemas"]["TeamUser"] | null;
/**
* Format: uuid
* @description Identifier of the API key
*/
id: string;
/** @description Raw value of the API key */
key: string;
/**
* Format: date-time
* @description Last time this API key was used
*/
lastUsed?: string | null;
mask: components["schemas"]["IdentifierMaskingDetails"];
/** @description Name of the API key */
name: string;
};
DeleteTemplateTagsRequest: {
/** @description Name of the template */
name: string;
/** @description Tags to delete */
tags: string[];
};
DiskMetrics: {
/** @description Device name */
device: string;
/** @description Filesystem type (e.g., ext4, xfs) */
filesystemType: string;
/** @description Mount point of the disk */
mountPoint: string;
/**
* Format: uint64
* @description Total space in bytes
*/
totalBytes: number;
/**
* Format: uint64
* @description Used space in bytes
*/
usedBytes: number;
};
/**
* Format: int32
* @description Disk size for the sandbox in MiB
*/
DiskSizeMB: number;
/** @description Version of the envd running in the sandbox */
EnvdVersion: string;
EnvVars: {
[key: string]: string;
};
Error: {
/**
* Format: int32
* @description Error code
*/
code: number;
/** @description Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed, internal_server_error. */
error_code?: string;
/** @description Error */
message: string;
};
FromImageRegistry: components["schemas"]["AWSRegistry"] | components["schemas"]["GCPRegistry"] | components["schemas"]["GeneralRegistry"];
GCPRegistry: {
/** @description Service Account JSON for GCP authentication */
serviceAccountJson: string;
/**
* @description Type of registry authentication (enum property replaced by openapi-typescript)
* @enum {string}
*/
type: "gcp";
};
GeneralRegistry: {
/** @description Password to use for the registry */
password: string;
/**
* @description Type of registry authentication (enum property replaced by openapi-typescript)
* @enum {string}
*/
type: "registry";
/** @description Username to use for the registry */
username: string;
};
IdentifierMaskingDetails: {
/** @description Prefix used in masked version of the token or key */
maskedValuePrefix: string;
/** @description Suffix used in masked version of the token or key */
maskedValueSuffix: string;
/** @description Prefix that identifies the token or key type */
prefix: string;
/** @description Length of the token or key */
valueLength: number;
};
ListedSandbox: {
/** @description Alias of the template */
alias?: string;
/**
* @deprecated
* @description Identifier of the client
*/
clientID: string;
cpuCount: components["schemas"]["CPUCount"];
diskSizeMB: components["schemas"]["DiskSizeMB"];
/**
* Format: date-time
* @description Time when the sandbox will expire
*/
endAt: string;
envdVersion: components["schemas"]["EnvdVersion"];
memoryMB: components["schemas"]["MemoryMB"];
metadata?: components["schemas"]["SandboxMetadata"];
/** @description Identifier of the sandbox */
sandboxID: string;
/**
* Format: date-time
* @description Time when the sandbox was started
*/
startedAt: string;
state: components["schemas"]["SandboxState"];
/** @description Identifier of the template from which is the sandbox created */
templateID: string;
volumeMounts?: components["schemas"]["SandboxVolumeMount"][];
};
/**
* @description State of the sandbox
* @enum {string}
*/
LogLevel: "debug" | "info" | "warn" | "error";
/**
* @description Direction of the logs that should be returned
* @enum {string}
*/
LogsDirection: "forward" | "backward";
/**
* @description Source of the logs that should be returned
* @enum {string}
*/
LogsSource: "temporary" | "persistent";
MachineInfo: {
/** @description CPU architecture of the node */
cpuArchitecture: string;
/** @description CPU family of the node */
cpuFamily: string;
/** @description CPU model of the node */
cpuModel: string;
/** @description CPU model name of the node */
cpuModelName: string;
};
/** @description Team metric with timestamp */
MaxTeamMetric: {
/**
* Format: date-time
* @deprecated
* @description Timestamp of the metric entry
*/
timestamp: string;
/**
* Format: int64
* @description Timestamp of the metric entry in Unix time (seconds since epoch)
*/
timestampUnix: number;
/** @description The maximum value of the requested metric in the given interval */
value: number;
};
/** @description MCP configuration for the sandbox */
Mcp: {
[key: string]: unknown;
} | null;
/**
* Format: int32
* @description Memory for the sandbox in MiB
*/
MemoryMB: number;
NewAccessToken: {
/** @description Name of the access token */
name: string;
};
NewSandbox: {
/** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */
allow_internet_access?: boolean;
/**
* @description Automatically pauses the sandbox after the timeout
* @default false
*/
autoPause?: boolean;
/**
* @description Controls the snapshot kind taken when the sandbox auto-pauses on timeout (only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only the filesystem (a filesystem-only snapshot); resuming it cold-boots (reboots) the sandbox from disk. Such a snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined with autoResume. Defaults to true (full memory snapshot).
* @default true
*/
autoPauseMemory?: boolean;
autoResume?: components["schemas"]["SandboxAutoResumeConfig"];
envVars?: components["schemas"]["EnvVars"];
iam?: components["schemas"]["SandboxIam"];
mcp?: components["schemas"]["Mcp"];
metadata?: components["schemas"]["SandboxMetadata"];
network?: components["schemas"]["SandboxNetworkConfig"];
/** @description Secure all system communication with sandbox */
secure?: boolean;
/** @description Identifier of the required template */
templateID: string;
/**
* Format: int32
* @description Time to live for the sandbox in seconds.
* @default 15
*/
timeout?: number;
volumeMounts?: components["schemas"]["SandboxVolumeMount"][];
};
NewSecret: {
metadata?: components["schemas"]["SecretMetadata"];
/** @description Name of the secret, unique within the project. Names are lower-cased before storage and returned in that canonical form; the sec_ prefix is reserved for secret identifiers.
* */
name: string;
/** @description Runtime marker stored as the secret's first version. The runtime resolves it to a value at sandbox egress. */
value: string;
};
NewTeamAPIKey: {
/** @description Name of the API key */
name: string;
};
NewVolume: {
/** @description Name of the volume */
name: string;
};
Node: {
/** @description Identifier of the cluster */
clusterID: string;
/** @description Commit of the orchestrator */
commit: string;
/**
* Format: uint64
* @description Number of sandbox create fails
*/
createFails: number;
/**
* Format: uint64
* @description Number of sandbox create successes
*/
createSuccesses: number;
/** @description Identifier of the node */
id: string;
machineInfo: components["schemas"]["MachineInfo"];
metrics: components["schemas"]["NodeMetrics"];
/**
* Format: uint32
* @description Number of sandboxes running on the node
*/
sandboxCount: number;
/**
* Format: int
* @description Number of starting Sandboxes
*/
sandboxStartingCount: number;
/** @description Service instance identifier of the node */
serviceInstanceID: string;
status: components["schemas"]["NodeStatus"];
/**
* Format: date-time
* @description Time when the node status was last changed
*/
statusChangedAt: string;
/** @description Version of the orchestrator */
version: string;
};
NodeDetail: {
/** @description Identifier of the cluster */
clusterID: string;
/** @description Commit of the orchestrator */
commit: string;
/**
* Format: uint64
* @description Number of sandbox create fails
*/
createFails: number;
/**
* Format: uint64
* @description Number of sandbox create successes
*/
createSuccesses: number;
/** @description Identifier of the node */
id: string;
machineInfo: components["schemas"]["MachineInfo"];
metrics: components["schemas"]["NodeMetrics"];
/**
* Format: uint32
* @description Number of sandboxes running on the node
*/
sandboxCount: number;
/** @description Service instance identifier of the node */
serviceInstanceID: string;
status: components["schemas"]["NodeStatus"];
/**
* Format: date-time
* @description Time when the node status was last changed
*/
statusChangedAt: string;
/** @description Version of the orchestrator */
version: string;
};
/** @description Node metrics */
NodeMetrics: {
/**
* Format: uint32
* @description Number of allocated CPU cores
*/
allocatedCPU: number;
/**
* Format: uint64
* @description Amount of allocated memory in bytes
*/
allocatedMemoryBytes: number;
/**
* Format: uint32
* @description Total number of CPU cores on the node
*/
cpuCount: number;
/**
* Format: uint32
* @description Node CPU usage percentage
*/
cpuPercent: number;
/** @description Detailed metrics for each disk/mount point */
disks: components["schemas"]["DiskMetrics"][];
/**
* Format: uint64
* @description Size of a single hugepage in bytes
*/
hugePageSizeBytes: number;
/**
* Format: uint64
* @description Number of reserved hugepages (committed but not yet faulted)
*/
hugePagesReserved: number;
/**
* Format: uint64
* @description Total number of preallocated hugepages on the node
*/
hugePagesTotal: number;
/**
* Format: uint64
* @description Number of hugepages in use (total - free)
*/
hugePagesUsed: number;
/**
* Format: uint64
* @description Total node memory in bytes
*/
memoryTotalBytes: number;
/**
* Format: uint64
* @description Node memory used in bytes
*/
memoryUsedBytes: number;
};
/**
* @description Status of the node.
* - draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing sandboxes are done.
* - standby: the node is not actively used, but it can return to ready and continue serving traffic.
*
* @enum {string}
*/
NodeStatus: "ready" | "draining" | "connecting" | "unhealthy" | "standby";
NodeStatusChange: {
/**
* Format: uuid
* @description Identifier of the cluster
*/
clusterID?: string;
status: components["schemas"]["NodeStatus"];
};
/**
* @description Sort direction
* @default desc
* @enum {string}
*/
OrderDirection: "asc" | "desc";
ResumedSandbox: {
/**
* @deprecated
* @description Automatically pauses the sandbox after the timeout
*/
autoPause?: boolean;
/**
* Format: int32
* @description Time to live for the sandbox in seconds.
* @default 15
*/
timeout?: number;
};
Sandbox: {
/** @description Alias of the template */
alias?: string;
/**
* @deprecated
* @description Identifier of the client
*/
clientID: string;
/** @description Base domain where the sandbox traffic is accessible */
domain?: string | null;
/** @description Access token used for envd communication */
envdAccessToken?: string;
envdVersion: components["schemas"]["EnvdVersion"];
/** @description Identifier of the sandbox */
sandboxID: string;
/** @description Identifier of the template from which is the sandbox created */
templateID: string;
/** @description Token required for accessing sandbox via proxy. */
trafficAccessToken?: string | null;
};
/** @description Auto-resume configuration for paused sandboxes. */
SandboxAutoResumeConfig: {
enabled: components["schemas"]["SandboxAutoResumeEnabled"];
};
/**
* @description Auto-resume enabled flag for paused sandboxes. Default false.
* @default false
*/
SandboxAutoResumeEnabled: boolean;
SandboxDetail: {
/** @description Alias of the template */
alias?: string;
/** @description Whether internet access was explicitly enabled or disabled for the sandbox. Null means it was not explicitly set. */
allowInternetAccess?: boolean | null;
/**
* @deprecated
* @description Identifier of the client
*/
clientID: string;
cpuCount: components["schemas"]["CPUCount"];
diskSizeMB: components["schemas"]["DiskSizeMB"];
/** @description Base domain where the sandbox traffic is accessible */
domain?: string | null;
/**
* Format: date-time
* @description Time when the sandbox will expire
*/
endAt: string;
/** @description Access token used for envd communication */
envdAccessToken?: string;
envdVersion: components["schemas"]["EnvdVersion"];
lifecycle?: components["schemas"]["SandboxLifecycle"];
memoryMB: components["schemas"]["MemoryMB"];
metadata?: components["schemas"]["SandboxMetadata"];
network?: components["schemas"]["SandboxNetworkConfig"];
/** @description Identifier of the sandbox */
sandboxID: string;
/**
* Format: date-time
* @description Time when the sandbox was started
*/
startedAt: string;
state: components["schemas"]["SandboxState"];
/** @description Identifier of the template from which is the sandbox created */
templateID: string;
volumeMounts?: components["schemas"]["SandboxVolumeMount"][];
};
/** @description SOCKS5 proxy for sandbox egress. Outbound TCP is tunneled through the proxy after allow/deny filtering; the sandbox is unaware. Domain-matched flows use remote DNS (ATYP=domain). */
SandboxEgressProxyConfig: {
/** @description SOCKS5 proxy address in host:port format (e.g. "proxy.example.com:1080"). */
address: string;
/** @description Optional SOCKS5 password (RFC 1929), max 255 bytes. */
password?: string;
/** @description Optional SOCKS5 username (RFC 1929), max 255 bytes. */
username?: string;
} | null;
SandboxesWithMetrics: {
sandboxes: {
[key: string]: components["schemas"]["SandboxMetric"];
};
};
SandboxForkRequest: {
/**
* Format: int32
* @description Number of forked sandboxes to create. All forks boot from the same snapshot, so the snapshot is captured once regardless of count. Each fork succeeds or fails independently; the outcome of each is reported in its entry of the response list.
* @default 1
*/
count?: number;
/**
* Format: int32
* @description Time to live for the new forked sandboxes in seconds.
* @default 15
*/
timeout?: number;
};
/** @description Result of one requested fork. Exactly one of sandbox or error is set: sandbox when the fork started successfully, error when it failed to start. */
SandboxForkResult: {
error?: components["schemas"]["Error"];
sandbox?: components["schemas"]["Sandbox"];
};
/** @description Sandbox workload identity configuration. A non-empty, valid tokens map enables workload identity for the sandbox. */
SandboxIam: {
tokens?: components["schemas"]["SandboxIamTokens"];
};
SandboxIamToken: {
/** @description Audience of the workload token, stored exactly as provided. */
audience: string;
/** @description Workload token type. */
tokenType: string;
};
/** @description Named workload-token definitions, keyed by a caller-chosen token name. */
SandboxIamTokens: {
[key: string]: components["schemas"]["SandboxIamToken"];
};
/** @description Sandbox lifecycle policy returned by sandbox info. */
SandboxLifecycle: {
/** @description Whether the sandbox can auto-resume. */
autoResume: boolean;
onTimeout: components["schemas"]["SandboxOnTimeout"];
};
/** @description Log entry with timestamp and line */
SandboxLog: {
/** @description Log line content */
line: string;
/**
* Format: date-time
* @description Timestamp of the log entry
*/
timestamp: string;
};
SandboxLogEntry: {
fields: {
[key: string]: string;
};
level: components["schemas"]["LogLevel"];
/** @description Log message content */
message: string;
/**
* Format: date-time
* @description Timestamp of the log entry
*/
timestamp: string;
};
SandboxLogs: {
/** @description Structured logs of the sandbox */
logEntries: components["schemas"]["SandboxLogEntry"][];
/** @description Logs of the sandbox */
logs: components["schemas"]["SandboxLog"][];
};
SandboxLogsV2Response: {
/**
* @description Sandbox logs structured
* @default []
*/
logs: components["schemas"]["SandboxLogEntry"][];
};
SandboxMetadata: {
[key: string]: string;
};
/** @description Metric entry with timestamp and line */
SandboxMetric: {
/**
* Format: int32
* @description Number of CPU cores
*/
cpuCount: number;
/**
* Format: float
* @description CPU usage percentage
*/
cpuUsedPct: number;
/**
* Format: int64
* @description Total disk space in bytes
*/
diskTotal: number;
/**
* Format: int64
* @description Disk used in bytes
*/
diskUsed: number;
/**
* Format: int64
* @description Cached memory (page cache) in bytes
*/
memCache: number;
/**
* Format: int64
* @description Total memory in bytes
*/
memTotal: number;
/**
* Format: int64
* @description Memory used in bytes
*/
memUsed: number;
/**
* Format: date-time
* @deprecated
* @description Timestamp of the metric entry
*/
timestamp: string;
/**
* Format: int64
* @description Timestamp of the metric entry in Unix time (seconds since epoch)
*/
timestampUnix: number;
};
SandboxNetworkConfig: {
/** @description List of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com", "*.example.com"). Allowed entries always take precedence over denied entries. */
allowOut?: string[];
/**
* @description Specify if the sandbox URLs should be accessible only with authentication.
* @default true
*/
allowPublicTraffic?: boolean;
/** @description List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules. */
denyOut?: string[];
egressProxy?: components["schemas"]["SandboxEgressProxyConfig"];
/** @description Specify host mask which will be used for all sandbox requests */
maskRequestHost?: string;
/** @description Per-domain transform rules applied to matching egress HTTP/HTTPS requests. Keys are domains (e.g. "api.example.com", "example.com"). A domain listed here is not automatically allowed - use allowOut to permit the traffic.
* */
rules?: {
[key: string]: components["schemas"]["SandboxNetworkRule"][];
};
};
/** @description Transform rule applied to egress requests matching a domain pattern. */
SandboxNetworkRule: {
transform?: components["schemas"]["SandboxNetworkTransform"];
};
/** @description Transformations applied to matching egress requests before forwarding. */
SandboxNetworkTransform: {
/** @description HTTP headers to inject or override in matching requests. An existing header with the same name is replaced. Values are plain strings; secret resolution happens client-side before sending to the API.
* */
headers?: {
[key: string]: string;
};
};
/** @description Network configuration update for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting a field clears it. */
SandboxNetworkUpdateConfig: {
/** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */
allow_internet_access?: boolean;
/** @description List of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com", "*.example.com"). Allowed entries always take precedence over denied entries. */
allowOut?: string[];
/** @description List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules. */
denyOut?: string[];
egressProxy?: components["schemas"]["SandboxEgressProxyConfig"];
/** @description Per-domain transform rules. Replaces all existing rules when provided. */
rules?: {
[key: string]: components["schemas"]["SandboxNetworkRule"][];
};
};
/**
* @description Action taken when the sandbox times out.
* @enum {string}
*/
SandboxOnTimeout: "kill" | "pause";
SandboxPauseRequest: {
/**
* @description Whether to capture a full memory snapshot. When false, only the filesystem is persisted and resuming the sandbox cold-boots (reboots) it from disk, losing in-memory state, running processes, and open connections. Resume it with an explicit request (connect or resume); auto-resume, which can be triggered by arbitrary traffic, refuses such a sandbox. Defaults to true.
* @default true
*/
memory?: boolean;
};
SandboxRefreshRequest: {
/** @description Duration for which the sandbox should be kept alive in seconds */
duration?: number;
};
SandboxSnapshotRequest: {
/** @description Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one. */
name?: string;
};
/**
* @description State of the sandbox
* @enum {string}
*/
SandboxState: "running" | "paused";
SandboxTimeoutRequest: {
/**
* Format: int32
* @description Timeout in seconds from the current time after which the sandbox should expire
*/
timeout: number;
};
SandboxVolumeMount: {
/** @description Name of the volume */
name: string;
/** @description Path of the volume */
path: string;
};
/** @description Metadata of a secret. It never carries the secret value. */
Secret: {
/**
* Format: date-time
* @description Time when the secret was created
*/
createdAt: string;
/**
* Format: int64
* @description Version served to readers that do not name one
*/
currentVersion: number;
metadata: components["schemas"]["SecretMetadata"];
/** @description Name of the secret, unique within the project */
name: string;
/** @description Identifier of the secret */
secretID: string;
/**
* Format: date-time
* @description Time when the secret was last updated
*/
updatedAt: string;
};
/** @description Customer metadata of the secret. Always present, empty when unset. At most 32 entries; keys are limited to 128 bytes, values to 1024 bytes, and a secret's metadata to 8192 bytes in total.
* */
SecretMetadata: {
[key: string]: string;
};
SecretUpdate: {
metadata?: components["schemas"]["SecretMetadata"];
/** @description Runtime marker stored as the secret's new version. The runtime resolves it to a value at sandbox egress. */
value: string;
};
SnapshotInfo: {
/** @description Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2) */
names: string[];
/** @description Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default). */
snapshotID: string;
};
Team: {
/** @description API key for the team */
apiKey: string;
/** @description Whether the team is the default team */
isDefault: boolean;
/** @description Name of the team */
name: string;
/** @description Identifier of the team */
teamID: string;
};
TeamAPIKey: {
/**
* Format: date-time
* @description Timestamp of API key creation
*/
createdAt: string;
createdBy?: components["schemas"]["TeamUser"] | null;
/**
* Format: uuid
* @description Identifier of the API key
*/
id: string;
/**
* Format: date-time
* @description Last time this API key was used
*/
lastUsed?: string | null;
mask: components["schemas"]["IdentifierMaskingDetails"];
/** @description Name of the API key */
name: string;
};
/** @description Team metric with timestamp */
TeamMetric: {
/**
* Format: int32
* @description The number of concurrent sandboxes for the team
*/
concurrentSandboxes: number;
/**
* Format: float
* @description Number of sandboxes started per second
*/
sandboxStartRate: number;
/**
* Format: date-time
* @deprecated
* @description Timestamp of the metric entry
*/
timestamp: string;
/**
* Format: int64
* @description Timestamp of the metric entry in Unix time (seconds since epoch)
*/
timestampUnix: number;
};
TeamUser: {
/**
* @deprecated
* @description Email of the user
* @default null
*/
email: string | null;
/**
* Format: uuid
* @description Identifier of the user
*/
id: string;
};
Template: {
/**
* @deprecated
* @description Aliases of the template
*/
aliases: string[];
/**
* Format: int32
* @description Number of times the template was built
*/
buildCount: number;
/** @description Identifier of the last successful build for given template */
buildID: string;
buildStatus: components["schemas"]["TemplateBuildStatus"];
cpuCount: components["schemas"]["CPUCount"];
/**
* Format: date-time
* @description Time when the template was created
*/
createdAt: string;
createdBy: components["schemas"]["TeamUser"] | null;
diskSizeMB: components["schemas"]["DiskSizeMB"];
envdVersion: components["schemas"]["EnvdVersion"];
/**
* Format: date-time
* @description Time when the template was last used
*/
lastSpawnedAt: string | null;
memoryMB: components["schemas"]["MemoryMB"];
/** @description Names of the template (namespace/alias format when namespaced) */
names: string[];
/** @description Whether the template is public or only accessible by the team */
public: boolean;
/**
* Format: int64
* @description Number of times the template was used
*/
spawnCount: number;
/** @description Identifier of the template */
templateID: string;
/**
* Format: date-time
* @description Time when the template was last updated
*/
updatedAt: string;
};
TemplateAliasResponse: {
/** @description Whether the template is public or only accessible by the team */
public: boolean;
/** @description Identifier of the template */
templateID: string;
};
TemplateBuild: {
/**
* Format: uuid
* @description Identifier of the build
*/
buildID: string;
cpuCount: components["schemas"]["CPUCount"];
/**
* Format: date-time
* @description Time when the build was created
*/
createdAt: string;
diskSizeMB?: components["schemas"]["DiskSizeMB"];
envdVersion?: components["schemas"]["EnvdVersion"];
/**
* Format: date-time
* @description Time when the build was finished
*/
finishedAt?: string;
memoryMB: components["schemas"]["MemoryMB"];
status: components["schemas"]["TemplateBuildStatus"];
/**
* Format: date-time
* @description Time when the build was last updated
*/
updatedAt: string;
};
TemplateBuildFileUpload: {
/** @description Whether the file is already present in the cache */
present: boolean;
/** @description Url where the file should be uploaded to */
url?: string;
};
TemplateBuildInfo: {
/** @description Identifier of the build */
buildID: string;
/**
* @description Build logs structured
* @default []
*/
logEntries: components["schemas"]["BuildLogEntry"][];
/**
* @description Build logs
* @default []
*/
logs: string[];
reason?: components["schemas"]["BuildStatusReason"];
status: components["schemas"]["TemplateBuildStatus"];
/** @description Identifier of the template */
templateID: string;
};
TemplateBuildLogsResponse: {
/**
* @description Build logs structured
* @default []
*/
logs: components["schemas"]["BuildLogEntry"][];
};
TemplateBuildRequest: {
/** @description Alias of the template */
alias?: string;
cpuCount?: components["schemas"]["CPUCount"];
/** @description Dockerfile for the template */
dockerfile: string;
memoryMB?: components["schemas"]["MemoryMB"];
/** @description Ready check command to execute in the template after the build */
readyCmd?: string;
/** @description Start command to execute in the template after the build */
startCmd?: string;
/** @description Identifier of the team */
teamID?: string;
};
TemplateBuildRequestV2: {
/** @description Alias of the template */
alias: string;
cpuCount?: components["schemas"]["CPUCount"];
memoryMB?: components["schemas"]["MemoryMB"];
/**
* @deprecated
* @description Identifier of the team
*/
teamID?: string;
};
TemplateBuildRequestV3: {
/**
* @deprecated
* @description Alias of the template. Deprecated, use name instead.
*/
alias?: string;
cpuCount?: components["schemas"]["CPUCount"];
memoryMB?: components["schemas"]["MemoryMB"];
/** @description Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array. */
name?: string;
/** @description Tags to assign to the template build */
tags?: string[];
/**
* @deprecated
* @description Identifier of the team
*/
teamID?: string;
};
TemplateBuildStartV2: {
/**
* @description Whether the whole build should be forced to run regardless of the cache
* @default false
*/
force?: boolean;
/** @description Image to use as a base for the template build */
fromImage?: string;
fromImageRegistry?: components["schemas"]["FromImageRegistry"];
/** @description Template to use as a base for the template build */
fromTemplate?: string;
/** @description Ready check command to execute in the template after the build */
readyCmd?: string;
/** @description Start command to execute in the template after the build */
startCmd?: string;
/**
* @description List of steps to execute in the template build
* @default []
*/
steps?: components["schemas"]["TemplateStep"][];
};
/**
* @description Status of the template build
* @enum {string}
*/
TemplateBuildStatus: "building" | "waiting" | "ready" | "error";
TemplateLegacy: {
/** @description Aliases of the template */
aliases: string[];
/**
* Format: int32
* @description Number of times the template was built
*/
buildCount: number;
/** @description Identifier of the last successful build for given template */
buildID: string;
cpuCount: components["schemas"]["CPUCount"];
/**
* Format: date-time
* @description Time when the template was created
*/
createdAt: string;
createdBy: components["schemas"]["TeamUser"] | null;
diskSizeMB: components["schemas"]["DiskSizeMB"];
envdVersion: components["schemas"]["EnvdVersion"];
/**
* Format: date-time
* @description Time when the template was last used
*/
lastSpawnedAt: string | null;
memoryMB: components["schemas"]["MemoryMB"];
/** @description Whether the template is public or only accessible by the team */
public: boolean;
/**
* Format: int64
* @description Number of times the template was used
*/
spawnCount: number;
/** @description Identifier of the template */
templateID: string;
/**
* Format: date-time
* @description Time when the template was last updated
*/
updatedAt: string;
};
TemplateRequestResponseV3: {
/**
* @deprecated
* @description Aliases of the template
*/
aliases: string[];
/** @description Identifier of the last successful build for given template */
buildID: string;
/** @description Names of the template */
names: string[];
/** @description Whether the template is public or only accessible by the team */
public: boolean;
/** @description Tags assigned to the template build */
tags: string[];
/** @description Identifier of the template */
templateID: string;
};
/** @description Step in the template build process */
TemplateStep: {
/**
* @description Arguments for the step
* @default []
*/
args?: string[];
/** @description Hash of the files used in the step */
filesHash?: string;
/**
* @description Whether the step should be forced to run regardless of the cache
* @default false
*/
force?: boolean;
/** @description Type of the step */
type: string;
};
TemplateTag: {
/**
* Format: uuid
* @description Identifier of the build associated with this tag
*/
buildID: string;
/**
* Format: date-time
* @description Time when the tag was assigned
*/
createdAt: string;
/** @description The tag name */
tag: string;
};
TemplateUpdateRequest: {
/** @description Whether the template is public or only accessible by the team */
public?: boolean;
};
TemplateUpdateResponse: {
/** @description Names of the template (namespace/alias format when namespaced) */
names: string[];
};
TemplateWithBuilds: {
/**
* @deprecated
* @description Aliases of the template
*/
aliases: string[];
/** @description List of builds for the template */
builds: components["schemas"]["TemplateBuild"][];
/**
* Format: date-time
* @description Time when the template was created
*/
createdAt: string;
/**
* Format: date-time
* @description Time when the template was last used
*/
lastSpawnedAt: string | null;
/** @description Names of the template (namespace/alias format when namespaced) */
names: string[];
/** @description Whether the template is public or only accessible by the team */
public: boolean;
/**
* Format: int64
* @description Number of times the template was used
*/
spawnCount: number;
/** @description Identifier of the template */
templateID: string;
/**
* Format: date-time
* @description Time when the template was last updated
*/
updatedAt: string;
};
UpdateTeamAPIKey: {
/** @description New name for the API key */
name: string;
};
Volume: {
/** @description Name of the volume */
name: string;
/** @description ID of the volume */
volumeID: string;
};
VolumeAndToken: {
/** @description Domain to use as the destination for volume content requests,
* replacing the default `api.<E2B_DOMAIN>`. Only returned when the
* team is connected to a custom (BYOC) cluster; absent otherwise, in
* which case the default domain is used.
* */
domain?: string;
/** @description Name of the volume */
name: string;
/** @description Auth token to use for interacting with volume content */
token: string;
/** @description ID of the volume */
volumeID: string;
};
VolumeToken: {
token: string;
};
};
responses: {
/** @description Bad request */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Authentication error */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Forbidden */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Not found */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Conflict */
409: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Gone */
410: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Too many requests */
429: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Server error */
500: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Backend error */
502: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Service unavailable */
503: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
/** @description Backend timeout */
504: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
parameters: {
accessTokenID: string;
apiKeyID: string;
buildID: string;
nodeID: string;
/** @description Maximum number of items to return per page */
paginationLimit: number;
/** @description Cursor to start the list from */
paginationNextToken: string;
sandboxID: string;
secretID: string;
snapshotID: string;
tag: string;
teamID: string;
templateID: string;
volumeID: string;
};
requestBodies: never;
headers: {
/** @description Cursor to fetch the next page of results, if more exist */
XNextToken: string;
/** @description Number of running sandboxes matching the filters, before pagination is applied. Only present when running sandboxes were requested.
* */
XTotalRunning: number;
};
pathItems: never;
}
//#endregion
//#region src/logs.d.ts
/**
* Logger interface compatible with {@link console} used for logging Sandbox messages.
*/
interface Logger {
/**
* Debug level logging method.
*/
debug?: (...args: any[]) => void;
/**
* Info level logging method.
*/
info?: (...args: any[]) => void;
/**
* Warn level logging method.
*/
warn?: (...args: any[]) => void;
/**
* Error level logging method.
*/
error?: (...args: any[]) => void;
}
//#endregion
//#region src/connectionConfig.d.ts
/**
* Connection options for requests to the API.
*/
interface ConnectionOpts {
/**
* E2B API key to use for authentication.
*
* @default E2B_API_KEY // environment variable
*/
apiKey?: string;
/**
* Whether to validate the format of the E2B API key on the client side.
* Disable this when your deployment issues API keys that don't match the
* default `e2b_` format.
*
* @default E2B_VALIDATE_API_KEY // environment variable or `true`
*/
validateApiKey?: boolean;
/**
* Domain to use for the API.
*
* @default E2B_DOMAIN // environment variable or `e2b.app`
*/
domain?: string;
/**
* API Url to use for the API.
* @internal
* @default E2B_API_URL // environment variable or `https://api.${domain}`
*/
apiUrl?: string;
/**
* Sandbox Url to use for the API.
* @internal
* @default E2B_SANDBOX_URL // environment variable, `https://sandbox.${domain}`
*/
sandboxUrl?: string;
/**
* If true the SDK starts in the debug mode and connects to the local envd API server.
* @internal
* @default E2B_DEBUG // environment variable or `false`
*/
debug?: boolean;
/**
* Timeout for requests to the API in **milliseconds**.
*
* @default 60_000 // 60 seconds
*/
requestTimeoutMs?: number;
/**
* Logger to use for logging messages. It can accept any object that implements `Logger` interface—for example, {@link console}.
*/
logger?: Logger;
/**
* Additional headers to send with the request.
*
* @deprecated Use `apiHeaders` instead.
*/
headers?: Record<string, string>;
/**
* Proxy URL to use for requests. In case of a sandbox it applies to all
* requests made to the returned sandbox.
*
* @example 'http://user:pass@127.0.0.1:8080'
*/
proxy?: string;
/**
* Additional headers to send with E2B API requests.
*/
apiHeaders?: Record<string, string>;
/**
* An optional `AbortSignal` that can be used to cancel the in-flight request.
* When the signal is aborted, the underlying `fetch` is aborted and the
* returned promise rejects with an `AbortError`.
*/
signal?: AbortSignal;
}
/**
* Options accepted by `ConnectionConfig`.
*
* @deprecated Use `ConnectionOpts` instead.
*/
type ConnectionConfigOpts = ConnectionOpts;
/**
* Configuration for connecting to the API.
*/
declare class ConnectionConfig {
static envdPort: number;
private static integration?;
private static readonly sdkUserAgentPrefix;
private static buildUserAgent;
/**
* Set the `User-Agent` on `headers`: an explicitly provided value always
* wins; otherwise the SDK-built one, tagged with the current integration.
*
* An SDK-built value carried over from an earlier config (configs are
* rebuilt via `new ConnectionConfig({ ...config })`) is recognized by its
* prefix and rebuilt, so it stays in sync with the current integration.
*/
private static applyUserAgent;
/**
* Identify traffic from an integration wrapping the E2B SDK by appending
* `integration` (e.g. `'e2b-code-interpreter/0.1.0'`) to the `User-Agent`
* header of every request.
*
* Call once at startup, before any `ConnectionConfig` is constructed —
* configs read the value at construction time. Pass `undefined` to clear.
*
* @internal
* @hidden
* @hide
*/
static setIntegration(integration: string | undefined): void;
readonly debug: boolean;
readonly domain: string;
readonly apiUrl: string;
readonly sandboxUrl?: string;
readonly logger?: Logger;
readonly requestTimeoutMs: number;
readonly apiKey?: string;
readonly validateApiKey: boolean;
readonly headers?: Record<string, string>;
readonly proxy?: string;
constructor(opts?: ConnectionOpts);
/**
* Merge connection options bound to a class (e.g. by an `E2B` client) with
* the per-call options. Per-call options win, then the bound options, then
* the environment variables resolved by the `ConnectionConfig` constructor.
*
* Explicitly `undefined` per-call values are dropped so they fall back to the
* bound options instead of clearing them.
*
* @internal
* @hidden
* @hide
*/
static mergeOpts<T extends ConnectionOpts>(boundOpts: ConnectionOpts | undefined, opts?: T): T | undefined;
private static get domain();
private static get apiUrl();
private static get sandboxUrl();
private static get debug();
private static get apiKey();
private static get validateApiKey();
getSignal(requestTimeoutMs?: number, signal?: AbortSignal): AbortSignal | undefined;
getSandboxUrl(sandboxId: string, opts: {
sandboxDomain: string;
envdPort: number;
}): string;
getSandboxDirectUrl(sandboxId: string, opts: {
sandboxDomain: string;
envdPort: number;
}): string;
getHost(sandboxId: string, port: number, sandboxDomain: string): string;
}
/**
* Base class for the resource classes (`Sandbox`, `Volume`, `Template`,
* `Secret`) whose static methods build a `ConnectionConfig` from per-call
* options. An {@link E2B} client exposes subclasses of these with its own
* options bound, and every static method resolves them through
* {@link ClientFactory.resolveOpts}.
*
* @internal
* @hidden
* @hide
*/
declare class ClientFactory {
/**
* Connection options bound to this class by an {@link E2B} client.
*
* Empty on the base classes, so the env-configured default path is unchanged.
*
* @internal
* @hidden
* @hide
*/
protected static readonly boundOpts?: Omit<ConnectionOpts, 'signal'>;
/**
* Merge the connection options bound to this class with the per-call options,
* with the per-call options taking precedence.
*
* @internal
* @hidden
* @hide
*/
protected static resolveOpts<T extends ConnectionOpts>(opts?: T): T | undefined;
}
type Username = string;
//#endregion
//#region src/api/index.d.ts
/**
* Client for interacting with the E2B API.
*/
declare class ApiClient {
readonly api: ReturnType<typeof createClient<paths>>;
constructor(config: ConnectionConfig, opts?: {
requireApiKey?: boolean;
});
}
//#endregion
//#region src/errors.d.ts
/**
* Base class for all sandbox errors.
*
* Thrown when general sandbox errors occur.
*/
declare class SandboxError extends Error {
constructor(message?: string);
}
/**
* Thrown when a timeout error occurs.
*
* The [unavailable] error type is caused by sandbox timeout.
*
* The [canceled] error type is caused by exceeding request timeout.
*
* The [deadline_exceeded] error type is caused by exceeding the timeout for command execution, watch, etc.
*
* The [unknown] error type is sometimes caused by the sandbox timeout when the request is not processed correctly.
*/
declare class TimeoutError extends SandboxError {
constructor(message: string);
}
/**
* Thrown when an invalid argument is provided.
*/
declare class InvalidArgumentError extends SandboxError {
constructor(message: string, stackTrace?: string);
}
/**
* Thrown when there is not enough disk space.
*/
declare class NotEnoughSpaceError extends SandboxError {
constructor(message: string);
}
/**
* Thrown when a resource is not found.
*
* @deprecated Use {@link FileNotFoundError} or {@link SandboxNotFoundError} instead. This class will be removed in the next major version.
*/
declare class NotFoundError extends SandboxError {
constructor(message: string);
}
/**
* Thrown when a file or directory is not found inside a sandbox.
*/
declare class FileNotFoundError extends NotFoundError {
constructor(message: string);
}
/**
* Thrown when a sandbox is not found (e.g. it doesn't exist or is no longer running).
*/
declare class SandboxNotFoundError extends NotFoundError {
constructor(message: string);
}
/**
* Thrown when authentication fails.
*/
declare class AuthenticationError extends Error {
constructor(message: string);
}
/**
* Thrown when git authentication fails.
*/
declare class GitAuthError extends AuthenticationError {
constructor(message: string);
}
/**
* Thrown when git upstream tracking is missing.
*/
declare class GitUpstreamError extends SandboxError {
constructor(message: string);
}
/**
* Thrown when the template uses old envd version. It isn't compatible with the new SDK.
*/
declare class TemplateError extends SandboxError {
constructor(message: string, stackTrace?: string);
}
/**
* Thrown when the API rate limit is exceeded.
*/
declare class RateLimitError extends SandboxError {
constructor(message: string);
}
/**
* Thrown when the build fails.
*/
declare class BuildError extends Error {
constructor(message: string, stackTrace?: string);
}
/**
* Thrown when the file upload fails.
*/
declare class FileUploadError extends BuildError {
constructor(message: string, stackTrace?: string);
}
/**
* Base class for all volume errors.
*
* Thrown when general volume errors occur.
*/
declare class VolumeError extends Error {
constructor(message: string);
}
/**
* Thrown when a volume is not found.
*/
declare class VolumeNotFoundError extends VolumeError {
constructor(message: string);
}
/**
* Thrown when a file or directory is not found inside a volume.
*/
declare class VolumePathNotFoundError extends VolumeError {
constructor(message: string);
}
/**
* Base class for all secret errors.
*
* Thrown when general secret errors occur.
*/
declare class SecretError extends Error {
constructor(message: string);
}
/**
* Thrown when a secret is not found.
*/
declare class SecretNotFoundError extends SecretError {
constructor(message: string);
}
//#endregion
//#region src/sandbox/signature.d.ts
/**
* Get the URL signature for the specified path, operation and user.
*
* @param path Path to the file in the sandbox.
*
* @param operation File system operation. Can be either `read` or `write`.
*
* @param user Sandbox user.
*
* @param expirationInSeconds Optional signature expiration time in seconds.
*/
interface SignatureOpts {
path: string;
operation: 'read' | 'write';
user: string | undefined;
expirationInSeconds?: number;
envdAccessToken?: string;
}
declare function getSignature({ path, operation, user, expirationInSeconds, envdAccessToken }: SignatureOpts): Promise<{
signature: string;
expiration: number | null;
}>;
//#endregion
//#region src/envd/schema.gen.d.ts
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
interface paths$1 {
"/envs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Environment variables */
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Environment variables */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$2["schemas"]["EnvVars"];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/files": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Download a file */
get: {
parameters: {
query?: {
/** @description Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). */
path?: components$2["parameters"]["FilePath"];
/** @description Signature used for file access permission verification. */
signature?: components$2["parameters"]["Signature"];
/** @description Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. */
signature_expiration?: components$2["parameters"]["SignatureExpiration"];
/** @description User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. */
username?: components$2["parameters"]["User"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
200: components$2["responses"]["DownloadSuccess"];
400: components$2["responses"]["InvalidPath"];
401: components$2["responses"]["InvalidUser"];
404: components$2["responses"]["FileNotFound"];
406: components$2["responses"]["NotAcceptable"];
500: components$2["responses"]["InternalServerError"];
};
};
put?: never;
/**
* Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
* @description Any request header of the form `X-Metadata-<key>: <value>` is persisted
* as a user-defined extended attribute on the uploaded file. The
* `X-Metadata-` prefix is stripped and the remaining header name is
* lowercased to form the metadata key; the resulting map is returned on
* `EntryInfo` lookups (e.g. `Stat`, `ListDir`).
*
* Each upload replaces the file's metadata with the keys provided in
* that request: keys previously stored but absent from the new request
* are removed, and an upload that sends no `X-Metadata-*` header clears
* all existing metadata.
*
* Both keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`)
* and are rejected with HTTP 400 otherwise. Each key is capped at 246
* bytes (the Linux VFS xattr-name limit minus the namespace prefix), and
* the combined size of all metadata on a file (keys plus values, with the
* namespace prefix counted per key) is capped at 4096 bytes to stay within
* the filesystem's per-inode xattr budget. Multiple files in a single
* multipart upload receive the same metadata. If the same
* `X-Metadata-<key>` header is sent more than once, only the first
* value is used.
*
*/
post: {
parameters: {
query?: {
/** @description Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). */
path?: components$2["parameters"]["FilePath"];
/** @description Signature used for file access permission verification. */
signature?: components$2["parameters"]["Signature"];
/** @description Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. */
signature_expiration?: components$2["parameters"]["SignatureExpiration"];
/** @description User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. */
username?: components$2["parameters"]["User"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody: components$2["requestBodies"]["File"];
responses: {
200: components$2["responses"]["UploadSuccess"];
400: components$2["responses"]["InvalidPath"];
401: components$2["responses"]["InvalidUser"];
500: components$2["responses"]["InternalServerError"];
507: components$2["responses"]["NotEnoughDiskSpace"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/files/compose": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/** Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition. */
post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components$2["schemas"]["ComposeRequest"];
};
};
responses: {
/** @description Files composed successfully */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$2["schemas"]["EntryInfo"];
};
};
400: components$2["responses"]["InvalidPath"];
401: components$2["responses"]["InvalidUser"];
404: components$2["responses"]["FileNotFound"];
500: components$2["responses"]["InternalServerError"];
507: components$2["responses"]["NotEnoughDiskSpace"];
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/health": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Check the health of the service */
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The service is healthy */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/metrics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Service stats */
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The resource usage metrics of the service */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$2["schemas"]["Metrics"];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
interface components$2 {
schemas: {
ComposeRequest: {
/** @description Destination file path for the composed file */
destination: string;
/** @description Ordered list of source file paths to concatenate */
source_paths: string[];
/** @description User for setting ownership and resolving relative paths */
username?: string;
};
EntryInfo: {
/** @description User-defined metadata stored as extended attributes on the file. */
metadata?: {
[key: string]: string;
};
/** @description Name of the file */
name: string;
/** @description Path to the file */
path: string;
/**
* @description Type of the file
* @enum {string}
*/
type: "file";
};
/** @description Environment variables to set */
EnvVars: {
[key: string]: string;
};
Error: {
/** @description Error code */
code: number;
/** @description Error message */
message: string;
};
/** @description Resource usage metrics */
Metrics: {
/** @description Number of CPU cores */
cpu_count?: number;
/**
* Format: float
* @description CPU usage percentage
*/
cpu_used_pct?: number;
/** @description Total disk space in bytes */
disk_total?: number;
/** @description Used disk space in bytes */
disk_used?: number;
/** @description Cached memory (page cache) in bytes */
mem_cache?: number;
/** @description Total virtual memory in bytes */
mem_total?: number;
/** @description Total virtual memory in MiB */
mem_total_mib?: number;
/** @description Used virtual memory in bytes */
mem_used?: number;
/** @description Used virtual memory in MiB */
mem_used_mib?: number;
/**
* Format: int64
* @description Unix timestamp in UTC for current sandbox time
*/
ts?: number;
};
};
responses: {
/** @description Entire file downloaded successfully. */
DownloadSuccess: {
headers: {
[name: string]: unknown;
};
content: {
"application/octet-stream": string;
};
};
/** @description File not found */
FileNotFound: {
headers: {
[name: string]: unknown;
};
content: {
/** @example {
* "message": "path '/home/user/missing.txt' does not exist",
* "code": 404
* } */
"application/json": components$2["schemas"]["Error"];
};
};
/** @description Internal server error */
InternalServerError: {
headers: {
[name: string]: unknown;
};
content: {
/** @example {
* "message": "error opening file '/home/user/file.txt': permission denied",
* "code": 500
* } */
"application/json": components$2["schemas"]["Error"];
};
};
/** @description Invalid path */
InvalidPath: {
headers: {
[name: string]: unknown;
};
content: {
/** @example {
* "message": "path '/home/user/docs' is a directory",
* "code": 400
* } */
"application/json": components$2["schemas"]["Error"];
};
};
/** @description Invalid user */
InvalidUser: {
headers: {
[name: string]: unknown;
};
content: {
/** @example {
* "message": "error looking up user 'nonexistent': user: unknown user nonexistent",
* "code": 401
* } */
"application/json": components$2["schemas"]["Error"];
};
};
/** @description Requested encoding is not supported */
NotAcceptable: {
headers: {
[name: string]: unknown;
};
content: {
/** @example {
* "message": "no acceptable encoding found, supported: [identity, gzip]",
* "code": 406
* } */
"application/json": components$2["schemas"]["Error"];
};
};
/** @description Not enough disk space */
NotEnoughDiskSpace: {
headers: {
[name: string]: unknown;
};
content: {
/** @example {
* "message": "not enough disk space available",
* "code": 507
* } */
"application/json": components$2["schemas"]["Error"];
};
};
/** @description The file was uploaded successfully. */
UploadSuccess: {
headers: {
[name: string]: unknown;
};
content: {
/** @example [
* {
* "path": "/home/user/hello.txt",
* "name": "hello.txt",
* "type": "file"
* }
* ] */
"application/json": components$2["schemas"]["EntryInfo"][];
};
};
};
parameters: {
/** @description Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). */
FilePath: string;
/** @description Signature used for file access permission verification. */
Signature: string;
/** @description Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. */
SignatureExpiration: number;
/** @description User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. */
User: string;
};
requestBodies: {
File: {
content: {
"application/octet-stream": string;
"multipart/form-data": {
/** Format: binary */
file?: string;
};
};
};
};
headers: never;
pathItems: never;
}
//#endregion
//#region src/envd/process/process_pb.d.ts
/**
* @generated from message process.PTY
*/
type PTY = Message<'process.PTY'> & {
/**
* @generated from field: process.PTY.Size size = 1;
*/
size?: PTY_Size;
};
/**
* @generated from message process.PTY.Size
*/
type PTY_Size = Message<'process.PTY.Size'> & {
/**
* @generated from field: uint32 cols = 1;
*/
cols: number;
/**
* @generated from field: uint32 rows = 2;
*/
rows: number;
};
/**
* @generated from message process.ProcessConfig
*/
type ProcessConfig = Message<'process.ProcessConfig'> & {
/**
* @generated from field: string cmd = 1;
*/
cmd: string;
/**
* @generated from field: repeated string args = 2;
*/
args: string[];
/**
* @generated from field: map<string, string> envs = 3;
*/
envs: {
[key: string]: string;
};
/**
* @generated from field: optional string cwd = 4;
*/
cwd?: string;
};
/**
* @generated from message process.ListRequest
*/
type ListRequest = Message<'process.ListRequest'> & {};
/**
* Describes the message process.ListRequest.
* Use `create(ListRequestSchema)` to create a new message.
*/
declare const ListRequestSchema: GenMessage<ListRequest>;
/**
* @generated from message process.ProcessInfo
*/
type ProcessInfo$1 = Message<'process.ProcessInfo'> & {
/**
* @generated from field: process.ProcessConfig config = 1;
*/
config?: ProcessConfig;
/**
* @generated from field: uint32 pid = 2;
*/
pid: number;
/**
* @generated from field: optional string tag = 3;
*/
tag?: string;
};
/**
* @generated from message process.ListResponse
*/
type ListResponse = Message<'process.ListResponse'> & {
/**
* @generated from field: repeated process.ProcessInfo processes = 1;
*/
processes: ProcessInfo$1[];
};
/**
* Describes the message process.ListResponse.
* Use `create(ListResponseSchema)` to create a new message.
*/
declare const ListResponseSchema: GenMessage<ListResponse>;
/**
* @generated from message process.StartRequest
*/
type StartRequest = Message<'process.StartRequest'> & {
/**
* @generated from field: process.ProcessConfig process = 1;
*/
process?: ProcessConfig;
/**
* @generated from field: optional process.PTY pty = 2;
*/
pty?: PTY;
/**
* @generated from field: optional string tag = 3;
*/
tag?: string;
/**
* This is optional for backwards compatibility.
* We default to true. New SDK versions will set this to false by default.
*
* @generated from field: optional bool stdin = 4;
*/
stdin?: boolean;
};
/**
* Describes the message process.StartRequest.
* Use `create(StartRequestSchema)` to create a new message.
*/
declare const StartRequestSchema: GenMessage<StartRequest>;
/**
* @generated from message process.UpdateRequest
*/
type UpdateRequest = Message<'process.UpdateRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
/**
* @generated from field: optional process.PTY pty = 2;
*/
pty?: PTY;
};
/**
* Describes the message process.UpdateRequest.
* Use `create(UpdateRequestSchema)` to create a new message.
*/
declare const UpdateRequestSchema: GenMessage<UpdateRequest>;
/**
* @generated from message process.UpdateResponse
*/
type UpdateResponse = Message<'process.UpdateResponse'> & {};
/**
* Describes the message process.UpdateResponse.
* Use `create(UpdateResponseSchema)` to create a new message.
*/
declare const UpdateResponseSchema: GenMessage<UpdateResponse>;
/**
* @generated from message process.ProcessEvent
*/
type ProcessEvent = Message<'process.ProcessEvent'> & {
/**
* @generated from oneof process.ProcessEvent.event
*/
event: {
/**
* @generated from field: process.ProcessEvent.StartEvent start = 1;
*/
value: ProcessEvent_StartEvent;
case: 'start';
} | {
/**
* @generated from field: process.ProcessEvent.DataEvent data = 2;
*/
value: ProcessEvent_DataEvent;
case: 'data';
} | {
/**
* @generated from field: process.ProcessEvent.EndEvent end = 3;
*/
value: ProcessEvent_EndEvent;
case: 'end';
} | {
/**
* @generated from field: process.ProcessEvent.KeepAlive keepalive = 4;
*/
value: ProcessEvent_KeepAlive;
case: 'keepalive';
} | {
case: undefined;
value?: undefined;
};
};
/**
* @generated from message process.ProcessEvent.StartEvent
*/
type ProcessEvent_StartEvent = Message<'process.ProcessEvent.StartEvent'> & {
/**
* @generated from field: uint32 pid = 1;
*/
pid: number;
};
/**
* @generated from message process.ProcessEvent.DataEvent
*/
type ProcessEvent_DataEvent = Message<'process.ProcessEvent.DataEvent'> & {
/**
* @generated from oneof process.ProcessEvent.DataEvent.output
*/
output: {
/**
* @generated from field: bytes stdout = 1;
*/
value: Uint8Array;
case: 'stdout';
} | {
/**
* @generated from field: bytes stderr = 2;
*/
value: Uint8Array;
case: 'stderr';
} | {
/**
* @generated from field: bytes pty = 3;
*/
value: Uint8Array;
case: 'pty';
} | {
case: undefined;
value?: undefined;
};
};
/**
* @generated from message process.ProcessEvent.EndEvent
*/
type ProcessEvent_EndEvent = Message<'process.ProcessEvent.EndEvent'> & {
/**
* @generated from field: sint32 exit_code = 1;
*/
exitCode: number;
/**
* @generated from field: bool exited = 2;
*/
exited: boolean;
/**
* @generated from field: string status = 3;
*/
status: string;
/**
* @generated from field: optional string error = 4;
*/
error?: string;
};
/**
* @generated from message process.ProcessEvent.KeepAlive
*/
type ProcessEvent_KeepAlive = Message<'process.ProcessEvent.KeepAlive'> & {};
/**
* @generated from message process.StartResponse
*/
type StartResponse = Message<'process.StartResponse'> & {
/**
* @generated from field: process.ProcessEvent event = 1;
*/
event?: ProcessEvent;
};
/**
* Describes the message process.StartResponse.
* Use `create(StartResponseSchema)` to create a new message.
*/
declare const StartResponseSchema: GenMessage<StartResponse>;
/**
* @generated from message process.ConnectResponse
*/
type ConnectResponse = Message<'process.ConnectResponse'> & {
/**
* @generated from field: process.ProcessEvent event = 1;
*/
event?: ProcessEvent;
};
/**
* Describes the message process.ConnectResponse.
* Use `create(ConnectResponseSchema)` to create a new message.
*/
declare const ConnectResponseSchema: GenMessage<ConnectResponse>;
/**
* @generated from message process.SendInputRequest
*/
type SendInputRequest = Message<'process.SendInputRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
/**
* @generated from field: process.ProcessInput input = 2;
*/
input?: ProcessInput;
};
/**
* Describes the message process.SendInputRequest.
* Use `create(SendInputRequestSchema)` to create a new message.
*/
declare const SendInputRequestSchema: GenMessage<SendInputRequest>;
/**
* @generated from message process.SendInputResponse
*/
type SendInputResponse = Message<'process.SendInputResponse'> & {};
/**
* Describes the message process.SendInputResponse.
* Use `create(SendInputResponseSchema)` to create a new message.
*/
declare const SendInputResponseSchema: GenMessage<SendInputResponse>;
/**
* @generated from message process.ProcessInput
*/
type ProcessInput = Message<'process.ProcessInput'> & {
/**
* @generated from oneof process.ProcessInput.input
*/
input: {
/**
* @generated from field: bytes stdin = 1;
*/
value: Uint8Array;
case: 'stdin';
} | {
/**
* @generated from field: bytes pty = 2;
*/
value: Uint8Array;
case: 'pty';
} | {
case: undefined;
value?: undefined;
};
};
/**
* @generated from message process.StreamInputRequest
*/
type StreamInputRequest = Message<'process.StreamInputRequest'> & {
/**
* @generated from oneof process.StreamInputRequest.event
*/
event: {
/**
* @generated from field: process.StreamInputRequest.StartEvent start = 1;
*/
value: StreamInputRequest_StartEvent;
case: 'start';
} | {
/**
* @generated from field: process.StreamInputRequest.DataEvent data = 2;
*/
value: StreamInputRequest_DataEvent;
case: 'data';
} | {
/**
* @generated from field: process.StreamInputRequest.KeepAlive keepalive = 3;
*/
value: StreamInputRequest_KeepAlive;
case: 'keepalive';
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message process.StreamInputRequest.
* Use `create(StreamInputRequestSchema)` to create a new message.
*/
declare const StreamInputRequestSchema: GenMessage<StreamInputRequest>;
/**
* @generated from message process.StreamInputRequest.StartEvent
*/
type StreamInputRequest_StartEvent = Message<'process.StreamInputRequest.StartEvent'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
};
/**
* @generated from message process.StreamInputRequest.DataEvent
*/
type StreamInputRequest_DataEvent = Message<'process.StreamInputRequest.DataEvent'> & {
/**
* @generated from field: process.ProcessInput input = 2;
*/
input?: ProcessInput;
};
/**
* @generated from message process.StreamInputRequest.KeepAlive
*/
type StreamInputRequest_KeepAlive = Message<'process.StreamInputRequest.KeepAlive'> & {};
/**
* @generated from message process.StreamInputResponse
*/
type StreamInputResponse = Message<'process.StreamInputResponse'> & {};
/**
* Describes the message process.StreamInputResponse.
* Use `create(StreamInputResponseSchema)` to create a new message.
*/
declare const StreamInputResponseSchema: GenMessage<StreamInputResponse>;
/**
* @generated from message process.SendSignalRequest
*/
type SendSignalRequest = Message<'process.SendSignalRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
/**
* @generated from field: process.Signal signal = 2;
*/
signal: Signal;
};
/**
* Describes the message process.SendSignalRequest.
* Use `create(SendSignalRequestSchema)` to create a new message.
*/
declare const SendSignalRequestSchema: GenMessage<SendSignalRequest>;
/**
* @generated from message process.SendSignalResponse
*/
type SendSignalResponse = Message<'process.SendSignalResponse'> & {};
/**
* Describes the message process.SendSignalResponse.
* Use `create(SendSignalResponseSchema)` to create a new message.
*/
declare const SendSignalResponseSchema: GenMessage<SendSignalResponse>;
/**
* @generated from message process.CloseStdinRequest
*/
type CloseStdinRequest = Message<'process.CloseStdinRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
};
/**
* Describes the message process.CloseStdinRequest.
* Use `create(CloseStdinRequestSchema)` to create a new message.
*/
declare const CloseStdinRequestSchema: GenMessage<CloseStdinRequest>;
/**
* @generated from message process.CloseStdinResponse
*/
type CloseStdinResponse = Message<'process.CloseStdinResponse'> & {};
/**
* Describes the message process.CloseStdinResponse.
* Use `create(CloseStdinResponseSchema)` to create a new message.
*/
declare const CloseStdinResponseSchema: GenMessage<CloseStdinResponse>;
/**
* @generated from message process.ConnectRequest
*/
type ConnectRequest = Message<'process.ConnectRequest'> & {
/**
* @generated from field: process.ProcessSelector process = 1;
*/
process?: ProcessSelector;
};
/**
* Describes the message process.ConnectRequest.
* Use `create(ConnectRequestSchema)` to create a new message.
*/
declare const ConnectRequestSchema: GenMessage<ConnectRequest>;
/**
* @generated from message process.ProcessSelector
*/
type ProcessSelector = Message<'process.ProcessSelector'> & {
/**
* @generated from oneof process.ProcessSelector.selector
*/
selector: {
/**
* @generated from field: uint32 pid = 1;
*/
value: number;
case: 'pid';
} | {
/**
* @generated from field: string tag = 2;
*/
value: string;
case: 'tag';
} | {
case: undefined;
value?: undefined;
};
};
/**
* @generated from enum process.Signal
*/
declare enum Signal {
/**
* @generated from enum value: SIGNAL_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: SIGNAL_SIGTERM = 15;
*/
SIGTERM = 15,
/**
* @generated from enum value: SIGNAL_SIGKILL = 9;
*/
SIGKILL = 9
}
/**
* @generated from service process.Process
*/
declare const Process: GenService<{
/**
* @generated from rpc process.Process.List
*/
list: {
methodKind: 'unary';
input: typeof ListRequestSchema;
output: typeof ListResponseSchema;
};
/**
* @generated from rpc process.Process.Connect
*/
connect: {
methodKind: 'server_streaming';
input: typeof ConnectRequestSchema;
output: typeof ConnectResponseSchema;
};
/**
* @generated from rpc process.Process.Start
*/
start: {
methodKind: 'server_streaming';
input: typeof StartRequestSchema;
output: typeof StartResponseSchema;
};
/**
* @generated from rpc process.Process.Update
*/
update: {
methodKind: 'unary';
input: typeof UpdateRequestSchema;
output: typeof UpdateResponseSchema;
};
/**
* Client input stream ensures ordering of messages
*
* @generated from rpc process.Process.StreamInput
*/
streamInput: {
methodKind: 'client_streaming';
input: typeof StreamInputRequestSchema;
output: typeof StreamInputResponseSchema;
};
/**
* @generated from rpc process.Process.SendInput
*/
sendInput: {
methodKind: 'unary';
input: typeof SendInputRequestSchema;
output: typeof SendInputResponseSchema;
};
/**
* @generated from rpc process.Process.SendSignal
*/
sendSignal: {
methodKind: 'unary';
input: typeof SendSignalRequestSchema;
output: typeof SendSignalResponseSchema;
};
/**
* Close stdin to signal EOF to the process.
* Only works for non-PTY processes. For PTY, send Ctrl+D (0x04) instead.
*
* @generated from rpc process.Process.CloseStdin
*/
closeStdin: {
methodKind: 'unary';
input: typeof CloseStdinRequestSchema;
output: typeof CloseStdinResponseSchema;
};
}>;
//#endregion
//#region src/envd/filesystem/filesystem_pb.d.ts
/**
* @generated from message filesystem.EntryInfo
*/
type EntryInfo$1 = Message<'filesystem.EntryInfo'> & {
/**
* @generated from field: string name = 1;
*/
name: string;
/**
* @generated from field: filesystem.FileType type = 2;
*/
type: FileType$1;
/**
* @generated from field: string path = 3;
*/
path: string;
/**
* @generated from field: int64 size = 4;
*/
size: bigint;
/**
* @generated from field: uint32 mode = 5;
*/
mode: number;
/**
* @generated from field: string permissions = 6;
*/
permissions: string;
/**
* @generated from field: string owner = 7;
*/
owner: string;
/**
* @generated from field: string group = 8;
*/
group: string;
/**
* @generated from field: google.protobuf.Timestamp modified_time = 9;
*/
modifiedTime?: Timestamp;
/**
* If the entry is a symlink, this field contains the target of the symlink.
*
* @generated from field: optional string symlink_target = 10;
*/
symlinkTarget?: string;
/**
* User-defined metadata stored as extended attributes (xattrs) on the file.
* Keys live under the `user.e2b.` xattr namespace; the prefix is stripped here.
* Plain `user.*` xattrs written by other tooling are not reflected.
*
* @generated from field: map<string, string> metadata = 11;
*/
metadata: {
[key: string]: string;
};
};
/**
* @generated from message filesystem.FilesystemEvent
*/
type FilesystemEvent$1 = Message<'filesystem.FilesystemEvent'> & {
/**
* @generated from field: string name = 1;
*/
name: string;
/**
* @generated from field: filesystem.EventType type = 2;
*/
type: EventType;
/**
* Info of the entry that triggered the event. Only populated when include_entry
* was requested and the entry could be stat-ed (e.g. not set for remove/rename-away
* events, where the entry no longer exists at this path).
*
* @generated from field: optional filesystem.EntryInfo entry = 3;
*/
entry?: EntryInfo$1;
};
/**
* @generated from message filesystem.WatchDirResponse
*/
type WatchDirResponse = Message<'filesystem.WatchDirResponse'> & {
/**
* @generated from oneof filesystem.WatchDirResponse.event
*/
event: {
/**
* @generated from field: filesystem.WatchDirResponse.StartEvent start = 1;
*/
value: WatchDirResponse_StartEvent;
case: 'start';
} | {
/**
* @generated from field: filesystem.FilesystemEvent filesystem = 2;
*/
value: FilesystemEvent$1;
case: 'filesystem';
} | {
/**
* @generated from field: filesystem.WatchDirResponse.KeepAlive keepalive = 3;
*/
value: WatchDirResponse_KeepAlive;
case: 'keepalive';
} | {
case: undefined;
value?: undefined;
};
};
/**
* @generated from message filesystem.WatchDirResponse.StartEvent
*/
type WatchDirResponse_StartEvent = Message<'filesystem.WatchDirResponse.StartEvent'> & {};
/**
* @generated from message filesystem.WatchDirResponse.KeepAlive
*/
type WatchDirResponse_KeepAlive = Message<'filesystem.WatchDirResponse.KeepAlive'> & {};
/**
* @generated from enum filesystem.FileType
*/
declare enum FileType$1 {
/**
* @generated from enum value: FILE_TYPE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: FILE_TYPE_FILE = 1;
*/
FILE = 1,
/**
* @generated from enum value: FILE_TYPE_DIRECTORY = 2;
*/
DIRECTORY = 2,
/**
* @generated from enum value: FILE_TYPE_SYMLINK = 3;
*/
SYMLINK = 3
}
/**
* @generated from enum filesystem.EventType
*/
declare enum EventType {
/**
* @generated from enum value: EVENT_TYPE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: EVENT_TYPE_CREATE = 1;
*/
CREATE = 1,
/**
* @generated from enum value: EVENT_TYPE_WRITE = 2;
*/
WRITE = 2,
/**
* @generated from enum value: EVENT_TYPE_REMOVE = 3;
*/
REMOVE = 3,
/**
* @generated from enum value: EVENT_TYPE_RENAME = 4;
*/
RENAME = 4,
/**
* @generated from enum value: EVENT_TYPE_CHMOD = 5;
*/
CHMOD = 5
}
//#endregion
//#region src/envd/rpc.d.ts
/**
* Result of a sandbox health probe: `true` if the sandbox is running, `false` if it is not,
* `undefined` if its state could not be determined.
*/
type SandboxHealthCheck = () => Promise<boolean | undefined>;
//#endregion
//#region src/envd/api.d.ts
declare class EnvdApiClient {
readonly api: ReturnType<typeof createClient<paths$1>>;
readonly version: string;
constructor(config: Pick<ConnectionConfig, 'apiUrl' | 'logger'> & {
/**
* Sandbox-scoped envd access token, sent as the `X-Access-Token` header.
*/
envdAccessToken?: string;
fetch?: (request: Request) => ReturnType<typeof fetch>;
headers?: Record<string, string>;
}, metadata: {
version: string;
});
}
//#endregion
//#region src/sandbox/filesystem/watchHandle.d.ts
/**
* Sandbox filesystem event types.
*/
declare enum FilesystemEventType {
/**
* Filesystem object permissions were changed.
*/
CHMOD = "chmod",
/**
* Filesystem object was created.
*/
CREATE = "create",
/**
* Filesystem object was removed.
*/
REMOVE = "remove",
/**
* Filesystem object was renamed.
*/
RENAME = "rename",
/**
* Filesystem object was written to.
*/
WRITE = "write"
}
/**
* Information about a filesystem event.
*/
interface FilesystemEvent {
/**
* Relative path to the filesystem object.
*/
name: string;
/**
* Filesystem operation event type.
*/
type: FilesystemEventType;
/**
* Information about the entry that triggered the event.
*
* Only populated when the watch was started with `includeEntry: true` and the
* sandbox's envd version supports it. It may be `undefined` for events where the
* entry no longer exists at the path (e.g. remove or rename-away events).
*/
entry?: EntryInfo;
}
/**
* Handle for watching a directory in the sandbox filesystem.
*
* Use {@link WatchHandle.stop} to stop watching the directory.
*/
declare class WatchHandle {
private readonly handleStop;
private readonly events;
private readonly onEvent?;
private readonly onExit?;
private readonly checkHealth?;
constructor(handleStop: () => void, events: AsyncIterable<WatchDirResponse>, onEvent?: ((event: FilesystemEvent) => void | Promise<void>) | undefined, onExit?: ((err?: Error) => void | Promise<void>) | undefined, checkHealth?: SandboxHealthCheck | undefined);
/**
* Stop watching the directory.
*/
stop(): Promise<void>;
private iterateEvents;
private handleEvents;
}
//#endregion
//#region src/sandbox/filesystem/index.d.ts
/**
* Sandbox filesystem object information.
*/
interface WriteInfo {
/**
* Name of the filesystem object.
*/
name: string;
/**
* Type of the filesystem object.
*/
type?: FileType;
/**
* Path to the filesystem object.
*/
path: string;
/**
* User-defined metadata stored on the file as `user.e2b.*` extended
* attributes. On writes this reflects the metadata supplied on upload; on
* reads (`getInfo`, `list`, `rename`) it reflects any `user.e2b.*` xattr on
* the file, including ones set out-of-band. `undefined` when none is set.
*/
metadata?: Record<string, string>;
}
interface EntryInfo extends WriteInfo {
/**
* Size of the filesystem object in bytes.
*/
size: number;
/**
* File mode and permission bits.
*/
mode: number;
/**
* String representation of file permissions (e.g. 'rwxr-xr-x').
*/
permissions: string;
/**
* Owner of the filesystem object.
*/
owner: string;
/**
* Group owner of the filesystem object.
*/
group: string;
/**
* Last modification time of the filesystem object.
*/
modifiedTime?: Date;
/**
* If the filesystem object is a symlink, this is the target of the symlink.
*/
symlinkTarget?: string;
}
/**
* Sandbox filesystem object type.
*/
declare enum FileType {
/**
* Filesystem object is a file.
*/
FILE = "file",
/**
* Filesystem object is a directory.
*/
DIR = "dir",
/**
* Filesystem object is a symlink.
*/
SYMLINK = "symlink"
}
type WriteEntry = {
path: string;
data: string | ArrayBuffer | Blob | ReadableStream;
};
/**
* Options for the sandbox filesystem operations.
*/
interface FilesystemRequestOpts extends Partial<Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>> {
/**
* User to use for the operation in the sandbox.
* This affects the resolution of relative paths and ownership of the created filesystem objects.
*/
user?: Username;
}
/**
* Options for writing files to the sandbox filesystem.
*/
interface FilesystemWriteOpts extends FilesystemRequestOpts {
/**
* When true, the upload will be gzip-compressed. Implies the
* `application/octet-stream` upload.
*
* Requires envd 0.5.7 or later — when not supported by the sandbox's envd
* version, the upload falls back to uncompressed `multipart/form-data`.
*/
gzip?: boolean;
/**
* When true, the upload uses `application/octet-stream` instead of `multipart/form-data`.
* Outside the browser, `ReadableStream` data is then streamed to the sandbox
* instead of being buffered in memory.
*
* Defaults to `undefined`, which uses octet-stream when any entry is a
* `ReadableStream` (so streamed uploads aren't buffered) and
* `multipart/form-data` otherwise; browsers always use `multipart/form-data`
* since they can't stream request bodies. Requires envd 0.5.7 or later — when
* not supported by the sandbox's envd version, the upload falls back to
* `multipart/form-data`.
*/
useOctetStream?: boolean;
/**
* User-defined metadata to persist on the uploaded file(s) as extended
* attributes. Keys are lowercased by the sandbox, so they may differ in case
* when read back. Invalid keys or values throw an `InvalidArgumentError`.
* The same metadata is applied to every file in a multi-file upload.
* Requires envd 0.6.2 or later.
*/
metadata?: Record<string, string>;
}
/**
* Options for reading files from the sandbox filesystem.
*/
interface FilesystemReadOpts extends FilesystemRequestOpts {
/**
* When true, the download will request gzip-encoded responses.
*/
gzip?: boolean;
/**
* Idle timeout for a streamed read (`format: 'stream'`) in **milliseconds**:
* abort if no chunk arrives from the server within this window *while
* reading*. It bounds only the wire — a slow or paused consumer never trips
* it (a consumer that holds the stream but stops reading is reclaimed
* server-side). Defaults to the request timeout (60s); pass `0` to disable.
*/
streamIdleTimeoutMs?: number;
}
interface FilesystemListOpts extends FilesystemRequestOpts {
/**
* Depth of the directory to list.
*/
depth?: number;
}
/**
* Options for watching a directory.
*/
interface WatchOpts extends FilesystemRequestOpts {
/**
* Timeout for the watch operation in **milliseconds**.
* You can pass `0` to disable the timeout.
*
* @default 60_000 // 60 seconds
*/
timeoutMs?: number;
/**
* Callback to call when the watch operation stops.
*/
onExit?: (err?: Error) => void | Promise<void>;
/**
* Watch the directory recursively
*/
recursive?: boolean;
/**
* Include the {@link EntryInfo} of the affected entry in each {@link FilesystemEvent}.
*
* The entry is populated best-effort and may be `undefined` for events where the
* entry no longer exists at the path (e.g. remove or rename-away events).
*
* Requires envd 0.6.3 or later. Watching with this option against an older sandbox
* throws a `TemplateError`.
*/
includeEntry?: boolean;
/**
* Allow watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE),
* which are rejected by default. Events on network mounts may be unreliable
* or not delivered at all.
*
* Requires envd 0.6.4 or later. Watching with this option against an older sandbox
* throws a `TemplateError`.
*/
allowNetworkMounts?: boolean;
}
/**
* Module for interacting with the sandbox filesystem.
*/
declare class Filesystem {
private readonly envdApi;
private readonly connectionConfig;
private readonly rpc;
private readonly defaultWatchTimeout;
private readonly defaultWatchRecursive;
private readonly checkHealth;
constructor(transport: Transport, envdApi: EnvdApiClient, connectionConfig: ConnectionConfig);
/**
* Read file content as a `string`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`text` by default.
*
* @returns file content as string
*/
read(path: string, opts?: FilesystemReadOpts & {
format?: 'text';
}): Promise<string>;
/**
* Read file content as a `Uint8Array`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`bytes`.
*
* @returns file content as `Uint8Array`
*/
read(path: string, opts?: FilesystemReadOpts & {
format: 'bytes';
}): Promise<Uint8Array>;
/**
* Read file content as a `Blob`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`blob`.
*
* @returns file content as `Blob`
*/
read(path: string, opts?: FilesystemReadOpts & {
format: 'blob';
}): Promise<Blob>;
/**
* Read file content as a `ReadableStream`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* The request timeout bounds only the initial handshake. The returned stream
* holds a pooled connection until it is fully read, cancelled, errors, or the
* idle timeout (`opts.streamIdleTimeoutMs`) fires—so consume it to the end or
* cancel it (`opts.signal`).
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`stream`.
*
* @returns file content as `ReadableStream`
*/
read(path: string, opts?: FilesystemReadOpts & {
format: 'stream';
}): Promise<ReadableStream<Uint8Array>>;
/**
* Write content to a file.
*
*
* Writing to a file that doesn't exist creates the file.
*
* Writing to a file that already exists overwrites the file.
*
* Writing to a file at path that doesn't exist creates the necessary directories.
*
* @param path path to file.
* @param data data to write to the file. Data can be a string, `ArrayBuffer`, `Blob`, or `ReadableStream`.
* @param opts connection options.
*
* @returns information about the written file
*/
write(path: string, data: string | ArrayBuffer | Blob | ReadableStream, opts?: FilesystemWriteOpts): Promise<WriteInfo>;
write(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
/**
* Write multiple files.
*
*
* Writing to a file that doesn't exist creates the file.
*
* Writing to a file that already exists overwrites the file.
*
* Writing to a file at path that doesn't exist creates the necessary directories.
*
* @param files list of files to write as `WriteEntry` objects, each containing `path` and `data`.
* @param opts connection options.
*
* @returns information about the written files
*/
writeFiles(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
/**
* List entries in a directory.
*
* @param path path to the directory.
* @param opts connection options.
*
* @returns list of entries in the sandbox filesystem directory.
*/
list(path: string, opts?: FilesystemListOpts): Promise<EntryInfo[]>;
/**
* Create a new directory and all directories along the way if needed on the specified path.
*
* @param path path to a new directory. For example '/dirA/dirB' when creating 'dirB'.
* @param opts connection options.
*
* @returns `true` if the directory was created, `false` if it already exists.
*/
makeDir(path: string, opts?: FilesystemRequestOpts): Promise<boolean>;
/**
* Rename a file or directory.
*
* @param oldPath path to the file or directory to rename.
* @param newPath new path for the file or directory.
* @param opts connection options.
*
* @returns information about renamed file or directory.
*/
rename(oldPath: string, newPath: string, opts?: FilesystemRequestOpts): Promise<EntryInfo>;
/**
* Remove a file or directory.
*
* @param path path to a file or directory.
* @param opts connection options.
*/
remove(path: string, opts?: FilesystemRequestOpts): Promise<void>;
/**
* Check if a file or a directory exists.
*
* @param path path to a file or a directory
* @param opts connection options.
*
* @returns `true` if the file or directory exists, `false` otherwise
*/
exists(path: string, opts?: FilesystemRequestOpts): Promise<boolean>;
/**
* Get information about a file or directory.
*
* @param path path to a file or directory.
* @param opts connection options.
*
* @returns information about the file or directory like name, type, and path.
*/
getInfo(path: string, opts?: FilesystemRequestOpts): Promise<EntryInfo>;
/**
* Start watching a directory for filesystem events.
*
* @param path path to directory to watch.
* @param onEvent callback to call when an event in the directory occurs.
* @param opts connection options.
*
* @returns `WatchHandle` object for stopping watching directory.
*/
watchDir(path: string, onEvent: (event: FilesystemEvent) => void | Promise<void>, opts?: WatchOpts & {
onExit?: (err?: Error) => void | Promise<void>;
}): Promise<WatchHandle>;
}
//#endregion
//#region src/sandbox/commands/pty.d.ts
interface PtyCreateOpts extends Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'> {
/**
* Number of columns for the PTY.
*/
cols: number;
/**
* Number of rows for the PTY.
*/
rows: number;
/**
* Callback to handle PTY data.
*/
onData: (data: Uint8Array) => void | Promise<void>;
/**
* Timeout for the PTY in **milliseconds**.
*
* @default 60_000 // 60 seconds
*/
timeoutMs?: number;
/**
* User to use for the PTY.
*
* @default `default Sandbox user (as specified in the template)`
*/
user?: Username;
/**
* Environment variables for the PTY.
*
* @default {}
*/
envs?: Record<string, string>;
/**
* Working directory for the PTY.
*
* @default // home directory of the user used to start the PTY
*/
cwd?: string;
}
/**
* Options for connecting to a command.
*/
type PtyConnectOpts = Pick<PtyCreateOpts, 'onData' | 'timeoutMs'> & Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>;
/**
* Module for interacting with PTYs (pseudo-terminals) in the sandbox.
*/
declare class Pty {
private readonly transport;
private readonly envdApi;
private readonly connectionConfig;
private readonly rpc;
private readonly envdVersion;
private readonly checkHealth;
private readonly defaultPtyConnectionTimeout;
constructor(transport: Transport, envdApi: EnvdApiClient, connectionConfig: ConnectionConfig);
/**
* Create a new PTY (pseudo-terminal).
*
* @param opts options for creating the PTY.
*
* @returns handle to interact with the PTY.
*/
create(opts: PtyCreateOpts): Promise<CommandHandle>;
/**
* Connect to a running PTY.
*
* @param pid process ID of the PTY to connect to. You can get the list of running PTYs using {@link Commands.list}.
* @param opts connection options.
*
* @returns handle to interact with the PTY.
*/
connect(pid: number, opts?: PtyConnectOpts): Promise<CommandHandle>;
/**
* Send input to a PTY.
*
* @param pid process ID of the PTY.
* @param data input data to send to the PTY.
* @param opts connection options.
*/
sendInput(pid: number, data: Uint8Array, opts?: Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>): Promise<void>;
/**
* Resize PTY.
* Call this when the terminal window is resized and the number of columns and rows has changed.
*
* @param pid process ID of the PTY.
* @param size new size of the PTY.
* @param opts connection options.
*/
resize(pid: number, size: {
cols: number;
rows: number;
}, opts?: Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>): Promise<void>;
/**
* Kill a running PTY specified by process ID.
* It uses `SIGKILL` signal to kill the PTY.
*
* @param pid process ID of the PTY.
* @param opts connection options.
*
* @returns `true` if the PTY was killed, `false` if the PTY was not found.
*/
kill(pid: number, opts?: Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>): Promise<boolean>;
}
//#endregion
//#region src/sandbox/commands/index.d.ts
/**
* Options for sending a command request.
*/
interface CommandRequestOpts extends Partial<Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>> {}
/**
* Options for starting a new command.
*/
interface CommandStartOpts extends CommandRequestOpts {
/**
* If true, starts command in the background and the method returns immediately.
* You can use {@link CommandHandle.wait} to wait for the command to finish.
*/
background?: boolean;
/**
* Working directory for the command.
*
* @default // home directory of the user used to start the command
*/
cwd?: string;
/**
* User to run the command as.
*
* @default `default Sandbox user (as specified in the template)`
*/
user?: Username;
/**
* Environment variables used for the command.
*
* This overrides the default environment variables from `Sandbox` constructor.
*
* @default `{}`
*/
envs?: Record<string, string>;
/**
* Callback for command stdout output.
*/
onStdout?: (data: string) => void | Promise<void>;
/**
* Callback for command stderr output.
*/
onStderr?: (data: string) => void | Promise<void>;
/**
* If true, command stdin is kept open and you can send data to it using {@link Commands.sendStdin} or {@link CommandHandle.sendStdin}.
* @default false
*/
stdin?: boolean;
/**
* Timeout for the command in **milliseconds**.
*
* @default 60_000 // 60 seconds
*/
timeoutMs?: number;
}
/**
* Options for connecting to a command.
*/
type CommandConnectOpts = Pick<CommandStartOpts, 'onStderr' | 'onStdout' | 'timeoutMs'> & CommandRequestOpts;
/**
* Information about a command, PTY session or start command running in the sandbox as process.
*/
interface ProcessInfo {
/**
* Process ID.
*/
pid: number;
/**
* Custom tag used for identifying special commands like start command in the custom template.
*/
tag?: string;
/**
* Command that was executed.
*/
cmd: string;
/**
* Command arguments.
*/
args: string[];
/**
* Environment variables used for the command.
*/
envs: Record<string, string>;
/**
* Executed command working directory.
*/
cwd?: string;
}
/**
* Module for starting and interacting with commands in the sandbox.
*/
declare class Commands {
private readonly envdApi;
private readonly connectionConfig;
protected readonly rpc: Client<typeof Process>;
private readonly defaultProcessConnectionTimeout;
private readonly envdVersion;
private readonly checkHealth;
constructor(transport: Transport, envdApi: EnvdApiClient, connectionConfig: ConnectionConfig);
/**
* @hidden
* @internal
*/
get supportsStdinClose(): boolean;
/**
* List all running commands and PTY sessions.
*
* @param opts connection options.
*
* @returns list of running commands and PTY sessions.
*/
list(opts?: CommandRequestOpts): Promise<ProcessInfo[]>;
/**
* Send data to command stdin.
*
* @param pid process ID of the command. You can get the list of running commands using {@link Commands.list}.
* @param data data to send to the command.
* @param opts connection options.
*/
sendStdin(pid: number, data: string | Uint8Array, opts?: CommandRequestOpts): Promise<void>;
/**
* Close command stdin.
*
* This signals EOF to the command. The command must have been started with `stdin: true`.
*
* @param pid process ID of the command. You can get the list of running commands using {@link Commands.list}.
* @param opts connection options.
*/
closeStdin(pid: number, opts?: CommandRequestOpts): Promise<void>;
/**
* Kill a running command specified by its process ID.
* It uses `SIGKILL` signal to kill the command.
*
* @param pid process ID of the command. You can get the list of running commands using {@link Commands.list}.
* @param opts connection options.
*
* @returns `true` if the command was killed, `false` if the command was not found.
*/
kill(pid: number, opts?: CommandRequestOpts): Promise<boolean>;
/**
* Connect to a running command.
* You can use {@link CommandHandle.wait} to wait for the command to finish and get execution results.
*
* @param pid process ID of the command to connect to. You can get the list of running commands using {@link Commands.list}.
* @param opts connection options.
*
* @returns `CommandHandle` handle to interact with the running command.
*/
connect(pid: number, opts?: CommandConnectOpts): Promise<CommandHandle>;
/**
* Start a new command and wait until it finishes executing.
*
* @param cmd command to execute.
* @param opts options for starting the command.
*
* @returns `CommandResult` result of the command execution.
*/
run(cmd: string, opts?: CommandStartOpts & {
background?: false;
}): Promise<CommandResult>;
/**
* Start a new command in the background.
* You can use {@link CommandHandle.wait} to wait for the command to finish and get its result.
*
* @param cmd command to execute.
* @param opts options for starting the command
*
* @returns `CommandHandle` handle to interact with the running command.
*/
run(cmd: string, opts: CommandStartOpts & {
background: true;
}): Promise<CommandHandle>;
/**
* Start a new command.
*
* @param cmd command to execute.
* @param opts options for starting the command.
* - `opts.background: true` - runs in background, returns `CommandHandle`
* - `opts.background: false | undefined` - waits for completion, returns `CommandResult`
*
* @returns Either a `CommandHandle` or a `CommandResult` (depending on `opts.background`).
*/
run(cmd: string, opts?: CommandStartOpts & {
background?: boolean;
}): Promise<CommandHandle | CommandResult>;
private start;
}
//#endregion
//#region src/sandbox/commands/commandHandle.d.ts
declare const __brand: unique symbol;
type Brand<B> = {
[__brand]: B;
};
type Branded<T, B> = T & Brand<B>;
type Stdout = Branded<string, 'stdout'>;
type Stderr = Branded<string, 'stderr'>;
type PtyOutput = Branded<Uint8Array, 'pty'>;
/**
* Command execution result.
*/
interface CommandResult {
/**
* Command execution exit code.
* `0` if the command finished successfully.
*/
exitCode: number;
/**
* Error message from command execution if it failed.
*/
error?: string;
/**
* Command stdout output.
*/
stdout: string;
/**
* Command stderr output.
*/
stderr: string;
}
/**
* Error thrown when a command exits with a non-zero exit code.
*/
declare class CommandExitError extends SandboxError implements CommandResult {
private readonly result;
constructor(result: CommandResult);
/**
* Command execution exit code.
* `0` if the command finished successfully.
*/
get exitCode(): number;
/**
* Error message from command execution.
*/
get error(): string | undefined;
/**
* Command execution stdout output.
*/
get stdout(): string;
/**
* Command execution stderr output.
*/
get stderr(): string;
}
/**
* Command execution handle.
*
* It provides methods for waiting for the command to finish, retrieving stdout/stderr, and killing the command.
*
* @property {number} pid process ID of the command.
*/
declare class CommandHandle implements Omit<CommandResult, 'exitCode' | 'error'>, Partial<Pick<CommandResult, 'exitCode' | 'error'>> {
readonly pid: number;
private readonly handleDisconnect;
private readonly handleKill;
private readonly events;
private readonly onStdout?;
private readonly onStderr?;
private readonly onPty?;
private readonly handleSendStdin?;
private readonly handleCloseStdin?;
private readonly checkHealth?;
private _stdout;
private _stderr;
private readonly stdoutDecoder;
private readonly stderrDecoder;
private result?;
private iterationError?;
private disconnected;
private readonly _wait;
/**
* @hidden
* @internal
* @access protected
*/
constructor(pid: number, handleDisconnect: () => void, handleKill: () => Promise<boolean>, events: AsyncIterable<ConnectResponse | StartResponse>, onStdout?: ((stdout: string) => void | Promise<void>) | undefined, onStderr?: ((stderr: string) => void | Promise<void>) | undefined, onPty?: ((pty: Uint8Array) => void | Promise<void>) | undefined, handleSendStdin?: ((data: string | Uint8Array, opts?: CommandRequestOpts) => Promise<void>) | undefined, handleCloseStdin?: ((opts?: CommandRequestOpts) => Promise<void>) | undefined, checkHealth?: SandboxHealthCheck | undefined);
/**
* Command execution exit code.
* `0` if the command finished successfully.
*
* It is `undefined` if the command is still running.
*/
get exitCode(): number | undefined;
/**
* Error message from command execution.
*/
get error(): string | undefined;
/**
* Command execution stderr output.
*/
get stderr(): string;
/**
* Command execution stdout output.
*/
get stdout(): string;
/**
* Wait for the command to finish and return the result.
* If the command exits with a non-zero exit code, it throws a `CommandExitError`.
*
* @returns `CommandResult` result of command execution.
*/
wait(): Promise<CommandResult>;
/**
* Disconnect from the command.
*
* The command is not killed, but SDK stops receiving events from the command.
* You can reconnect to the command using {@link Commands.connect}.
*
* Once it returns, the `onStdout`/`onStderr`/`onPty` callbacks are guaranteed
* not to fire for output produced after this call. It does not wait for the
* event handler to drain, so it returns promptly even for an idle command
* whose stream produces no further output.
*/
disconnect(): Promise<void>;
/**
* Kill the command.
* It uses `SIGKILL` signal to kill the command.
*
* @returns `true` if the command was killed successfully, `false` if the command was not found.
*/
kill(): Promise<boolean>;
/**
* Send data to the command stdin.
*
* The command must have been started with `stdin: true`.
*
* @param data data to send to the command.
* @param opts connection options.
*/
sendStdin(data: string | Uint8Array, opts?: CommandRequestOpts): Promise<void>;
/**
* Close the command stdin.
*
* This signals EOF to the command. The command must have been started with
* `stdin: true`.
*
* @param opts connection options.
*/
closeStdin(opts?: CommandRequestOpts): Promise<void>;
/**
* Flush any bytes still buffered in the stream decoders.
*
* Incomplete trailing UTF-8 sequences are emitted as replacement
* characters, matching the per-chunk decoding behavior.
*/
private flushDecoders;
private iterateEvents;
private handleEvents;
}
//#endregion
//#region src/paginator.d.ts
/**
* Generic, reusable paginator for cursor-based list endpoints.
*
* The base owns the shared pagination state — `hasNext`, `nextToken`, and the
* reading of the `x-next-token` response header (via {@link Paginator.updatePagination}).
* Each concrete paginator implements {@link Paginator.nextItems} to do the
* actual fetching for its endpoint, so any model can expose pagination by
* subclassing this without reimplementing the bookkeeping.
*
* The optional `O` type parameter is the per-call options type accepted by
* `nextItems` (e.g. connection options for a given API).
*
* @example
* ```ts
* const paginator = Sandbox.list()
* while (paginator.hasNext) {
* const items = await paginator.nextItems()
* console.log(items)
* }
* ```
*/
declare abstract class Paginator<T, O extends ConnectionOpts = ConnectionOpts> {
protected readonly opts?: O;
protected readonly limit?: number;
private _hasNext;
private _nextToken?;
constructor(opts?: O, limit?: number, nextToken?: string);
/**
* Returns true if there are more items to fetch.
*/
get hasNext(): boolean;
/**
* Returns the next token to use for pagination.
*/
get nextToken(): string | undefined;
/**
* Update the pagination state from a response, reading the `x-next-token`
* header. Concrete paginators call this from {@link Paginator.nextItems}
* after fetching a page.
*/
protected updatePagination(response: Response): void;
/**
* Get the next page of items.
*
* @param opts per-call connection options. When provided, this call uses
* these options (e.g. `apiKey`, `domain`, `headers`, `requestTimeoutMs`,
* `signal`) instead of the ones the paginator was constructed with.
* Aborting a page via `signal` does not affect subsequent {@link Paginator.nextItems}
* calls — pass a fresh signal each call you want to be cancellable.
*
* @throws Error if there are no more items to fetch. Call this method only if `hasNext` is `true`.
*
* @returns List of items
*/
abstract nextItems(opts?: O): Promise<T[]>;
}
//#endregion
//#region src/volume/schema.gen.d.ts
interface components$1 {
schemas: {
Error: {
/** @description Error code */
code: string;
/** @description Error message */
message: string;
};
VolumeDirectoryListing: components$1["schemas"]["VolumeEntryStat"][];
VolumeEntryStat: {
/** Format: date-time */
atime: string;
/** Format: date-time */
ctime: string;
/** Format: uint32 */
gid: number;
/** Format: uint32 */
mode: number;
/** Format: date-time */
mtime: string;
name: string;
path: string;
/** Format: int64 */
size: number;
target?: string;
/** @enum {string} */
type: "unknown" | "file" | "directory" | "symlink";
/** Format: uint32 */
uid: number;
};
};
responses: {
/** @description Bad request */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$1["schemas"]["Error"];
};
};
/** @description Authentication error */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$1["schemas"]["Error"];
};
};
/** @description Forbidden */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$1["schemas"]["Error"];
};
};
/** @description Not found */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$1["schemas"]["Error"];
};
};
/** @description Conflict */
409: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$1["schemas"]["Error"];
};
};
/** @description Server error */
500: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components$1["schemas"]["Error"];
};
};
};
parameters: {
path: string;
volumeID: string;
};
requestBodies: never;
headers: never;
pathItems: never;
}
//#endregion
//#region src/volume/client.d.ts
interface VolumeApiOpts {
/**
* E2B API key to use for authentication.
*
* @default E2B_API_KEY // environment variable
*/
token?: string;
/**
* Domain to use for the volume API.
*
* @default E2B_DOMAIN // environment variable or `e2b.app`
*/
domain?: string;
/**
* If true the SDK starts in the debug mode and connects to the local volume API server.
* @internal
* @default E2B_DEBUG // environment variable or `false`
*/
debug?: boolean;
/**
* API Url to use for the API.
* @internal
* @default E2B_VOLUME_API_URL // environment variable or `https://api.${domain}`
*/
apiUrl?: string;
/**
* Timeout for requests to the API in **milliseconds**.
*
* @default 60_000 // 60 seconds
*/
requestTimeoutMs?: number;
/**
* Logger to use for logging messages. It can accept any object that implements `Logger` interface—for example, {@link console}.
*/
logger?: Logger;
/**
* Additional headers to send with the request.
*/
headers?: Record<string, string>;
/**
* Proxy URL to use for requests.
*
* @example 'http://user:pass@127.0.0.1:8080'
*/
proxy?: string;
/**
* An optional `AbortSignal` that can be used to cancel the in-flight request.
* When the signal is aborted, the underlying `fetch` is aborted and the
* returned promise rejects with an `AbortError`.
*/
signal?: AbortSignal;
}
declare class VolumeConnectionConfig {
readonly domain: string;
readonly debug: boolean;
readonly apiUrl: string;
readonly token?: string;
readonly headers?: Record<string, string>;
readonly logger?: Logger;
readonly requestTimeoutMs: number;
readonly signal?: AbortSignal;
readonly proxy?: string;
constructor(volume: Volume, opts?: VolumeApiOpts);
private static get domain();
private static get debug();
private static get volumeApiUrl();
getSignal(requestTimeoutMs?: number, signal?: AbortSignal): AbortSignal | undefined;
}
//#endregion
//#region src/volume/types.d.ts
/**
* File type enum.
*/
declare enum VolumeFileType {
UNKNOWN = "unknown",
FILE = "file",
DIRECTORY = "directory",
SYMLINK = "symlink"
}
/**
* Information about a volume.
*/
type VolumeInfo = {
/**
* Volume ID.
*/
volumeId: string;
/**
* Volume name.
*/
name: string;
};
/**
* Information about a volume and its auth token.
*/
type VolumeAndToken = VolumeInfo & {
/**
* Volume auth token.
*/
token: string;
/**
* Domain to use as the destination for volume content requests, replacing
* the default `api.<domain>` host. Only set for teams connected to a custom
* (BYOC) cluster; `undefined` otherwise.
*/
domain?: string;
};
/**
* Volume entry stat with dates converted to Date objects.
*/
type VolumeEntryStat = Omit<components$1['schemas']['VolumeEntryStat'], 'atime' | 'mtime' | 'ctime' | 'type'> & {
/**
* Access time as a Date object.
*/
atime: Date;
/**
* Modification time as a Date object.
*/
mtime: Date;
/**
* Creation time as a Date object.
*/
ctime: Date;
/**
* File type.
*/
type: VolumeFileType;
};
/**
* Options for updating file metadata.
*/
type VolumeMetadataOpts = {
/**
* User ID of the file or directory.
*/
uid?: number;
/**
* Group ID of the file or directory.
*/
gid?: number;
/**
* Mode of the file or directory.
*/
mode?: number;
};
/**
* Options for reading files from a volume.
*/
type VolumeReadOpts = VolumeApiOpts & {
/**
* Idle timeout for a streamed read (`format: 'stream'`) in **milliseconds**:
* abort if no chunk arrives from the server within this window *while
* reading*. It bounds only the wire — a slow or paused consumer never trips
* it (a consumer that holds the stream but stops reading is reclaimed
* server-side). Defaults to the request timeout; pass `0` to disable.
*/
streamIdleTimeoutMs?: number;
};
/**
* Options for file and directory operations.
*/
type VolumeWriteOpts = VolumeMetadataOpts & {
/**
* For makeDir: Create parent directories if they don't exist.
* For writeFile: Force overwrite of an existing file.
*/
force?: boolean;
};
/**
* @deprecated Use {@link VolumeMetadataOpts} instead.
*/
type VolumeMetadataOptions = VolumeMetadataOpts;
/**
* @deprecated Use {@link VolumeWriteOpts} instead.
*/
type VolumeWriteOptions = VolumeWriteOpts;
//#endregion
//#region src/volume/index.d.ts
/**
* Module for interacting with E2B volumes.
*
* Create a `Volume` instance to interact with a volume by its ID,
* or use the static methods to manage volumes.
*/
declare class Volume extends ClientFactory {
/**
* Volume ID.
*/
readonly volumeId: string;
/**
* Volume name.
*/
readonly name: string;
/**
* Volume auth token.
*/
readonly token: string;
/**
* Domain used for constructing the volume API URL.
*/
readonly domain?: string;
/**
* Whether to use debug mode (connects to local volume API server).
*/
readonly debug?: boolean;
/**
* Proxy URL used for requests to the volume content API.
*/
readonly proxy?: string;
/**
* Create a local Volume instance with no API call.
*
* @param volumeId volume ID.
* @param name volume name.
* @param token volume auth token.
* @param domain domain for the volume API.
* @param debug whether to use debug mode.
* @param proxy proxy URL for the volume content API.
*/
constructor(volumeId: string, name: string, token: string, domain?: string, debug?: boolean, proxy?: string);
/**
* Create a new volume.
*
* @param name name of the volume.
* @param opts connection options.
*
* @returns new Volume instance.
*/
static create<V extends typeof Volume>(this: V, name: string, opts?: ConnectionOpts): Promise<InstanceType<V>>;
/**
* Connect to an existing volume by ID.
*
* @param volumeId volume ID.
* @param opts connection options.
*
* @returns Volume instance.
*/
static connect<V extends typeof Volume>(this: V, volumeId: string, opts?: ConnectionOpts): Promise<InstanceType<V>>;
/**
* Get volume information.
*
* @param volumeId volume ID.
* @param opts connection options.
*
* @returns volume information.
*/
static getInfo(volumeId: string, opts?: ConnectionOpts): Promise<VolumeAndToken>;
/**
* List all volumes.
*
* @param opts connection options.
*
* @returns list of volume information.
*/
static list(opts?: ConnectionOpts): Promise<VolumeInfo[]>;
/**
* Destroy a volume.
*
* @param volumeId volume ID.
* @param opts connection options.
*/
static destroy(volumeId: string, opts?: ConnectionOpts): Promise<boolean>;
/**
* List directory contents.
*
* @param path path to the directory.
* @param opts connection options.
* @param [opts.depth] number of layers deep to recurse into the directory (default: 1).
*
* @returns list of entries in the directory.
*/
list(path: string, opts?: VolumeApiOpts & {
depth?: number;
}): Promise<VolumeEntryStat[]>;
/**
* Create a directory.
*
* @param path path to the directory to create.
* @param options directory creation options.
* @param opts connection options.
*/
makeDir(path: string, opts?: VolumeWriteOpts & VolumeApiOpts): Promise<VolumeEntryStat>;
/**
* Get information about a file or directory.
*
* @param path path to the file or directory.
* @param opts connection options.
*
* @returns information about the entry.
*/
getInfo(path: string, opts?: VolumeApiOpts): Promise<VolumeEntryStat>;
/**
* Check whether a file or directory exists.
*
* Uses {@link getInfo} under the hood. Returns `true` if the path exists,
* `false` if it does not (404). Other errors are rethrown.
*
* @param path path to the file or directory.
* @param opts connection options.
*
* @returns `true` if the path exists, `false` otherwise.
*/
exists(path: string, opts?: VolumeApiOpts): Promise<boolean>;
/**
* Update file or directory metadata.
*
* @param path path to the file or directory.
* @param metadata metadata to update (uid, gid, mode).
* @param opts connection options.
*
* @returns updated entry information.
*/
updateMetadata(path: string, metadata: VolumeMetadataOpts, opts?: VolumeApiOpts): Promise<VolumeEntryStat>;
/**
* Read file content as a `string`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`text` by default.
*
* @returns file content as string
*/
readFile(path: string, opts?: VolumeReadOpts & {
format?: 'text';
}): Promise<string>;
/**
* Read file content as a `Uint8Array`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`bytes`.
*
* @returns file content as `Uint8Array`
*/
readFile(path: string, opts?: VolumeReadOpts & {
format: 'bytes';
}): Promise<Uint8Array>;
/**
* Read file content as a `Blob`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`blob`.
*
* @returns file content as `Blob`
*/
readFile(path: string, opts?: VolumeReadOpts & {
format: 'blob';
}): Promise<Blob>;
/**
* Read file content as a `ReadableStream`.
*
* You can pass `text`, `bytes`, `blob`, or `stream` to `opts.format` to change the return type.
*
* @param path path to the file.
* @param opts connection options.
* @param [opts.format] format of the file content—`stream`.
*
* @returns file content as `ReadableStream`
*/
readFile(path: string, opts?: VolumeReadOpts & {
format: 'stream';
}): Promise<ReadableStream<Uint8Array>>;
/**
* Write content to a file.
*
* Writing to a file that doesn't exist creates the file.
*
* Writing to a file that already exists overwrites the file.
*
* @param path path to the file.
* @param data data to write to the file. Data can be a string, `ArrayBuffer`, `Blob`, or `ReadableStream`. Outside the browser, `ReadableStream` data is streamed to the API instead of being buffered in memory.
* @param options file creation options.
* @param opts connection options.
*
* @returns information about the written file
*/
writeFile(path: string, data: string | ArrayBuffer | Blob | ReadableStream<Uint8Array>, opts?: VolumeWriteOpts & VolumeApiOpts): Promise<VolumeEntryStat>;
/**
* Remove a file or directory.
*
* @param path path to the file or directory to remove.
* @param opts connection options.
*/
remove(path: string, opts?: VolumeApiOpts): Promise<void>;
}
//#endregion
//#region src/sandbox/mcp.d.ts
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
interface McpServer {
airtable?: Airtable;
aks?: AzureKubernetesServiceAKS;
alfresco?: Alfresco;
amazonBedrockAgentcore?: AWSBedrockAgentCore;
amazonKendraIndex?: AmazonKendraIndex;
amazonNeptune?: AmazonNeptune;
amazonQbusinessAnonymous?: AmazonQBusiness;
apiGateway?: APIGateway;
apify?: Apify;
arm?: Arm;
arxiv?: ArXiv;
astGrep?: AstGrep;
astraDb?: AstraDB;
astroDocs?: AstroDocs;
atlan?: Atlan;
atlasDocs?: AtlasDocs;
atlassian?: Atlassian;
audienseInsights?: AudienseInsights;
awsApi?: AWSAPI;
awsAppsync?: AWSAppSync;
awsBedrockCustomModelImport?: AWSBedrockCustomModelImport;
awsBedrockDataAutomation?: AWSBedrockDataAutomation;
awsCdk?: AWSCDK;
awsCore?: AWSCore;
awsDataprocessing?: AWSDataProcessing;
awsDiagram?: AWSDiagram;
awsDocumentation?: AWSDocumentation;
awsHealthomics?: AWSHealthOmics;
awsIotSitewise?: AWSIoTSiteWise;
awsKbRetrievalServer?: AWSKBRetrievalArchived;
awsLocation?: AmazonLocationService;
awsMsk?: AmazonMSK;
awsPricing?: AWSPricing;
awsTerraform?: AWSTerraform;
awslabsBillingCostManagement?: AWSBillingAndCostManagement;
awslabsCcapi?: AWSCloudControlAPI;
awslabsCfn?: AWSCloudFormation;
awslabsCloudtrail?: AWSCloudTrail;
awslabsCloudwatch?: AmazonCloudWatch;
awslabsCloudwatchAppsignals?: AmazonCloudWatchApplicationSignals;
awslabsCostExplorer?: AWSCostExplorer;
awslabsDynamodb?: AmazonDynamoDB;
awslabsElasticache?: AmazonElastiCache;
awslabsIam?: AWSIAM;
awslabsMemcached?: AmazonElastiCacheForMemcached;
awslabsNovaCanvas?: AWSLabsNovaCanvas;
awslabsRedshift?: AmazonRedshift;
awslabsS3Tables?: AWSS3Tables;
awslabsTimestreamForInfluxdb?: AmazonTimestreamForInfluxDB;
awslabsValkey?: AmazonElastiCacheMemoryDBForValkey;
azure?: Azure;
beagleSecurity?: BeagleSecurity;
bitrefill?: Bitrefill;
box?: Box;
brave?: BraveSearch;
browserbase?: Browserbase;
buildkite?: Buildkite;
camunda?: CamundaBPMProcessEngine;
charmhealth?: CharmHealth;
chroma?: Chroma;
circleci?: CircleCI;
clickhouse?: OfficialClickHouse;
close?: Close;
cloudRun?: CloudRun;
cloudflareDocs?: CloudflareDocs;
cockroachdb?: CockroachDB;
codeInterpreter?: PythonInterpreter;
context7?: Context7;
couchbase?: Couchbase;
cylera?: Cylera;
cyreslabAiShodan?: Shodan;
dappier?: Dappier;
dappierRemote?: DappierRemote;
dart?: DartAI;
databaseServer?: MCPDatabaseServer;
databutton?: Databutton;
deepwiki?: DeepWiki;
descope?: Descope;
desktopCommander?: DesktopCommander;
devhubCms?: DevHubCMS;
discord?: Discord;
dockerhub?: DockerHub;
dodoPayments?: DodoPayments;
dotnetTypesExplorer?: NETTypesExplorer;
dreamfactory?: DreamFactory;
duckduckgo?: PrivateWebSearch;
dynatrace?: Dynatrace;
e2b?: E2B$1;
edubase?: EduBase;
effect?: Effect;
elasticsearch?: Elasticsearch;
elevenlabs?: ElevenLabs;
everart?: EverArtArchived;
exa?: Exa;
explorium?: ExploriumB2BData;
fetch?: FetchReference;
fibery?: Fibery;
filesystem?: FilesystemReference;
findADomain?: FindADomain;
firecrawl?: Firecrawl;
firewalla?: Firewalla;
geminiApiDocs?: GeminiAPIDocs;
git?: GitReference;
github?: GitHubArchived;
githubChat?: GitHubChat;
githubOfficial?: GitHubOfficial;
gitlab?: GitLabArchived;
gitmcp?: GitMCP;
glif?: GlifApp;
gmail?: Gmail;
googleFlights?: GoogleFlights;
googleMaps?: GoogleMapsArchived;
googleMapsComprehensive?: GoogleMapsComprehensive;
grafana?: Grafana;
gyazo?: Gyazo;
hackernews?: HackerNews;
hackle?: Hackle;
handwritingOcr?: HandwritingOCR;
hdx?: HumanitarianDataExchange;
heroku?: Heroku;
hostinger?: HostingerAPI;
hoverfly?: Hoverfly;
hubspot?: HubSpot;
huggingFace?: HuggingFace;
hummingbot?: HummingbotTradingAgent;
husqvarnaAutomower?: HusqvarnaAutomower;
hyperbrowser?: Hyperbrowser;
hyperspell?: Hyperspell;
iaptic?: Iaptic;
inspektorGadget?: InspektorGadget;
javadocs?: Javadocs;
jetbrains?: JetBrains;
kafkaSchemaReg?: KafkaSchemaRegistry;
kagisearch?: KagiSearch;
keboola?: Keboola;
kong?: KongKonnect;
kubectl?: Kubectl;
kubernetes?: Kubernetes;
lara?: LaraTranslate;
line?: LINE;
linkedin?: LinkedIn;
llmtxt?: LLMText;
maestro?: Maestro;
manifold?: Manifold;
mapbox?: Mapbox;
mapboxDevkit?: MapboxDeveloper;
markdownify?: Markdownify;
markitdown?: Markitdown;
mavenTools?: MavenTools;
memory?: MemoryReference;
mercadoLibre?: MercadoLibre;
mercadoPago?: MercadoPago;
metabase?: Metabase;
minecraftWiki?: MinecraftWiki;
mongodb?: MongoDB;
multiversxMx?: MultiversX;
n8n?: N8N;
nasdaqDataLink?: NasdaqDataLink;
needle?: Needle;
neo4j?: Neo4J;
neo4jCloudAuraApi?: Neo4JCloudAuraApi;
neo4jCypher?: Neo4JCypher;
neo4jDataModeling?: Neo4JDataModeling;
neo4jMemory?: Neo4JMemory;
neon?: Neon;
nextDevtools?: NextJsDevTools;
nodeCodeSandbox?: NodeJsSandbox;
notion?: Notion;
novita?: Novita;
npmSentinel?: NPMSentinel;
obsidian?: Obsidian;
okta?: Okta;
oktaMcpFctr?: Okta1;
omi?: Omi;
onlyofficeDocspace?: ONLYOFFICEDocSpace;
openapi?: OpenAPIToolkit;
openapiSchema?: OpenAPISchema;
openbnbAirbnb?: AirbnbSearch;
openmesh?: OpenMesh;
openweather?: Openweather;
openzeppelinCairo?: OpenZeppelinCairoContracts;
openzeppelinSolidity?: OpenZeppelinSolidityContracts;
openzeppelinStellar?: OpenZeppelinStellarContracts;
openzeppelinStylus?: OpenZeppelinStylusContracts;
opik?: Opik;
opine?: Opine;
oracle?: OracleDatabase;
ospMarketingTools?: OSPMarketingTools;
oxylabs?: Oxylabs;
paperSearch?: PaperSearch;
perplexityAsk?: Perplexity;
pia?: ProgramIntegrityAlliance;
pinecone?: PineconeAssistant;
playwright?: ExecuteAutomationPlaywright;
pluggedinMcpProxy?: PluggedInProxy;
polarSignals?: PolarSignals;
pomodash?: PomoDash;
postman?: Postman;
prefEditor?: PrefEditor;
prometheus?: Prometheus;
proxmox?: ProxmoxVE;
puppeteer?: PuppeteerArchived;
pythonRefactoring?: PythonRefactoringAssistant;
quantconnect?: QuantConnect;
ramparts?: RampartsSecurityScanner;
razorpay?: Razorpay;
reddit?: Reddit;
redis?: Redis;
redisCloud?: RedisCloud;
ref?: RefUpToDateDocs;
remote?: RemoteMCP;
render?: Render;
resend?: Resend;
risken?: RISKEN;
ros2?: WiseVisionROS2;
rube?: Rube;
rustMcpFilesystem?: RustFilesystem;
schemacrawlerAi?: SchemaCrawlerAI;
schoginiMcpImageBorder?: SchoginiImageBorder;
scrapegraph?: ScrapeGraph;
scrapezy?: Scrapezy;
securenoteLink?: SecurenoteLink;
semgrep?: Semgrep;
sentry?: SentryArchived;
sequa?: SequaAI;
sequentialthinking?: SequentialThinkingReference;
shortIo?: ShortIo;
simplechecklist?: SimpleCheckList;
singlestore?: Singlestore;
slack?: SlackArchived;
smartbear?: SmartBear;
sonarqube?: SonarQube;
sqlite?: SQLiteArchived;
stackgen?: StackGen;
stackhawk?: StackHawk;
stripe?: Stripe;
supadata?: Supadata;
suzieq?: Suzieq;
taskOrchestrator?: TaskOrchestrator;
tavily?: Tavily;
teamwork?: Teamwork;
telnyx?: Telnyx;
temporal?: Temporal;
terraform?: HashicorpTerraform;
testkube?: Testkube;
textToGraphql?: TextToGraphQL;
thingsboard?: ThingsBoard;
tigris?: TigrisData;
time?: TimeReference;
unrealEngine?: UnrealEngine;
vectraAiRux?: VectraAIRUXMCPServer;
veyrax?: VeyraX;
victorialogs?: VictoriaLogs;
victoriametrics?: VictoriaMetrics;
victoriatraces?: VictoriaTraces;
vizro?: Vizro;
vulnNist?: VulnNIST;
wayfound?: Wayfound;
webflow?: Webflow;
wikipedia?: Wikipedia;
wolframAlpha?: WolframAlpha;
youtubeTranscript?: YouTubeTranscripts;
zen?: Zen;
zerodhaKite?: ZerodhaKiteConnect;
zscaler?: Zscaler;
}
/**
* Provides AI assistants with direct access to Airtable bases, allowing them to read schemas, query records, and interact with your Airtable data. Supports listing bases, retrieving table structures, and searching through records to help automate workflows and answer questions about your organized data.
*/
interface Airtable {
airtableApiKey: string;
nodeenv: string;
}
/**
* Azure Kubernetes Service (AKS) official MCP server.
*/
interface AzureKubernetesServiceAKS {
/**
* Access level for the MCP server, One of [ readonly, readwrite, admin ]
*/
accessLevel: string;
/**
* Comma-separated list of additional tools, One of [ helm, cilium ]
*/
additionalTools?: string;
/**
* Comma-separated list of namespaces to allow access to. If not specified, all namespaces are allowed.
*/
allowNamespaces?: string;
/**
* Path to the Azure configuration directory (e.g. /home/azureuser/.azure). Used for Azure CLI authentication, you should be logged in (e.g. run `az login`) on the host before starting the MCP server.
*/
azureDir: string;
/**
* Username or UID of the container user (format <name|uid>[:<group|gid>] e.g. 10000), ensuring correct permissions to access the Azure and kubeconfig files. Leave empty to use default user in the container.
*/
containerUser?: string;
/**
* Path to the kubeconfig file for the AKS cluster (e.g. /home/azureuser/.kube/config). Used to connect to the AKS cluster.
*/
kubeconfig: string;
}
/**
* A minimal Model Context Protocol (MCP) server for Alfresco providing tools via the Alfresco REST API.
*/
interface Alfresco {
alfrescoHost: string;
}
/**
* Documentation on AgentCore platform services.
*/
interface AWSBedrockAgentCore {}
/**
* Enterprise search and RAG enhancement.
*/
interface AmazonKendraIndex {
awsProfile?: string;
awsRegion?: string;
kendraIndexId: string;
}
/**
* Graph database queries with Cypher and Gremlin.
*/
interface AmazonNeptune {
awsProfile?: string;
awsRegion?: string;
neptuneEndpoint: string;
}
/**
* AI assistant for ingested content with anonymous access.
*/
interface AmazonQBusiness {
awsAccessKeyId?: string;
awsProfile?: string;
awsRegion?: string;
awsSecretAccessKey?: string;
awsSessionToken?: string;
qbusinessApplicationId: string;
}
/**
* A universal MCP (Model Context Protocol) server to integrate any API with Claude Desktop using only Docker configurations.
*/
interface APIGateway {
api1HeaderAuthorization: string;
api1Name: string;
api1SwaggerUrl: string;
}
/**
* Apify is the world's largest marketplace of tools for web scraping, data extraction, and web automation. You can extract structured data from social media, e-commerce, search engines, maps, travel sites, or any other website.
*/
interface Apify {
apifyToken: string;
/**
* Comma-separated list of tools to enable. Can be either a tool category, a specific tool, or an Apify Actor. For example: "actors,docs,apify/rag-web-browser". For more details visit https://mcp.apify.com.
*/
tools: string;
}
/**
* Provides AI assistants with specialized tools for Arm architecture development, migration, optimization, and profiling. Includes knowledge base search, code migration analysis, container architecture inspection, Arm Performix workload profiling, and assembly performance analysis.
*/
interface Arm {
/**
* Optional path to an SSH known_hosts file for Arm Performix remote target access
*/
sshKnownHostsPath?: string;
/**
* Optional path to an SSH private key for Arm Performix remote target access
*/
sshPrivateKeyPath?: string;
workspacePath: string;
}
/**
* The ArXiv MCP Server provides a comprehensive bridge between AI assistants and arXiv's research repository through the Model Context Protocol (MCP). Features: • Search arXiv papers with advanced filtering • Download and store papers locally as markdown • Read and analyze paper content • Deep research analysis prompts • Local paper management and storage • Enhanced tool descriptions optimized for local AI models • Docker MCP Gateway compatible with detailed context Perfect for researchers, academics, and AI assistants conducting literature reviews and research analysis. **Recent Update**: Enhanced tool descriptions specifically designed to resolve local AI model confusion and improve Docker MCP Gateway compatibility.
*/
interface ArXiv {
/**
* Directory path where downloaded papers will be stored
*/
storagePath: string;
}
/**
* ast-grep is a fast and polyglot tool for code structural search, lint, rewriting at large scale.
*/
interface AstGrep {
path: string;
}
/**
* An MCP server for Astra DB workloads.
*/
interface AstraDB {
astraDbApplicationToken: string;
endpoint: string;
}
/**
* Access the latest Astro web framework documentation, guides, and API references.
*/
interface AstroDocs {}
/**
* MCP server for interacting with Atlan services including asset search, updates, and lineage traversal for comprehensive data governance and discovery.
*/
interface Atlan {
apiKey: string;
baseUrl: string;
}
/**
* Provide LLMs hosted, clean markdown documentation of libraries and frameworks.
*/
interface AtlasDocs {
apiUrl: string;
}
/**
* Tools for Atlassian products (Confluence and Jira). This integration supports both Atlassian Cloud and Jira Server/Data Center deployments.
*/
interface Atlassian {
confluenceApiToken?: string;
confluencePersonalToken?: string;
confluenceUrl: string;
confluenceUsername?: string;
jiraApiToken?: string;
jiraPersonalToken?: string;
jiraUrl: string;
jiraUsername?: string;
}
/**
* Audiense Insights MCP Server is a server based on the Model Context Protocol (MCP) that allows Claude and other MCP-compatible clients to interact with your Audiense Insights account.
*/
interface AudienseInsights {
audienseClientSecret?: string;
clientId: string;
twitterBearerToken?: string;
}
/**
* Comprehensive AWS API support with command validation and access to all services.
*/
interface AWSAPI {
awsAccessKeyId: string;
awsProfileName: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Manage applications powered by AWS AppSync.
*/
interface AWSAppSync {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Manage custom models in Bedrock.
*/
interface AWSBedrockCustomModelImport {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
bedrockModelImportS3Bucket: string;
}
/**
* Analyze documents, images, videos, and audio.
*/
interface AWSBedrockDataAutomation {
awsBucketName: string;
awsProfile?: string;
awsRegion?: string;
}
/**
* AWS Cloud Development Kit (CDK) best practices, infrastructure as code patterns, and security compliance with CDK Nag.
*/
interface AWSCDK {}
/**
* Starting point for using the awslabs MCP servers.
*/
interface AWSCore {}
/**
* Data processing and transformation services.
*/
interface AWSDataProcessing {
awsProfile: string;
awsRegion: string;
}
/**
* Seamlessly create diagrams using the Python diagrams package DSL. This server allows you to generate AWS diagrams, sequence diagrams, flow diagrams, and class diagrams using Python code.
*/
interface AWSDiagram {
outputDir: string;
}
/**
* Tools to access AWS documentation, search for content, and get recommendations.
*/
interface AWSDocumentation {}
/**
* Generate, run, debug lifescience workflows.
*/
interface AWSHealthOmics {
awsProfile: string;
awsRegion: string;
}
/**
* Industrial IoT asset management.
*/
interface AWSIoTSiteWise {
awsProfile: string;
awsRegion: string;
}
/**
* An MCP server implementation for retrieving information from the AWS Knowledge Base using the Bedrock Agent Runtime.
*/
interface AWSKBRetrievalArchived {
accessKeyId: string;
awsSecretAccessKey?: string;
}
/**
* Place search, geocoding, and route optimization.
*/
interface AmazonLocationService {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Managed Kafka cluster operations.
*/
interface AmazonMSK {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* AWS service pricing and cost estimates.
*/
interface AWSPricing {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Terraform on AWS best practices, infrastructure as code patterns, and security compliance with Checkov.
*/
interface AWSTerraform {}
/**
* Billing and cost management.
*/
interface AWSBillingAndCostManagement {
awsProfile: string;
awsRegion: string;
storageLensManifestLocation: string;
}
/**
* Direct resource management with security scanning.
*/
interface AWSCloudControlAPI {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
}
/**
* CloudFormation resource management via Cloud Control API.
*/
interface AWSCloudFormation {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* AWS CloudTrail audit logging and monitoring.
*/
interface AWSCloudTrail {
awsProfile: string;
}
/**
* Metrics, alarms, and logs analysis.
*/
interface AmazonCloudWatch {
awsProfile: string;
awsRegion: string;
}
/**
* Application performance monitoring and insights.
*/
interface AmazonCloudWatchApplicationSignals {
awsProfile: string;
awsRegion: string;
}
/**
* Detailed cost analysis and reporting.
*/
interface AWSCostExplorer {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Complete DynamoDB operations and table management.
*/
interface AmazonDynamoDB {
awsProfile: string;
awsRegion: string;
}
/**
* ElastiCache control plane operations.
*/
interface AmazonElastiCache {
awsProfile: string;
awsRegion: string;
}
/**
* IAM user, role, group, and policy management.
*/
interface AWSIAM {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
}
/**
* High-speed caching with Memcached.
*/
interface AmazonElastiCacheForMemcached {
memcachedHost: string;
memcachedPort?: string;
}
/**
* AI image generation using Amazon Nova Canvas.
*/
interface AWSLabsNovaCanvas {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Data warehouse operations and queries.
*/
interface AmazonRedshift {
awsProfile: string;
awsRegion: string;
}
/**
* Manage S3 Tables for analytics.
*/
interface AWSS3Tables {
awsAccessKeyId: string;
awsProfile: string;
awsRegion: string;
awsSecretAccessKey: string;
awsSessionToken: string;
}
/**
* Time-series database operations.
*/
interface AmazonTimestreamForInfluxDB {
awsProfile: string;
awsRegion: string;
}
/**
* Advanced data structures with Valkey.
*/
interface AmazonElastiCacheMemoryDBForValkey {
valkeyHost: string;
valkeyPort: string;
}
/**
* Catalog of official Microsoft MCP (Model Context Protocol) server implementations for AI-powered data access and tool integration.
*/
interface Azure {}
/**
* Connects with the Beagle Security backend using a user token to manage applications, run automated security tests, track vulnerabilities across environments, and gain intelligence from Application and API vulnerability data.
*/
interface BeagleSecurity {
beagleSecurityApiToken: string;
}
/**
* A Model Context Protocol Server connector for Bitrefill public API, to enable AI agents to search and shop on Bitrefill.
*/
interface Bitrefill {
apiId: string;
apiSecret?: string;
}
/**
* An MCP server capable of interacting with the Box API.
*/
interface Box {
clientId: string;
clientSecret?: string;
}
/**
* Search the Web for pages, images, news, videos, and more using the Brave Search API.
*/
interface BraveSearch {
apiKey: string;
}
/**
* Allow LLMs to control a browser with Browserbase and Stagehand for AI-powered web automation, intelligent data extraction, and screenshot capture.
*/
interface Browserbase {
apiKey: string;
geminiApiKey: string;
projectId: string;
}
/**
* Buildkite MCP lets agents interact with Buildkite Builds, Jobs, Logs, Packages and Test Suites.
*/
interface Buildkite {
apiToken: string;
}
/**
* Tools to interact with the Camunda 7 Community Edition Engine using the Model Context Protocol (MCP). Whether you're automating workflows, querying process instances, or integrating with external systems, Camunda MCP Server is your agentic solution for seamless interaction with Camunda.
*/
interface CamundaBPMProcessEngine {
camundahost: string;
}
/**
* An MCP server for CharmHealth EHR that allows LLMs and MCP clients to interact with patient records, encounters, and practice information.
*/
interface CharmHealth {
charmhealthApiKey: string;
charmhealthBaseUrl: string;
charmhealthClientId: string;
charmhealthClientSecret: string;
charmhealthRedirectUri: string;
charmhealthRefreshToken: string;
charmhealthTokenUrl: string;
}
/**
* A Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma.
*/
interface Chroma {
apiKey: string;
}
/**
* A specialized server implementation for the Model Context Protocol (MCP) designed to integrate with CircleCI's development workflow. This project serves as a bridge between CircleCI's infrastructure and the Model Context Protocol, enabling enhanced AI-powered development experiences.
*/
interface CircleCI {
token: string;
url: string;
}
/**
* Official ClickHouse MCP Server.
*/
interface OfficialClickHouse {
connectTimeout: string;
host: string;
password: string;
port: string;
secure: string;
sendReceiveTimeout: string;
user: string;
verify: string;
}
/**
* Streamline sales processes with integrated calling, email, SMS, and automated workflows for small and scaling businesses.
*/
interface Close {
apiKey: string;
}
/**
* MCP server to deploy apps to Cloud Run.
*/
interface CloudRun {
/**
* path to application-default credentials (eg $HOME/.config/gcloud/application_default_credentials.json )
*/
credentialsPath: string;
}
/**
* Access the latest documentation on Cloudflare products such as Workers, Pages, R2, D1, KV.
*/
interface CloudflareDocs {}
/**
* Enable AI agents to manage, monitor, and query CockroachDB using natural language. Perform complex database operations, cluster management, and query execution seamlessly through AI-driven workflows. Integrate effortlessly with MCP clients for scalable and high-performance data operations.
*/
interface CockroachDB {
caPath: string;
crdbPwd: string;
database: string;
host: string;
port: number;
sslCertfile: string;
sslKeyfile: string;
sslMode: string;
username: string;
}
/**
* A Python-based execution tool that mimics a Jupyter notebook environment. It accepts code snippets, executes them, and maintains state across sessions — preserving variables, imports, and past results. Ideal for iterative development, debugging, or code execution.
*/
interface PythonInterpreter {}
/**
* Pull up-to-date, version-specific documentation and code examples for any library or framework straight into your prompt.
*/
interface Context7 {
apiKey: string;
}
/**
* Couchbase is a distributed document database with a powerful search engine and in-built operational and analytical capabilities.
*/
interface Couchbase {
/**
* Bucket in the Couchbase cluster to use for the MCP server.
*/
cbBucketName: string;
/**
* Connection string for the Couchbase cluster.
*/
cbConnectionString: string;
/**
* Setting to "true" (default) enables read-only query mode while running SQL++ queries.
*/
cbMcpReadOnlyQueryMode: string;
cbPassword: string;
/**
* Username for the Couchbase cluster with access to the bucket.
*/
cbUsername: string;
}
/**
* Brings context about device inventory, threats, risks and utilization powered by the Cylera Partner API into an LLM.
*/
interface Cylera {
cyleraBaseUrl: string;
cyleraPassword: string;
cyleraUsername: string;
}
/**
* A Model Context Protocol server that provides access to Shodan API functionality.
*/
interface Shodan {
shodanApiKey: string;
}
/**
* Enable fast, free real-time web search and access premium data from trusted media brands—news, financial markets, sports, entertainment, weather, and more. Build powerful AI agents with Dappier.
*/
interface Dappier {
apiKey: string;
}
/**
* Enable fast, free real-time web search and access premium data from trusted media brands—news, financial markets, sports, entertainment, weather, and more. Build powerful AI agents with Dappier.
*/
interface DappierRemote {
dappierRemoteApiKey: string;
}
/**
* Dart AI Model Context Protocol (MCP) server.
*/
interface DartAI {
host: string;
token: string;
}
/**
* Comprehensive database server supporting PostgreSQL, MySQL, and SQLite with natural language SQL query capabilities. Enables AI agents to interact with databases through both direct SQL and natural language queries.
*/
interface MCPDatabaseServer {
/**
* Connection string for your database. Examples: SQLite: sqlite+aiosqlite:///data/mydb.db, PostgreSQL: postgresql+asyncpg://user:password@localhost:5432/mydb, MySQL: mysql+aiomysql://user:password@localhost:3306/mydb
*/
databaseUrl: string;
}
/**
* Databutton MCP Server.
*/
interface Databutton {}
/**
* Tools for fetching and asking questions about GitHub repositories.
*/
interface DeepWiki {}
/**
* The Descope Model Context Protocol (MCP) server provides an interface to interact with Descope's Management APIs, enabling the search and retrieval of project-related information.
*/
interface Descope {
managementKey?: string;
projectId: string;
}
/**
* Search, update, manage files and run terminal commands with AI.
*/
interface DesktopCommander {
/**
* List of directories that Desktop Commander can access
*/
paths: string[];
}
/**
* DevHub CMS LLM integration through the Model Context Protocol.
*/
interface DevHubCMS {
devhubApiKey?: string;
devhubApiSecret?: string;
url: string;
}
/**
* Interact with the Discord platform.
*/
interface Discord {
discordToken: string;
}
/**
* Docker Hub official MCP server.
*/
interface DockerHub {
hubPatToken: string;
username: string;
}
/**
* Tools for cross-border payments, taxes, and compliance.
*/
interface DodoPayments {
dodoPaymentsApiKey: string;
}
/**
* Provides detailed type information from .NET projects including assembly exploration, namespace discovery, type reflection, and NuGet integration for AI coding agents.
*/
interface NETTypesExplorer {}
/**
* DreamFactory is a REST API generation platform with support for hundreds of data sources, including Microsoft SQL Server, MySQL, PostgreSQL, and MongoDB. The DreamFactory MCP Server makes it easy for users to securely interact with their data sources via an MCP client.
*/
interface DreamFactory {
dreamfactoryapikey: string;
dreamfactoryurl: string;
}
/**
* Community-maintained server for DuckDuckGo search. Not published by or affiliated with DuckDuckGo.
*/
interface PrivateWebSearch {}
/**
* This MCP Server allows interaction with the Dynatrace observability platform, brining real-time observability data directly into your development workflow.
*/
interface Dynatrace {
oauthClientId: string;
oauthClientSecret: string;
url: string;
}
/**
* Giving Claude ability to run code with E2B via MCP (Model Context Protocol).
*/
interface E2B$1 {
apiKey: string;
}
/**
* The EduBase MCP server enables Claude and other LLMs to interact with EduBase's comprehensive e-learning platform through the Model Context Protocol (MCP).
*/
interface EduBase {
apiKey?: string;
app: string;
url: string;
}
/**
* Tools and resources for writing Effect code in Typescript.
*/
interface Effect {}
/**
* Interact with your Elasticsearch indices through natural language conversations.
*/
interface Elasticsearch {
esApiKey?: string;
url: string;
}
/**
* Official ElevenLabs Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech and audio processing APIs.
*/
interface ElevenLabs {
apiKey?: string;
data: string;
}
/**
* Image generation server using EverArt's API.
*/
interface EverArtArchived {
apiKey: string;
}
/**
* Exa MCP for web search and web crawling!.
*/
interface Exa {
apiKey: string;
}
/**
* Discover companies, contacts, and business insights—powered by dozens of trusted external data sources.
*/
interface ExploriumB2BData {
apiAccessToken: string;
}
/**
* Fetches a URL from the internet and extracts its contents as markdown.
*/
interface FetchReference {}
/**
* Interact with your Fibery workspace.
*/
interface Fibery {
apiToken: string;
host: string;
}
/**
* Local filesystem access with configurable allowed paths.
*/
interface FilesystemReference {
paths: string[];
}
/**
* Tools for finding domain names.
*/
interface FindADomain {}
/**
* 🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
*/
interface Firecrawl {
apiKey: string;
creditCriticalThreshold: number;
creditWarningThreshold: number;
retryBackoffFactor: number;
retryDelay: number;
retryMax: number;
retryMaxDelay: number;
url: string;
}
/**
* Real-time network monitoring, security analysis, and firewall management through 28 specialized tools. Access security alerts, network flows, device status, and firewall rules directly from your Firewalla device.
*/
interface Firewalla {
/**
* Your Firewalla Box Global ID
*/
boxId: string;
firewallaMspToken: string;
/**
* Your Firewalla MSP domain (e.g., yourdomain.firewalla.net)
*/
mspId: string;
}
/**
* Provides tools to search and retrieve Google Gemini API documentation.
*/
interface GeminiAPIDocs {}
/**
* Git repository interaction and automation.
*/
interface GitReference {
paths: string[];
}
/**
* Tools for interacting with the GitHub API, enabling file operations, repository management, search functionality, and more.
*/
interface GitHubArchived {
personalAccessToken: string;
}
/**
* A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
*/
interface GitHubChat {
githubApiKey: string;
}
/**
* Official GitHub MCP Server, by GitHub. Provides seamless integration with GitHub APIs, enabling advanced automation and interaction capabilities for developers and tools.
*/
interface GitHubOfficial {
githubPersonalAccessToken: string;
}
/**
* MCP Server for the GitLab API, enabling project management, file operations, and more.
*/
interface GitLabArchived {
personalAccessToken: string;
/**
* api url - optional for self-hosted instances
*/
url: string;
}
/**
* Tools for interacting with Git repositories.
*/
interface GitMCP {}
/**
* Deprecated — use the hosted Glif MCP server at https://glif.app/mcp.
*/
interface GlifApp {
apiToken: string;
ids: string;
ignoredSaved: boolean;
}
/**
* A Model Context Protocol server for Gmail operations using IMAP/SMTP with app password authentication. Supports listing messages, searching emails, and sending messages. To create your app password, visit your Google Account settings under Security > App Passwords. Or visit the link https://myaccount.google.com/apppasswords.
*/
interface Gmail {
/**
* Your Gmail email address
*/
emailAddress: string;
emailPassword?: string;
}
/**
* Interact with Google Flights data to search for one-way, round-trip, and date range flight options between airports.
*/
interface GoogleFlights {}
/**
* Tools for interacting with the Google Maps API.
*/
interface GoogleMapsArchived {
googleMapsApiKey: string;
}
/**
* Complete Google Maps integration with 8 tools including geocoding, places search, directions, elevation data, and more using Google's latest APIs.
*/
interface GoogleMapsComprehensive {
googleMapsApiKey: string;
}
/**
* MCP server for Grafana.
*/
interface Grafana {
apiKey: string;
url: string;
}
/**
* Official Model Context Protocol server for Gyazo.
*/
interface Gyazo {
accessToken: string;
}
/**
* A Model Context Protocol (MCP) server that provides access to Hacker News stories, comments, and user data, with support for search and content retrieval.
*/
interface HackerNews {}
/**
* Model Context Protocol server for Hackle.
*/
interface Hackle {
apiKey: string;
}
/**
* Model Context Protocol (MCP) Server for Handwriting OCR.
*/
interface HandwritingOCR {
apiToken: string;
}
/**
* HDX MCP Server provides access to humanitarian data through the Humanitarian Data Exchange (HDX) API - https://data.humdata.org/hapi. This server offers 33 specialized tools for retrieving humanitarian information including affected populations (refugees, IDPs, returnees), baseline demographics, food security indicators, conflict data, funding information, and operational presence across hundreds of countries and territories. See repository for instructions on getting a free HDX_APP_INDENTIFIER for access.
*/
interface HumanitarianDataExchange {
appIdentifier: string;
}
/**
* Heroku Platform MCP Server using the Heroku CLI.
*/
interface Heroku {
apiKey: string;
}
/**
* Interact with Hostinger services over the Hostinger API.
*/
interface HostingerAPI {
apitoken: string;
}
/**
* A Model Context Protocol (MCP) server that exposes Hoverfly as a programmable tool for AI assistants like Cursor, Claude, GitHub Copilot, and others supporting MCP. It enables dynamic mocking of third-party APIs to unblock development, automate testing, and simulate unavailable services during integration.
*/
interface Hoverfly {
data: string;
}
/**
* Unite marketing, sales, and customer service with AI-powered automation, lead management, and comprehensive analytics.
*/
interface HubSpot {
apiKey: string;
}
/**
* Tools for interacting with Hugging Face models, datasets, research papers, and more.
*/
interface HuggingFace {}
/**
* Hummingbot MCP is an open-source toolset that lets you control and monitor your Hummingbot trading bots through AI-powered commands and automation.
*/
interface HummingbotTradingAgent {
apiUrl: string;
hummingbotApiPassword?: string;
hummingbotApiUsername?: string;
}
/**
* MCP Server for huqsvarna automower.
*/
interface HusqvarnaAutomower {
clientId: string;
husqvarnaClientSecret: string;
}
/**
* A MCP server implementation for hyperbrowser.
*/
interface Hyperbrowser {
apiKey: string;
}
/**
* Hyperspell MCP Server.
*/
interface Hyperspell {
collection: string;
token: string;
useResources: boolean;
}
/**
* Model Context Protocol server for interacting with iaptic.
*/
interface Iaptic {
apiKey?: string;
appName: string;
}
/**
* AI interface to troubleshoot and observe Kubernetes/Container workloads.
*/
interface InspektorGadget {
/**
* Comma-separated list of gadget images (trace_dns, trace_tcp, etc) to use, allowing control over which gadgets are available as MCP tools
*/
gadgetImages?: string;
/**
* Path to the kubeconfig file for accessing Kubernetes clusters
*/
kubeconfig: string;
}
/**
* Access to Java, Kotlin, and Scala library documentation.
*/
interface Javadocs {}
/**
* A model context protocol server to work with JetBrains IDEs: IntelliJ, PyCharm, WebStorm, etc. Also, works with Android Studio.
*/
interface JetBrains {
port: number;
}
/**
* Comprehensive MCP server for Kafka Schema Registry operations. Features multi-registry support, schema contexts, migration tools, OAuth authentication, and 57+ tools for complete schema management. Supports SLIM_MODE for optimal performance.
*/
interface KafkaSchemaRegistry {
/**
* Schema Registry URL
*/
registryUrl: string;
schemaRegistryPassword?: string;
schemaRegistryUser?: string;
/**
* Enable SLIM_MODE for better performance
*/
slimMode?: string;
/**
* Enable read-only mode
*/
viewonly?: string;
}
/**
* The Official Model Context Protocol (MCP) server for Kagi Search & other tools.
*/
interface KagiSearch {
engine: string;
kagiApiKey: string;
}
/**
* Keboola MCP Server is an open-source bridge between your Keboola project and modern AI tools.
*/
interface Keboola {
kbcStorageToken: string;
kbcWorkspaceSchema: string;
}
/**
* A Model Context Protocol (MCP) server for interacting with Kong Konnect APIs, allowing AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.
*/
interface KongKonnect {
konnectAccessToken: string;
region: string;
}
/**
* MCP Server that enables AI assistants to interact with Kubernetes clusters via kubectl operations.
*/
interface Kubectl {
kubeconfig: string;
}
/**
* Connect to a Kubernetes cluster and manage it.
*/
interface Kubernetes {
/**
* the path to the host .kube/config
*/
configPath: string;
}
/**
* Connect to Lara Translate API, enabling powerful translation capabilities with support for language detection and context-aware translations.
*/
interface LaraTranslate {
accessKeySecret?: string;
keyId: string;
}
/**
* MCP server that integrates the LINE Messaging API to connect an AI Agent to the LINE Official Account.
*/
interface LINE {
channelAccessToken?: string;
userId: string;
}
/**
* This MCP server allows Claude and other AI assistants to access your LinkedIn. Scrape LinkedIn profiles and companies, get your recommended jobs, and perform job searches. Set your li_at LinkedIn cookie to use this server.
*/
interface LinkedIn {
linkedinCookie: string;
/**
* Custom user agent string (optional, helps avoid detection and cookie login issues)
*/
userAgent: string;
}
/**
* Discovers and retrieves llms.txt from websites.
*/
interface LLMText {}
/**
* A Model Context Protocol (MCP) server exposing Bitcoin blockchain data through the Maestro API platform. Provides tools to explore blocks, transactions, addresses, inscriptions, runes, and other metaprotocol data.
*/
interface Maestro {
apiKeyApiKey: string;
}
/**
* Tools for accessing the Manifold Markets online prediction market platform.
*/
interface Manifold {}
/**
* Transform any AI agent into a geospatially-aware system with Mapbox APIs. Provides geocoding, POI search, routing, travel time matrices, isochrones, and static map generation.
*/
interface Mapbox {
accessToken: string;
}
/**
* Direct access to Mapbox developer APIs for AI assistants. Enables style management, token management, GeoJSON preview, and other developer tools for building Mapbox applications.
*/
interface MapboxDeveloper {
mapboxAccessToken: string;
}
/**
* A Model Context Protocol server for converting almost anything to Markdown.
*/
interface Markdownify {
paths: string[];
}
/**
* A lightweight MCP server for calling MarkItDown.
*/
interface Markitdown {
paths: string[];
}
/**
* JVM dependency intelligence for any build tool using Maven Central Repository. Includes Context7 integration for upgrade documentation and guidance.
*/
interface MavenTools {}
/**
* Knowledge graph-based persistent memory system.
*/
interface MemoryReference {}
/**
* Provides access to Mercado Libre E-Commerce API.
*/
interface MercadoLibre {
mercadoLibreApiKey: string;
}
/**
* Provides access to Mercado Pago Marketplace API.
*/
interface MercadoPago {
mercadoPagoApiKey: string;
}
/**
* A comprehensive MCP server for Metabase with 70+ tools.
*/
interface Metabase {
apiKey: string;
metabaseurl: string;
metabaseusername: string;
password: string;
}
/**
* A MCP Server for browsing the official Minecraft Wiki!.
*/
interface MinecraftWiki {}
/**
* A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
*/
interface MongoDB {
mdbMcpConnectionString: string;
}
/**
* MCP Server for MultiversX.
*/
interface MultiversX {
network: string;
wallet: string;
}
/**
* Bridges n8n's workflow automation platform with AI models, providing access to 543 n8n nodes, workflow templates, and AI-capable automation tools.
*/
interface N8N {
apiKey: string;
/**
* The URL of your n8n instance (use http://host.docker.internal:5678 for local instances)
*/
apiUrl: string;
}
/**
* MCP server to interact with the data feeds provided by the Nasdaq Data Link. Developed by the community and maintained by Stefano Amorelli.
*/
interface NasdaqDataLink {
nasdaqDataLinkApiKey: string;
}
/**
* Production-ready RAG service to search and retrieve data from your documents.
*/
interface Needle {
needleApiKey: string;
}
/**
* Official MCP server for Neo4j. Interact with Neo4j using Cypher graph queries.
*/
interface Neo4J {
database: string;
password: string;
readOnly: boolean;
telemetry: boolean;
uri: string;
username: string;
}
/**
* Manage Neo4j Aura database instances through the Neo4j Aura API.
*/
interface Neo4JCloudAuraApi {
clientId: string;
neo4jAuraClientSecret?: string;
serverAllowOrigins?: string;
serverAllowedHosts?: string;
serverHost?: string;
serverPath?: string;
serverPort?: string;
transport?: string;
}
/**
* Interact with Neo4j using Cypher graph queries.
*/
interface Neo4JCypher {
database?: string;
namespace?: string;
neo4jPassword?: string;
readOnly?: boolean;
readTimeout?: string;
responseTokenLimit?: string;
schemaSampleSize?: string;
serverAllowOrigins?: string;
serverAllowedHosts?: string;
serverHost?: string;
serverPath?: string;
serverPort?: string;
transport?: string;
url: string;
username: string;
}
/**
* MCP server that assists in creating, validating and visualizing graph data models.
*/
interface Neo4JDataModeling {
serverAllowOrigins: string;
serverAllowedHosts: string;
serverHost: string;
serverPath: string;
serverPort: string;
transport: string;
}
/**
* Provide persistent memory capabilities through Neo4j graph database integration.
*/
interface Neo4JMemory {
database?: string;
neo4jPassword?: string;
serverAllowOrigins?: string;
serverAllowedHosts?: string;
serverHost?: string;
serverPath?: string;
serverPort?: string;
transport?: string;
url: string;
username: string;
}
/**
* MCP server for interacting with Neon Management API and databases.
*/
interface Neon {
apiKey: string;
}
/**
* next-devtools-mcp is a Model Context Protocol (MCP) server that provides Next.js development tools and utilities for AI coding assistants.
*/
interface NextJsDevTools {}
/**
* A Node.js–based Model Context Protocol server that spins up disposable Docker containers to execute arbitrary JavaScript.
*/
interface NodeJsSandbox {}
/**
* Official Notion MCP Server.
*/
interface Notion {
internalIntegrationToken: string;
}
/**
* Seamless interaction with Novita AI platform resources.
*/
interface Novita {}
/**
* MCP server that enables intelligent NPM package analysis powered by AI.
*/
interface NPMSentinel {}
/**
* MCP server that interacts with Obsidian via the Obsidian rest API community plugin.
*/
interface Obsidian {
apiKey: string;
}
/**
* ## :tada: __It's Official__ :tada: The Okta Open-Source MCP Server integrates with LLMs and AI agents, allowing you to perform various Okta management operations using natural language and is Generally Available (GA).
*/
interface Okta {
logPath: string;
oktaClientId: string;
oktaKeyId: string;
oktaLogLevel: string;
oktaOrgUrl: string;
oktaPrivateKey: string;
oktaScopes: string;
}
/**
* Secure Okta identity and access management via Model Context Protocol (MCP). Access Okta users, groups, applications, logs, and policies through AI assistants with enterprise-grade security.
*/
interface Okta1 {
/**
* Okta organization URL (e.g., https://dev-123456.okta.com)
*/
clientOrgurl: string;
/**
* Maximum concurrent requests to Okta API
*/
concurrentLimit?: string;
/**
* Logging level for server output
*/
logLevel?: string;
oktaApiToken?: string;
}
/**
* A Model Context Protocol server for Omi interaction and automation. This server provides tools to read, search, and manipulate Memories and Conversations.
*/
interface Omi {
apiKey: string;
}
/**
* ONLYOFFICE DocSpace is a room-based collaborative platform which allows organizing a clear file structure depending on users' needs or project goals.
*/
interface ONLYOFFICEDocSpace {
baseUrl: string;
docspaceApiKey: string;
}
/**
* Fetch, validate, and generate code or curl from any OpenAPI or Swagger spec - all from a single URL.
*/
interface OpenAPIToolkit {
mode: string;
}
/**
* OpenAPI Schema Model Context Protocol Server.
*/
interface OpenAPISchema {
SchemaPath: string;
}
/**
* MCP Server for searching Airbnb and get listing details.
*/
interface AirbnbSearch {}
/**
* Discover and connect to a curated marketplace of MCP servers for extending AI agent capabilities.
*/
interface OpenMesh {}
/**
* A simple MCP service that provides current weather and 5-day forecast using the free OpenWeatherMap API.
*/
interface Openweather {
owmApiKey: string;
}
/**
* Access to OpenZeppelin Cairo Contracts.
*/
interface OpenZeppelinCairoContracts {}
/**
* Access to OpenZeppelin Solidity Contracts.
*/
interface OpenZeppelinSolidityContracts {}
/**
* Access to OpenZeppelin Stellar Contracts.
*/
interface OpenZeppelinStellarContracts {}
/**
* Access to OpenZeppelin Stylus Contracts.
*/
interface OpenZeppelinStylusContracts {}
/**
* Model Context Protocol (MCP) server for Opik, the open-source LLM observability and evaluation platform, built by Comet. Read traces, log scores, and manage prompts from Claude Code, Cursor, or VS Code.
*/
interface Opik {
apiBaseUrl: string;
apiKey: string;
workspaceName: string;
}
/**
* A Model Context Protocol (MCP) server for querying deals and evaluations from the Opine CRM API.
*/
interface Opine {
opineApiKey: string;
}
/**
* Connect to Oracle databases via MCP, providing secure read-only access with support for schema exploration, query execution, and metadata inspection.
*/
interface OracleDatabase {
oracleConnectionString: string;
oracleUser: string;
password: string;
}
/**
* A Model Context Protocol (MCP) server that empowers LLMs to use some of Open Srategy Partners' core writing and product marketing techniques.
*/
interface OSPMarketingTools {}
/**
* A Model Context Protocol (MCP) server that enables AI assistants like Claude to seamlessly access web data through Oxylabs' powerful web scraping technology.
*/
interface Oxylabs {
password?: string;
username: string;
}
/**
* MCP, CLI, Skills for searching and downloading academic papers from multiple sources like arXiv, PubMed, bioRxiv, etc.
*/
interface PaperSearch {}
/**
* Connector for Perplexity API, to enable real-time, web-wide research.
*/
interface Perplexity {
perplexityApiKey: string;
}
/**
* An MCP server to help make U.S. Government open datasets AI-friendly.
*/
interface ProgramIntegrityAlliance {
apiKey: string;
}
/**
* Pinecone Assistant MCP server.
*/
interface PineconeAssistant {
apiKey: string;
assistantHost: string;
}
/**
* Playwright Model Context Protocol Server - Tool to automate Browsers and APIs in Claude Desktop, Cline, Cursor IDE and More 🔌.
*/
interface ExecuteAutomationPlaywright {
data: string;
}
/**
* A unified MCP proxy that aggregates multiple MCP servers into one interface, enabling seamless tool discovery and management across all your AI interactions. Manage all your MCP servers from a single connection point with RAG capabilities and real-time notifications.
*/
interface PluggedInProxy {
/**
* Base URL for the Plugged.in API (optional, defaults to https://plugged.in for cloud or http://localhost:12005 for self-hosted)
*/
pluggedinApiBaseUrl: string;
pluggedinApiKey: string;
}
/**
* MCP server for Polar Signals Cloud continuous profiling platform, enabling AI assistants to analyze CPU performance, memory usage, and identify optimization opportunities in production systems.
*/
interface PolarSignals {
polarSignalsApiKey: string;
}
/**
* Connect your AI assistant to PomoDash for seamless task and project management.
*/
interface PomoDash {
apiKey: string;
}
/**
* Postman's MCP server connects AI agents, assistants, and chatbots directly to your APIs on Postman. Use natural language to prompt AI to automate work across your Postman collections, environments, workspaces, and more.
*/
interface Postman {
apiKey: string;
}
/**
* Pref Editor is a tool for viewing and editing Android app preferences during development.
*/
interface PrefEditor {}
/**
* A Model Context Protocol (MCP) server that enables AI assistants to query and analyze Prometheus metrics through standardized interfaces. Connect to your Prometheus instance to retrieve metrics, perform queries, and gain insights into your system's performance and health.
*/
interface Prometheus {
/**
* The URL of your Prometheus server
*/
prometheusUrl: string;
}
/**
* Manage Proxmox VE infrastructure including virtual machines, containers, storage, networking, firewall rules, high availability, and more.
*/
interface ProxmoxVE {
/**
* Proxmox VE hostname or IP address
*/
host: string;
password?: string;
/**
* Proxmox VE API port
*/
port?: string;
/**
* Request timeout in seconds
*/
timeout?: string;
/**
* API token name
*/
tokenName: string;
tokenValue: string;
/**
* Proxmox VE user (e.g. root@pam)
*/
user?: string;
/**
* Verify SSL certificates (true/false)
*/
verifySsl?: string;
}
/**
* Browser automation and web scraping using Puppeteer.
*/
interface PuppeteerArchived {}
/**
* Educational Python refactoring assistant that provides guided suggestions for AI assistants.
*/
interface PythonRefactoringAssistant {}
/**
* The QuantConnect MCP Server is a bridge for AIs (such as Claude and OpenAI o3 Pro) to interact with our cloud platform. When equipped with our MCP, the AI can perform tasks on your behalf through our API such as updating projects, writing strategies, backtesting, and deploying strategies to production live-trading.
*/
interface QuantConnect {
agentname: string;
quantconnectapitoken: string;
quantconnectuserid: string;
}
/**
* A comprehensive security scanner for MCP servers with YARA rules and static analysis capabilities.
*/
interface RampartsSecurityScanner {}
/**
* Razorpay's Official MCP Server.
*/
interface Razorpay {
keyId: string;
keySecret?: string;
}
/**
* This server provides AI agents with tools to fetch, post and search on Reddit.
*/
interface Reddit {
redditClientId: string;
redditClientSecret: string;
redditPassword: string;
username: string;
}
/**
* Access to Redis database operations.
*/
interface Redis {
caCerts: string;
caPath: string;
certReqs: string;
clusterMode: boolean;
host: string;
port: number;
pwd: string;
ssl: boolean;
sslCertfile: string;
sslKeyfile: string;
username: string;
}
/**
* MCP Server for Redis Cloud's API, allowing you to manage your Redis Cloud resources using natural language.
*/
interface RedisCloud {
apiKey: string;
secretKey?: string;
}
/**
* Ref powerful search tool connets your coding tools with documentation context. It includes an up-to-date index of public documentation and it can ingest your private documentation (eg. GitHub repos, PDFs) as well.
*/
interface RefUpToDateDocs {
apiKey: string;
}
/**
* Tools for finding remote MCP servers.
*/
interface RemoteMCP {}
/**
* Interact with your Render resources via LLMs.
*/
interface Render {
apiKey: string;
}
/**
* The official MCP server to send emails and interact with Resend.
*/
interface Resend {
apiKey?: string;
/**
* comma separated list of reply to email addresses
*/
replyTo: string;
/**
* sender email address
*/
sender: string;
}
/**
* RISKEN's official MCP Server.
*/
interface RISKEN {
accessToken: string;
url: string;
}
/**
* Python server implementing Model Context Protocol (MCP) for ROS2.
*/
interface WiseVisionROS2 {}
/**
* Access to Rube's catalog of remote MCP servers.
*/
interface Rube {
apiKey: string;
}
/**
* The Rust MCP Filesystem is a high-performance, asynchronous, and lightweight Model Context Protocol (MCP) server built in Rust for secure and efficient filesystem operations. Designed with security in mind, it operates in read-only mode by default and restricts clients from updating allowed directories via MCP Roots unless explicitly enabled, ensuring robust protection against unauthorized access. Leveraging asynchronous I/O, it delivers blazingly fast performance with a minimal resource footprint. Optimized for token efficiency, the Rust MCP Filesystem enables large language models (LLMs) to precisely target searches and edits within specific sections of large files and restrict operations by file size range, making it ideal for efficient file exploration, automation, and system integration.
*/
interface RustFilesystem {
/**
* Enable read/write mode. If false, the app operates in read-only mode.
*/
allowWrite: boolean;
/**
* List of directories that rust-mcp-filesystem can access.
*/
allowedDirectories: string[];
/**
* Enable dynamic directory access control via MCP client-side Roots.
*/
enableRoots: boolean;
}
/**
* The SchemaCrawler AI MCP Server enables natural language interaction with your database schema using an MCP client in "Agent" mode. It allows users to explore tables, columns, foreign keys, triggers, stored procedures and more simply by asking questions like "Explain the code for the interest calculation stored procedure". You can also ask it to help with SQL, since it knows your schema. This is ideal for developers, DBAs, and data analysts who want to streamline schema comprehension and query development without diving into dense documentation.
*/
interface SchemaCrawlerAI {
/**
* --info-level How much database metadata to retrieve
*/
generalInfoLevel: string;
generalLogLevel?: string;
schcrwlrDatabasePassword?: string;
schcrwlrDatabaseUser?: string;
/**
* --database Database to connect to (optional)
*/
serverConnectionDatabase?: string;
/**
* --host Database host (optional)
*/
serverConnectionHost?: string;
/**
* --port Database port (optional)
*/
serverConnectionPort?: number;
/**
* --server SchemaCrawler database plugin
*/
serverConnectionServer: string;
/**
* --url JDBC URL for database connection
*/
urlConnectionJdbcUrl: string;
/**
* Host volume to map within the Docker container
*/
volumeHostShare: string;
}
/**
* This adds a border to an image and returns base64 encoded image.
*/
interface SchoginiImageBorder {}
/**
* ScapeGraph MCP Server.
*/
interface ScrapeGraph {
sgaiApiKey: string;
}
/**
* A Model Context Protocol server for Scrapezy that enables AI models to extract structured data from websites.
*/
interface Scrapezy {
apiKey: string;
}
/**
* SecureNote.link MCP Server - allowing AI agents to securely share sensitive information through end-to-end encrypted notes.
*/
interface SecurenoteLink {}
/**
* MCP server for using Semgrep to scan code for security vulnerabilities.
*/
interface Semgrep {}
/**
* A Model Context Protocol server for retrieving and analyzing issues from Sentry.io. This server provides tools to inspect error reports, stacktraces, and other debugging information from your Sentry account.
*/
interface SentryArchived {
authToken: string;
}
/**
* Stop stitching context for Copilot and Cursor. With Sequa MCP, your AI tools know your entire codebase and docs out of the box.
*/
interface SequaAI {
apiKey: string;
mcpServerUrl: string;
}
/**
* Dynamic and reflective problem-solving through thought sequences.
*/
interface SequentialThinkingReference {}
/**
* Access to Short.io's link shortener and analytics tools.
*/
interface ShortIo {
shortIoApiKey: string;
}
/**
* Advanced SimpleCheckList with MCP server and SQLite database for comprehensive task management. Features: • Complete project and task management system • Hierarchical organization (Projects → Groups → Task Lists → Tasks → Subtasks) • SQLite database for data persistence • RESTful API with comprehensive endpoints • MCP protocol compliance for AI assistant integration • Docker-optimized deployment with stability improvements **v1.0.1 Update**: Enhanced Docker stability with improved container lifecycle management. Default mode optimized for containerized deployment with reliable startup and shutdown processes. Perfect for AI assistants managing complex project workflows and task hierarchies.
*/
interface SimpleCheckList {}
/**
* MCP server for interacting with SingleStore Management API and services.
*/
interface Singlestore {
mcpApiKey: string;
}
/**
* Interact with Slack Workspaces over the Slack API.
*/
interface SlackArchived {
botToken?: string;
channelIds?: string;
teamId: string;
}
/**
* MCP server for AI access to SmartBear tools, including BugSnag, Reflect, API Hub, PactFlow.
*/
interface SmartBear {
apiHubApiKey: string;
bugsnagApiKey: string;
bugsnagAuthToken: string;
bugsnagEndpoint: string;
pactBrokerBaseUrl: string;
pactBrokerPassword: string;
pactBrokerToken: string;
pactBrokerUsername: string;
reflectApiToken: string;
}
/**
* Interact with SonarQube Cloud, Server and Community build over the web API. Analyze code to identify quality and security issues.
*/
interface SonarQube {
/**
* Organization key for SonarQube Cloud, not required for SonarQube Server or Community Build
*/
org: string;
token: string;
/**
* URL of the SonarQube instance, to provide only for SonarQube Server or Community Build
*/
url: string;
}
/**
* Database interaction and business intelligence capabilities.
*/
interface SQLiteArchived {}
/**
* AI-powered DevOps assistant for managing cloud infrastructure and applications.
*/
interface StackGen {
token?: string;
/**
* URL of your StackGen instance
*/
url: string;
}
/**
* A Model Context Protocol (MCP) server for integrating with StackHawk's security scanning platform. Provides security analytics, YAML configuration management, sensitive data/threat surface analysis, and anti-hallucination tools for LLMs.
*/
interface StackHawk {
apiKey: string;
}
/**
* Interact with Stripe services over the Stripe API.
*/
interface Stripe {
secretKey: string;
}
/**
* Official Supadata MCP Server - Adds powerful video & web scraping to Cursor, Claude and any other LLM clients.
*/
interface Supadata {
apiKey: string;
}
/**
* MCP Server to interact with a SuzieQ network observability instance via its REST API.
*/
interface Suzieq {
apiEndpoint: string;
apiKey: string;
}
/**
* Model Context Protocol (MCP) server for comprehensive task and feature management, providing AI assistants with a structured, context-efficient way to interact with project data.
*/
interface TaskOrchestrator {}
/**
* The Tavily MCP server provides seamless interaction with the tavily-search and tavily-extract tools, real-time web search capabilities through the tavily-search tool and Intelligent data extraction from web pages via the tavily-extract tool.
*/
interface Tavily {
apiKey: string;
}
/**
* Tools for Teamwork.com products.
*/
interface Teamwork {
twMcpBearerToken: string;
}
/**
* Enables interaction with powerful telephony, messaging, and AI assistant APIs.
*/
interface Telnyx {
apiKey: string;
}
/**
* Manage Temporal workflows, schedules, namespaces, task queues, and workflow execution history from MCP clients.
*/
interface Temporal {
apiKey?: string;
/**
* Temporal frontend host and port.
*/
temporalHost: string;
/**
* Temporal namespace to connect to.
*/
temporalNamespace: string;
/**
* Optional path inside the container to an mTLS client certificate.
*/
temporalTlsClientCertPath?: string;
/**
* Optional path inside the container to an mTLS client private key.
*/
temporalTlsClientKeyPath?: string;
/**
* Whether to force TLS for the Temporal connection.
*/
temporalTlsEnabled?: string;
}
/**
* The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
*/
interface HashicorpTerraform {}
/**
* The Testkube MCP Server exposes continuous testing capabilities (test orchestration, execution, troubleshooting and anlysis) to AI tools and workflows.
*/
interface Testkube {
tkAccessToken: string;
/**
* The URL of the Testkube Control Plane
*/
tkControlPlaneUrl: string;
tkEnvId: string;
tkOrgId: string;
}
/**
* Transform natural language queries into GraphQL queries using an AI agent. Provides schema management, query validation, execution, and history tracking.
*/
interface TextToGraphQL {
graphqlApiKey: string;
/**
* Authentication method for GraphQL API
*/
graphqlAuthType: string;
graphqlEndpoint: string;
/**
* OpenAI model to use
*/
modelName: string;
/**
* Model temperature for responses
*/
modelTemperature: number;
openaiApiKey: string;
}
/**
* Connect your AI workflows to the ThingsBoard IoT Platform through this MCP server. Enables LLMs to query device telemetry, manage IoT entities (devices, assets, customers), and analyze sensor data - all through natural language. Perfect for building AI-powered IoT monitoring, predictive maintenance, and automated device management workflows. Supports both ThingsBoard Community Edition and Professional Edition.
*/
interface ThingsBoard {
password?: string;
/**
* URL of your ThingsBoard Platform instance
*/
url: string;
username?: string;
}
/**
* Tigris is a globally distributed S3-compatible object storage service that provides low latency anywhere in the world, enabling developers to store and access any amount of data for a wide range of use cases.
*/
interface TigrisData {
awsAccessKeyId: string;
awsEndpointUrlS3: string;
awsSecretAccessKey?: string;
}
/**
* Time and timezone conversion capabilities.
*/
interface TimeReference {}
/**
* A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Engine via Remote Control API. Built with TypeScript and designed for game development automation.
*/
interface UnrealEngine {
/**
* Logging level
*/
logLevel?: string;
/**
* Unreal Engine host address. Use: host.docker.internal for local UE on Windows/Mac Docker, 127.0.0.1 for Linux without Docker, or actual IP address (e.g., 192.168.1.100) for remote UE
*/
ueHost: string;
/**
* Remote Control HTTP port
*/
ueRcHttpPort: string;
/**
* Remote Control WebSocket port
*/
ueRcWsPort: string;
}
/**
* Vectra AI MCP Server - An MCP server that connects AI assistants & agents to the Vectra AI security platform, enabling intelligent threat analysis and automated incident response.
*/
interface VectraAIRUXMCPServer {
/**
* The client ID of the Vectra AI RUX MCP Server
*/
VECTRACLIENTID: string;
vectraClientSecret?: string;
/**
* The base URL of the Vectra AI RUX MCP Server
*/
vectraUrl?: string;
}
/**
* VeyraX MCP is the only connection you need to access all your tools in any MCP-compatible environment.
*/
interface VeyraX {
apiKey: string;
}
/**
* Provides access to your VictoriaLogs instance and seamless integration with VictoriaLogs APIs and documentation. It can give you a comprehensive interface for logs, observability, and debugging tasks related to your VictoriaLogs instances, enable advanced automation and interaction capabilities for engineers and tools.
*/
interface VictoriaLogs {
/**
* Comma-separated list of tools to disable (possible values: export, metric_statistics, test_rules)
*/
mcpDisabledTools?: string;
/**
* Defines the heartbeat interval for the streamable-http protocol. It means the MCP server will send a heartbeat to the client through the GET connection, to keep the connection alive from being closed by the network infrastructure (e.g. gateways)
*/
mcpHeartbeatInterval?: string;
/**
* Address and port on which the MCP server listens for incoming connections (e.g., ':8081')
*/
mcpListenAddr?: string;
/**
* Mode in which the MCP server operates (possible values: stdio, http, sse)
*/
mcpServerMode?: string;
vlInstanceBearerToken?: string;
/**
* URL of VictoriaLogs instance (it should be root URL of vlsingle or vlselect)
*/
vlInstanceEntrypoint: string;
/**
* Optional custom headers to include in requests to VictoriaLogs instance, formatted as 'header1=value1,header2=value2'
*/
vlInstanceHeaders?: string;
}
/**
* Provides access to your VictoriaMetrics instance and seamless integration with VictoriaMetrics APIs and documentation. It can give you a comprehensive interface for monitoring, observability, and debugging tasks related to your VictoriaMetrics instances, enable advanced automation and interaction capabilities for engineers and tools.
*/
interface VictoriaMetrics {
/**
* Set to 'true' to disable all resource endpoints
*/
mcpDisableResources?: string;
/**
* Comma-separated list of tools to disable (possible values: export, metric_statistics, test_rules)
*/
mcpDisabledTools?: string;
/**
* Defines the heartbeat interval for the streamable-http protocol. It means the MCP server will send a heartbeat to the client through the GET connection, to keep the connection alive from being closed by the network infrastructure (e.g. gateways)
*/
mcpHeartbeatInterval?: string;
/**
* Address and port on which the MCP server listens for incoming connections (e.g., ':8080')
*/
mcpListenAddr?: string;
/**
* Mode in which the MCP server operates (possible values: stdio, http, sse)
*/
mcpServerMode?: string;
vmInstanceBearerToken?: string;
/**
* URL of VictoriaMetrics instance (it should be root URL of vmsingle or vmselect)
*/
vmInstanceEntrypoint: string;
/**
* Optional custom headers to include in requests to VictoriaMetrics instance, formatted as 'header1=value1,header2=value2'
*/
vmInstanceHeaders?: string;
/**
* Type of VictoriaMetrics instance (possible values: single, cluster)
*/
vmInstanceType: string;
}
/**
* Provides access to your VictoriaTraces instance and seamless integration with VictoriaTraces APIs and documentation. It can give you a comprehensive interface for tracing, observability, and debugging tasks related to your VictoriaTraces instances, enable advanced automation and interaction capabilities for engineers and tools.
*/
interface VictoriaTraces {
/**
* Comma-separated list of tools to disable (possible values: export, metric_statistics, test_rules)
*/
mcpDisabledTools?: string;
/**
* Defines the heartbeat interval for the streamable-http protocol. It means the MCP server will send a heartbeat to the client through the GET connection, to keep the connection alive from being closed by the network infrastructure (e.g. gateways)
*/
mcpHeartbeatInterval?: string;
/**
* Address and port on which the MCP server listens for incoming connections (e.g., ':8081')
*/
mcpListenAddr?: string;
/**
* Mode in which the MCP server operates (possible values: stdio, http, sse)
*/
mcpServerMode?: string;
vtInstanceBearerToken?: string;
/**
* URL of VictoriaTraces instance (it should be root URL of vtsingle or vtselect)
*/
vtInstanceEntrypoint: string;
/**
* Optional custom headers to include in requests to VictoriaTraces instance, formatted as 'header1=value1,header2=value2'
*/
vtInstanceHeaders?: string;
}
/**
* provides tools and templates to create a functioning Vizro chart or dashboard step by step.
*/
interface Vizro {}
/**
* This MCP server exposes tools to query the NVD/CVE REST API and return formatted text results suitable for LLM consumption via the MCP protocol. It includes automatic query chunking for large date ranges and parallel processing for improved performance.
*/
interface VulnNIST {}
/**
* Wayfound’s MCP server allows business users to govern, supervise, and improve AI Agents.
*/
interface Wayfound {
mcpApiKey: string;
}
/**
* Model Context Protocol (MCP) server for the Webflow Data API.
*/
interface Webflow {
token: string;
}
/**
* A Model Context Protocol (MCP) server that retrieves information from Wikipedia to provide context to LLMs.
*/
interface Wikipedia {}
/**
* Connect your chat repl to wolfram alpha computational intelligence.
*/
interface WolframAlpha {
wolframApiKey: string;
}
/**
* Retrieves transcripts for given YouTube video URLs.
*/
interface YouTubeTranscripts {}
/**
* Bridges multiple AI models and CLIs, enabling orchestrated workflows across Claude Code, Gemini CLI, Codex CLI, and other AI development tools.
*/
interface Zen {
geminiApiKey: string;
openaiApiKey: string;
openrouterApiKey: string;
xaiApiKey: string;
}
/**
* MCP server for Zerodha Kite Connect API - India's leading stock broker trading platform. Execute trades, manage portfolios, and access real-time market data for NSE, BSE, and other Indian exchanges.
*/
interface ZerodhaKiteConnect {
/**
* Access token obtained after OAuth authentication (optional - can be generated at runtime)
*/
kiteAccessToken?: string;
/**
* Your Kite Connect API key from the developer console
*/
kiteApiKey: string;
kiteApiSecret?: string;
/**
* OAuth redirect URL configured in your Kite Connect app
*/
kiteRedirectUrl?: string;
}
/**
* Manage the Zscaler Zero Trust Exchange platform via 300+ tools across ZPA (private access), ZIA (internet access), ZDX (digital experience), ZCC (client connector), ZTW (workload segmentation), ZMS (microsegmentation), EASM (attack surface management), Z-Insights (security analytics), and ZIdentity (identity management). Create and manage policies, troubleshoot connectivity, audit security configurations, and investigate incidents — all from your AI assistant.
*/
interface Zscaler {
/**
* Comma-separated services to disable (zcc,zdx,zpa,zia,ztw,zid,zeasm,zins,zms)
*/
disabledServices: string;
/**
* Comma-separated tool name patterns to disable (e.g. zia_delete_*,zpa_bulk_*)
*/
disabledTools: string;
/**
* Skip HMAC confirmation prompts for destructive operations (true/false)
*/
skipConfirmations: string;
/**
* Enable write operations (true/false)
*/
writeEnabled: string;
/**
* Comma-separated write tool patterns to allow (e.g. zpa_create_*,zia_update_*)
*/
writeTools: string;
zscalerClientId: string;
zscalerClientSecret: string;
zscalerCloud: string;
zscalerCustomerId: string;
zscalerVanityDomain: string;
}
//#endregion
//#region src/sandbox/sandboxApi.d.ts
/**
* Extended MCP server configuration that includes base servers
* and allows dynamic GitHub-based MCP servers with custom run and install commands.
*/
type McpServer$1 = McpServer | GitHubMcpServer;
type GitHubMcpServer = {
[key: `github/${string}`]: {
/**
* Command to run the MCP server. Must start a stdio-compatible server.
*/
runCmd: string;
/**
* Command to install dependencies for the MCP server. Working directory is the root of the github repository.
*/
installCmd?: string;
/**
* Environment variables to set in the MCP process.
*/
envs?: Record<string, string>;
};
};
/**
* Transform applied to egress requests matching a {@link SandboxNetworkRule}.
*/
type SandboxNetworkTransform = {
/**
* Headers to inject into the outbound request. Values override any headers
* already present on the request.
*/
headers?: Record<string, string>;
};
/**
* Context passed to a {@link SandboxNetworkRule} `transform` callback. Its
* values are literal placeholder strings that the egress proxy resolves per
* request, so the secret itself never leaves the platform.
*/
type SandboxNetworkTransformContext = {
/** Workload identity placeholders. */
iam: {
/**
* Placeholder for each workload token registered in
* {@link SandboxOpts.iam}, keyed by token name. `tokens.aws` is the string
* `'${e2b.identity.tokens.aws}'`, which the egress proxy replaces with a
* freshly minted token when it forwards the request.
*
* Reading a name that is not registered throws
* {@link InvalidArgumentError} — the proxy never turns an unregistered name
* into a token, so a typo would surface as a confusing auth failure at the
* destination. The four names the runtime reads off any object it
* serializes, awaits or coerces (`toJSON`, `then`, `toString`, `valueOf`)
* throw on use rather than on the read.
*/
tokens: Record<string, string>;
};
};
/**
* Callback form of {@link SandboxNetworkRule.transform}. Invoked once while the
* request is being built, with a context of placeholder strings.
*/
type SandboxNetworkTransformResolver = (ctx: SandboxNetworkTransformContext) => SandboxNetworkTransform;
/**
* Per-domain rule applied to egress requests.
*/
type SandboxNetworkRule = {
/**
* Transform applied to requests matching this rule.
*
* Accepts either a static object or a callback that receives a
* {@link SandboxNetworkTransformContext} of placeholder strings — use the
* callback to inject a workload identity token the proxy mints per request.
*
* @example
* ```ts
* {
* transform: ({ iam }) => ({
* headers: { Authorization: `Bearer ${iam.tokens.aws}` },
* }),
* }
* ```
*/
transform?: SandboxNetworkTransform | SandboxNetworkTransformResolver;
};
/**
* Map of host (or CIDR / IP) to ordered list of rules applied to outbound
* requests for that host. Accepts either a plain object or a `Map`.
* Registering a host here does not allow egress on its own — the host must
* also appear in {@link SandboxNetworkOpts.allowOut}.
*/
type SandboxNetworkRules = Record<string, SandboxNetworkRule[]> | Map<string, SandboxNetworkRule[]>;
/**
* Per-domain rule as returned by the sandbox info endpoint. Mirrors
* {@link SandboxNetworkRule} but with `transform` always materialized to the
* static {@link SandboxNetworkTransform} shape — no callback variant.
*/
type SandboxNetworkRuleInfo = {
transform?: SandboxNetworkTransform;
};
/**
* Context passed to {@link SandboxNetworkOpts.allowOut} and
* {@link SandboxNetworkOpts.denyOut} when they are defined as functions.
*/
type SandboxNetworkSelectorContext = {
/** All traffic sentinel — equivalent to `'0.0.0.0/0'`. */
allTraffic: string;
/** Rules registered in {@link SandboxNetworkOpts.rules}. */
rules: Map<string, SandboxNetworkRule[]>;
};
/**
* Egress rule list, either a static array of CIDR blocks / IP addresses /
* hostnames, or a callback that receives `{ allTraffic, rules }` and returns
* the same.
*/
type SandboxNetworkSelector = string[] | ((ctx: SandboxNetworkSelectorContext) => string[]);
/**
* SOCKS5 proxy the sandbox's outbound TCP is tunneled through — "bring your
* own proxy".
*
* Tunneling happens on the host, after
* {@link SandboxNetworkOpts.allowOut}/{@link SandboxNetworkOpts.denyOut}
* filtering, so nothing runs inside the sandbox and code running there can
* neither see the proxy nor route around it. UDP-based traffic — DNS and
* QUIC/HTTP3 — is not tunneled and leaves the sandbox the usual way.
*
* Egress fails closed: when the proxy is unreachable or does not speak SOCKS5,
* outbound connections fail rather than falling back to a direct connection.
*
* @example
* ```ts
* const sandbox = await Sandbox.create({
* network: {
* egressProxy: {
* address: 'proxy.example.com:1080',
* username: 'proxy-user',
* password: 'proxy-password',
* },
* },
* })
* ```
*/
type SandboxEgressProxyOpts = {
/**
* SOCKS5 proxy address in `host:port` form, e.g.
* `'proxy.example.com:1080'`. The host can be a hostname or an IP literal;
* a hostname is re-resolved at dial time and the resolved address is pinned
* for that connection, so a DNS change cannot redirect a connection that is
* already being established.
*
* The proxy has to be reachable from E2B's infrastructure: an address that
* does not resolve, or that resolves into a private or otherwise internal
* range, is rejected before the sandbox exists.
*/
address: string;
/**
* SOCKS5 username
* ([RFC 1929](https://datatracker.ietf.org/doc/html/rfc1929)), up to 255
* bytes. Omit it for a proxy that takes no credentials.
*/
username?: string;
/**
* SOCKS5 password, up to 255 bytes. Only valid together with
* {@link SandboxEgressProxyOpts.username}.
*/
password?: string;
};
/**
* Egress proxy as returned by the sandbox info endpoint. Mirrors
* {@link SandboxEgressProxyOpts} without `password` — the API never returns
* it.
*/
type SandboxEgressProxyInfo = {
/** See {@link SandboxEgressProxyOpts.address}. */
address: string;
/** See {@link SandboxEgressProxyOpts.username}. */
username?: string;
};
type SandboxNetworkOpts = {
/**
* Allow outbound traffic from the sandbox to the specified addresses.
* If `allowOut` is not specified, all outbound traffic is allowed.
*
* Accepts either a static array of CIDR blocks, IP addresses, or hostnames,
* or a callback that receives `{ allTraffic, rules }` and returns the same.
* `allTraffic` is `'0.0.0.0/0'`; `rules` is a `Map` view of
* {@link SandboxNetworkOpts.rules}.
*
* Examples:
* - Static list: `["1.1.1.1", "8.8.8.0/24"]`
* - Allow only rule-registered hosts:
* `({ rules }) => [...rules.keys()]`
*/
allowOut?: SandboxNetworkSelector;
/**
* Deny outbound traffic from the sandbox to the specified addresses.
*
* Accepts the same shapes as {@link allowOut}.
*
* Examples:
* - Static list: `["1.1.1.1", "8.8.8.0/24"]`
* - Block all egress: `({ allTraffic }) => [allTraffic]`
*/
denyOut?: SandboxNetworkSelector;
/**
* Per-domain transform rules applied to matching egress HTTP/HTTPS
* requests. Keys are domains (e.g. `"api.example.com"`); values are
* ordered lists of rules.
*
* Registering a host here does not allow egress on its own — the host must
* also appear in {@link allowOut}. Hosts registered here are exposed to the
* `allowOut`/`denyOut` callbacks via `rules`.
*
* A rule's `transform` can also be a callback receiving a
* {@link SandboxNetworkTransformContext}, which is how a workload identity
* token from {@link SandboxOpts.iam} gets injected without the SDK ever
* seeing its value.
*
* @example
* ```ts
* await Sandbox.create({
* network: {
* allowOut: ({ rules }) => [...rules.keys()],
* rules: {
* 'api.openai.com': [
* { transform: { headers: { Authorization: `Bearer ${token}` } } },
* ],
* 'api.internal.example.com': [
* {
* transform: ({ iam }) => ({
* headers: { Authorization: `Bearer ${iam.tokens.aws}` },
* }),
* },
* ],
* },
* },
* })
* ```
*/
rules?: SandboxNetworkRules;
/**
* Tunnel the sandbox's outbound TCP through a SOCKS5 proxy you operate.
*
* Filtering runs first, so a connection {@link denyOut} blocks never reaches
* the proxy, and per-host {@link rules} transforms still apply before the
* connection is dialed. Omit it to send the sandbox's traffic out directly.
*
* Available on E2B Cloud and in BYOC deployments; a sandbox that names a
* proxy on a deployment built from the open source `e2b-dev/infra`
* repository is rejected as unsupported.
*
* @example
* ```ts
* // Deny everything except api.example.com, and tunnel what is left
* await Sandbox.create({
* network: {
* allowOut: ['api.example.com'],
* denyOut: ({ allTraffic }) => [allTraffic],
* egressProxy: { address: 'proxy.example.com:1080' },
* },
* })
* ```
*/
egressProxy?: SandboxEgressProxyOpts;
/**
* Specify if the sandbox URLs should be accessible only with authentication.
* @default true
*/
allowPublicTraffic?: boolean;
/** Specify host mask which will be used for all sandbox requests in the header.
* You can use the ${PORT} variable that will be replaced with the actual port number of the service.
*
* @default ${PORT}-sandboxid.e2b.app
*/
maskRequestHost?: string;
};
/**
* Network configuration as returned by the sandbox info endpoint. Mirrors
* {@link SandboxNetworkOpts} but with `allowOut`/`denyOut` always materialized
* to plain string arrays.
*/
type SandboxNetworkInfo = {
allowOut?: string[];
denyOut?: string[];
rules?: Record<string, SandboxNetworkRuleInfo[]>;
/**
* Proxy the sandbox's egress is currently tunneled through, absent when it
* goes out directly. See {@link SandboxEgressProxyInfo} for why the password
* is missing.
*/
egressProxy?: SandboxEgressProxyInfo;
allowPublicTraffic?: boolean;
maskRequestHost?: string;
};
/**
* Subset of {@link SandboxNetworkOpts} accepted by {@link SandboxApi.updateNetwork}.
* The update endpoint replaces all egress rules atomically — fields that are
* omitted are cleared on the server.
*/
type SandboxNetworkUpdate = {
/** See {@link SandboxNetworkOpts.allowOut}. */
allowOut?: SandboxNetworkSelector;
/** See {@link SandboxNetworkOpts.denyOut}. */
denyOut?: SandboxNetworkSelector;
/**
* See {@link SandboxNetworkOpts.rules}. A `transform` callback works here
* too, but the update payload carries no `iam` config, so token names cannot
* be checked against the sandbox's registered tokens — every name resolves to
* its placeholder and a typo only surfaces at the destination.
*/
rules?: SandboxNetworkRules;
/**
* See {@link SandboxNetworkOpts.egressProxy}. Sets or replaces the proxy on a
* sandbox that is already running, with no restart.
*
* The update replaces the whole configuration instead of merging into it, so
* an update that leaves this out stops tunneling and sends the sandbox's
* traffic out directly — even when the update was only meant to change the
* allow and deny lists. Repeat it in every update that should keep
* tunneling.
*/
egressProxy?: SandboxEgressProxyOpts;
/**
* Allow sandbox to access the internet. When set to `false`, it behaves the
* same as specifying `denyOut: ['0.0.0.0/0']` in the network config.
*/
allowInternetAccess?: boolean;
};
/**
* Workload token type. `'JWT-SVID'` is the only type the API accepts in this
* version; the set is defined server-side and may grow, so any string is
* allowed.
*/
type SandboxIamTokenType = 'JWT-SVID' | (string & {});
/**
* Workload token definition for sandbox workload identity.
*/
interface SandboxIamToken {
/**
* Audience of the workload token, stored exactly as provided.
*/
audience: string;
/**
* Workload token type.
*/
tokenType: SandboxIamTokenType;
}
/**
* Sandbox workload identity configuration. A non-empty `tokens` map enables
* workload identity for the sandbox.
*/
interface SandboxIamOpts {
/**
* Named workload-token definitions, keyed by a caller-chosen token name.
* Values can be created with `Secret.iamToken()`.
*
* A name is interpolated into the `'${e2b.identity.tokens.<name>}'`
* placeholder a network transform resolves, so it cannot be empty or contain
* `{`, `}` or control characters.
*/
tokens?: Record<string, SandboxIamToken>;
}
/**
* What happens when the sandbox timeout is reached. Either the bare action
* (`'pause'` / `'kill'`), or an object form that also controls the pause
* snapshot kind via `keepMemory`.
*
* The object form is a discriminated union on `action`: `keepMemory` is only
* accepted alongside `action: 'pause'`. Passing `keepMemory` with
* `action: 'kill'` is a compile-time type error.
*/
type SandboxOnTimeout = 'pause' | 'kill' | {
/** Auto-pause the sandbox when the timeout is reached. */
action: 'pause';
/**
* Whether the timeout auto-pause keeps a full memory snapshot.
*
* When `false`, the auto-pause drops the in-memory state and persists only
* the filesystem (a filesystem-only snapshot); resuming such a sandbox
* cold-boots (reboots) it from disk, losing running processes and open
* connections.
*
* Cannot be combined with `autoResume`: auto-resume wakes a paused sandbox
* on inbound traffic by restoring its memory snapshot in place, so the
* request that woke it hits an already-running process. A filesystem-only
* snapshot has no memory to restore — resuming cold-boots it — so it can't
* be woken transparently by traffic and must be resumed explicitly via
* `connect()`.
*
* Left unset, the flag is omitted from the create request and the API's own
* default (currently enabled) applies.
*/
keepMemory?: boolean;
} | {
/** Kill the sandbox when the timeout is reached. */
action: 'kill';
};
type SandboxLifecycle = {
/**
* Action to take when sandbox timeout is reached. Accepts either `'pause'` /
* `'kill'`, or `{ action, keepMemory }` to also control the pause snapshot kind.
* Omitted from the create request when unset, leaving the API's default
* (currently `kill`) in effect.
*/
onTimeout: SandboxOnTimeout;
/**
* Auto-resume enabled flag.
*
* Leave unset to let the API pick the behavior. Set `false` to opt out
* explicitly and keep auto-resume off even if the API's default changes.
* Can be `true` only when `onTimeout` is `pause`. Not supported when
* `keepMemory` is `false` (a filesystem-only snapshot must be resumed
* explicitly via `connect()`).
*/
autoResume?: boolean;
};
type SandboxInfoLifecycle = {
/**
* Action to take when sandbox timeout is reached.
*/
onTimeout: 'pause' | 'kill';
/**
* Whether the sandbox can auto-resume.
*/
autoResume: boolean;
};
/**
* Options for request to the Sandbox API.
*/
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'validateApiKey' | 'headers' | 'apiHeaders' | 'debug' | 'domain' | 'requestTimeoutMs' | 'signal'>> {}
/**
* Options for pausing a sandbox.
*/
interface SandboxPauseOpts extends SandboxApiOpts {
/**
* Whether to keep a full memory snapshot.
*
* When `false`, the in-memory state is dropped and only the filesystem is
* persisted (a filesystem-only snapshot); resuming such a sandbox cold-boots
* (reboots) it from disk, losing running processes and open connections.
*
* @default true
*/
keepMemory?: boolean;
}
/**
* Options for forking a sandbox.
*/
interface SandboxForkOpts extends ConnectionOpts {
/**
* Number of forked sandboxes to create.
*
* All forks boot from the same snapshot — the snapshot is captured once
* regardless of count. Each fork succeeds or fails independently; the
* outcome of each is reported in its entry of the returned array.
*
* @default 1
*/
count?: number;
/**
* Timeout for the forked sandboxes in **milliseconds**.
* Maximum time a sandbox can be kept alive is 24 hours (86_400_000 milliseconds) for Pro users and 1 hour (3_600_000 milliseconds) for Hobby users.
*
* @default 300_000 // 5 minutes
*/
timeoutMs?: number;
}
/**
* Result of one requested fork as returned by the API — either the raw
* connection info of the created sandbox, or the error that prevented it
* from starting. Per-fork error codes map to the same error classes as other
* API errors (e.g. 429 to `RateLimitError`).
*/
type SandboxForkResponse = {
sandboxId: string;
sandboxDomain?: string;
envdVersion: string;
envdAccessToken?: string;
trafficAccessToken?: string;
} | Error;
/**
* Options for creating a new Sandbox.
*/
interface SandboxOpts extends ConnectionOpts {
/**
* Sandbox template name or ID.
*
* @default 'base' (or 'mcp-gateway' when `mcp` option is set)
*/
template?: string;
/**
* Custom metadata for the sandbox.
*
* @default {}
*/
metadata?: Record<string, string>;
/**
* Custom environment variables for the sandbox.
*
* Used when executing commands and code in the sandbox.
* Can be overridden with the `envs` argument when executing commands or code.
*
* @default {}
*/
envs?: Record<string, string>;
/**
* Timeout for the sandbox in **milliseconds**.
* Maximum time a sandbox can be kept alive is 24 hours (86_400_000 milliseconds) for Pro users and 1 hour (3_600_000 milliseconds) for Hobby users.
*
* @default 300_000 // 5 minutes
*/
timeoutMs?: number;
/**
* Secure all traffic coming to the sandbox controller with auth token
*
* @default true
*/
secure?: boolean;
/**
* Allow sandbox to access the internet. If set to `False`, it works the same as setting network `denyOut` to `[0.0.0.0/0]`.
*
* @default true
*/
allowInternetAccess?: boolean;
/**
* MCP server to enable in the sandbox
* @default undefined
*/
mcp?: McpServer$1;
/**
* Sandbox network configuration
*/
network?: SandboxNetworkOpts;
/**
* Sandbox workload identity configuration. Providing a non-empty
* `tokens` map enables workload identity for the sandbox.
*
* Registered tokens are exposed to {@link SandboxNetworkOpts.rules}
* `transform` callbacks as `iam.tokens.<name>` placeholders, which the egress
* proxy resolves per request.
*
* @example
* ```ts
* const sandbox = await Sandbox.create({
* iam: {
* tokens: {
* aws: Secret.iamToken({
* audience: 'sts.amazonaws.com',
* tokenType: 'JWT-SVID',
* }),
* },
* },
* })
* ```
*/
iam?: SandboxIamOpts;
/**
* Volume mounts for the sandbox.
*
* The keys are mount paths inside the sandbox and the values are either
* a `Volume` instance or a string representing the volume name.
*
* @default undefined
*/
volumeMounts?: Record<string, Volume | string>;
/**
* Sandbox URL. Used for local development
*/
sandboxUrl?: string;
/**
* Sandbox lifecycle configuration.
*/
lifecycle?: SandboxLifecycle;
}
/**
* Options for connecting to a Sandbox.
*/
type SandboxConnectOpts = ConnectionOpts & {
/**
* Timeout for the sandbox in **milliseconds**.
* For running sandboxes, the timeout will update only if the new timeout is longer than the existing one.
* Maximum time a sandbox can be kept alive is 24 hours (86_400_000 milliseconds) for Pro users and 1 hour (3_600_000 milliseconds) for Hobby users.
*
* @default 300_000 // 5 minutes
*/
timeoutMs?: number;
};
/**
* State of the sandbox.
*/
type SandboxState = 'running' | 'paused';
/**
* Sort order for listing sandboxes by start time.
*/
type SandboxListOrder = 'asc' | 'desc';
interface SandboxListOpts extends Omit<SandboxApiOpts, 'signal'> {
/**
* Filter the list of sandboxes, e.g. by metadata `metadata:{"key": "value"}`, if there are multiple filters they are combined with AND.
*
*/
query?: {
metadata?: Record<string, string>;
/**
* Filter the list of sandboxes by state.
* @default ['running', 'paused']
*/
state?: Array<SandboxState>;
/**
* Filter the list of sandboxes to those started at or after this time.
*/
startedAfter?: Date;
/**
* Filter the list of sandboxes by a template ID or name.
*/
template?: string;
};
/**
* Sort order of the list of sandboxes by start time, applied across the
* whole result set before pagination (not within a page).
*
* @default 'desc'
*/
order?: SandboxListOrder;
/**
* Number of sandboxes to return per page.
*
* @default 100
*/
limit?: number;
/**
* Token to the next page.
*/
nextToken?: string;
}
interface SandboxMetricsOpts extends SandboxApiOpts {
/**
* Start time for the metrics, defaults to the start of the sandbox
*/
start?: Date;
/**
* End time for the metrics, defaults to the current time
*/
end?: Date;
}
/**
* Options for listing snapshots.
*/
interface SnapshotListOpts extends Omit<SandboxApiOpts, 'signal'> {
/**
* Filter snapshots by source sandbox ID.
*/
sandboxId?: string;
/**
* Filter snapshots by name or ID, optionally tag-qualified
* (e.g. "my-snapshot", "my-project/my-snapshot" or "my-snapshot:v1").
*/
name?: string;
/**
* Number of snapshots to return per page.
*
* @default 100
*/
limit?: number;
/**
* Token to the next page.
*/
nextToken?: string;
}
/**
* Information about a snapshot.
*/
interface SnapshotInfo {
/**
* Snapshot identifier — template ID with tag, or namespaced name with tag (e.g. my-snapshot:latest).
* Can be used with Sandbox.create() to create a new sandbox from this snapshot.
*/
snapshotId: string;
/**
* Full names of the snapshot template including project slug and tag (e.g. project-slug/my-snapshot:v2).
*/
names: string[];
}
/**
* Options for creating a snapshot.
*/
interface CreateSnapshotOpts extends SandboxApiOpts {
/**
* Optional name for the snapshot template.
* If a snapshot template with this name already exists, a new build will be assigned
* to the existing template instead of creating a new one.
*/
name?: string;
}
/**
* Information about a sandbox.
*/
interface SandboxInfo {
/**
* Sandbox ID.
*/
sandboxId: string;
/**
* Template ID.
*/
templateId: string;
/**
* Template name.
*/
name?: string;
/**
* Saved sandbox metadata.
*/
metadata: Record<string, string>;
/**
* Sandbox start time.
*/
startedAt: Date;
/**
* Sandbox expiration date.
*/
endAt: Date;
/**
* Sandbox state.
*
* @string can be `running` or `paused`
*/
state: SandboxState;
/**
* Sandbox CPU count.
*/
cpuCount: number;
/**
* Sandbox Memory size in MiB.
*/
memoryMB: number;
/**
* Envd version.
*/
envdVersion: string;
/**
* Whether internet access was explicitly enabled or disabled for the sandbox.
*/
allowInternetAccess?: boolean | undefined;
/**
* Sandbox network configuration.
*/
network?: SandboxNetworkInfo;
/**
* Sandbox lifecycle configuration.
*/
lifecycle?: SandboxInfoLifecycle;
/**
* Volume mounts for the sandbox.
*/
volumeMounts?: Array<{
name: string;
path: string;
}>;
/**
* Sandbox domain.
*/
sandboxDomain?: string;
}
/**
* Sandbox resource usage metrics.
*/
interface SandboxMetrics {
/**
* Timestamp of the metrics.
*/
timestamp: Date;
/**
* CPU usage in percentage.
*/
cpuUsedPct: number;
/**
* Number of CPU cores.
*/
cpuCount: number;
/**
* Memory usage in bytes.
*/
memUsed: number;
/**
* Total memory available in bytes.
*/
memTotal: number;
/**
* Cached memory (page cache) in bytes.
*/
memCache: number;
/**
* Used disk space in bytes.
*/
diskUsed: number;
/**
* Total disk space available in bytes.
*/
diskTotal: number;
}
declare class SandboxApi extends ClientFactory {
protected constructor();
/**
* Kill the sandbox specified by sandbox ID.
*
* @param sandboxId sandbox ID.
* @param opts connection options.
*
* @returns `true` if the sandbox was found and killed, `false` otherwise.
*/
static kill(sandboxId: string, opts?: SandboxApiOpts): Promise<boolean>;
/**
* Get sandbox information like sandbox ID, template, metadata, started at/end at date.
*
* @param sandboxId sandbox ID.
* @param opts connection options.
*
* @returns sandbox information.
*/
static getInfo(sandboxId: string, opts?: SandboxApiOpts): Promise<SandboxInfo>;
/**
* @deprecated Use {@link Sandbox.getInfo} instead.
*
* @param sandboxId sandbox ID.
* @param opts connection options.
*
* @returns sandbox information.
*/
static getFullInfo(sandboxId: string, opts?: SandboxApiOpts): Promise<SandboxInfo>;
/**
* Get the metrics of the sandbox.
*
* @param sandboxId sandbox ID.
* @param opts sandbox metrics options.
*
* @returns List of sandbox metrics containing CPU, memory and disk usage information.
*/
static getMetrics(sandboxId: string, opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
/**
* Set the timeout of the specified sandbox.
* After the timeout expires the sandbox will be automatically killed.
*
* This method can extend or reduce the sandbox timeout set when creating the sandbox or from the last call to {@link Sandbox.setTimeout}.
*
* Maximum time a sandbox can be kept alive is 24 hours (86_400_000 milliseconds) for Pro users and 1 hour (3_600_000 milliseconds) for Hobby users.
*
* @param sandboxId sandbox ID.
* @param timeoutMs timeout in **milliseconds**.
* @param opts connection options.
*/
static setTimeout(sandboxId: string, timeoutMs: number, opts?: SandboxApiOpts): Promise<void>;
/**
* Update the network configuration of a running sandbox.
*
* Replaces the current egress configuration atomically — fields that are
* omitted are cleared on the server.
*
* @param sandboxId sandbox ID.
* @param network new network configuration.
* @param opts connection options.
*/
static updateNetwork(sandboxId: string, network: SandboxNetworkUpdate, opts?: SandboxApiOpts): Promise<void>;
/**
* Pause the sandbox specified by sandbox ID.
*
* @param sandboxId sandbox ID.
* @param opts pause options, including `keepMemory` and connection options.
*
* @returns `true` if the sandbox got paused, `false` if the sandbox was already paused.
*/
static pause(sandboxId: string, opts?: SandboxPauseOpts): Promise<boolean>;
/**
* @deprecated Use {@link SandboxApi.pause} instead.
*/
static betaPause(sandboxId: string, opts?: SandboxPauseOpts): Promise<boolean>;
/**
* Create a snapshot from a sandbox.
*
* The sandbox will be paused while the snapshot is being created.
* The snapshot can be used to create new sandboxes with the same state.
* The snapshot is a persistent image that survives sandbox deletion.
*
* @param sandboxId sandbox ID to create snapshot from.
* @param opts snapshot creation options including optional name and connection options.
*
* @returns snapshot information including the snapshot name that can be used with Sandbox.create().
*/
static createSnapshot(sandboxId: string, opts?: CreateSnapshotOpts): Promise<SnapshotInfo>;
/**
* List all snapshots.
*
* @param opts list options including filters and pagination.
*
* @returns paginator for listing snapshots.
*/
static listSnapshots(opts?: SnapshotListOpts): SnapshotPaginator;
/**
* Delete a snapshot.
*
* @param snapshotId snapshot ID.
* @param opts connection options.
*
* @returns `true` if the snapshot was deleted, `false` if it was not found.
*/
static deleteSnapshot(snapshotId: string, opts?: SandboxApiOpts): Promise<boolean>;
protected static createSandbox(template: string, timeoutMs: number, opts?: SandboxOpts): Promise<{
sandboxId: string;
sandboxDomain: string | undefined;
envdVersion: string;
envdAccessToken: string | undefined;
trafficAccessToken: string | undefined;
}>;
protected static forkSandbox(sandboxId: string, timeoutMs: number, count: number, opts?: SandboxApiOpts): Promise<SandboxForkResponse[]>;
protected static connectSandbox(sandboxId: string, opts?: SandboxConnectOpts): Promise<{
sandboxId: string;
sandboxDomain: string | undefined;
envdVersion: string;
envdAccessToken: string | undefined;
trafficAccessToken: string | undefined;
}>;
}
/**
* Paginator for listing sandboxes.
*
* @example
* ```ts
* const paginator = Sandbox.list()
* while (paginator.hasNext) {
* const sandboxes = await paginator.nextItems()
* console.log(sandboxes)
* }
* ```
*/
declare class SandboxPaginator extends Paginator<SandboxInfo, SandboxApiOpts> {
private query;
private order;
constructor(opts?: SandboxListOpts);
nextItems(opts?: SandboxApiOpts): Promise<SandboxInfo[]>;
}
/**
* Paginator for listing snapshots.
*
* @example
* ```ts
* const paginator = Sandbox.listSnapshots()
* while (paginator.hasNext) {
* const snapshots = await paginator.nextItems()
* console.log(snapshots)
* }
* ```
*/
declare class SnapshotPaginator extends Paginator<SnapshotInfo, SandboxApiOpts> {
private readonly sandboxId?;
private readonly name?;
constructor(opts?: SnapshotListOpts);
nextItems(opts?: SandboxApiOpts): Promise<SnapshotInfo[]>;
}
//#endregion
//#region src/secret.d.ts
/**
* Metadata of a secret. Secret values are write-only and never returned.
*/
interface SecretInfo {
/**
* Secret ID.
*/
secretId: string;
/**
* Secret name, unique within the project.
*/
name: string;
/**
* Version served to readers that do not name one.
*/
version: number;
/**
* Customer metadata of the secret.
*/
metadata: Record<string, string>;
/**
* Time when the secret was created.
*/
createdAt: Date;
/**
* Time when the secret was last updated.
*/
updatedAt: Date;
}
interface SecretCreateOpts extends ConnectionOpts {
/**
* Customer metadata to store with the secret.
*/
metadata?: Record<string, string>;
}
interface SecretUpdateOpts extends ConnectionOpts {
/**
* Customer metadata to store with the secret. When provided, replaces the
* stored metadata.
*/
metadata?: Record<string, string>;
}
type SecretGetInfoOpts = ConnectionOpts;
type SecretExistsOpts = ConnectionOpts;
type SecretDestroyOpts = ConnectionOpts;
interface SecretListOpts extends Omit<ConnectionOpts, 'signal'> {
/**
* Number of secrets to return per page.
*
* @default 100
*/
limit?: number;
/**
* Token to the next page.
*/
nextToken?: string;
}
/**
* Paginator for listing secrets.
*
* @example
* ```ts
* const paginator = Secret.list()
* while (paginator.hasNext) {
* const secrets = await paginator.nextItems()
* console.log(secrets)
* }
* ```
*/
declare class SecretPaginator extends Paginator<SecretInfo> {
constructor(opts?: SecretListOpts);
nextItems(opts?: ConnectionOpts): Promise<SecretInfo[]>;
}
/**
* Module for managing E2B secrets and workload identity helpers.
*
* Secret values are write-only: they are accepted by {@link Secret.create}
* and {@link Secret.update} but never returned by any read surface.
*/
declare class Secret extends ClientFactory {
/**
* Create a new secret and its first value.
*
* @param name name of the secret, unique within the project.
* @param value secret value. Write-only — never returned by the API.
* @param opts connection options.
*
* @returns the secret's ID, name, current version (`1` for a new secret),
* metadata, and creation and update times.
*/
static create(name: string, value: string, opts?: SecretCreateOpts): Promise<SecretInfo>;
/**
* Update a secret's value by storing it as the secret's new version.
*
* @param secret secret ID or name.
* @param value new secret value. Write-only — never returned by the API.
* @param opts connection options.
*
* @returns the secret's ID, name, new current version, metadata, and
* creation and update times.
*/
static update(secret: string, value: string, opts?: SecretUpdateOpts): Promise<SecretInfo>;
/**
* Get a secret's metadata.
*
* @param secret secret ID or name.
* @param opts connection options.
*
* @returns the secret's ID, name, current version, metadata, and creation
* and update times.
*/
static getInfo(secret: string, opts?: SecretGetInfoOpts): Promise<SecretInfo>;
/**
* List the project's secrets.
*
* @param opts connection options.
*
* @returns paginator over the project's secrets. Drain it page by page:
* `while (paginator.hasNext) { const secrets = await paginator.nextItems() }`.
*
* @example
* ```ts
* const paginator = Secret.list({ limit: 50 })
* while (paginator.hasNext) {
* const secrets = await paginator.nextItems()
* }
* ```
*/
static list(opts?: SecretListOpts): SecretPaginator;
/**
* Check whether a secret exists.
*
* @param secret secret ID or name.
* @param opts connection options.
*
* @returns `true` if the secret exists, `false` otherwise.
*/
static exists(secret: string, opts?: SecretExistsOpts): Promise<boolean>;
/**
* Destroy a secret, making all its versions inaccessible.
*
* @param secret secret ID or name.
* @param opts connection options.
*
* @returns `true` if the secret was destroyed, `false` if it was not found.
*/
static destroy(secret: string, opts?: SecretDestroyOpts): Promise<boolean>;
/**
* Format a placeholder that the runtime resolves to the secret's current
* value.
*
* This is a local formatting helper and makes no network call — it does
* not check whether the named secret exists. An unknown reference fails
* server-side when the placeholder is resolved.
*
* @param secret secret name.
*
* @returns placeholder string resolving to the secret's value.
*
* @example
* ```ts
* Secret.fill('openai-api-key')
* // '${e2b.secrets.openai-api-key}'
* ```
*/
static fill(secret: string): string;
/**
* Define a workload identity token to pass to `iam.tokens` when creating
* a sandbox.
*
* @param token workload token definition.
*
* @returns a token definition passable to `iam.tokens`.
*
* @example
* ```ts
* const sandbox = await Sandbox.create({
* iam: {
* tokens: {
* aws: Secret.iamToken({
* audience: 'sts.amazonaws.com',
* tokenType: 'JWT-SVID',
* }),
* },
* },
* })
* ```
*/
static iamToken(token: SandboxIamToken): SandboxIamToken;
}
//#endregion
//#region src/sandbox/network.d.ts
/**
* CIDR range that represents all traffic.
*/
declare const ALL_TRAFFIC = "0.0.0.0/0";
//#endregion
//#region src/sandbox/git/utils.d.ts
/**
* Parsed git status entry for a file.
*/
interface GitFileStatus {
/**
* Path relative to the repository root.
*/
name: string;
/**
* Normalized status string (for example, `"modified"` or `"added"`).
*/
status: GitStatusLabel;
/**
* Index status character from porcelain output.
*/
indexStatus: string;
/**
* Working tree status character from porcelain output.
*/
workingTreeStatus: string;
/**
* Whether the change is staged.
*/
staged: boolean;
/**
* Original path when the file was renamed.
*/
renamedFrom?: string;
}
/**
* Supported normalized git status labels.
*/
type GitStatusLabel = 'conflict' | 'renamed' | 'copied' | 'deleted' | 'added' | 'modified' | 'typechange' | 'untracked' | 'unknown';
/**
* Scope for git config operations.
*/
type GitConfigScope = 'global' | 'local' | 'system';
/**
* Parsed git repository status.
*/
interface GitStatus {
/**
* Current branch name, if available.
*/
currentBranch?: string;
/**
* Upstream branch name, if available.
*/
upstream?: string;
/**
* Number of commits the branch is ahead of upstream.
*/
ahead: number;
/**
* Number of commits the branch is behind upstream.
*/
behind: number;
/**
* Whether HEAD is detached.
*/
detached: boolean;
/**
* List of file status entries.
*/
fileStatus: GitFileStatus[];
/**
* Whether the repository has no tracked or untracked file changes.
*/
isClean: boolean;
/**
* Whether the repository has any tracked or untracked file changes.
*/
hasChanges: boolean;
/**
* Whether there are staged changes.
*/
hasStaged: boolean;
/**
* Whether there are untracked files.
*/
hasUntracked: boolean;
/**
* Whether there are merge conflicts.
*/
hasConflicts: boolean;
/**
* Total number of changed files.
*/
totalCount: number;
/**
* Number of files with staged changes.
*/
stagedCount: number;
/**
* Number of files with unstaged changes.
*/
unstagedCount: number;
/**
* Number of untracked files.
*/
untrackedCount: number;
/**
* Number of files with merge conflicts.
*/
conflictCount: number;
}
/**
* Parsed git branch list.
*/
interface GitBranches {
/**
* List of branch names.
*/
branches: string[];
/**
* Current branch name, if available.
*/
currentBranch?: string;
}
//#endregion
//#region src/sandbox/git/index.d.ts
/**
* Options for git operations in the sandbox.
*/
interface GitRequestOpts extends Partial<Pick<CommandStartOpts, 'envs' | 'user' | 'cwd' | 'timeoutMs' | 'requestTimeoutMs'>> {}
/**
* Options for cloning a repository.
*/
interface GitCloneOpts extends GitRequestOpts {
/**
* Destination path for the clone.
*/
path?: string;
/**
* Branch to check out.
*/
branch?: string;
/**
* If set, perform a shallow clone with this depth.
*/
depth?: number;
/**
* Username for HTTP(S) authentication.
*/
username?: string;
/**
* Password or token for HTTP(S) authentication.
*/
password?: string;
/**
* Store credentials in the cloned repository when `true`.
*
* @default false
*/
dangerouslyStoreCredentials?: boolean;
}
/**
* Options for initializing a repository.
*/
interface GitInitOpts extends GitRequestOpts {
/**
* Create a bare repository when `true`.
*/
bare?: boolean;
/**
* Initial branch name (for example, `"main"`).
*/
initialBranch?: string;
}
/**
* Options for adding a git remote.
*/
interface GitRemoteAddOpts extends GitRequestOpts {
/**
* Fetch the remote after adding it when `true`.
*/
fetch?: boolean;
/**
* Overwrite the remote URL if the remote already exists when `true`.
*/
overwrite?: boolean;
}
/**
* Options for creating a commit.
*/
interface GitCommitOpts extends GitRequestOpts {
/**
* Commit author name.
*/
authorName?: string;
/**
* Commit author email.
*/
authorEmail?: string;
/**
* Allow empty commits when `true`.
*/
allowEmpty?: boolean;
}
/**
* Options for staging files.
*/
interface GitAddOpts extends GitRequestOpts {
/**
* Files to add; when omitted, adds the current directory.
*/
files?: string[];
/**
* When `true` and `files` is omitted, stage all changes.
*/
all?: boolean;
}
/**
* Supported reset modes.
*/
type GitResetMode = 'soft' | 'mixed' | 'hard' | 'merge' | 'keep';
/**
* Options for resetting a repository.
*/
interface GitResetOpts extends GitRequestOpts {
/**
* Reset mode to use.
*/
mode?: GitResetMode;
/**
* Commit, branch, or ref to reset to (defaults to HEAD).
*/
target?: string;
/**
* Paths to reset.
*/
paths?: string[];
}
/**
* Options for restoring files or unstaging changes.
*/
interface GitRestoreOpts extends GitRequestOpts {
/**
* Paths to restore (use `['.']` for all).
*/
paths: string[];
/**
* Restore the index (unstage).
*/
staged?: boolean;
/**
* Restore working tree files.
*/
worktree?: boolean;
/**
* Restore from the given source (commit, branch, or ref).
*/
source?: string;
}
/**
* Options for deleting a branch.
*/
interface GitDeleteBranchOpts extends GitRequestOpts {
/**
* Force deletion with `-D` when `true`.
*/
force?: boolean;
}
/**
* Options for pushing commits.
*/
interface GitPushOpts extends GitRequestOpts {
/**
* Remote name (for example, `"origin"`).
*/
remote?: string;
/**
* Branch name to push.
*/
branch?: string;
/**
* Set upstream tracking when `true`.
*/
setUpstream?: boolean;
/**
* Username for HTTP(S) authentication.
*/
username?: string;
/**
* Password or token for HTTP(S) authentication.
*/
password?: string;
}
/**
* Options for pulling commits.
*/
interface GitPullOpts extends GitRequestOpts {
/**
* Remote name (for example, `"origin"`).
*/
remote?: string;
/**
* Branch name to pull.
*/
branch?: string;
/**
* Username for HTTP(S) authentication.
*/
username?: string;
/**
* Password or token for HTTP(S) authentication.
*/
password?: string;
}
/**
* Supported scopes for git config operations.
*/
/**
* Options for git config operations.
*/
interface GitConfigOpts extends GitRequestOpts {
/**
* Scope for the git config command.
*
* @default "global"
*/
scope?: GitConfigScope;
/**
* Repository path required when `scope` is `"local"`.
*/
path?: string;
}
/**
* Options for dangerously authenticating git globally via the credential helper.
*/
interface GitDangerouslyAuthenticateOpts extends GitRequestOpts {
/**
* Username for HTTP(S) authentication.
*/
username: string;
/**
* Password or token for HTTP(S) authentication.
*/
password: string;
/**
* Host to authenticate for.
*
* @default "github.com"
*/
host?: string;
/**
* Protocol to authenticate for.
*
* @default "https"
*/
protocol?: string;
}
/**
* Module for running git operations in the sandbox.
*/
declare class Git {
private readonly commands;
constructor(commands: Commands);
/**
* Clone a git repository into the sandbox.
*
* @param url Git repository URL.
* @param opts Clone options.
* @returns Command result from the command runner.
*/
clone(url: string, opts?: GitCloneOpts): Promise<CommandResult>;
/**
* Initialize a new git repository.
*
* @param path Destination path for the repository.
* @param opts Init options.
* @returns Command result from the command runner.
*/
init(path: string, opts?: GitInitOpts): Promise<CommandResult>;
/**
* Add (or update) a remote for a repository.
*
* @param path Repository path.
* @param name Remote name (for example, `"origin"`).
* @param url Remote URL.
* @param opts Remote add options.
* @returns Command result from the command runner.
*/
remoteAdd(path: string, name: string, url: string, opts?: GitRemoteAddOpts): Promise<CommandResult>;
/**
* Get the URL for a git remote.
*
* Returns `undefined` when the remote does not exist.
*
* @param path Repository path.
* @param name Remote name (for example, `"origin"`).
* @param opts Command execution options.
* @returns Remote URL if present.
*/
remoteGet(path: string, name: string, opts?: GitRequestOpts): Promise<string | undefined>;
/**
* Get repository status information.
*
* @param path Repository path.
* @param opts Command execution options.
* @returns Parsed git status.
*/
status(path: string, opts?: GitRequestOpts): Promise<GitStatus>;
/**
* List branches in a repository.
*
* @param path Repository path.
* @param opts Command execution options.
* @returns Parsed branch list.
*/
branches(path: string, opts?: GitRequestOpts): Promise<GitBranches>;
/**
* Create and check out a new branch.
*
* @param path Repository path.
* @param branch Branch name to create.
* @param opts Command execution options.
* @returns Command result from the command runner.
*/
createBranch(path: string, branch: string, opts?: GitRequestOpts): Promise<CommandResult>;
/**
* Check out an existing branch.
*
* @param path Repository path.
* @param branch Branch name to check out.
* @param opts Command execution options.
* @returns Command result from the command runner.
*/
checkoutBranch(path: string, branch: string, opts?: GitRequestOpts): Promise<CommandResult>;
/**
* Delete a branch.
*
* @param path Repository path.
* @param branch Branch name to delete.
* @param opts Delete options.
* @returns Command result from the command runner.
*/
deleteBranch(path: string, branch: string, opts?: GitDeleteBranchOpts): Promise<CommandResult>;
/**
* Stage files for commit.
*
* @param path Repository path.
* @param opts Add options.
* @returns Command result from the command runner.
*/
add(path: string, opts?: GitAddOpts): Promise<CommandResult>;
/**
* Create a commit in the repository.
*
* @param path Repository path.
* @param message Commit message.
* @param opts Commit options.
* @returns Command result from the command runner.
*/
commit(path: string, message: string, opts?: GitCommitOpts): Promise<CommandResult>;
/**
* Reset the current HEAD to a specified state.
*
* @param path Repository path.
* @param opts Reset options.
* @returns Command result from the command runner.
*/
reset(path: string, opts?: GitResetOpts): Promise<CommandResult>;
/**
* Restore working tree files or unstage changes.
*
* @param path Repository path.
* @param opts Restore options.
* @returns Command result from the command runner.
*/
restore(path: string, opts: GitRestoreOpts): Promise<CommandResult>;
/**
* Push commits to a remote.
*
* @param path Repository path.
* @param opts Push options.
* @returns Command result from the command runner.
*/
push(path: string, opts?: GitPushOpts): Promise<CommandResult>;
/**
* Pull changes from a remote.
*
* @param path Repository path.
* @param opts Pull options.
* @returns Command result from the command runner.
*/
pull(path: string, opts?: GitPullOpts): Promise<CommandResult>;
/**
* Set a git config value.
*
* Use `scope: "local"` together with `path` to configure a specific repository.
*
* @param key Git config key (for example, `"pull.rebase"`).
* @param value Git config value.
* @param opts Config options.
* @returns Command result from the command runner.
*/
setConfig(key: string, value: string, opts?: GitConfigOpts): Promise<CommandResult>;
/**
* Get a git config value.
*
* Returns `undefined` when the key is not set in the requested scope.
*
* @param key Git config key (for example, `"pull.rebase"`).
* @param opts Config options.
* @returns The config value if present.
*/
getConfig(key: string, opts?: GitConfigOpts): Promise<string | undefined>;
/**
* Dangerously authenticate git globally via the credential helper.
*
* This persists credentials in the credential store.
* Prefer short-lived credentials when possible.
*
* @param opts Authentication options.
* @returns Command result from the command runner.
*/
dangerouslyAuthenticate(opts: GitDangerouslyAuthenticateOpts): Promise<CommandResult>;
/**
* Configure git user name and email.
*
* @param name Git user name.
* @param email Git user email.
* @param opts Config options.
* @returns Command result from the command runner.
*/
configureUser(name: string, email: string, opts?: GitConfigOpts): Promise<CommandResult>;
/**
* Build and execute a git command inside the sandbox.
*
* @param args Git arguments to pass to the git binary.
* @param repoPath Repository path used with `git -C`, if provided.
* @param opts Command execution options.
* @returns Command result from the command runner.
*/
private runGit;
/**
* Execute a raw shell command while applying default git environment variables.
*
Note: We can likely just modify runGit later to allow appending commands to the git but for now it's separate.
*/
private runShell;
private getRemoteUrl;
private resolveRemoteName;
private withRemoteCredentials;
private hasUpstream;
}
//#endregion
//#region src/sandbox/index.d.ts
/**
* Options for sandbox upload/download URL generation.
*/
interface SandboxUrlOpts {
/**
* Use signature expiration for the URL.
* Optional parameter to set the expiration time for the signature in seconds.
*/
useSignatureExpiration?: number;
/**
* User that will be used to access the file.
*/
user?: Username;
}
/**
* E2B cloud sandbox is a secure and isolated cloud environment.
*
* The sandbox allows you to:
* - Access Linux OS
* - Create, list, and delete files and directories
* - Run commands
* - Run git operations
* - Run isolated code
* - Access the internet
*
* Check docs [here](https://e2b.dev/docs).
*
* Use {@link Sandbox.create} to create a new sandbox.
*
* @example
* ```ts
* import { Sandbox } from 'e2b'
*
* const sandbox = await Sandbox.create()
* ```
*/
declare class Sandbox extends SandboxApi {
protected static readonly defaultTemplate: string;
protected static readonly defaultMcpTemplate: string;
protected static readonly defaultSandboxTimeoutMs = 300000;
/**
* Module for interacting with the sandbox filesystem
*/
readonly files: Filesystem;
/**
* Module for running commands in the sandbox
*/
readonly commands: Commands;
/**
* Module for interacting with the sandbox pseudo-terminals
*/
readonly pty: Pty;
/**
* Module for running git operations in the sandbox
*/
readonly git: Git;
/**
* Unique identifier of the sandbox.
*/
readonly sandboxId: string;
/**
* Domain where the sandbox is hosted.
*/
readonly sandboxDomain: string;
/**
* Traffic access token for accessing sandbox services with restricted public traffic.
*/
readonly trafficAccessToken?: string;
protected readonly envdPort = 49983;
protected readonly mcpPort = 50005;
protected readonly connectionConfig: ConnectionConfig;
protected readonly envdAccessToken?: string;
private readonly envdApiUrl;
private readonly envdDirectUrl;
private readonly envdApi;
private mcpToken?;
/**
* Use {@link Sandbox.create} to create a new Sandbox instead.
*
* @hidden
* @hide
* @internal
* @access protected
*/
constructor(opts: SandboxConnectOpts & {
sandboxId: string;
sandboxDomain?: string;
envdVersion: string;
envdAccessToken?: string;
trafficAccessToken?: string;
});
/**
* List sandboxes.
*
* By default (no `query.state` set in `opts`), returns sandboxes in both
* `running` and `paused` states. To filter by state, pass
* `opts.query.state = [...]`.
*
* @param opts connection options, plus optional `query` to filter by
* metadata / state / start time / template, `order` to sort by start
* time across the whole result set (not within a page), and `limit` /
* `nextToken` for pagination.
*
* @returns a {@link SandboxPaginator} that yields pages of sandboxes
* (running and paused by default). Iterate pages via
* `await paginator.nextItems()` while `paginator.hasNext` is `true`.
*/
static list(opts?: SandboxListOpts): SandboxPaginator;
/**
* Create a new sandbox from the default `base` sandbox template.
*
* @param opts connection options.
*
* @returns sandbox instance for the new sandbox.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* ```
* @constructs {@link Sandbox}
*/
static create<S extends typeof Sandbox>(this: S, opts?: SandboxOpts): Promise<InstanceType<S>>;
/**
* Create a new sandbox from the specified sandbox template.
*
* @param template sandbox template name or ID.
* @param opts connection options.
*
* @returns sandbox instance for the new sandbox.
*
* @example
* ```ts
* const sandbox = await Sandbox.create('<template-name-or-id>')
* ```
* @constructs {@link Sandbox}
*/
static create<S extends typeof Sandbox>(this: S, template: string, opts?: SandboxOpts): Promise<InstanceType<S>>;
/**
* Connect to a sandbox. If the sandbox is paused, it will be automatically resumed.
* Sandbox must be either running or be paused.
*
* With sandbox ID you can connect to the same sandbox from different places or environments (serverless functions, etc).
*
* @param sandboxId sandbox ID.
* @param opts connection options.
*
* @returns A running sandbox instance
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* const sandboxId = sandbox.sandboxId
*
* // Connect to the same sandbox.
* const sameSandbox = await Sandbox.connect(sandboxId)
* ```
*/
static connect<S extends typeof Sandbox>(this: S, sandboxId: string, opts?: SandboxConnectOpts): Promise<InstanceType<S>>;
/**
* Fork a running sandbox specified by sandbox ID.
*
* The sandbox is checkpointed in place (briefly paused, snapshotted with its
* full memory state, and resumed — its ID and expiration stay untouched) and
* `count` new sandboxes are created from that snapshot. All forks boot from
* the same snapshot, so the snapshot is captured once regardless of count.
*
* Each fork succeeds or fails independently — the returned array contains
* one entry per requested fork, either a running {@link Sandbox} instance or
* an `Error` describing why that fork failed to start
* (`Promise.allSettled`-style). Per-fork error codes map to the same error
* classes as other API errors (e.g. 429 to `RateLimitError`).
*
* @param sandboxId sandbox ID.
* @param opts fork options — `count`, `timeoutMs` and connection options.
*
* @returns array with one entry per requested fork — a sandbox instance or an error.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
*
* const [fork1, fork2] = await Sandbox.fork(sandbox.sandboxId, { count: 2 })
* if (fork1 instanceof Sandbox) {
* await fork1.commands.run('echo "hello from fork"')
* }
* ```
*/
static fork<S extends typeof Sandbox>(this: S, sandboxId: string, opts?: SandboxForkOpts): Promise<Array<InstanceType<S> | Error>>;
/**
* Connect to a sandbox. If the sandbox is paused, it will be automatically resumed.
* Sandbox must be either running or be paused.
*
* With sandbox ID you can connect to the same sandbox from different places or environments (serverless functions, etc).
*
* @param opts connection options.
*
* @returns A running sandbox instance
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* await sandbox.betaPause()
*
* // Connect to the same sandbox.
* const sameSandbox = await sandbox.connect()
* ```
*/
connect(opts?: SandboxConnectOpts): Promise<this>;
/**
* Fork the sandbox.
*
* The sandbox is checkpointed in place (briefly paused, snapshotted with its
* full memory state, and resumed — its ID and expiration stay untouched) and
* `count` new sandboxes are created from that snapshot. All forks boot from
* the same snapshot, so the snapshot is captured once regardless of count.
*
* Each fork succeeds or fails independently — the returned array contains
* one entry per requested fork, either a running {@link Sandbox} instance or
* an `Error` describing why that fork failed to start
* (`Promise.allSettled`-style). Per-fork error codes map to the same error
* classes as other API errors (e.g. 429 to `RateLimitError`).
*
* @param opts fork options — `count`, `timeoutMs` and connection options.
*
* @returns array with one entry per requested fork — a sandbox instance or an error.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
*
* const [fork1, fork2] = await sandbox.fork({ count: 2 })
* if (fork1 instanceof Sandbox) {
* await fork1.commands.run('echo "hello from fork"')
* }
* ```
*/
fork(opts?: SandboxForkOpts): Promise<Array<this | Error>>;
/**
* Get the host address for the specified sandbox port.
* You can then use this address to connect to the sandbox port from outside the sandbox via HTTP or WebSocket.
*
* @param port number of the port in the sandbox.
*
* @returns host address of the sandbox port.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* // Start an HTTP server
* await sandbox.commands.run('python3 -m http.server 3000', { background: true })
* // Get the hostname of the HTTP server
* const serverURL = sandbox.getHost(3000)
* ```
*/
getHost(port: number): string;
/**
* Check if the sandbox is running.
*
* @returns `true` if the sandbox is running, `false` otherwise.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* await sandbox.isRunning() // Returns true
*
* await sandbox.kill()
* await sandbox.isRunning() // Returns false
* ```
*/
isRunning(opts?: Pick<ConnectionOpts, 'requestTimeoutMs' | 'signal'>): Promise<boolean>;
/**
* Set the timeout of the sandbox.
*
* This method can extend or reduce the sandbox timeout set when creating the sandbox or from the last call to `.setTimeout`.
* Maximum time a sandbox can be kept alive is 24 hours (86_400_000 milliseconds) for Pro users and 1 hour (3_600_000 milliseconds) for Hobby users.
*
* @param timeoutMs timeout in **milliseconds**.
* @param opts connection options.
*/
setTimeout(timeoutMs: number, opts?: Pick<SandboxOpts, 'requestTimeoutMs' | 'signal'>): Promise<void>;
/**
* Update the network configuration of the sandbox.
*
* Replaces the current egress configuration atomically — fields that are
* omitted are cleared on the server.
*
* @param network new network configuration.
* @param opts connection options.
*/
updateNetwork(network: SandboxNetworkUpdate, opts?: Pick<SandboxOpts, 'requestTimeoutMs' | 'signal'>): Promise<void>;
/**
* Kill the sandbox.
*
* @param opts connection options.
*
* @returns `true` if the sandbox was killed, `false` if the sandbox was not found.
*/
kill(opts?: Pick<SandboxOpts, 'requestTimeoutMs' | 'signal'>): Promise<boolean>;
/**
* Pause a sandbox by its ID.
*
* @param opts connection options, plus `keepMemory` to control the snapshot
* kind. When `opts.keepMemory` is `false`, the in-memory state is dropped and
* only the filesystem is persisted (a filesystem-only snapshot); resuming such
* a sandbox cold-boots (reboots) it from disk, losing running processes and
* open connections. Defaults to `true` (full memory snapshot).
*
* @returns `true` if the sandbox got paused, `false` if the sandbox was already paused.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* await sandbox.pause()
*
* // filesystem-only snapshot (resume reboots the sandbox)
* await sandbox.pause({ keepMemory: false })
* ```
*/
pause(opts?: SandboxPauseOpts): Promise<boolean>;
/**
* @deprecated Use {@link Sandbox.pause} instead.
*/
betaPause(opts?: SandboxPauseOpts): Promise<boolean>;
/**
* Create a snapshot of the sandbox's current state.
*
* The sandbox will be paused while the snapshot is being created.
* The snapshot can be used to create new sandboxes with the same filesystem and state.
* Snapshots are persistent and survive sandbox deletion.
*
* Use the returned `snapshotId` with `Sandbox.create(snapshotId)` to create a new sandbox from the snapshot.
*
* @param opts snapshot creation options including optional name and connection options.
*
* @returns snapshot information including the snapshot ID.
*
* @example
* ```ts
* const sandbox = await Sandbox.create()
* await sandbox.files.write('/app/state.json', '{"step": 1}')
*
* // Create a snapshot
* const snapshot = await sandbox.createSnapshot({ name: 'my-snapshot' })
*
* // Create a new sandbox from the snapshot
* const newSandbox = await Sandbox.create(snapshot.snapshotId)
* ```
*/
createSnapshot(opts?: CreateSnapshotOpts): Promise<SnapshotInfo>;
/**
* List all snapshots created from this sandbox.
*
* @param opts list options.
*
* @returns paginator for listing snapshots from this sandbox.
*/
listSnapshots(opts?: Omit<SnapshotListOpts, 'sandboxId'>): SnapshotPaginator;
/**
*
* Get the MCP URL for the sandbox.
*
* @returns MCP URL for the sandbox.
*/
getMcpUrl(): string;
/**
* Get the MCP token for the sandbox.
*
* @returns MCP token for the sandbox, or undefined if MCP is not enabled.
*/
getMcpToken(): Promise<string | undefined>;
/**
* Get the URL to upload a file to the sandbox.
*
* You have to send a POST request to this URL with the file as multipart/form-data.
*
* @param path path to the file in the sandbox.
*
* @param opts download url options.
*
* @returns URL for uploading file.
*/
uploadUrl(path?: string, opts?: SandboxUrlOpts): Promise<string>;
/**
* Get the URL to download a file from the sandbox.
*
* @param path path to the file in the sandbox.
*
* @param opts download url options.
*
* @returns URL for downloading file.
*/
downloadUrl(path: string, opts?: SandboxUrlOpts): Promise<string>;
/**
* Get sandbox information like sandbox ID, template, metadata, started at/end at date.
*
* @param opts connection options.
*
* @returns information about the sandbox
*/
getInfo(opts?: Pick<SandboxOpts, 'requestTimeoutMs' | 'signal'>): Promise<SandboxInfo>;
/**
* Get the metrics of the sandbox.
*
* @param opts connection options.
*
* @returns List of sandbox metrics containing CPU, memory and disk usage information.
*/
getMetrics(opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
private resolveApiOpts;
private fileUrl;
}
//#endregion
//#region src/template/readycmd.d.ts
/**
* Class for ready check commands.
*/
declare class ReadyCmd {
private cmd;
constructor(cmd: string);
getCmd(): string;
}
/**
* Wait for a port to be listening.
* Uses `ss` command to check if a port is open and listening.
*
* @param port Port number to wait for
* @returns ReadyCmd that checks for the port
*
* @example
* ```ts
* import { Template, waitForPort } from 'e2b'
*
* const template = Template()
* .fromPythonImage()
* .setStartCmd('python -m http.server 8000', waitForPort(8000))
* ```
*/
declare function waitForPort(port: number): ReadyCmd;
/**
* Wait for a URL to return a specific HTTP status code.
* Uses `curl` to make HTTP requests and check the response status.
*
* @param url URL to check (e.g., 'http://localhost:3000/health')
* @param statusCode Expected HTTP status code (default: 200)
* @returns ReadyCmd that checks the URL
*
* @example
* ```ts
* import { Template, waitForURL } from 'e2b'
*
* const template = Template()
* .fromNodeImage()
* .setStartCmd('npm start', waitForURL('http://localhost:3000/health'))
* ```
*/
declare function waitForURL(url: string, statusCode?: number): ReadyCmd;
/**
* Wait for a process with a specific name to be running.
* Uses `pgrep` to check if a process exists.
*
* @param processName Name of the process to wait for
* @returns ReadyCmd that checks for the process
*
* @example
* ```ts
* import { Template, waitForProcess } from 'e2b'
*
* const template = Template()
* .fromBaseImage()
* .setStartCmd('./my-daemon', waitForProcess('my-daemon'))
* ```
*/
declare function waitForProcess(processName: string): ReadyCmd;
/**
* Wait for a file to exist.
* Uses shell test command to check file existence.
*
* @param filename Path to the file to wait for
* @returns ReadyCmd that checks for the file
*
* @example
* ```ts
* import { Template, waitForFile } from 'e2b'
*
* const template = Template()
* .fromBaseImage()
* .setStartCmd('./init.sh', waitForFile('/tmp/ready'))
* ```
*/
declare function waitForFile(filename: string): ReadyCmd;
/**
* Wait for a specified timeout before considering the sandbox ready.
* Uses `sleep` command to wait for a fixed duration.
*
* @param timeout Time to wait in milliseconds (minimum: 1000ms / 1 second)
* @returns ReadyCmd that waits for the specified duration
*
* @example
* ```ts
* import { Template, waitForTimeout } from 'e2b'
*
* const template = Template()
* .fromNodeImage()
* .setStartCmd('npm start', waitForTimeout(5000)) // Wait 5 seconds
* ```
*/
declare function waitForTimeout(timeout: number): ReadyCmd;
//#endregion
//#region src/template/logger.d.ts
/**
* Log entry severity levels.
*/
type LogEntryLevel = 'debug' | 'info' | 'warn' | 'error';
/**
* Represents a single log entry from the template build process.
*/
declare class LogEntry {
readonly timestamp: Date;
readonly level: LogEntryLevel;
readonly message: string;
constructor(timestamp: Date, level: LogEntryLevel, message: string);
toString(): string;
}
/**
* Special log entry indicating the start of a build process.
*/
declare class LogEntryStart extends LogEntry {
constructor(timestamp: Date, message: string);
}
/**
* Special log entry indicating the end of a build process.
*/
declare class LogEntryEnd extends LogEntry {
constructor(timestamp: Date, message: string);
}
/**
* Create a default build logger with animated timer display.
*
* @param options Logger configuration options
* @param options.minLevel Minimum log level to display (default: 'info')
* @returns Logger function that accepts LogEntry instances
*
* @example
* ```ts
* import { Template, defaultBuildLogger } from 'e2b'
*
* const template = Template().fromPythonImage()
*
* await Template.build(template, {
* alias: 'my-template',
* onBuildLogs: defaultBuildLogger({ minLevel: 'debug' })
* })
* ```
*/
declare function defaultBuildLogger(options?: {
minLevel?: LogEntryLevel;
}): (logEntry: LogEntry) => void;
//#endregion
//#region src/template/types.d.ts
/**
* Options for creating a new template.
*/
type TemplateOptions = {
/**
* Path to the directory containing files to be copied into the template.
* @default Current directory from template location
*/
fileContextPath?: PathLike;
/**
* Array of glob patterns to ignore when copying files.
*/
fileIgnorePatterns?: string[];
};
/**
* Basic options for building a template.
*/
type BasicBuildOptions = {
/**
* Alias name for the template.
* @deprecated Use the `name` parameter of `Template.build()` instead.
*/
alias: string;
/**
* Tags to assign to the template build.
*/
tags?: string[];
/**
* Number of CPUs allocated to the sandbox.
* @default 2
*/
cpuCount?: number;
/**
* Amount of memory in MB allocated to the sandbox.
* @default 1024
*/
memoryMB?: number;
/**
* If true, skips cache and forces a complete rebuild.
* @default false
*/
skipCache?: boolean;
/**
* Callback function to receive build logs during the build process.
*/
onBuildLogs?: (logEntry: LogEntry) => void;
};
/**
* Options for building a template with authentication.
*/
type BuildOptions = ConnectionOpts & BasicBuildOptions;
/**
* Information about a built template.
*/
type BuildInfo = {
/**
* First alias from the build (for backward compatibility).
* @deprecated Use `name` instead.
*/
alias: string;
/**
* Name of the template.
*/
name: string;
/**
* Tags assigned to this build.
*/
tags: string[];
/**
* Template identifier.
*/
templateId: string;
/**
* Build identifier.
*/
buildId: string;
};
/**
* Options for getting build status.
*/
type GetBuildStatusOptions = ConnectionOpts & {
logsOffset?: number;
};
/**
* Status of a template build.
*/
type TemplateBuildStatus = 'building' | 'waiting' | 'ready' | 'error';
/**
* Reason for the current build status (typically for errors).
*/
type BuildStatusReason = {
/**
* Message with the status reason.
*/
message: string;
/**
* Step that failed.
*/
step?: string;
/**
* Log entries related to the status reason.
*/
logEntries: LogEntry[];
};
/**
* Response from getting build status.
*/
type TemplateBuildStatusResponse = {
/**
* Build identifier.
*/
buildID: string;
/**
* Template identifier.
*/
templateID: string;
/**
* Current status of the build.
*/
status: TemplateBuildStatus;
/**
* Build log entries.
*/
logEntries: LogEntry[];
/**
* Build logs (raw strings).
* @deprecated Use `logEntries` instead.
*/
logs: string[];
/**
* Reason for the current status (typically for errors).
*/
reason?: BuildStatusReason;
};
/**
* Information about assigned template tags.
*/
type TemplateTagInfo = {
/**
* Build identifier associated with this tag.
*/
buildId: string;
/**
* Assigned tags of the template.
*/
tags: string[];
};
/**
* Detailed information about a single template tag.
*/
type TemplateTag = {
/**
* Name of the tag.
*/
tag: string;
/**
* Build identifier associated with this tag.
*/
buildId: string;
/**
* When this tag was assigned.
*/
createdAt: Date;
};
/**
* Configuration for a single file/directory copy operation.
*/
type CopyItem = {
src: PathLike | PathLike[];
dest: PathLike;
forceUpload?: true;
user?: string;
mode?: number;
resolveSymlinks?: boolean;
gzip?: boolean;
};
/**
* MCP server names that can be installed.
*/
type McpServerName = keyof McpServer;
/**
* Initial state of a template builder.
* Use one of these methods to specify the base image or template to start from.
*/
interface TemplateFromImage {
/**
* Start from a Debian-based Docker image.
* @param variant Debian variant (default: 'stable')
*
* @example
* ```ts
* Template().fromDebianImage('bookworm')
* ```
*/
fromDebianImage(variant?: string): TemplateBuilder;
/**
* Start from an Ubuntu-based Docker image.
* @param variant Ubuntu variant (default: 'latest')
*
* @example
* ```ts
* Template().fromUbuntuImage('24.04')
* ```
*/
fromUbuntuImage(variant?: string): TemplateBuilder;
/**
* Start from a Fedora-based Docker image.
* @param variant Fedora variant (default: '44')
*
* @example
* ```ts
* Template().fromFedoraImage('44')
* ```
*/
fromFedoraImage(variant?: string): TemplateBuilder;
/**
* Start from an Alpine-based Docker image.
* @param variant Alpine variant (default: '3.24')
*
* @example
* ```ts
* Template().fromAlpineImage('3.24')
* ```
*/
fromAlpineImage(variant?: string): TemplateBuilder;
/**
* Start from an Arch Linux-based Docker image.
*
* Defaults to `latest`: Arch is a rolling release and template provisioning
* runs `pacman -Syu`, so pinning a tag would not change the built result.
* @param variant Arch Linux variant (default: 'latest')
*
* @example
* ```ts
* Template().fromArchImage('base-devel')
* ```
*/
fromArchImage(variant?: string): TemplateBuilder;
/**
* Start from a Python-based Docker image.
* @param version Python version (default: '3')
*
* @example
* ```ts
* Template().fromPythonImage('3')
* ```
*/
fromPythonImage(version?: string): TemplateBuilder;
/**
* Start from a Node.js-based Docker image.
* @param variant Node.js variant (default: 'lts')
*
* @example
* ```ts
* Template().fromNodeImage('24')
* ```
*/
fromNodeImage(variant?: string): TemplateBuilder;
/**
* Start from a Bun-based Docker image.
* @param variant Bun variant (default: 'latest')
*
* @example
* ```ts
* Template().fromBunImage('1.3')
* ```
*/
fromBunImage(variant?: string): TemplateBuilder;
/**
* Start from E2B's default base image (e2bdev/base:latest).
*
* @example
* ```ts
* Template().fromBaseImage()
* ```
*/
fromBaseImage(): TemplateBuilder;
/**
* Start from a custom Docker image.
* @param baseImage Docker image name
* @param credentials Optional credentials for private registries
*
* @example
* ```ts
* Template().fromImage('python:3')
*
* // With credentials (optional)
* Template().fromImage('myregistry.com/myimage:latest', {
* username: 'user',
* password: 'pass'
* })
* ```
*/
fromImage(baseImage: string, credentials?: {
username: string;
password: string;
}): TemplateBuilder;
/**
* Start from an existing E2B template.
* @param template E2B template ID or alias
*
* @example
* ```ts
* Template().fromTemplate('my-base-template')
* ```
*/
fromTemplate(template: string): TemplateBuilder;
/**
* Parse a Dockerfile and convert it to Template SDK format.
* @param dockerfileContentOrPath Dockerfile content or path
*
* @example
* ```ts
* Template().fromDockerfile('Dockerfile')
* Template().fromDockerfile('FROM python:3\nRUN pip install numpy')
* ```
*/
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
/**
* Start from a Docker image in AWS ECR.
* @param image Full ECR image path
* @param credentials AWS credentials
*
* @example
* ```ts
* Template().fromAWSRegistry(
* '123456789.dkr.ecr.us-west-2.amazonaws.com/myimage:latest',
* {
* accessKeyId: 'AKIA...',
* secretAccessKey: '...',
* region: 'us-west-2'
* }
* )
* ```
*/
fromAWSRegistry(image: string, credentials: {
accessKeyId: string;
secretAccessKey: string;
region: string;
}): TemplateBuilder;
/**
* Start from a Docker image in Google Container Registry.
* @param image Full GCR/GAR image path
* @param credentials GCP service account credentials
*
* @example
* ```ts
* Template().fromGCPRegistry(
* 'gcr.io/myproject/myimage:latest',
* { serviceAccountJSON: 'path/to/service-account.json' }
* )
* ```
*/
fromGCPRegistry(image: string, credentials: {
serviceAccountJSON: object | string;
}): TemplateBuilder;
/**
* Skip cache for all subsequent build instructions from this point.
*
* @example
* ```ts
* Template().skipCache().fromPythonImage('3')
* ```
*/
skipCache(): this;
}
/**
* Main builder state for constructing templates.
* Provides methods for customizing the template environment.
*/
interface TemplateBuilder {
/**
* Copy files or directories into the template.
* @param src Source path(s)
* @param dest Destination path
* @param options Copy options
*
* @example
* ```ts
* template.copy('requirements.txt', '/home/user/')
* template.copy(['app.ts', 'config.ts'], '/app/', { mode: 0o755 })
* ```
*/
copy(src: PathLike | PathLike[], dest: PathLike, options?: {
forceUpload?: true;
user?: string;
mode?: number;
resolveSymlinks?: boolean;
gzip?: boolean;
}): TemplateBuilder;
/**
* Copy multiple items with individual options.
* @param items Array of copy items
*
* @example
* ```ts
* template.copyItems([
* { src: 'app.ts', dest: '/app/' },
* { src: 'config.ts', dest: '/app/', mode: 0o644 }
* ])
* ```
*/
copyItems(items: CopyItem[]): TemplateBuilder;
/**
* Remove files or directories.
* @param path Path(s) to remove
* @param options Remove options
*
* @example
* ```ts
* template.remove('/tmp/cache', { recursive: true, force: true })
* template.remove('/tmp/cache', { recursive: true, force: true, user: 'root' })
* ```
*/
remove(path: PathLike | PathLike[], options?: {
force?: boolean;
recursive?: boolean;
user?: string;
}): TemplateBuilder;
/**
* Rename or move a file or directory.
* @param src Source path
* @param dest Destination path
* @param options Rename options
*
* @example
* ```ts
* template.rename('/tmp/old.txt', '/tmp/new.txt')
* template.rename('/tmp/old.txt', '/tmp/new.txt', { user: 'root' })
* ```
*/
rename(src: PathLike, dest: PathLike, options?: {
force?: boolean;
user?: string;
}): TemplateBuilder;
/**
* Create directories.
* @param path Directory path(s)
* @param options Directory options
*
* @example
* ```ts
* template.makeDir('/app/data', { mode: 0o755 })
* template.makeDir(['/app/logs', '/app/cache'])
* template.makeDir('/app/data', { mode: 0o755, user: 'root' })
* ```
*/
makeDir(path: PathLike | PathLike[], options?: {
mode?: number;
user?: string;
}): TemplateBuilder;
/**
* Create a symbolic link.
* @param src Source path (target)
* @param dest Destination path (symlink location)
* @param options Symlink options
*
* @example
* ```ts
* template.makeSymlink('/usr/bin/python3', '/usr/bin/python')
* template.makeSymlink('/usr/bin/python3', '/usr/bin/python', { user: 'root' })
* template.makeSymlink('/usr/bin/python3', '/usr/bin/python', { force: true })
* ```
*/
makeSymlink(src: PathLike, dest: PathLike, options?: {
user?: string;
force?: boolean;
}): TemplateBuilder;
/**
* Run a shell command.
* @param command Command string
* @param options Command options
*
* @example
* ```ts
* template.runCmd('apt-get update')
* template.runCmd(['pip install numpy', 'pip install pandas'])
* template.runCmd('apt-get install vim', { user: 'root' })
* ```
*/
runCmd(command: string, options?: {
user?: string;
}): TemplateBuilder;
/**
* Run multiple shell commands.
* @param commands Array of command strings
* @param options Command options
*/
runCmd(commands: string[], options?: {
user?: string;
}): TemplateBuilder;
/**
* Run command(s).
* @param commandOrCommands Command or commands
* @param options Command options
*/
runCmd(commandOrCommands: string | string[], options?: {
user?: string;
}): TemplateBuilder;
/**
* Set the working directory.
* @param workdir Working directory path
*
* @example
* ```ts
* template.setWorkdir('/app')
* ```
*/
setWorkdir(workdir: PathLike): TemplateBuilder;
/**
* Set the user for subsequent commands.
* @param user Username
*
* @example
* ```ts
* template.setUser('root')
* ```
*/
setUser(user: string): TemplateBuilder;
/**
* Install Python packages using pip.
* @param packages Package name(s) or undefined for current directory
* @param options Install options
* @param options.g Install globally as root (default: true). Set to false for user-only installation with --user flag
*
* @example
* ```ts
* template.pipInstall('numpy') // Installs globally (default)
* template.pipInstall(['pandas', 'scikit-learn'])
* template.pipInstall('numpy', { g: false }) // Install for user only
* template.pipInstall() // Installs from current directory
* ```
*/
pipInstall(packages?: string | string[], options?: {
g?: boolean;
}): TemplateBuilder;
/**
* Install Node.js packages using npm.
* @param packages Package name(s) or undefined for package.json
* @param options Install options
*
* @example
* ```ts
* template.npmInstall('express')
* template.npmInstall(['lodash', 'axios'])
* template.npmInstall('tsx', { g: true })
* template.npmInstall('typescript', { dev: true })
* template.npmInstall() // Installs from package.json
* ```
*/
npmInstall(packages?: string | string[], options?: {
g?: boolean;
dev?: boolean;
}): TemplateBuilder;
/**
* Install Bun packages using bun.
* @param packages Package name(s) or undefined for package.json
* @param options Install options
*
* @example
* ```ts
* template.bunInstall('express')
* template.bunInstall(['lodash', 'axios'])
* template.bunInstall('tsx', { g: true })
* template.bunInstall('typescript', { dev: true })
* template.bunInstall() // Installs from package.json
* ```
*/
bunInstall(packages?: string | string[], options?: {
g?: boolean;
dev?: boolean;
}): TemplateBuilder;
/**
* Install Debian/Ubuntu packages using apt-get.
* @param packages Package name(s)
*
* @example
* ```ts
* template.aptInstall('vim')
* template.aptInstall(['git', 'curl', 'wget'])
* template.aptInstall(['vim'], { noInstallRecommends: true })
* template.aptInstall(['vim'], { fixMissing: true })
* ```
*/
aptInstall(packages: string | string[], options?: {
noInstallRecommends?: boolean;
fixMissing?: boolean;
}): TemplateBuilder;
/**
* Install MCP servers using mcp-gateway.
* Note: Requires a base image with mcp-gateway pre-installed (e.g., mcp-gateway).
* @param servers MCP server name(s)
*
* @throws {Error} If the base template is not mcp-gateway
* @example
* ```ts
* template.addMcpServer('exa')
* template.addMcpServer(['brave', 'firecrawl', 'duckduckgo'])
* ```
*/
addMcpServer(servers: McpServerName | McpServerName[]): TemplateBuilder;
/**
* Clone a Git repository.
* @param url Repository URL
* @param path Optional destination path
* @param options Clone options
*
* @example
* ```ts
* template.gitClone('https://github.com/user/repo.git', '/app/repo')
* template.gitClone('https://github.com/user/repo.git', undefined, {
* branch: 'main',
* depth: 1
* })
* template.gitClone('https://github.com/user/repo.git', '/app/repo', {
* user: 'root'
* })
* ```
*/
gitClone(url: string, path?: PathLike, options?: {
branch?: string;
depth?: number;
user?: string;
}): TemplateBuilder;
/**
* Set environment variables.
* Note: Environment variables defined here are available only during template build.
* @param envs Environment variables
*
* @example
* ```ts
* template.setEnvs({ NODE_ENV: 'production', PORT: '8080' })
* ```
*/
setEnvs(envs: Record<string, string>): TemplateBuilder;
/**
* Skip cache for all subsequent build instructions from this point.
*
* @example
* ```ts
* template.skipCache().runCmd('apt-get update')
* ```
*/
skipCache(): this;
/**
* Set the start command and ready check.
* @param startCommand Command to run on startup
* @param readyCommand Command to check readiness
*
* @example
* ```ts
* // Using a string command
* template.setStartCmd(
* 'node app.js',
* 'curl http://localhost:8000/health'
* )
*
* // Using ReadyCmd helpers
* import { waitForPort, waitForURL } from 'e2b'
*
* template.setStartCmd(
* 'python -m http.server 8000',
* waitForPort(8000)
* )
*
* template.setStartCmd(
* 'npm start',
* waitForURL('http://localhost:3000/health', 200)
* )
* ```
*/
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
/**
* Set or update the ready check command.
* @param readyCommand Command to check readiness
*
* @example
* ```ts
* // Using a string command
* template.setReadyCmd('curl http://localhost:8000/health')
*
* // Using ReadyCmd helpers
* import { waitForPort, waitForFile, waitForProcess } from 'e2b'
*
* template.setReadyCmd(waitForPort(3000))
*
* template.setReadyCmd(waitForFile('/tmp/ready'))
*
* template.setReadyCmd(waitForProcess('nginx'))
* ```
*/
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
/**
* Prebuild a devcontainer from the specified directory.
* @param devcontainerDirectory Path to the devcontainer directory
*
* @example
* ```ts
* template
* .gitClone('https://myrepo.com/project.git', '/my-devcontainer')
* .betaDevContainerPrebuild('/my-devcontainer')
* ```
*/
betaDevContainerPrebuild(devcontainerDirectory: string): TemplateBuilder;
/**
* Start a devcontainer from the specified directory.
* @param devcontainerDirectory Path to the devcontainer directory
*
* @example
* ```ts
* template
* .gitClone('https://myrepo.com/project.git', '/my-devcontainer')
* .startDevcontainer('/my-devcontainer')
*
* // Prebuild and start
* template
* .gitClone('https://myrepo.com/project.git', '/my-devcontainer')
* .betaDevContainerPrebuild('/my-devcontainer')
* // Other instructions...
* .betaSetDevContainerStart('/my-devcontainer')
* ```
*/
betaSetDevContainerStart(devcontainerDirectory: string): TemplateFinal;
}
/**
* Final state of a template after start/ready commands are set.
* The template can only be built in this state.
*/
interface TemplateFinal {}
/**
* Type representing a template in any state (builder or final).
*/
type TemplateClass = TemplateBuilder | TemplateFinal;
//#endregion
//#region src/template/callable.d.ts
/**
* A template class that can also be called without `new`.
*
* @internal
* @hidden
* @hide
*/
type CallableTemplate<T extends typeof TemplateBase> = T & ((options?: TemplateOptions) => TemplateFromImage);
//#endregion
//#region src/template/index.d.ts
/**
* Builder for E2B sandbox templates, and the entrypoint for the template API.
*
* Exposed as {@link Template}, which can be called as a factory.
*/
declare class TemplateBase extends ClientFactory implements TemplateFromImage, TemplateBuilder, TemplateFinal {
private defaultBaseImage;
private baseImage;
private baseTemplate;
private registryConfig;
private startCmd;
private readyCmd;
private force;
private forceNextLayer;
private instructions;
private fileContextPath;
private fileIgnorePatterns;
private logsRefreshFrequency;
private stackTraces;
constructor(options?: TemplateOptions);
/**
* Convert a template to JSON representation.
*
* @param template The template to convert
* @param computeHashes Whether to compute file hashes for cache invalidation
* @returns JSON string representation of the template
*/
static toJSON(template: TemplateClass, computeHashes?: boolean): Promise<string>;
/**
* Convert a template to Dockerfile format.
* Note: Templates based on other E2B templates cannot be converted to Dockerfile.
*
* @param template The template to convert
* @returns Dockerfile string representation
* @throws Error if the template is based on another E2B template
*/
static toDockerfile(template: TemplateClass): string;
/**
* Build and deploy a template to E2B infrastructure.
*
* @param template The template to build
* @param name Template name in 'name' or 'name:tag' format
* @param options Optional build configuration options
*
* @example
* ```ts
* const template = Template().fromPythonImage('3')
*
* // Build with single tag in name
* await Template.build(template, 'my-python-env:v1.0')
*
* // Build with multiple tags
* await Template.build(template, 'my-python-env', { tags: ['v1.0', 'stable'] })
* ```
*/
static build(template: TemplateClass, name: string, options?: Omit<BuildOptions, 'alias'>): Promise<BuildInfo>;
/**
* Build and deploy a template to E2B infrastructure.
*
* @param template The template to build
* @param options Build configuration options with alias (deprecated)
*
* @deprecated Use the overload with `name` parameter instead.
* @example
* ```ts
* // Deprecated:
* await Template.build(template, { alias: 'my-python-env' })
*
* // Use instead:
* await Template.build(template, 'my-python-env:v1.0')
* ```
*/
static build(template: TemplateClass, options: BuildOptions): Promise<BuildInfo>;
/**
* Build and deploy a template to E2B infrastructure without waiting for completion.
*
* @param template The template to build
* @param name Template name in 'name' or 'name:tag' format
* @param options Optional build configuration options
*
* @example
* ```ts
* const template = Template().fromPythonImage('3')
*
* // Build with single tag in name
* const data = await Template.buildInBackground(template, 'my-python-env:v1.0')
*
* // Build with multiple tags
* const data = await Template.buildInBackground(template, 'my-python-env', { tags: ['v1.0', 'stable'] })
* ```
*/
static buildInBackground(template: TemplateClass, name: string, options?: Omit<BuildOptions, 'alias'>): Promise<BuildInfo>;
/**
* Build and deploy a template to E2B infrastructure without waiting for completion.
*
* @param template The template to build
* @param options Build configuration options with alias (deprecated)
*
* @deprecated Use the overload with `name` parameter instead.
* @example
* ```ts
* // Deprecated:
* await Template.buildInBackground(template, { alias: 'my-python-env' })
*
* // Use instead:
* await Template.buildInBackground(template, 'my-python-env:v1.0')
* ```
*/
static buildInBackground(template: TemplateClass, options: BuildOptions): Promise<BuildInfo>;
/**
* Get the status of a build.
*
* @param data Build identifiers
* @param options Authentication options
*
* @example
* ```ts
* const status = await Template.getBuildStatus(data, { logsOffset: 0 })
* ```
*/
static getBuildStatus(data: Pick<BuildInfo, 'templateId' | 'buildId'>, options?: GetBuildStatusOptions): Promise<TemplateBuildStatusResponse>;
/**
* Check if a template with the given name exists.
*
* @param name Template name to check
* @param options Authentication options
* @returns True if the name exists, false otherwise
*
* @example
* ```ts
* const exists = await Template.exists('my-python-env')
* if (exists) {
* console.log('Template exists!')
* }
* ```
*/
static exists(name: string, options?: ConnectionOpts): Promise<boolean>;
/**
* Check if a template with the given alias exists.
*
* @param alias Template alias to check
* @param options Authentication options
* @returns True if the alias exists, false otherwise
*
* @deprecated Use `exists` instead.
* @example
* ```ts
* const exists = await Template.aliasExists('my-python-env')
* if (exists) {
* console.log('Template exists!')
* }
* ```
*/
static aliasExists(alias: string, options?: ConnectionOpts): Promise<boolean>;
/**
* Assign tag(s) to an existing template build.
*
* @param targetName Template name in 'name:tag' format (the source build to tag from)
* @param tags Tag or tags to assign
* @param options Authentication options
* @returns Tag info with buildId and assigned tags
*
* @example
* ```ts
* // Assign a single tag
* await Template.assignTags('my-template:v1.0', 'production')
*
* // Assign multiple tags
* await Template.assignTags('my-template:v1.0', ['production', 'stable'])
* ```
*/
static assignTags(targetName: string, tags: string | string[], options?: ConnectionOpts): Promise<TemplateTagInfo>;
/**
* Remove tag(s) from a template.
*
* @param name Template name
* @param tags Tag or tags to remove
* @param options Authentication options
*
* @example
* ```ts
* // Remove a single tag
* await Template.removeTags('my-template', 'production')
*
* // Remove multiple tags from a template
* await Template.removeTags('my-template', ['production', 'staging'])
* ```
*/
static removeTags(name: string, tags: string | string[], options?: ConnectionOpts): Promise<void>;
/**
* Get all tags for a template.
*
* @param templateId Template ID or name
* @param options Authentication options
* @returns Array of tag details including tag name, buildId, and creation date
*
* @example
* ```ts
* const tags = await Template.getTags('my-template')
* for (const tag of tags) {
* console.log(`Tag: ${tag.tag}, Build: ${tag.buildId}, Created: ${tag.createdAt}`)
* }
* ```
*/
static getTags(templateId: string, options?: ConnectionOpts): Promise<TemplateTag[]>;
fromDebianImage(variant?: string): TemplateBuilder;
fromUbuntuImage(variant?: string): TemplateBuilder;
fromFedoraImage(variant?: string): TemplateBuilder;
fromAlpineImage(variant?: string): TemplateBuilder;
fromArchImage(variant?: string): TemplateBuilder;
fromPythonImage(version?: string): TemplateBuilder;
fromNodeImage(variant?: string): TemplateBuilder;
fromBunImage(variant?: string): TemplateBuilder;
fromBaseImage(): TemplateBuilder;
fromImage(baseImage: string, credentials?: {
username: string;
password: string;
}): TemplateBuilder;
fromTemplate(template: string): TemplateBuilder;
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
fromAWSRegistry(image: string, credentials: {
accessKeyId: string;
secretAccessKey: string;
region: string;
}): TemplateBuilder;
fromGCPRegistry(image: string, credentials: {
serviceAccountJSON: string | object;
}): TemplateBuilder;
copy(src: PathLike | PathLike[], dest: PathLike, options?: {
forceUpload?: true;
user?: string;
mode?: number;
resolveSymlinks?: boolean;
gzip?: boolean;
}): TemplateBuilder;
copyItems(items: CopyItem[]): TemplateBuilder;
remove(path: PathLike | PathLike[], options?: {
force?: boolean;
recursive?: boolean;
user?: string;
}): TemplateBuilder;
rename(src: PathLike, dest: PathLike, options?: {
force?: boolean;
user?: string;
}): TemplateBuilder;
makeDir(path: PathLike | PathLike[], options?: {
mode?: number;
user?: string;
}): TemplateBuilder;
makeSymlink(src: PathLike, dest: PathLike, options?: {
user?: string;
force?: boolean;
}): TemplateBuilder;
runCmd(command: string, options?: {
user?: string;
}): TemplateBuilder;
runCmd(commands: string[], options?: {
user?: string;
}): TemplateBuilder;
setWorkdir(workdir: PathLike): TemplateBuilder;
setUser(user: string): TemplateBuilder;
pipInstall(packages?: string | string[], options?: {
g?: boolean;
}): TemplateBuilder;
npmInstall(packages?: string | string[], options?: {
g?: boolean;
dev?: boolean;
}): TemplateBuilder;
bunInstall(packages?: string | string[], options?: {
g?: boolean;
dev?: boolean;
}): TemplateBuilder;
aptInstall(packages: string | string[], options?: {
noInstallRecommends?: boolean;
fixMissing?: boolean;
}): TemplateBuilder;
addMcpServer(servers: McpServerName | McpServerName[]): TemplateBuilder;
gitClone(url: string, path?: PathLike, options?: {
branch?: string;
depth?: number;
user?: string;
}): TemplateBuilder;
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
setEnvs(envs: Record<string, string>): TemplateBuilder;
skipCache(): this;
betaDevContainerPrebuild(devcontainerDirectory: string): TemplateBuilder;
betaSetDevContainerStart(devcontainerDirectory: string): TemplateFinal;
/**
* Collect the current stack trace for debugging purposes.
*
* The trace resolves to the first frame outside the SDK, so methods that
* delegate to other builder methods (e.g. `remove()` → `runCmd()`) collect
* the user's call site without any bookkeeping.
*
* @returns this for method chaining
*/
private collectStackTrace;
/**
* Convert the template to JSON representation.
*
* @param computeHashes Whether to compute file hashes for COPY instructions
* @returns JSON string representation of the template
*/
private toJSON;
/**
* Convert the template to Dockerfile format.
*
* Note: Only templates based on Docker images can be converted to Dockerfile.
* Templates based on other E2B templates cannot be converted because they
* may use features not available in standard Dockerfiles.
*
* @returns Dockerfile string representation
* @throws Error if template is based on another E2B template or has no base image
*/
private toDockerfile;
/**
* Internal implementation of the template build process.
*
* @param client API client for communicating with E2B backend
* @param name Template name in 'name' or 'name:tag' format
* @param tags Additional tags to assign to the build
* @param options Build configuration options
* @throws BuildError if the build fails
*/
private build;
/**
* Add file hashes to COPY instructions for cache invalidation.
*
* @returns Copy of instructions array with filesHash added to COPY instructions
*/
private instructionsWithHashes;
/**
* Serialize the template to the API request format.
*
* @param steps Array of build instructions with file hashes
* @returns Template data formatted for the API
*/
private serialize;
}
/**
* Builder and API entrypoint for E2B sandbox templates.
*
* `Template` is the {@link TemplateBase} class, wrapped so it can also be
* called as a factory returning a builder. The statics (`Template.build`,
* `Template.exists`, …) resolve their connection options off the class they are
* called on — so a subclass can bind its own defaults.
*
* @param options Optional builder options, e.g. the file context path used to
* resolve relative paths passed to `copy`
* @returns A template builder
*
* @example
* ```ts
* import { Template } from 'e2b'
*
* const template = Template()
* .fromPythonImage('3')
* .copy('requirements.txt', '/app/')
* .pipInstall()
*
* await Template.build(template, 'my-python-app:v1.0')
* ```
*/
declare const Template: CallableTemplate<typeof TemplateBase>;
//#endregion
//#region src/client.d.ts
/**
* Connection options bound to an {@link E2B} client.
*
* Same as {@link ConnectionOpts} without `signal`, which cancels a single
* request and therefore can only be passed per call.
*/
type E2BClientOpts = Omit<ConnectionOpts, 'signal'>;
/**
* E2B client with an explicitly bound connection configuration.
*
* The resources exposed by the client ({@link E2B.Sandbox},
* {@link E2B.Volume}, {@link E2B.Template}, {@link E2B.Secret}) behave exactly
* like the top-level `Sandbox` / `Volume` / `Template` / `Secret` exports,
* except the options passed to the client are used as the defaults instead of
* the environment variables.
* Per-call options still take precedence over the client's options.
*
* Multiple clients are fully isolated from each other and from the top-level
* env-configured exports.
*
* @example
* ```ts
* import { E2B } from 'e2b'
*
* const client = new E2B({ apiKey: 'e2b_...', domain: 'e2b.dev' })
*
* const sandbox = await client.Sandbox.create()
* const volumes = await client.Volume.list()
* await client.Template.build(client.Template().fromPythonImage('3'), 'my-env')
* ```
*/
declare class E2B {
/**
* `Sandbox` class bound to this client's connection configuration.
*/
readonly Sandbox: typeof Sandbox;
/**
* `Volume` class bound to this client's connection configuration.
*/
readonly Volume: typeof Volume;
/**
* `Template` bound to this client's connection configuration. Both the
* builder (`client.Template()`) and the statics
* (`client.Template.build(...)`, `client.Template.exists(...)`, …) work like
* the top-level `Template`.
*/
readonly Template: typeof Template;
/**
* `Secret` class bound to this client's connection configuration.
*/
readonly Secret: typeof Secret;
/**
* Create a new client with the connection options bound to it.
*
* @param opts connection options used as the defaults for every call made
* through this client's resource classes.
*/
constructor(opts?: E2BClientOpts);
}
//#endregion
export { ALL_TRAFFIC, ApiClient, AuthenticationError, BuildError, type BuildInfo, type BuildOptions, type BuildStatusReason, type CommandConnectOpts, CommandExitError, type CommandHandle, type CommandRequestOpts, type CommandResult, type CommandStartOpts, type Commands, ConnectionConfig, type ConnectionConfigOpts, type ConnectionOpts, type CopyItem, type CreateSnapshotOpts, E2B, type E2BClientOpts, type EntryInfo, FileNotFoundError, FileType, FileUploadError, type Filesystem, type FilesystemEvent, FilesystemEventType, type FilesystemReadOpts, type FilesystemWriteOpts, type GetBuildStatusOptions, Git, type GitAddOpts, GitAuthError, type GitBranches, type GitCloneOpts, type GitCommitOpts, type GitConfigOpts, type GitConfigScope, type GitDangerouslyAuthenticateOpts, type GitDeleteBranchOpts, type GitFileStatus, type GitInitOpts, type GitPullOpts, type GitPushOpts, type GitRemoteAddOpts, type GitRequestOpts, type GitResetMode, type GitResetOpts, type GitRestoreOpts, type GitStatus, type GitStatusLabel, GitUpstreamError, InvalidArgumentError, LogEntry, LogEntryEnd, type LogEntryLevel, LogEntryStart, type Logger, type McpServer, type McpServerName, NotEnoughSpaceError, NotFoundError, type ProcessInfo, type Pty, type PtyOutput, RateLimitError, ReadyCmd, Sandbox, Sandbox as default, type SandboxApiOpts, type SandboxConnectOpts, type SandboxEgressProxyInfo, type SandboxEgressProxyOpts, SandboxError, type SandboxForkOpts, type SandboxIamOpts, type SandboxIamToken, type SandboxIamTokenType, type SandboxInfo, type SandboxInfoLifecycle, type SandboxLifecycle, type SandboxListOpts, type SandboxListOrder, type SandboxMetrics, type SandboxMetricsOpts, type SandboxNetworkInfo, type SandboxNetworkOpts, type SandboxNetworkRule, type SandboxNetworkRuleInfo, type SandboxNetworkRules, type SandboxNetworkSelector, type SandboxNetworkSelectorContext, type SandboxNetworkTransform, type SandboxNetworkTransformContext, type SandboxNetworkTransformResolver, type SandboxNetworkUpdate, SandboxNotFoundError, type SandboxOnTimeout, type SandboxOpts, type SandboxPaginator, type SandboxPauseOpts, type SandboxState, Secret, type SecretCreateOpts, type SecretDestroyOpts, SecretError, type SecretExistsOpts, type SecretGetInfoOpts, type SecretInfo, type SecretListOpts, SecretNotFoundError, SecretPaginator, type SecretUpdateOpts, type SnapshotInfo, type SnapshotListOpts, type SnapshotPaginator, type Stderr, type Stdout, Template, TemplateBase, type TemplateBuildStatus, type TemplateBuildStatusResponse, type TemplateBuilder, type TemplateClass, TemplateError, type TemplateTag, type TemplateTagInfo, TimeoutError, type Username, Volume, type VolumeAndToken, type VolumeApiOpts, type VolumeConnectionConfig, type VolumeEntryStat, VolumeError, VolumeFileType, type VolumeInfo, type VolumeMetadataOptions, type VolumeMetadataOpts, VolumeNotFoundError, VolumePathNotFoundError, type VolumeReadOpts, type VolumeWriteOptions, type VolumeWriteOpts, type WatchHandle, type WriteInfo, type components, defaultBuildLogger, getSignature, type paths, waitForFile, waitForPort, waitForProcess, waitForTimeout, waitForURL };
//# sourceMappingURL=index.d.mts.map