Skip to content

Commit 392007d

Browse files
authored
fix(documentation): added types to the typedoc main list and fixed some decorators (#677)
* added types to typedocs so that you can find the raw API types. Also made some changes to fix some rendering issues (eg. added @remarks). * exclude types during normal build
1 parent 2e5866c commit 392007d

17 files changed

Lines changed: 246 additions & 3 deletions

src/resources/agents.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ export interface AgentListView {
9090

9191
/**
9292
* An Agent represents a registered AI agent entity.
93+
*
94+
* @category Agent Types
9395
*/
9496
export interface AgentView {
9597
/**
@@ -123,6 +125,11 @@ export interface AgentView {
123125
source?: Shared.AgentSource | null;
124126
}
125127

128+
/**
129+
* Parameters for creating a new Agent.
130+
*
131+
* @category Agent Types
132+
*/
126133
export interface AgentCreateParams {
127134
/**
128135
* The name of the Agent.

src/resources/blueprints.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ export interface BlueprintPreviewView {
457457
* Blueprints are ways to create customized starting points for Devboxes. They
458458
* allow you to define custom starting points for Devboxes such that environment
459459
* set up can be cached to improve Devbox boot times.
460+
*
461+
* @category Blueprint Types
460462
*/
461463
export interface BlueprintView {
462464
/**
@@ -595,6 +597,11 @@ export interface InspectionSource {
595597

596598
export type BlueprintDeleteResponse = unknown;
597599

600+
/**
601+
* Parameters for creating a new Blueprint.
602+
*
603+
* @category Blueprint Types
604+
*/
598605
export interface BlueprintCreateParams {
599606
/**
600607
* Name of the Blueprint.

src/resources/devboxes/devboxes.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,11 @@ export class DevboxViewsDevboxesCursorIDPage extends DevboxesCursorIDPage<Devbox
533533

534534
export class DevboxSnapshotViewsDiskSnapshotsCursorIDPage extends DiskSnapshotsCursorIDPage<DevboxSnapshotView> {}
535535

536+
/**
537+
* Details of an asynchronous command execution on a Devbox.
538+
*
539+
* @category Devbox Types
540+
*/
536541
export interface DevboxAsyncExecutionDetailView {
537542
/**
538543
* Devbox id where command was executed.
@@ -673,6 +678,11 @@ export interface DevboxSnapshotListView {
673678
total_count: number;
674679
}
675680

681+
/**
682+
* View of a Devbox disk snapshot.
683+
*
684+
* @category Snapshot Types
685+
*/
676686
export interface DevboxSnapshotView {
677687
/**
678688
* The unique identifier of the snapshot.
@@ -731,6 +741,8 @@ export interface DevboxTunnelView {
731741
* A Devbox represents a virtual development environment. It is an isolated sandbox
732742
* that can be given to agents and used to run arbitrary code such as AI generated
733743
* code.
744+
*
745+
* @category Devbox Types
734746
*/
735747
export interface DevboxView {
736748
/**
@@ -886,6 +898,11 @@ export type DevboxRemoveTunnelResponse = unknown;
886898

887899
export type DevboxUploadFileResponse = unknown;
888900

901+
/**
902+
* Parameters for creating a new Devbox.
903+
*
904+
* @category Devbox Types
905+
*/
889906
export interface DevboxCreateParams {
890907
/**
891908
* Blueprint ID to use for the Devbox. If none set, the Devbox will be created with
@@ -1005,6 +1022,11 @@ export interface DevboxDownloadFileParams {
10051022
path: string;
10061023
}
10071024

1025+
/**
1026+
* Parameters for executing a command on a Devbox.
1027+
*
1028+
* @category Devbox Types
1029+
*/
10081030
export interface DevboxExecuteParams {
10091031
/**
10101032
* Body param: The command to execute via the Devbox shell. By default, commands

src/resources/objects.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ export interface ObjectListView {
171171

172172
/**
173173
* An Object represents a stored data entity with metadata.
174+
*
175+
* @category Storage Object Types
174176
*/
175177
export interface ObjectView {
176178
/**
@@ -214,6 +216,11 @@ export interface ObjectView {
214216
upload_url?: string | null;
215217
}
216218

219+
/**
220+
* Parameters for creating a new Storage Object.
221+
*
222+
* @category Storage Object Types
223+
*/
217224
export interface ObjectCreateParams {
218225
/**
219226
* The content type of the Object.

src/resources/shared.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
/**
4+
* Configuration for automatic Devbox behavior after idle time.
5+
*
6+
* @category Shared Types
7+
*/
38
export interface AfterIdle {
49
/**
510
* After idle_time_seconds, on_idle action will be taken.
@@ -14,6 +19,8 @@ export interface AfterIdle {
1419

1520
/**
1621
* Agent source configuration.
22+
*
23+
* @category Shared Types
1724
*/
1825
export interface AgentSource {
1926
/**
@@ -119,6 +126,11 @@ export namespace AgentSource {
119126
}
120127
}
121128

129+
/**
130+
* Parameters for mounting code from a Git repository.
131+
*
132+
* @category Shared Types
133+
*/
122134
export interface CodeMountParameters {
123135
/**
124136
* The name of the repo to mount. By default, code will be mounted at
@@ -146,6 +158,8 @@ export interface CodeMountParameters {
146158
* LaunchParameters enable you to customize the resources available to your Devbox
147159
* as well as the environment set up that should be completed before the Devbox is
148160
* marked as 'running'.
161+
*
162+
* @category Shared Types
149163
*/
150164
export interface LaunchParameters {
151165
/**
@@ -238,6 +252,11 @@ export namespace LaunchParameters {
238252
}
239253
}
240254

255+
/**
256+
* Mount configuration for attaching files, agents, or code to a Devbox.
257+
*
258+
* @category Shared Types
259+
*/
241260
export type Mount = Mount.ObjectMount | Mount.AgentMount | Mount.CodeMount | Mount.FileMount;
242261

243262
export namespace Mount {
@@ -322,6 +341,11 @@ export namespace Mount {
322341
}
323342
}
324343

344+
/**
345+
* Configuration profile for scenario/benchmark runs.
346+
*
347+
* @category Shared Types
348+
*/
325349
export interface RunProfile {
326350
/**
327351
* Mapping of Environment Variable to Value. May be shown in devbox logging.

src/sdk.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import * as Shared from './resources/shared';
2929
* The key is the path on the devbox where the object will be mounted,
3030
* and the value is the StorageObject instance.
3131
*
32+
* @category SDK Types
33+
*
3234
* @example
3335
* ```typescript
3436
* { '/home/user/config.txt': storageObject }
@@ -39,12 +41,16 @@ export type InlineObjectMount = { [path: string]: StorageObject };
3941
/**
4042
* Union type representing all valid mount inputs for the SDK.
4143
* Accepts both the standard API mount format and the convenient InlineObjectMount format.
44+
*
45+
* @category SDK Types
4246
*/
4347
export type MountInstance = Shared.Mount | InlineObjectMount;
4448

4549
/**
4650
* Extended DevboxCreateParams that accepts the convenient SDK mount syntax.
4751
* Use this type when creating devboxes through the SDK's DevboxOps.create() method.
52+
*
53+
* @category SDK Types
4854
*/
4955
export interface SDKDevboxCreateParams extends Omit<DevboxCreateParams, 'mounts'> {
5056
/**
@@ -167,6 +173,8 @@ type ContentType = ObjectCreateParams['content_type'];
167173
* Runloop SDK - The recommended way to interact with Runloop.
168174
* Provides both low-level API access and high-level object-oriented interfaces.
169175
*
176+
* @category SDK Client
177+
*
170178
* @example
171179
* ```typescript
172180
* const runloop = new RunloopSDK(); // export RUNLOOP_API_KEY will automatically be used.
@@ -175,6 +183,7 @@ type ContentType = ObjectCreateParams['content_type'];
175183
* console.log(result.exitCode);
176184
* ```
177185
*
186+
* @remarks
178187
* ## Operations
179188
* - `devbox` - {@link DevboxOps}
180189
* - `blueprint` - {@link BlueprintOps}
@@ -268,6 +277,9 @@ export class RunloopSDK {
268277
/**
269278
* Devbox SDK interface for managing devboxes.
270279
*
280+
* @category Devbox
281+
*
282+
* @remarks
271283
* ## Overview
272284
*
273285
* The `DevboxOps` class provides a high-level abstraction for managing devboxes,
@@ -417,6 +429,9 @@ export class DevboxOps {
417429
/**
418430
* Blueprint SDK interface for managing blueprints.
419431
*
432+
* @category Blueprint
433+
*
434+
* @remarks
420435
* ## Overview
421436
*
422437
* The `BlueprintOps` class provides a high-level abstraction for managing blueprints,
@@ -510,6 +525,9 @@ export class BlueprintOps {
510525
/**
511526
* Snapshot SDK interface for managing disk snapshots.
512527
*
528+
* @category Snapshot
529+
*
530+
* @remarks
513531
* ## Overview
514532
*
515533
* The `SnapshotOps` class provides a high-level abstraction for managing disk snapshots,
@@ -558,6 +576,9 @@ export class SnapshotOps {
558576
/**
559577
* Storage object management interface
560578
*
579+
* @category Storage Object
580+
*
581+
* @remarks
561582
* ## Overview
562583
*
563584
* The `StorageObjectOps` class provides a high-level abstraction for managing storage objects,
@@ -773,6 +794,9 @@ export class StorageObjectOps {
773794
/**
774795
* Agent SDK interface for managing agents.
775796
*
797+
* @category Agent
798+
*
799+
* @remarks
776800
* ## Overview
777801
*
778802
* The `AgentOps` class provides a high-level abstraction for managing AI agent entities.

src/sdk/agent.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import type { AgentCreateParams, AgentListParams, AgentView } from '../resources
55
/**
66
* Object-oriented interface for working with Agents.
77
*
8+
* @category Agent
9+
*
10+
* @remarks
811
* ## Overview
912
*
1013
* The `Agent` class provides a high-level API for managing AI agent entities.

src/sdk/blueprint.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ export type CreateParams = Omit<BlueprintCreateParams, 'build_context'> & {
5959

6060
/**
6161
* Object-oriented interface for working with Blueprints.
62+
*
63+
* @category Blueprint
6264
*/
6365
export class Blueprint {
6466
private client: Runloop;

src/sdk/devbox.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export { ExecutionResult } from './execution-result';
2828

2929
/**
3030
* Streaming callbacks for real-time log processing.
31+
*
32+
* @category Execution Types
3133
*/
3234
export interface ExecuteStreamingCallbacks {
3335
/** Callback invoked for each stdout log line */
@@ -41,6 +43,8 @@ export interface ExecuteStreamingCallbacks {
4143
/**
4244
* Network operations for a devbox.
4345
* Provides methods for managing SSH keys and network tunnels.
46+
*
47+
* @category Devbox
4448
*/
4549
export class DevboxNetOps {
4650
/**
@@ -130,6 +134,8 @@ export class DevboxNetOps {
130134
/**
131135
* Command execution operations for a devbox.
132136
* Provides methods for executing commands synchronously and asynchronously.
137+
*
138+
* @category Devbox
133139
*/
134140
export class DevboxCmdOps {
135141
/**
@@ -262,6 +268,9 @@ export class DevboxCmdOps {
262268
* Named shell operations for a devbox.
263269
* Provides methods for executing commands in a persistent, stateful shell session.
264270
*
271+
* @category Devbox
272+
*
273+
* @remarks
265274
* Use {@link Devbox.shell} to create a named shell instance. If you use the same shell name,
266275
* it will re-attach to the existing named shell, preserving its state (environment variables,
267276
* current working directory, etc.).
@@ -383,6 +392,8 @@ export class DevboxNamedShell {
383392
/**
384393
* File operations for a devbox.
385394
* Provides methods for reading, writing, uploading, and downloading files.
395+
*
396+
* @category Devbox
386397
*/
387398
export class DevboxFileOps {
388399
/**
@@ -471,6 +482,9 @@ export class DevboxFileOps {
471482
/**
472483
* Object-oriented interface for working with Devboxes.
473484
*
485+
* @category Devbox
486+
*
487+
* @remarks
474488
* ## Overview
475489
*
476490
* The `Devbox` class provides a high-level, object-oriented API for managing devboxes.

src/sdk/execution-result.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import type { DevboxAsyncExecutionDetailView } from '../resources/devboxes/devbo
44
/**
55
* Execution Result object for a completed command execution.
66
*
7+
* @category Execution Types
8+
*
9+
* @remarks
710
* ## Overview
811
*
912
* The `ExecutionResult` class provides access to the results of a completed command execution.

0 commit comments

Comments
 (0)