computer-agents 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComputerAgentsClient.d.ts +23 -1
- package/dist/ComputerAgentsClient.js +27 -0
- package/dist/ComputerAgentsClient.js.map +1 -1
- package/dist/cloud/resources/EnvironmentsResource.d.ts +4 -0
- package/dist/cloud/resources/EnvironmentsResource.js +4 -0
- package/dist/cloud/resources/EnvironmentsResource.js.map +1 -1
- package/dist/cloud/resources/ProductResources.d.ts +79 -0
- package/dist/cloud/resources/ProductResources.js +123 -0
- package/dist/cloud/resources/ProductResources.js.map +1 -0
- package/dist/cloud/resources/index.d.ts +1 -0
- package/dist/cloud/resources/index.js +7 -1
- package/dist/cloud/resources/index.js.map +1 -1
- package/dist/cloud/types.d.ts +44 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { ApiClientError } from './cloud/ApiClient';
|
|
29
29
|
import type { ApiClientConfig } from './cloud/ApiClient';
|
|
30
|
-
import { EnvironmentsResource, ThreadsResource, AgentsResource, ResourcesResource, DatabasesResource, SkillsResource, BudgetResource, BillingResource, SchedulesResource, TriggersResource, OrchestrationsResource, GitResource, FilesResource } from './cloud/resources';
|
|
30
|
+
import { EnvironmentsResource, ThreadsResource, AgentsResource, ResourcesResource, WebAppsResource, FunctionsResource, AuthResource, AgentRuntimesResource, DatabasesResource, SkillsResource, BudgetResource, BillingResource, SchedulesResource, TriggersResource, OrchestrationsResource, GitResource, FilesResource } from './cloud/resources';
|
|
31
31
|
import type { HealthCheck, Metrics, Project, Environment, MessageStreamEvent, AgentModel } from './cloud/types';
|
|
32
32
|
export { ApiClientError };
|
|
33
33
|
export type { ApiClientConfig };
|
|
@@ -124,6 +124,7 @@ export interface RunResult {
|
|
|
124
124
|
* - `threads` - Conversation management with SSE streaming
|
|
125
125
|
* - `environments` / `computers` - Computer configuration and lifecycle
|
|
126
126
|
* - `resources` - Deployable apps, functions, auth modules, and runtimes
|
|
127
|
+
* - `webApps` / `functions` / `auth` / `runtimes` - Product-shaped resource managers
|
|
127
128
|
* - `databases` - Managed database surfaces
|
|
128
129
|
* - `skills` - Custom ACP skills
|
|
129
130
|
* - `agents` - Agent configuration
|
|
@@ -165,6 +166,7 @@ export declare class ComputerAgentsClient {
|
|
|
165
166
|
* ```typescript
|
|
166
167
|
* const env = await client.environments.create({
|
|
167
168
|
* name: 'production',
|
|
169
|
+
* computeProfile: 'standard',
|
|
168
170
|
* internetAccess: true
|
|
169
171
|
* });
|
|
170
172
|
* ```
|
|
@@ -194,6 +196,26 @@ export declare class ComputerAgentsClient {
|
|
|
194
196
|
* Managed resource surfaces such as web apps, functions, auth modules, and agent runtimes.
|
|
195
197
|
*/
|
|
196
198
|
readonly resources: ResourcesResource;
|
|
199
|
+
/**
|
|
200
|
+
* First-class web app resource management.
|
|
201
|
+
*/
|
|
202
|
+
readonly webApps: WebAppsResource;
|
|
203
|
+
/**
|
|
204
|
+
* First-class function resource management.
|
|
205
|
+
*/
|
|
206
|
+
readonly functions: FunctionsResource;
|
|
207
|
+
/**
|
|
208
|
+
* First-class auth resource management.
|
|
209
|
+
*/
|
|
210
|
+
readonly auth: AuthResource;
|
|
211
|
+
/**
|
|
212
|
+
* First-class agent runtime management.
|
|
213
|
+
*/
|
|
214
|
+
readonly runtimes: AgentRuntimesResource;
|
|
215
|
+
/**
|
|
216
|
+
* Explicit alias for `runtimes`.
|
|
217
|
+
*/
|
|
218
|
+
readonly agentRuntimes: AgentRuntimesResource;
|
|
197
219
|
/**
|
|
198
220
|
* Managed database surfaces and document operations.
|
|
199
221
|
*/
|
|
@@ -40,6 +40,7 @@ const resources_1 = require("./cloud/resources");
|
|
|
40
40
|
* - `threads` - Conversation management with SSE streaming
|
|
41
41
|
* - `environments` / `computers` - Computer configuration and lifecycle
|
|
42
42
|
* - `resources` - Deployable apps, functions, auth modules, and runtimes
|
|
43
|
+
* - `webApps` / `functions` / `auth` / `runtimes` - Product-shaped resource managers
|
|
43
44
|
* - `databases` - Managed database surfaces
|
|
44
45
|
* - `skills` - Custom ACP skills
|
|
45
46
|
* - `agents` - Agent configuration
|
|
@@ -86,6 +87,7 @@ class ComputerAgentsClient {
|
|
|
86
87
|
* ```typescript
|
|
87
88
|
* const env = await client.environments.create({
|
|
88
89
|
* name: 'production',
|
|
90
|
+
* computeProfile: 'standard',
|
|
89
91
|
* internetAccess: true
|
|
90
92
|
* });
|
|
91
93
|
* ```
|
|
@@ -115,6 +117,26 @@ class ComputerAgentsClient {
|
|
|
115
117
|
* Managed resource surfaces such as web apps, functions, auth modules, and agent runtimes.
|
|
116
118
|
*/
|
|
117
119
|
resources;
|
|
120
|
+
/**
|
|
121
|
+
* First-class web app resource management.
|
|
122
|
+
*/
|
|
123
|
+
webApps;
|
|
124
|
+
/**
|
|
125
|
+
* First-class function resource management.
|
|
126
|
+
*/
|
|
127
|
+
functions;
|
|
128
|
+
/**
|
|
129
|
+
* First-class auth resource management.
|
|
130
|
+
*/
|
|
131
|
+
auth;
|
|
132
|
+
/**
|
|
133
|
+
* First-class agent runtime management.
|
|
134
|
+
*/
|
|
135
|
+
runtimes;
|
|
136
|
+
/**
|
|
137
|
+
* Explicit alias for `runtimes`.
|
|
138
|
+
*/
|
|
139
|
+
agentRuntimes;
|
|
118
140
|
/**
|
|
119
141
|
* Managed database surfaces and document operations.
|
|
120
142
|
*/
|
|
@@ -285,6 +307,11 @@ class ComputerAgentsClient {
|
|
|
285
307
|
this.computers = this.environments;
|
|
286
308
|
this.agents = new resources_1.AgentsResource(this.api);
|
|
287
309
|
this.resources = new resources_1.ResourcesResource(this.api);
|
|
310
|
+
this.webApps = new resources_1.WebAppsResource(this.api);
|
|
311
|
+
this.functions = new resources_1.FunctionsResource(this.api);
|
|
312
|
+
this.auth = new resources_1.AuthResource(this.api);
|
|
313
|
+
this.runtimes = new resources_1.AgentRuntimesResource(this.api);
|
|
314
|
+
this.agentRuntimes = this.runtimes;
|
|
288
315
|
this.databases = new resources_1.DatabasesResource(this.api);
|
|
289
316
|
this.skills = new resources_1.SkillsResource(this.api);
|
|
290
317
|
this.files = new resources_1.FilesResource(this.api);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputerAgentsClient.js","sourceRoot":"","sources":["../src/ComputerAgentsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;AAEH,iDAA8D;
|
|
1
|
+
{"version":3,"file":"ComputerAgentsClient.js","sourceRoot":"","sources":["../src/ComputerAgentsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;AAEH,iDAA8D;AAgCrD,+FAhCW,0BAAc,OAgCX;AA9BvB,iDAmB2B;AA+G3B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,oBAAoB;IAC/B;;;OAGG;IACM,GAAG,CAAY;IAExB;;;;;;;;;;;;;;;;;OAiBG;IACM,OAAO,CAAkB;IAElC;;;;;;;;;;;;;;OAcG;IACM,YAAY,CAAuB;IAE5C;;OAEG;IACM,SAAS,CAAuB;IAEzC;;;;;;;;;;;;;;OAcG;IACM,MAAM,CAAiB;IAEhC;;OAEG;IACM,SAAS,CAAoB;IAEtC;;OAEG;IACM,OAAO,CAAkB;IAElC;;OAEG;IACM,SAAS,CAAoB;IAEtC;;OAEG;IACM,IAAI,CAAe;IAE5B;;OAEG;IACM,QAAQ,CAAwB;IAEzC;;OAEG;IACM,aAAa,CAAwB;IAE9C;;OAEG;IACM,SAAS,CAAoB;IAEtC;;OAEG;IACM,MAAM,CAAiB;IAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACM,KAAK,CAAgB;IAE9B;;;;;;;;;;;;;;;;OAgBG;IACM,SAAS,CAAoB;IAEtC;;;;;;;;;;;;;;;;;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AAC,GAAG,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC;CACF;AA9cD,oDA8cC;AASgC,2CAAW;AAKX,8CAAc"}
|
|
@@ -56,6 +56,8 @@ export declare class EnvironmentsResource {
|
|
|
56
56
|
* Create a new environment
|
|
57
57
|
*
|
|
58
58
|
* User is determined automatically from the API key.
|
|
59
|
+
* Use `computeProfile` for first-class sizing presets such as
|
|
60
|
+
* `lite`, `standard`, `power`, and `desktop`.
|
|
59
61
|
*/
|
|
60
62
|
create(params: CreateEnvironmentParams): Promise<Environment>;
|
|
61
63
|
/**
|
|
@@ -79,6 +81,8 @@ export declare class EnvironmentsResource {
|
|
|
79
81
|
setDefault(environmentId: string): Promise<Environment>;
|
|
80
82
|
/**
|
|
81
83
|
* Update an environment
|
|
84
|
+
*
|
|
85
|
+
* `computeProfile` is the recommended way to change computer sizing.
|
|
82
86
|
*/
|
|
83
87
|
update(environmentId: string, params: UpdateEnvironmentParams): Promise<Environment>;
|
|
84
88
|
/**
|
|
@@ -19,6 +19,8 @@ class EnvironmentsResource {
|
|
|
19
19
|
* Create a new environment
|
|
20
20
|
*
|
|
21
21
|
* User is determined automatically from the API key.
|
|
22
|
+
* Use `computeProfile` for first-class sizing presets such as
|
|
23
|
+
* `lite`, `standard`, `power`, and `desktop`.
|
|
22
24
|
*/
|
|
23
25
|
async create(params) {
|
|
24
26
|
const response = await this.client.post(`/environments`, params);
|
|
@@ -67,6 +69,8 @@ class EnvironmentsResource {
|
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* Update an environment
|
|
72
|
+
*
|
|
73
|
+
* `computeProfile` is the recommended way to change computer sizing.
|
|
70
74
|
*/
|
|
71
75
|
async update(environmentId, params) {
|
|
72
76
|
const response = await this.client.patch(`/environments/${environmentId}`, params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentsResource.js","sourceRoot":"","sources":["../../../src/cloud/resources/EnvironmentsResource.ts"],"names":[],"mappings":";AAAA;;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AED,KAAK,CAAC,eAAe,CACnB,aAAqB,EACrB,UAAkB,EAClB,IAAY;QAEZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,aAAa,cAAc,UAAU,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClG,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,aAAqB,EACrB,UAAkB,EAClB,SAAkD,EAAE;QAMpD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,aAAa,cAAc,UAAU,OAAO,EAAE,MAAM,CAAC,CAAC;IACjG,CAAC;IAED,4EAA4E;IAC5E,2BAA2B;IAC3B,4EAA4E;IAE5E;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,aAAqB;QACnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,iBAAiB,aAAa,SAAS,CACxC,CAAC;QACF,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,aAAqB,EACrB,MAAc;QAEd,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACnB,iBAAiB,aAAa,SAAS,EACvC,EAAE,MAAM,EAAE,CACX,CAAC;IACJ,CAAC;CACF;AArfD,oDAqfC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ApiClient } from '../ApiClient';
|
|
2
|
+
import type { CreateResourceParams, Resource, ResourceAnalyticsResponse, ResourceBinding, ResourceKind, ResourceLogEntry, UpdateResourceParams } from '../types';
|
|
3
|
+
import { type ListResourcesParams, type ResourceAuthSignInParams, type ResourceAuthUserCreateParams, type ResourceFileEntry, type ResourceFileUploadParams, type ResourceInvokeParams, ResourcesResource } from './ResourcesResource';
|
|
4
|
+
type KindScopedCreateParams<K extends ResourceKind> = Omit<CreateResourceParams, 'kind'> & {
|
|
5
|
+
kind?: K;
|
|
6
|
+
};
|
|
7
|
+
type KindScopedUpdateParams<K extends ResourceKind> = Omit<UpdateResourceParams, 'kind'> & {
|
|
8
|
+
kind?: K;
|
|
9
|
+
};
|
|
10
|
+
declare class KindScopedResources<K extends ResourceKind> {
|
|
11
|
+
private readonly kind;
|
|
12
|
+
protected readonly resources: ResourcesResource;
|
|
13
|
+
constructor(client: ApiClient, kind: K);
|
|
14
|
+
create(params: KindScopedCreateParams<K>): Promise<Resource>;
|
|
15
|
+
list(params?: ListResourcesParams): Promise<Resource[]>;
|
|
16
|
+
get(serverId: string): Promise<Resource>;
|
|
17
|
+
update(serverId: string, params: KindScopedUpdateParams<K>): Promise<Resource>;
|
|
18
|
+
delete(serverId: string): Promise<boolean>;
|
|
19
|
+
deploy(serverId: string): Promise<{
|
|
20
|
+
server?: Resource;
|
|
21
|
+
serviceUrl?: string | null;
|
|
22
|
+
invocationUrl?: string | null;
|
|
23
|
+
revision?: string | null;
|
|
24
|
+
deploymentType?: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
invoke(serverId: string, params?: ResourceInvokeParams): Promise<{
|
|
27
|
+
status?: number;
|
|
28
|
+
ok?: boolean;
|
|
29
|
+
url?: string;
|
|
30
|
+
body?: unknown;
|
|
31
|
+
text?: string;
|
|
32
|
+
headers?: Record<string, string>;
|
|
33
|
+
}>;
|
|
34
|
+
getAnalytics(serverId: string): Promise<ResourceAnalyticsResponse>;
|
|
35
|
+
getLogs(serverId: string, params?: {
|
|
36
|
+
kind?: 'request' | 'runtime' | 'deployment';
|
|
37
|
+
limit?: number;
|
|
38
|
+
}): Promise<ResourceLogEntry[]>;
|
|
39
|
+
listBindings(serverId: string): Promise<ResourceBinding[]>;
|
|
40
|
+
upsertBinding(serverId: string, targetType: 'database' | 'auth' | 'agent_runtime', params: {
|
|
41
|
+
targetId: string;
|
|
42
|
+
alias?: string;
|
|
43
|
+
metadata?: Record<string, unknown> | null;
|
|
44
|
+
}): Promise<ResourceBinding[]>;
|
|
45
|
+
deleteBinding(serverId: string, targetType: 'database' | 'auth' | 'agent_runtime'): Promise<ResourceBinding[]>;
|
|
46
|
+
getContext(serverId: string): Promise<Record<string, unknown>>;
|
|
47
|
+
getRuntimeConfig(serverId: string): Promise<Record<string, unknown>>;
|
|
48
|
+
getRuntime(serverId: string): Promise<Record<string, unknown>>;
|
|
49
|
+
listFiles(serverId: string, params?: {
|
|
50
|
+
path?: string;
|
|
51
|
+
depth?: number;
|
|
52
|
+
}): Promise<ResourceFileEntry[]>;
|
|
53
|
+
getFileContent(serverId: string, filePath: string): Promise<string>;
|
|
54
|
+
writeFileContent(serverId: string, filePath: string, content: string): Promise<Record<string, unknown>>;
|
|
55
|
+
downloadFile(serverId: string, filePath: string): Promise<Buffer>;
|
|
56
|
+
uploadFile(params: ResourceFileUploadParams): Promise<Record<string, unknown>>;
|
|
57
|
+
deleteFile(serverId: string, filePath: string): Promise<Record<string, unknown>>;
|
|
58
|
+
}
|
|
59
|
+
export declare class WebAppsResource extends KindScopedResources<'web_app'> {
|
|
60
|
+
constructor(client: ApiClient);
|
|
61
|
+
createAiChatAppTemplate(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
62
|
+
}
|
|
63
|
+
export declare class FunctionsResource extends KindScopedResources<'function'> {
|
|
64
|
+
constructor(client: ApiClient);
|
|
65
|
+
}
|
|
66
|
+
export declare class AuthResource extends KindScopedResources<'auth'> {
|
|
67
|
+
constructor(client: ApiClient);
|
|
68
|
+
listUsers(serverId: string, params?: {
|
|
69
|
+
limit?: number;
|
|
70
|
+
nextPageToken?: string;
|
|
71
|
+
}): Promise<Array<Record<string, unknown>>>;
|
|
72
|
+
createUser(serverId: string, params: ResourceAuthUserCreateParams): Promise<Record<string, unknown>>;
|
|
73
|
+
signUp(serverId: string, params: ResourceAuthUserCreateParams): Promise<Record<string, unknown>>;
|
|
74
|
+
signIn(serverId: string, params: ResourceAuthSignInParams): Promise<Record<string, unknown>>;
|
|
75
|
+
}
|
|
76
|
+
export declare class AgentRuntimesResource extends KindScopedResources<'agent_runtime'> {
|
|
77
|
+
constructor(client: ApiClient);
|
|
78
|
+
}
|
|
79
|
+
export { AgentRuntimesResource as RuntimesResource };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuntimesResource = exports.AgentRuntimesResource = exports.AuthResource = exports.FunctionsResource = exports.WebAppsResource = void 0;
|
|
4
|
+
const ResourcesResource_1 = require("./ResourcesResource");
|
|
5
|
+
class KindScopedResources {
|
|
6
|
+
kind;
|
|
7
|
+
resources;
|
|
8
|
+
constructor(client, kind) {
|
|
9
|
+
this.kind = kind;
|
|
10
|
+
this.resources = new ResourcesResource_1.ResourcesResource(client);
|
|
11
|
+
}
|
|
12
|
+
async create(params) {
|
|
13
|
+
return this.resources.create({
|
|
14
|
+
...params,
|
|
15
|
+
kind: this.kind,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async list(params = {}) {
|
|
19
|
+
const resources = await this.resources.list(params);
|
|
20
|
+
return resources.filter((resource) => resource.kind === this.kind);
|
|
21
|
+
}
|
|
22
|
+
async get(serverId) {
|
|
23
|
+
return this.resources.get(serverId);
|
|
24
|
+
}
|
|
25
|
+
async update(serverId, params) {
|
|
26
|
+
return this.resources.update(serverId, {
|
|
27
|
+
...params,
|
|
28
|
+
kind: this.kind,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async delete(serverId) {
|
|
32
|
+
return this.resources.delete(serverId);
|
|
33
|
+
}
|
|
34
|
+
async deploy(serverId) {
|
|
35
|
+
return this.resources.deploy(serverId);
|
|
36
|
+
}
|
|
37
|
+
async invoke(serverId, params = {}) {
|
|
38
|
+
return this.resources.invoke(serverId, params);
|
|
39
|
+
}
|
|
40
|
+
async getAnalytics(serverId) {
|
|
41
|
+
return this.resources.getAnalytics(serverId);
|
|
42
|
+
}
|
|
43
|
+
async getLogs(serverId, params = {}) {
|
|
44
|
+
return this.resources.getLogs(serverId, params);
|
|
45
|
+
}
|
|
46
|
+
async listBindings(serverId) {
|
|
47
|
+
return this.resources.listBindings(serverId);
|
|
48
|
+
}
|
|
49
|
+
async upsertBinding(serverId, targetType, params) {
|
|
50
|
+
return this.resources.upsertBinding(serverId, targetType, params);
|
|
51
|
+
}
|
|
52
|
+
async deleteBinding(serverId, targetType) {
|
|
53
|
+
return this.resources.deleteBinding(serverId, targetType);
|
|
54
|
+
}
|
|
55
|
+
async getContext(serverId) {
|
|
56
|
+
return this.resources.getContext(serverId);
|
|
57
|
+
}
|
|
58
|
+
async getRuntimeConfig(serverId) {
|
|
59
|
+
return this.resources.getRuntimeConfig(serverId);
|
|
60
|
+
}
|
|
61
|
+
async getRuntime(serverId) {
|
|
62
|
+
return this.resources.getRuntime(serverId);
|
|
63
|
+
}
|
|
64
|
+
async listFiles(serverId, params = {}) {
|
|
65
|
+
return this.resources.listFiles(serverId, params);
|
|
66
|
+
}
|
|
67
|
+
async getFileContent(serverId, filePath) {
|
|
68
|
+
return this.resources.getFileContent(serverId, filePath);
|
|
69
|
+
}
|
|
70
|
+
async writeFileContent(serverId, filePath, content) {
|
|
71
|
+
return this.resources.writeFileContent(serverId, filePath, content);
|
|
72
|
+
}
|
|
73
|
+
async downloadFile(serverId, filePath) {
|
|
74
|
+
return this.resources.downloadFile(serverId, filePath);
|
|
75
|
+
}
|
|
76
|
+
async uploadFile(params) {
|
|
77
|
+
return this.resources.uploadFile(params);
|
|
78
|
+
}
|
|
79
|
+
async deleteFile(serverId, filePath) {
|
|
80
|
+
return this.resources.deleteFile(serverId, filePath);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
class WebAppsResource extends KindScopedResources {
|
|
84
|
+
constructor(client) {
|
|
85
|
+
super(client, 'web_app');
|
|
86
|
+
}
|
|
87
|
+
async createAiChatAppTemplate(params) {
|
|
88
|
+
return this.resources.createAiChatAppTemplate(params);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.WebAppsResource = WebAppsResource;
|
|
92
|
+
class FunctionsResource extends KindScopedResources {
|
|
93
|
+
constructor(client) {
|
|
94
|
+
super(client, 'function');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.FunctionsResource = FunctionsResource;
|
|
98
|
+
class AuthResource extends KindScopedResources {
|
|
99
|
+
constructor(client) {
|
|
100
|
+
super(client, 'auth');
|
|
101
|
+
}
|
|
102
|
+
async listUsers(serverId, params = {}) {
|
|
103
|
+
return this.resources.listAuthUsers(serverId, params);
|
|
104
|
+
}
|
|
105
|
+
async createUser(serverId, params) {
|
|
106
|
+
return this.resources.createAuthUser(serverId, params);
|
|
107
|
+
}
|
|
108
|
+
async signUp(serverId, params) {
|
|
109
|
+
return this.resources.signUp(serverId, params);
|
|
110
|
+
}
|
|
111
|
+
async signIn(serverId, params) {
|
|
112
|
+
return this.resources.signIn(serverId, params);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.AuthResource = AuthResource;
|
|
116
|
+
class AgentRuntimesResource extends KindScopedResources {
|
|
117
|
+
constructor(client) {
|
|
118
|
+
super(client, 'agent_runtime');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.AgentRuntimesResource = AgentRuntimesResource;
|
|
122
|
+
exports.RuntimesResource = AgentRuntimesResource;
|
|
123
|
+
//# sourceMappingURL=ProductResources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductResources.js","sourceRoot":"","sources":["../../../src/cloud/resources/ProductResources.ts"],"names":[],"mappings":";;;AAUA,2DAQ6B;AAU7B,MAAM,mBAAmB;IAGyB;IAF7B,SAAS,CAAoB;IAEhD,YAAY,MAAiB,EAAmB,IAAO;QAAP,SAAI,GAAJ,IAAI,CAAG;QACrD,IAAI,CAAC,SAAS,GAAG,IAAI,qCAAiB,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAiC;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;Y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AQ,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,MAAoC;QACjE,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,MAAgC;QAC7D,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;CACF;AAvBD,oCAuBC;AAED,MAAa,qBAAsB,SAAQ,mBAAoC;IAC7E,YAAY,MAAiB;QAC3B,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACjC,CAAC;CACF;AAJD,sDAIC;AAEiC,iDAAgB"}
|
|
@@ -12,6 +12,7 @@ export type { StreamEventCallback, SendMessageOptions, SendMessageResult } from
|
|
|
12
12
|
export { AgentsResource } from './AgentsResource';
|
|
13
13
|
export { ResourcesResource } from './ResourcesResource';
|
|
14
14
|
export type { ListResourcesParams, ResourceInvokeParams, ResourceFileUploadParams } from './ResourcesResource';
|
|
15
|
+
export { WebAppsResource, FunctionsResource, AuthResource, AgentRuntimesResource, RuntimesResource, } from './ProductResources';
|
|
15
16
|
export { DatabasesResource } from './DatabasesResource';
|
|
16
17
|
export type { ListDatabasesParams, CreateDatabaseCollectionParams, CreateDatabaseDocumentParams, UpdateDatabaseDocumentParams, } from './DatabasesResource';
|
|
17
18
|
export { SkillsResource } from './SkillsResource';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Export all resource managers for use in CloudClient.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.FilesResource = exports.GitResource = exports.OrchestrationsResource = exports.TriggersResource = exports.SchedulesResource = exports.BillingResource = exports.BudgetResource = exports.SkillsResource = exports.DatabasesResource = exports.ResourcesResource = exports.AgentsResource = exports.ThreadsResource = exports.ComputersResource = exports.EnvironmentsResource = exports.ProjectsResource = void 0;
|
|
8
|
+
exports.FilesResource = exports.GitResource = exports.OrchestrationsResource = exports.TriggersResource = exports.SchedulesResource = exports.BillingResource = exports.BudgetResource = exports.SkillsResource = exports.DatabasesResource = exports.RuntimesResource = exports.AgentRuntimesResource = exports.AuthResource = exports.FunctionsResource = exports.WebAppsResource = exports.ResourcesResource = exports.AgentsResource = exports.ThreadsResource = exports.ComputersResource = exports.EnvironmentsResource = exports.ProjectsResource = void 0;
|
|
9
9
|
var ProjectsResource_1 = require("./ProjectsResource");
|
|
10
10
|
Object.defineProperty(exports, "ProjectsResource", { enumerable: true, get: function () { return ProjectsResource_1.ProjectsResource; } });
|
|
11
11
|
var EnvironmentsResource_1 = require("./EnvironmentsResource");
|
|
@@ -18,6 +18,12 @@ var AgentsResource_1 = require("./AgentsResource");
|
|
|
18
18
|
Object.defineProperty(exports, "AgentsResource", { enumerable: true, get: function () { return AgentsResource_1.AgentsResource; } });
|
|
19
19
|
var ResourcesResource_1 = require("./ResourcesResource");
|
|
20
20
|
Object.defineProperty(exports, "ResourcesResource", { enumerable: true, get: function () { return ResourcesResource_1.ResourcesResource; } });
|
|
21
|
+
var ProductResources_1 = require("./ProductResources");
|
|
22
|
+
Object.defineProperty(exports, "WebAppsResource", { enumerable: true, get: function () { return ProductResources_1.WebAppsResource; } });
|
|
23
|
+
Object.defineProperty(exports, "FunctionsResource", { enumerable: true, get: function () { return ProductResources_1.FunctionsResource; } });
|
|
24
|
+
Object.defineProperty(exports, "AuthResource", { enumerable: true, get: function () { return ProductResources_1.AuthResource; } });
|
|
25
|
+
Object.defineProperty(exports, "AgentRuntimesResource", { enumerable: true, get: function () { return ProductResources_1.AgentRuntimesResource; } });
|
|
26
|
+
Object.defineProperty(exports, "RuntimesResource", { enumerable: true, get: function () { return ProductResources_1.RuntimesResource; } });
|
|
21
27
|
var DatabasesResource_1 = require("./DatabasesResource");
|
|
22
28
|
Object.defineProperty(exports, "DatabasesResource", { enumerable: true, get: function () { return DatabasesResource_1.DatabasesResource; } });
|
|
23
29
|
var SkillsResource_1 = require("./SkillsResource");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cloud/resources/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,+DAAmF;AAA1E,yHAAA,oBAAoB,OAAqB;AAElD,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAExB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAO1B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,mDAAmE;AAA1D,gHAAA,cAAc,OAAA;AAAE,iHAAA,eAAe,OAAA;AACxC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cloud/resources/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,+DAAmF;AAA1E,yHAAA,oBAAoB,OAAqB;AAElD,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAExB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,uDAM4B;AAL1B,mHAAA,eAAe,OAAA;AACf,qHAAA,iBAAiB,OAAA;AACjB,gHAAA,YAAY,OAAA;AACZ,yHAAA,qBAAqB,OAAA;AACrB,oHAAA,gBAAgB,OAAA;AAElB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAO1B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,mDAAmE;AAA1D,gHAAA,cAAc,OAAA;AAAE,iHAAA,eAAe,OAAA;AACxC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA"}
|
package/dist/cloud/types.d.ts
CHANGED
|
@@ -114,6 +114,23 @@ export interface AvailableRuntimes {
|
|
|
114
114
|
ruby: string[];
|
|
115
115
|
rust: string[];
|
|
116
116
|
}
|
|
117
|
+
export type EnvironmentComputeProfileId = 'lite' | 'standard' | 'power' | 'desktop';
|
|
118
|
+
export interface EnvironmentComputeResources {
|
|
119
|
+
cpuCores: number;
|
|
120
|
+
memoryMb: number;
|
|
121
|
+
}
|
|
122
|
+
export interface EnvironmentPricingMetadata {
|
|
123
|
+
minutePrice?: number;
|
|
124
|
+
[key: string]: unknown;
|
|
125
|
+
}
|
|
126
|
+
export interface EnvironmentMetadata {
|
|
127
|
+
computeProfile?: EnvironmentComputeProfileId;
|
|
128
|
+
computeResources?: EnvironmentComputeResources;
|
|
129
|
+
pricing?: EnvironmentPricingMetadata;
|
|
130
|
+
guiEnabled?: boolean;
|
|
131
|
+
officeAppsEnabled?: boolean;
|
|
132
|
+
[key: string]: unknown;
|
|
133
|
+
}
|
|
117
134
|
export interface Environment {
|
|
118
135
|
id: string;
|
|
119
136
|
userId: string;
|
|
@@ -136,6 +153,7 @@ export interface Environment {
|
|
|
136
153
|
buildLogs?: string;
|
|
137
154
|
lastBuildAt?: string;
|
|
138
155
|
imageTag?: string;
|
|
156
|
+
metadata?: EnvironmentMetadata | null;
|
|
139
157
|
isDefault?: boolean;
|
|
140
158
|
isActive?: boolean;
|
|
141
159
|
createdAt: string;
|
|
@@ -151,6 +169,7 @@ export interface Environment {
|
|
|
151
169
|
export type Computer = Environment;
|
|
152
170
|
export interface CreateEnvironmentParams {
|
|
153
171
|
name: string;
|
|
172
|
+
projectId?: string | null;
|
|
154
173
|
description?: string;
|
|
155
174
|
runtimes?: RuntimeConfig;
|
|
156
175
|
packages?: PackagesConfig;
|
|
@@ -162,9 +181,14 @@ export interface CreateEnvironmentParams {
|
|
|
162
181
|
documentation?: string[];
|
|
163
182
|
internetAccess?: boolean;
|
|
164
183
|
isDefault?: boolean;
|
|
184
|
+
computeProfile?: EnvironmentComputeProfileId;
|
|
185
|
+
guiEnabled?: boolean;
|
|
186
|
+
officeAppsEnabled?: boolean;
|
|
187
|
+
metadata?: EnvironmentMetadata;
|
|
165
188
|
}
|
|
166
189
|
export interface UpdateEnvironmentParams {
|
|
167
190
|
name?: string;
|
|
191
|
+
projectId?: string | null;
|
|
168
192
|
description?: string;
|
|
169
193
|
runtimes?: RuntimeConfig;
|
|
170
194
|
packages?: PackagesConfig;
|
|
@@ -175,6 +199,10 @@ export interface UpdateEnvironmentParams {
|
|
|
175
199
|
mcpServers?: McpServer[];
|
|
176
200
|
internetAccess?: boolean;
|
|
177
201
|
isDefault?: boolean;
|
|
202
|
+
computeProfile?: EnvironmentComputeProfileId;
|
|
203
|
+
guiEnabled?: boolean;
|
|
204
|
+
officeAppsEnabled?: boolean;
|
|
205
|
+
metadata?: EnvironmentMetadata;
|
|
178
206
|
}
|
|
179
207
|
export type CreateComputerParams = CreateEnvironmentParams;
|
|
180
208
|
export type UpdateComputerParams = UpdateEnvironmentParams;
|
|
@@ -880,12 +908,26 @@ export interface UpdateScheduleParams {
|
|
|
880
908
|
enabled?: boolean;
|
|
881
909
|
metadata?: Record<string, unknown>;
|
|
882
910
|
}
|
|
883
|
-
export type TriggerSource = 'github' | 'slack' | 'email' | 'webhook' | 'cron' | 'custom';
|
|
884
|
-
export interface
|
|
911
|
+
export type TriggerSource = 'github' | 'gitlab' | 'slack' | 'email' | 'webhook' | 'cron' | 'custom';
|
|
912
|
+
export interface SendMessageTriggerAction {
|
|
885
913
|
type: 'send_message';
|
|
914
|
+
prompt?: string;
|
|
915
|
+
message?: string;
|
|
916
|
+
template?: string;
|
|
917
|
+
}
|
|
918
|
+
export interface CommentPullRequestTriggerAction {
|
|
919
|
+
type: 'comment_pull_request';
|
|
920
|
+
prompt?: string;
|
|
921
|
+
message?: string;
|
|
922
|
+
template?: string;
|
|
923
|
+
}
|
|
924
|
+
export interface CommentMergeRequestTriggerAction {
|
|
925
|
+
type: 'comment_merge_request';
|
|
926
|
+
prompt?: string;
|
|
886
927
|
message?: string;
|
|
887
928
|
template?: string;
|
|
888
929
|
}
|
|
930
|
+
export type TriggerAction = SendMessageTriggerAction | CommentPullRequestTriggerAction | CommentMergeRequestTriggerAction;
|
|
889
931
|
export interface Trigger {
|
|
890
932
|
id: string;
|
|
891
933
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export { ComputerAgentsClient, CloudClient, TestbaseClient, ApiClientError, } from './ComputerAgentsClient';
|
|
24
24
|
export type { ComputerAgentsClientConfig, RunOptions, RunResult, ApiClientConfig, } from './ComputerAgentsClient';
|
|
25
|
-
export { ProjectsResource, EnvironmentsResource, ComputersResource, ThreadsResource, AgentsResource, ResourcesResource, DatabasesResource, SkillsResource, BudgetResource, BillingResource, SchedulesResource, TriggersResource, OrchestrationsResource, GitResource, } from './cloud/resources';
|
|
25
|
+
export { ProjectsResource, EnvironmentsResource, ComputersResource, ThreadsResource, AgentsResource, ResourcesResource, WebAppsResource, FunctionsResource, AuthResource, AgentRuntimesResource, RuntimesResource, DatabasesResource, SkillsResource, BudgetResource, BillingResource, SchedulesResource, TriggersResource, OrchestrationsResource, GitResource, } from './cloud/resources';
|
|
26
26
|
export type { StreamEventCallback, SendMessageOptions, SendMessageResult, ListEnvironmentsParams, ListResourcesParams, ResourceInvokeParams, ResourceFileUploadParams, ListDatabasesParams, CreateDatabaseCollectionParams, CreateDatabaseDocumentParams, UpdateDatabaseDocumentParams, ListSkillsParams, } from './cloud/resources';
|
|
27
|
-
export type { PaginationParams, PaginatedResponse, ApiError, Project, CreateProjectParams, UpdateProjectParams, ProjectStats, ProjectType, ProjectSource, Environment, Computer, CreateEnvironmentParams, CreateComputerParams, UpdateEnvironmentParams, UpdateComputerParams, EnvironmentStatus, EnvironmentVariable, McpServer, ContainerStatus, BuildResult, BuildStatus, BuildStatusResult, BuildLogsResult, TestBuildResult, DockerfileResult, ValidateDockerfileResult, RuntimeConfig, PackagesConfig, AvailableRuntimes, PackageType, InstallPackagesResult, StartContainerParams, StartContainerResult, Thread, CreateThreadParams, UpdateThreadParams, ListThreadsParams, SendMessageParams, ThreadMessage, ThreadStatus, AgentConfig, CopyThreadParams, SearchThreadsParams, SearchThreadResult, SearchThreadsResponse, ThreadLogEntry, ResearchSession, StreamEvent, MessageStreamEvent, ResponseStartedEvent, ResponseItemCompletedEvent, ResponseCompletedEvent, StreamCompletedEvent, StreamErrorEvent, Run, CreateRunParams, UpdateRunParams, ListRunsParams, RunStatus, RunLogEntry, RunDiff, TokenUsage, CloudAgent, CreateAgentParams, UpdateAgentParams, BuiltinAgentModel, AgentModel, ReasoningEffort, DeepResearchModel, AgentBinary, AgentModelCatalogEntry, AgentAnalyticsResponse, Resource, CreateResourceParams, UpdateResourceParams, ResourceKind, ResourceAuthMode, ResourceStatus, ResourceAnalyticsResponse, ResourceLogEntry, ResourceBinding, Database, CreateDatabaseParams, UpdateDatabaseParams, DatabaseCollection, DatabaseDocument, Skill, SkillFile, SkillCategory, CreateSkillParams, UpdateSkillParams, BudgetStatus, CanExecuteResult, IncreaseBudgetParams, IncreaseBudgetResult, BillingRecord, ListBillingRecordsParams, BillingAccount, UsageStats, UsageStatsParams, FileEntry, ListFilesParams, UploadFileParams, CreateDirectoryParams, GitDiffFile, GitDiffResult, GitCommitParams, GitCommitResult, GitPushParams, GitPushResult, Schedule, CreateScheduleParams, UpdateScheduleParams, ScheduleType, TriggerSource, Trigger, TriggerAction, CreateTriggerParams, UpdateTriggerParams, TriggerExecution, OrchestrationStrategy, OrchestrationStep, Orchestration, CreateOrchestrationParams, UpdateOrchestrationParams, OrchestrationRun, OrchestrationStepResult, HealthCheck, Metrics, } from './cloud/types';
|
|
27
|
+
export type { PaginationParams, PaginatedResponse, ApiError, Project, CreateProjectParams, UpdateProjectParams, ProjectStats, ProjectType, ProjectSource, Environment, Computer, CreateEnvironmentParams, CreateComputerParams, UpdateEnvironmentParams, UpdateComputerParams, EnvironmentStatus, EnvironmentVariable, EnvironmentComputeProfileId, EnvironmentComputeResources, EnvironmentPricingMetadata, EnvironmentMetadata, McpServer, ContainerStatus, BuildResult, BuildStatus, BuildStatusResult, BuildLogsResult, TestBuildResult, DockerfileResult, ValidateDockerfileResult, RuntimeConfig, PackagesConfig, AvailableRuntimes, PackageType, InstallPackagesResult, StartContainerParams, StartContainerResult, Thread, CreateThreadParams, UpdateThreadParams, ListThreadsParams, SendMessageParams, ThreadMessage, ThreadStatus, AgentConfig, CopyThreadParams, SearchThreadsParams, SearchThreadResult, SearchThreadsResponse, ThreadLogEntry, ResearchSession, StreamEvent, MessageStreamEvent, ResponseStartedEvent, ResponseItemCompletedEvent, ResponseCompletedEvent, StreamCompletedEvent, StreamErrorEvent, Run, CreateRunParams, UpdateRunParams, ListRunsParams, RunStatus, RunLogEntry, RunDiff, TokenUsage, CloudAgent, CreateAgentParams, UpdateAgentParams, BuiltinAgentModel, AgentModel, ReasoningEffort, DeepResearchModel, AgentBinary, AgentModelCatalogEntry, AgentAnalyticsResponse, Resource, CreateResourceParams, UpdateResourceParams, ResourceKind, ResourceAuthMode, ResourceStatus, ResourceAnalyticsResponse, ResourceLogEntry, ResourceBinding, Database, CreateDatabaseParams, UpdateDatabaseParams, DatabaseCollection, DatabaseDocument, Skill, SkillFile, SkillCategory, CreateSkillParams, UpdateSkillParams, BudgetStatus, CanExecuteResult, IncreaseBudgetParams, IncreaseBudgetResult, BillingRecord, ListBillingRecordsParams, BillingAccount, UsageStats, UsageStatsParams, FileEntry, ListFilesParams, UploadFileParams, CreateDirectoryParams, GitDiffFile, GitDiffResult, GitCommitParams, GitCommitResult, GitPushParams, GitPushResult, Schedule, CreateScheduleParams, UpdateScheduleParams, ScheduleType, TriggerSource, Trigger, TriggerAction, CreateTriggerParams, UpdateTriggerParams, TriggerExecution, OrchestrationStrategy, OrchestrationStep, Orchestration, CreateOrchestrationParams, UpdateOrchestrationParams, OrchestrationRun, OrchestrationStepResult, HealthCheck, Metrics, } from './cloud/types';
|
|
28
28
|
export { ApiClient } from './cloud/ApiClient';
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ApiClient = exports.GitResource = exports.OrchestrationsResource = exports.TriggersResource = exports.SchedulesResource = exports.BillingResource = exports.BudgetResource = exports.SkillsResource = exports.DatabasesResource = exports.ResourcesResource = exports.AgentsResource = exports.ThreadsResource = exports.ComputersResource = exports.EnvironmentsResource = exports.ProjectsResource = exports.ApiClientError = exports.TestbaseClient = exports.CloudClient = exports.ComputerAgentsClient = void 0;
|
|
25
|
+
exports.ApiClient = exports.GitResource = exports.OrchestrationsResource = exports.TriggersResource = exports.SchedulesResource = exports.BillingResource = exports.BudgetResource = exports.SkillsResource = exports.DatabasesResource = exports.RuntimesResource = exports.AgentRuntimesResource = exports.AuthResource = exports.FunctionsResource = exports.WebAppsResource = exports.ResourcesResource = exports.AgentsResource = exports.ThreadsResource = exports.ComputersResource = exports.EnvironmentsResource = exports.ProjectsResource = exports.ApiClientError = exports.TestbaseClient = exports.CloudClient = exports.ComputerAgentsClient = void 0;
|
|
26
26
|
// ============================================================================
|
|
27
27
|
// Main Client
|
|
28
28
|
// ============================================================================
|
|
@@ -43,6 +43,11 @@ Object.defineProperty(exports, "ComputersResource", { enumerable: true, get: fun
|
|
|
43
43
|
Object.defineProperty(exports, "ThreadsResource", { enumerable: true, get: function () { return resources_1.ThreadsResource; } });
|
|
44
44
|
Object.defineProperty(exports, "AgentsResource", { enumerable: true, get: function () { return resources_1.AgentsResource; } });
|
|
45
45
|
Object.defineProperty(exports, "ResourcesResource", { enumerable: true, get: function () { return resources_1.ResourcesResource; } });
|
|
46
|
+
Object.defineProperty(exports, "WebAppsResource", { enumerable: true, get: function () { return resources_1.WebAppsResource; } });
|
|
47
|
+
Object.defineProperty(exports, "FunctionsResource", { enumerable: true, get: function () { return resources_1.FunctionsResource; } });
|
|
48
|
+
Object.defineProperty(exports, "AuthResource", { enumerable: true, get: function () { return resources_1.AuthResource; } });
|
|
49
|
+
Object.defineProperty(exports, "AgentRuntimesResource", { enumerable: true, get: function () { return resources_1.AgentRuntimesResource; } });
|
|
50
|
+
Object.defineProperty(exports, "RuntimesResource", { enumerable: true, get: function () { return resources_1.RuntimesResource; } });
|
|
46
51
|
Object.defineProperty(exports, "DatabasesResource", { enumerable: true, get: function () { return resources_1.DatabasesResource; } });
|
|
47
52
|
Object.defineProperty(exports, "SkillsResource", { enumerable: true, get: function () { return resources_1.SkillsResource; } });
|
|
48
53
|
Object.defineProperty(exports, "BudgetResource", { enumerable: true, get: function () { return resources_1.BudgetResource; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,+DAOgC;AAN9B,4HAAA,oBAAoB,OAAA;AACpB,kCAAkC;AAClC,mHAAA,WAAW,OAAA;AACX,sHAAA,cAAc,OAAA;AACd,cAAc;AACd,sHAAA,cAAc,OAAA;AAUhB,+EAA+E;AAC/E,yCAAyC;AACzC,+EAA+E;AAE/E,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,+DAOgC;AAN9B,4HAAA,oBAAoB,OAAA;AACpB,kCAAkC;AAClC,mHAAA,WAAW,OAAA;AACX,sHAAA,cAAc,OAAA;AACd,cAAc;AACd,sHAAA,cAAc,OAAA;AAUhB,+EAA+E;AAC/E,yCAAyC;AACzC,+EAA+E;AAE/E,+CAoB2B;AAnBzB,6GAAA,gBAAgB,OAAA;AAChB,iHAAA,oBAAoB,OAAA;AACpB,8GAAA,iBAAiB,OAAA;AACjB,4GAAA,eAAe,OAAA;AACf,2GAAA,cAAc,OAAA;AACd,8GAAA,iBAAiB,OAAA;AACjB,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,yGAAA,YAAY,OAAA;AACZ,kHAAA,qBAAqB,OAAA;AACrB,6GAAA,gBAAgB,OAAA;AAChB,8GAAA,iBAAiB,OAAA;AACjB,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,6GAAA,gBAAgB,OAAA;AAChB,mHAAA,sBAAsB,OAAA;AACtB,wGAAA,WAAW,OAAA;AA2Lb,+EAA+E;AAC/E,4CAA4C;AAC5C,+EAA+E;AAE/E,+CAA8C;AAArC,sGAAA,SAAS,OAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "computer-agents",
|
|
3
3
|
"repository": "https://github.com/computer-agents/computer-agents-sdk",
|
|
4
4
|
"homepage": "https://computer-agents.com",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.6.0",
|
|
6
6
|
"description": "Official SDK for the Computer Agents Agentic Compute Platform API. Build with threads, computers, agents, resources, and databases.",
|
|
7
7
|
"author": "Computer Agents",
|
|
8
8
|
"main": "dist/index.js",
|