Skip to content
Open
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
49 changes: 49 additions & 0 deletions src/agentengines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,55 @@ export class AgentEngines extends BaseModule {
this.sandboxes = new Sandboxes(apiClient);
}

/** Creates an agent engine and returns the operation. */
async create(
params: types.CreateAgentEngineRequestParameters,
): Promise<types.AgentEngineOperation> {
return this.createInternal(params);
}

/** Deletes the agent engine and returns the operation. */
async delete(
params: types.DeleteAgentEngineRequestParameters,
): Promise<types.DeleteAgentEngineOperation> {
return this.deleteInternal(params);
}

/** Returns the agent engine with the specified name. */
async get(
params: types.GetAgentEngineRequestParameters,
): Promise<types.ReasoningEngine> {
return this.getInternal(params);
}

/** Lists the agent engines for the given config. */
async list(
params: types.ListAgentEngineRequestParameters,
): Promise<types.ListReasoningEnginesResponse> {
return this.listInternal(params);
}

/** Returns the agent engine operation with the specified name. */
async getAgentOperation(
params: types.GetAgentEngineOperationParameters,
): Promise<types.AgentEngineOperation> {
return this.getAgentOperationInternal(params);
}

/** Queries the agent engine. */
async query(
params: types.QueryAgentEngineRequestParameters,
): Promise<types.QueryReasoningEngineResponse> {
return this.queryInternal(params);
}

/** Updates the agent engine and returns the operation. */
async update(
params: types.UpdateAgentEngineRequestParameters,
): Promise<types.AgentEngineOperation> {
return this.updateInternal(params);
}

async createInternal(
params: types.CreateAgentEngineRequestParameters,
): Promise<types.AgentEngineOperation> {
Expand Down
8 changes: 8 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,12 @@ export class Client {
}
return this._agentEnginesInternal;
}

/**
* Provides access to the Agent Engines API, including its sandboxes,
* sandbox templates, and sandbox snapshots submodules.
*/
public get agentEngines(): AgentEngines {
return this._agentEnginesInternal;
}
}
42 changes: 42 additions & 0 deletions src/sandboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,48 @@ export class Sandboxes extends BaseModule {
this.snapshots = new SandboxSnapshots(apiClient);
}

/** Creates a sandbox environment and returns the operation. */
async create(
params: types.CreateAgentEngineSandboxRequestParameters,
): Promise<types.AgentEngineSandboxOperation> {
return this.createInternal(params);
}

/** Deletes the sandbox environment and returns the operation. */
async delete(
params: types.DeleteAgentEngineSandboxRequestParameters,
): Promise<types.DeleteAgentEngineSandboxOperation> {
return this.deleteInternal(params);
}

/** Executes code in the sandbox environment. */
async executeCode(
params: types.ExecuteCodeAgentEngineSandboxRequestParameters,
): Promise<types.ExecuteSandboxEnvironmentResponse> {
return this.executeCodeInternal(params);
}

/** Returns the sandbox environment with the specified name. */
async get(
params: types.GetAgentEngineSandboxRequestParameters,
): Promise<types.SandboxEnvironment> {
return this.getInternal(params);
}

/** Lists the sandbox environments for the given name. */
async list(
params: types.ListAgentEngineSandboxesRequestParameters,
): Promise<types.ListAgentEngineSandboxesResponse> {
return this.listInternal(params);
}

/** Returns the sandbox operation with the specified name. */
async getSandboxOperation(
params: types.GetAgentEngineSandboxOperationParameters,
): Promise<types.AgentEngineSandboxOperation> {
return this.getSandboxOperationInternal(params);
}

async createInternal(
params: types.CreateAgentEngineSandboxRequestParameters,
): Promise<types.AgentEngineSandboxOperation> {
Expand Down
28 changes: 28 additions & 0 deletions src/sandboxsnapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ export class SandboxSnapshots extends BaseModule {
super();
}

/** Creates a snapshot of a running sandbox and returns the operation. */
async create(
params: types.CreateSandboxEnvironmentSnapshotRequestParameters,
): Promise<types.AgentEngineSandboxSnapshotOperation> {
return this.createInternal(params);
}

/** Returns the sandbox environment snapshot with the specified name. */
async get(
params: types.GetSandboxEnvironmentSnapshotRequestParameters,
): Promise<types.SandboxEnvironmentSnapshot> {
return this.getInternal(params);
}

/** Lists the sandbox environment snapshots for the given name. */
async list(
params: types.ListSandboxEnvironmentSnapshotsRequestParameters,
): Promise<types.ListSandboxEnvironmentSnapshotsResponse> {
return this.listInternal(params);
}

/** Deletes the sandbox environment snapshot and returns the operation. */
async delete(
params: types.DeleteSandboxEnvironmentSnapshotRequestParameters,
): Promise<types.DeleteSandboxEnvironmentSnapshotOperation> {
return this.deleteInternal(params);
}

async createInternal(
params: types.CreateSandboxEnvironmentSnapshotRequestParameters,
): Promise<types.AgentEngineSandboxSnapshotOperation> {
Expand Down
28 changes: 28 additions & 0 deletions src/sandboxtemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ export class SandboxTemplates extends BaseModule {
super();
}

/** Creates a sandbox environment template and returns the operation. */
async create(
params: types.CreateSandboxEnvironmentTemplateRequestParameters,
): Promise<types.SandboxEnvironmentTemplateOperation> {
return this.createInternal(params);
}

/** Returns the sandbox environment template with the specified name. */
async get(
params: types.GetSandboxEnvironmentTemplateRequestParameters,
): Promise<types.SandboxEnvironmentTemplate> {
return this.getInternal(params);
}

/** Lists the sandbox environment templates for the given name. */
async list(
params: types.ListSandboxEnvironmentTemplatesRequestParameters,
): Promise<types.ListSandboxEnvironmentTemplatesResponse> {
return this.listInternal(params);
}

/** Deletes the sandbox environment template and returns the operation. */
async delete(
params: types.DeleteSandboxEnvironmentTemplateRequestParameters,
): Promise<types.DeleteSandboxEnvironmentTemplateOperation> {
return this.deleteInternal(params);
}

async createInternal(
params: types.CreateSandboxEnvironmentTemplateRequestParameters,
): Promise<types.SandboxEnvironmentTemplateOperation> {
Expand Down
Loading