Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/resources/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export interface AgentListView {

/**
* An Agent represents a registered AI agent entity.
*
* @category Agent Types
*/
export interface AgentView {
/**
Expand Down Expand Up @@ -123,6 +125,11 @@ export interface AgentView {
source?: Shared.AgentSource | null;
}

/**
* Parameters for creating a new Agent.
*
* @category Agent Types
*/
export interface AgentCreateParams {
/**
* The name of the Agent.
Expand Down
7 changes: 7 additions & 0 deletions src/resources/blueprints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ export interface BlueprintPreviewView {
* Blueprints are ways to create customized starting points for Devboxes. They
* allow you to define custom starting points for Devboxes such that environment
* set up can be cached to improve Devbox boot times.
*
* @category Blueprint Types
*/
export interface BlueprintView {
/**
Expand Down Expand Up @@ -595,6 +597,11 @@ export interface InspectionSource {

export type BlueprintDeleteResponse = unknown;

/**
* Parameters for creating a new Blueprint.
*
* @category Blueprint Types
*/
export interface BlueprintCreateParams {
/**
* Name of the Blueprint.
Expand Down
22 changes: 22 additions & 0 deletions src/resources/devboxes/devboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,11 @@ export class DevboxViewsDevboxesCursorIDPage extends DevboxesCursorIDPage<Devbox

export class DevboxSnapshotViewsDiskSnapshotsCursorIDPage extends DiskSnapshotsCursorIDPage<DevboxSnapshotView> {}

/**
* Details of an asynchronous command execution on a Devbox.
*
* @category Devbox Types
*/
export interface DevboxAsyncExecutionDetailView {
/**
* Devbox id where command was executed.
Expand Down Expand Up @@ -673,6 +678,11 @@ export interface DevboxSnapshotListView {
total_count: number;
}

/**
* View of a Devbox disk snapshot.
*
* @category Snapshot Types
*/
export interface DevboxSnapshotView {
/**
* The unique identifier of the snapshot.
Expand Down Expand Up @@ -731,6 +741,8 @@ export interface DevboxTunnelView {
* A Devbox represents a virtual development environment. It is an isolated sandbox
* that can be given to agents and used to run arbitrary code such as AI generated
* code.
*
* @category Devbox Types
*/
export interface DevboxView {
/**
Expand Down Expand Up @@ -886,6 +898,11 @@ export type DevboxRemoveTunnelResponse = unknown;

export type DevboxUploadFileResponse = unknown;

/**
* Parameters for creating a new Devbox.
*
* @category Devbox Types
*/
export interface DevboxCreateParams {
/**
* Blueprint ID to use for the Devbox. If none set, the Devbox will be created with
Expand Down Expand Up @@ -1005,6 +1022,11 @@ export interface DevboxDownloadFileParams {
path: string;
}

/**
* Parameters for executing a command on a Devbox.
*
* @category Devbox Types
*/
export interface DevboxExecuteParams {
/**
* Body param: The command to execute via the Devbox shell. By default, commands
Expand Down
7 changes: 7 additions & 0 deletions src/resources/objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ export interface ObjectListView {

/**
* An Object represents a stored data entity with metadata.
*
* @category Storage Object Types
*/
export interface ObjectView {
/**
Expand Down Expand Up @@ -214,6 +216,11 @@ export interface ObjectView {
upload_url?: string | null;
}

/**
* Parameters for creating a new Storage Object.
*
* @category Storage Object Types
*/
export interface ObjectCreateParams {
/**
* The content type of the Object.
Expand Down
24 changes: 24 additions & 0 deletions src/resources/shared.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

/**
* Configuration for automatic Devbox behavior after idle time.
*
* @category Shared Types
*/
export interface AfterIdle {
/**
* After idle_time_seconds, on_idle action will be taken.
Expand All @@ -14,6 +19,8 @@ export interface AfterIdle {

/**
* Agent source configuration.
*
* @category Shared Types
*/
export interface AgentSource {
/**
Expand Down Expand Up @@ -119,6 +126,11 @@ export namespace AgentSource {
}
}

/**
* Parameters for mounting code from a Git repository.
*
* @category Shared Types
*/
export interface CodeMountParameters {
/**
* The name of the repo to mount. By default, code will be mounted at
Expand Down Expand Up @@ -146,6 +158,8 @@ export interface CodeMountParameters {
* LaunchParameters enable you to customize the resources available to your Devbox
* as well as the environment set up that should be completed before the Devbox is
* marked as 'running'.
*
* @category Shared Types
*/
export interface LaunchParameters {
/**
Expand Down Expand Up @@ -238,6 +252,11 @@ export namespace LaunchParameters {
}
}

/**
* Mount configuration for attaching files, agents, or code to a Devbox.
*
* @category Shared Types
*/
export type Mount = Mount.ObjectMount | Mount.AgentMount | Mount.CodeMount | Mount.FileMount;

export namespace Mount {
Expand Down Expand Up @@ -322,6 +341,11 @@ export namespace Mount {
}
}

/**
* Configuration profile for scenario/benchmark runs.
*
* @category Shared Types
*/
export interface RunProfile {
/**
* Mapping of Environment Variable to Value. May be shown in devbox logging.
Expand Down
24 changes: 24 additions & 0 deletions src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import * as Shared from './resources/shared';
* The key is the path on the devbox where the object will be mounted,
* and the value is the StorageObject instance.
*
* @category SDK Types
*
* @example
* ```typescript
* { '/home/user/config.txt': storageObject }
Expand All @@ -39,12 +41,16 @@ export type InlineObjectMount = { [path: string]: StorageObject };
/**
* Union type representing all valid mount inputs for the SDK.
* Accepts both the standard API mount format and the convenient InlineObjectMount format.
*
* @category SDK Types
*/
export type MountInstance = Shared.Mount | InlineObjectMount;

/**
* Extended DevboxCreateParams that accepts the convenient SDK mount syntax.
* Use this type when creating devboxes through the SDK's DevboxOps.create() method.
*
* @category SDK Types
*/
export interface SDKDevboxCreateParams extends Omit<DevboxCreateParams, 'mounts'> {
/**
Expand Down Expand Up @@ -167,6 +173,8 @@ type ContentType = ObjectCreateParams['content_type'];
* Runloop SDK - The recommended way to interact with Runloop.
* Provides both low-level API access and high-level object-oriented interfaces.
*
* @category SDK Client
*
* @example
* ```typescript
* const runloop = new RunloopSDK(); // export RUNLOOP_API_KEY will automatically be used.
Expand All @@ -175,6 +183,7 @@ type ContentType = ObjectCreateParams['content_type'];
* console.log(result.exitCode);
* ```
*
* @remarks
* ## Operations
* - `devbox` - {@link DevboxOps}
* - `blueprint` - {@link BlueprintOps}
Expand Down Expand Up @@ -268,6 +277,9 @@ export class RunloopSDK {
/**
* Devbox SDK interface for managing devboxes.
*
* @category Devbox
*
* @remarks
* ## Overview
*
* The `DevboxOps` class provides a high-level abstraction for managing devboxes,
Expand Down Expand Up @@ -417,6 +429,9 @@ export class DevboxOps {
/**
* Blueprint SDK interface for managing blueprints.
*
* @category Blueprint
*
* @remarks
* ## Overview
*
* The `BlueprintOps` class provides a high-level abstraction for managing blueprints,
Expand Down Expand Up @@ -510,6 +525,9 @@ export class BlueprintOps {
/**
* Snapshot SDK interface for managing disk snapshots.
*
* @category Snapshot
*
* @remarks
* ## Overview
*
* The `SnapshotOps` class provides a high-level abstraction for managing disk snapshots,
Expand Down Expand Up @@ -558,6 +576,9 @@ export class SnapshotOps {
/**
* Storage object management interface
*
* @category Storage Object
*
* @remarks
* ## Overview
*
* The `StorageObjectOps` class provides a high-level abstraction for managing storage objects,
Expand Down Expand Up @@ -773,6 +794,9 @@ export class StorageObjectOps {
/**
* Agent SDK interface for managing agents.
*
* @category Agent
*
* @remarks
* ## Overview
*
* The `AgentOps` class provides a high-level abstraction for managing AI agent entities.
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import type { AgentCreateParams, AgentListParams, AgentView } from '../resources
/**
* Object-oriented interface for working with Agents.
*
* @category Agent
*
* @remarks
* ## Overview
*
* The `Agent` class provides a high-level API for managing AI agent entities.
Expand Down
2 changes: 2 additions & 0 deletions src/sdk/blueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export type CreateParams = Omit<BlueprintCreateParams, 'build_context'> & {

/**
* Object-oriented interface for working with Blueprints.
*
* @category Blueprint
*/
export class Blueprint {
private client: Runloop;
Expand Down
14 changes: 14 additions & 0 deletions src/sdk/devbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export { ExecutionResult } from './execution-result';

/**
* Streaming callbacks for real-time log processing.
*
* @category Execution Types
*/
export interface ExecuteStreamingCallbacks {
/** Callback invoked for each stdout log line */
Expand All @@ -41,6 +43,8 @@ export interface ExecuteStreamingCallbacks {
/**
* Network operations for a devbox.
* Provides methods for managing SSH keys and network tunnels.
*
* @category Devbox
*/
export class DevboxNetOps {
/**
Expand Down Expand Up @@ -130,6 +134,8 @@ export class DevboxNetOps {
/**
* Command execution operations for a devbox.
* Provides methods for executing commands synchronously and asynchronously.
*
* @category Devbox
*/
export class DevboxCmdOps {
/**
Expand Down Expand Up @@ -262,6 +268,9 @@ export class DevboxCmdOps {
* Named shell operations for a devbox.
* Provides methods for executing commands in a persistent, stateful shell session.
*
* @category Devbox
*
* @remarks
* Use {@link Devbox.shell} to create a named shell instance. If you use the same shell name,
* it will re-attach to the existing named shell, preserving its state (environment variables,
* current working directory, etc.).
Expand Down Expand Up @@ -383,6 +392,8 @@ export class DevboxNamedShell {
/**
* File operations for a devbox.
* Provides methods for reading, writing, uploading, and downloading files.
*
* @category Devbox
*/
export class DevboxFileOps {
/**
Expand Down Expand Up @@ -471,6 +482,9 @@ export class DevboxFileOps {
/**
* Object-oriented interface for working with Devboxes.
*
* @category Devbox
*
* @remarks
* ## Overview
*
* The `Devbox` class provides a high-level, object-oriented API for managing devboxes.
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/execution-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import type { DevboxAsyncExecutionDetailView } from '../resources/devboxes/devbo
/**
* Execution Result object for a completed command execution.
*
* @category Execution Types
*
* @remarks
* ## Overview
*
* The `ExecutionResult` class provides access to the results of a completed command execution.
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { ExecutionResult } from './execution-result';
/**
* Execution object for tracking async command execution with streaming support.
*
* @category Execution Types
*
* @remarks
* ## Overview
*
* The `Execution` class represents an asynchronous command execution on a devbox.
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import { Devbox } from './devbox';
/**
* Object-oriented interface for working with Disk Snapshots.
*
* @category Snapshot
*
* @remarks
* ## Overview
*
* The `Snapshot` class provides a high-level API for managing disk snapshots of devboxes.
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/storage-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ function assertNodeEnvironment(): void {
/**
* Object-oriented interface for working with Storage Objects.
*
* @category Storage Object
*
* @remarks
* ## Overview
*
* The `StorageObject` class provides a high-level API for managing storage objects,
Expand Down
Loading
Loading