computer-agents 1.1.0 → 2.1.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 +5 -4
- package/dist/ComputerAgentsClient.js +3 -2
- package/dist/ComputerAgentsClient.js.map +1 -1
- package/dist/cloud/resources/ThreadsResource.d.ts +67 -1
- package/dist/cloud/resources/ThreadsResource.js +83 -0
- package/dist/cloud/resources/ThreadsResource.js.map +1 -1
- package/dist/cloud/types.d.ts +75 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
|
@@ -76,9 +76,9 @@ export interface RunOptions {
|
|
|
76
76
|
* Agent configuration override
|
|
77
77
|
*/
|
|
78
78
|
agentConfig?: {
|
|
79
|
-
model?:
|
|
79
|
+
model?: 'claude-opus-4-6' | 'claude-sonnet-4-5' | 'claude-haiku-4-5';
|
|
80
80
|
instructions?: string;
|
|
81
|
-
reasoningEffort?: '
|
|
81
|
+
reasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
84
|
* Callback for streaming events
|
|
@@ -169,13 +169,14 @@ export declare class ComputerAgentsClient {
|
|
|
169
169
|
/**
|
|
170
170
|
* Agent configuration
|
|
171
171
|
*
|
|
172
|
-
* Create and manage agent configurations with models, instructions, and skills.
|
|
172
|
+
* Create and manage agent configurations with Claude models, instructions, and skills.
|
|
173
|
+
* All agents execute via Claude Code CLI in isolated containers.
|
|
173
174
|
*
|
|
174
175
|
* @example
|
|
175
176
|
* ```typescript
|
|
176
177
|
* const agent = await client.agents.create({
|
|
177
178
|
* name: 'Code Assistant',
|
|
178
|
-
* model: '
|
|
179
|
+
* model: 'claude-sonnet-4-5',
|
|
179
180
|
* instructions: 'You are a helpful coding assistant.'
|
|
180
181
|
* });
|
|
181
182
|
* ```
|
|
@@ -95,13 +95,14 @@ class ComputerAgentsClient {
|
|
|
95
95
|
/**
|
|
96
96
|
* Agent configuration
|
|
97
97
|
*
|
|
98
|
-
* Create and manage agent configurations with models, instructions, and skills.
|
|
98
|
+
* Create and manage agent configurations with Claude models, instructions, and skills.
|
|
99
|
+
* All agents execute via Claude Code CLI in isolated containers.
|
|
99
100
|
*
|
|
100
101
|
* @example
|
|
101
102
|
* ```typescript
|
|
102
103
|
* const agent = await client.agents.create({
|
|
103
104
|
* name: 'Code Assistant',
|
|
104
|
-
* model: '
|
|
105
|
+
* model: 'claude-sonnet-4-5',
|
|
105
106
|
* instructions: 'You are a helpful coding assistant.'
|
|
106
107
|
* });
|
|
107
108
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputerAgentsClient.js","sourceRoot":"","sources":["../src/ComputerAgentsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;AAEH,iDAA8D;AAuBrD,+FAvBW,0BAAc,OAuBX;AArBvB,iDAW2B;AAwG3B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,oBAAoB;IAC/B;;;OAGG;IACM,GAAG,CAAY;IAExB;;;;;;;;;;;;;;;;;OAiBG;IACM,OAAO,CAAkB;IAElC;;;;;;;;;;;;;OAaG;IACM,YAAY,CAAuB;IAE5C
|
|
1
|
+
{"version":3,"file":"ComputerAgentsClient.js","sourceRoot":"","sources":["../src/ComputerAgentsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;AAEH,iDAA8D;AAuBrD,+FAvBW,0BAAc,OAuBX;AArBvB,iDAW2B;AAwG3B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,oBAAoB;IAC/B;;;OAGG;IACM,GAAG,CAAY;IAExB;;;;;;;;;;;;;;;;;OAiBG;IACM,OAAO,CAAkB;IAElC;;;;;;;;;;;;;OAaG;IACM,YAAY,CAAuB;IAE5C;;;;;;;;;;;;;;OAcG;IACM,MAAM,CAAiB;IAEh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CAAC,UAAU,CAAC,UAGb,EAAE;QAIJ,qCAAqC;QACrC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE1C,yCAAyC;QACzC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACpD,IAAI,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAEtD,4CAA4C;QAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;gBAC3C,IAAI,EAAE,OAAO,CAAC,eAAe,IAAI,SAAS;gBAC1C,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,IAAI;gBAC9C,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,4EAA4E;IAC5E,sBAAsB;IACtB,4EAA4E;IAE5E;;OAEG;IACH,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAc,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAU,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC;CACF;AA/UD,oDA+UC;AASgC,2CAAW;AAKX,8CAAc"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* simplified paths without /projects/:projectId prefix.
|
|
9
9
|
*/
|
|
10
10
|
import type { ApiClient } from '../ApiClient';
|
|
11
|
-
import type { Thread, CreateThreadParams, UpdateThreadParams, ListThreadsParams, SendMessageParams, ThreadMessage, MessageStreamEvent } from '../types';
|
|
11
|
+
import type { Thread, CreateThreadParams, UpdateThreadParams, ListThreadsParams, SendMessageParams, ThreadMessage, MessageStreamEvent, CopyThreadParams, SearchThreadsParams, SearchThreadsResponse, ThreadLogEntry, ResearchSession } from '../types';
|
|
12
12
|
/**
|
|
13
13
|
* Callback for handling streaming events
|
|
14
14
|
*/
|
|
@@ -113,6 +113,72 @@ export declare class ThreadsResource {
|
|
|
113
113
|
* ```
|
|
114
114
|
*/
|
|
115
115
|
sendMessage(threadId: string, options: SendMessageOptions): Promise<SendMessageResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Copy a thread with all its conversation messages into a new thread
|
|
118
|
+
*
|
|
119
|
+
* Creates a new thread with the same environment and agent configuration,
|
|
120
|
+
* copies all conversation messages, and marks the new thread as completed.
|
|
121
|
+
*
|
|
122
|
+
* @param threadId - The source thread to copy
|
|
123
|
+
* @param params - Optional parameters (custom title)
|
|
124
|
+
* @returns The newly created thread
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```typescript
|
|
128
|
+
* // Copy with auto-generated title ("[Original Title] Copy")
|
|
129
|
+
* const copy = await client.threads.copy('thread_abc');
|
|
130
|
+
*
|
|
131
|
+
* // Copy with custom title
|
|
132
|
+
* const copy = await client.threads.copy('thread_abc', {
|
|
133
|
+
* title: 'My experiment v2'
|
|
134
|
+
* });
|
|
135
|
+
*
|
|
136
|
+
* // Continue conversation on the copy
|
|
137
|
+
* await client.threads.sendMessage(copy.id, {
|
|
138
|
+
* content: 'Try a different approach...',
|
|
139
|
+
* onEvent: (event) => console.log(event)
|
|
140
|
+
* });
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
copy(threadId: string, params?: CopyThreadParams): Promise<Thread>;
|
|
144
|
+
/**
|
|
145
|
+
* Search threads by text query
|
|
146
|
+
*
|
|
147
|
+
* Full-text search across thread titles and messages.
|
|
148
|
+
* Requires PostgreSQL backend.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* const results = await client.threads.search({
|
|
153
|
+
* query: 'REST API',
|
|
154
|
+
* limit: 10
|
|
155
|
+
* });
|
|
156
|
+
*
|
|
157
|
+
* for (const result of results.results) {
|
|
158
|
+
* console.log(result.thread.title, result.score);
|
|
159
|
+
* }
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
search(params: SearchThreadsParams): Promise<SearchThreadsResponse>;
|
|
163
|
+
/**
|
|
164
|
+
* Get execution logs for a thread
|
|
165
|
+
*
|
|
166
|
+
* Returns logs with role separation (user, assistant, execution_log)
|
|
167
|
+
* and relative timestamps from thread start time.
|
|
168
|
+
*/
|
|
169
|
+
getLogs(threadId: string): Promise<ThreadLogEntry[]>;
|
|
170
|
+
/**
|
|
171
|
+
* List deep research sessions for a thread
|
|
172
|
+
*/
|
|
173
|
+
listResearch(threadId: string): Promise<ResearchSession[]>;
|
|
174
|
+
/**
|
|
175
|
+
* Get a specific deep research session
|
|
176
|
+
*/
|
|
177
|
+
getResearch(threadId: string, sessionId: string): Promise<ResearchSession>;
|
|
178
|
+
/**
|
|
179
|
+
* Delete a deep research session
|
|
180
|
+
*/
|
|
181
|
+
deleteResearch(threadId: string, sessionId: string): Promise<void>;
|
|
116
182
|
/**
|
|
117
183
|
* Cancel an in-progress message execution
|
|
118
184
|
*/
|
|
@@ -160,6 +160,89 @@ class ThreadsResource {
|
|
|
160
160
|
events,
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Copy a thread with all its conversation messages into a new thread
|
|
165
|
+
*
|
|
166
|
+
* Creates a new thread with the same environment and agent configuration,
|
|
167
|
+
* copies all conversation messages, and marks the new thread as completed.
|
|
168
|
+
*
|
|
169
|
+
* @param threadId - The source thread to copy
|
|
170
|
+
* @param params - Optional parameters (custom title)
|
|
171
|
+
* @returns The newly created thread
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```typescript
|
|
175
|
+
* // Copy with auto-generated title ("[Original Title] Copy")
|
|
176
|
+
* const copy = await client.threads.copy('thread_abc');
|
|
177
|
+
*
|
|
178
|
+
* // Copy with custom title
|
|
179
|
+
* const copy = await client.threads.copy('thread_abc', {
|
|
180
|
+
* title: 'My experiment v2'
|
|
181
|
+
* });
|
|
182
|
+
*
|
|
183
|
+
* // Continue conversation on the copy
|
|
184
|
+
* await client.threads.sendMessage(copy.id, {
|
|
185
|
+
* content: 'Try a different approach...',
|
|
186
|
+
* onEvent: (event) => console.log(event)
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
async copy(threadId, params) {
|
|
191
|
+
const response = await this.client.post(`/threads/${threadId}/copy`, params);
|
|
192
|
+
return response.thread;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Search threads by text query
|
|
196
|
+
*
|
|
197
|
+
* Full-text search across thread titles and messages.
|
|
198
|
+
* Requires PostgreSQL backend.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* const results = await client.threads.search({
|
|
203
|
+
* query: 'REST API',
|
|
204
|
+
* limit: 10
|
|
205
|
+
* });
|
|
206
|
+
*
|
|
207
|
+
* for (const result of results.results) {
|
|
208
|
+
* console.log(result.thread.title, result.score);
|
|
209
|
+
* }
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
async search(params) {
|
|
213
|
+
const response = await this.client.post(`/threads/search`, params);
|
|
214
|
+
return response;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get execution logs for a thread
|
|
218
|
+
*
|
|
219
|
+
* Returns logs with role separation (user, assistant, execution_log)
|
|
220
|
+
* and relative timestamps from thread start time.
|
|
221
|
+
*/
|
|
222
|
+
async getLogs(threadId) {
|
|
223
|
+
const response = await this.client.get(`/threads/${threadId}/logs`);
|
|
224
|
+
return response.logs;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* List deep research sessions for a thread
|
|
228
|
+
*/
|
|
229
|
+
async listResearch(threadId) {
|
|
230
|
+
const response = await this.client.get(`/threads/${threadId}/research`);
|
|
231
|
+
return response.sessions;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Get a specific deep research session
|
|
235
|
+
*/
|
|
236
|
+
async getResearch(threadId, sessionId) {
|
|
237
|
+
const response = await this.client.get(`/threads/${threadId}/research/${sessionId}`);
|
|
238
|
+
return response.session;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Delete a deep research session
|
|
242
|
+
*/
|
|
243
|
+
async deleteResearch(threadId, sessionId) {
|
|
244
|
+
await this.client.delete(`/threads/${threadId}/research/${sessionId}`);
|
|
245
|
+
}
|
|
163
246
|
/**
|
|
164
247
|
* Cancel an in-progress message execution
|
|
165
248
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadsResource.js","sourceRoot":"","sources":["../../../src/cloud/resources/ThreadsResource.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;
|
|
1
|
+
{"version":3,"file":"ThreadsResource.js","sourceRoot":"","sources":["../../../src/cloud/resources/ThreadsResource.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAkEH,MAAa,eAAe;IACG;IAA7B,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAElD;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAA0B;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACrC,UAAU,EACV,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,SAA4B,EAAE;QAKvC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAKnC,UAAU,EAAE;YACb,KAAK,EAAE,MAAM,CAAC,KAAK;YAC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AQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACrC,YAAY,QAAQ,SAAS,CAC9B,CAAC;QACF,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;CACF;AAtUD,0CAsUC"}
|
package/dist/cloud/types.d.ts
CHANGED
|
@@ -236,7 +236,7 @@ export interface StartContainerResult {
|
|
|
236
236
|
imageTag: string;
|
|
237
237
|
workspacePath: string;
|
|
238
238
|
}
|
|
239
|
-
export type ThreadStatus = 'active' | 'completed' | 'cancelled';
|
|
239
|
+
export type ThreadStatus = 'active' | 'running' | 'completed' | 'failed' | 'archived' | 'cancelled' | 'deleted';
|
|
240
240
|
export interface ThreadMessage {
|
|
241
241
|
role: 'user' | 'assistant' | 'system';
|
|
242
242
|
content: string;
|
|
@@ -270,6 +270,62 @@ export interface ListThreadsParams extends PaginationParams {
|
|
|
270
270
|
environmentId?: string;
|
|
271
271
|
status?: ThreadStatus;
|
|
272
272
|
}
|
|
273
|
+
export interface CopyThreadParams {
|
|
274
|
+
/**
|
|
275
|
+
* Custom title for the copied thread.
|
|
276
|
+
* If not provided, defaults to "[Original Title] Copy"
|
|
277
|
+
*/
|
|
278
|
+
title?: string;
|
|
279
|
+
}
|
|
280
|
+
export interface SearchThreadsParams {
|
|
281
|
+
/** Search query (required) */
|
|
282
|
+
query: string;
|
|
283
|
+
/** Filter by environment */
|
|
284
|
+
environmentId?: string;
|
|
285
|
+
/** Filter by status */
|
|
286
|
+
status?: ThreadStatus | 'all';
|
|
287
|
+
/** Max results to return (default: 20, max: 100) */
|
|
288
|
+
limit?: number;
|
|
289
|
+
/** Offset for pagination */
|
|
290
|
+
offset?: number;
|
|
291
|
+
/** Include matching messages in results */
|
|
292
|
+
includeMessages?: boolean;
|
|
293
|
+
}
|
|
294
|
+
export interface SearchThreadResult {
|
|
295
|
+
thread: Thread & {
|
|
296
|
+
environmentName?: string;
|
|
297
|
+
agentName?: string | null;
|
|
298
|
+
};
|
|
299
|
+
score: number;
|
|
300
|
+
highlights: string[];
|
|
301
|
+
matchingMessages?: ThreadMessage[];
|
|
302
|
+
}
|
|
303
|
+
export interface SearchThreadsResponse {
|
|
304
|
+
results: SearchThreadResult[];
|
|
305
|
+
total: number;
|
|
306
|
+
hasMore: boolean;
|
|
307
|
+
searchMetadata: {
|
|
308
|
+
query: string;
|
|
309
|
+
queryType: string;
|
|
310
|
+
processingTimeMs: number;
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
export interface ThreadLogEntry {
|
|
314
|
+
role: 'user' | 'assistant' | 'execution_log';
|
|
315
|
+
content: string;
|
|
316
|
+
timestamp?: string;
|
|
317
|
+
relativeTime?: string;
|
|
318
|
+
}
|
|
319
|
+
export interface ResearchSession {
|
|
320
|
+
id: string;
|
|
321
|
+
threadId: string;
|
|
322
|
+
status: string;
|
|
323
|
+
progress?: number;
|
|
324
|
+
query?: string;
|
|
325
|
+
results?: unknown[];
|
|
326
|
+
createdAt: string;
|
|
327
|
+
updatedAt: string;
|
|
328
|
+
}
|
|
273
329
|
export interface SendMessageParams {
|
|
274
330
|
content: string;
|
|
275
331
|
mcpServers?: McpServer[];
|
|
@@ -282,9 +338,9 @@ export interface SendMessageParams {
|
|
|
282
338
|
runId?: string;
|
|
283
339
|
}
|
|
284
340
|
export interface AgentConfig {
|
|
285
|
-
model?:
|
|
341
|
+
model?: AgentModel;
|
|
286
342
|
instructions?: string;
|
|
287
|
-
reasoningEffort?:
|
|
343
|
+
reasoningEffort?: ReasoningEffort;
|
|
288
344
|
}
|
|
289
345
|
export interface StreamEvent {
|
|
290
346
|
type: string;
|
|
@@ -397,8 +453,19 @@ export interface RunDiff {
|
|
|
397
453
|
additions?: number;
|
|
398
454
|
deletions?: number;
|
|
399
455
|
}
|
|
400
|
-
|
|
401
|
-
|
|
456
|
+
/**
|
|
457
|
+
* Supported Claude models for agent execution.
|
|
458
|
+
* All agents run via Claude Code CLI in containers.
|
|
459
|
+
*/
|
|
460
|
+
export type AgentModel = 'claude-opus-4-6' | 'claude-sonnet-4-5' | 'claude-haiku-4-5';
|
|
461
|
+
/**
|
|
462
|
+
* Reasoning effort level for extended thinking.
|
|
463
|
+
*/
|
|
464
|
+
export type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
|
|
465
|
+
/**
|
|
466
|
+
* Deep research model options (for research skill).
|
|
467
|
+
*/
|
|
468
|
+
export type DeepResearchModel = 'gemini-3-flash-preview' | 'gemini-3-pro-preview';
|
|
402
469
|
export interface AgentBinary {
|
|
403
470
|
path: string;
|
|
404
471
|
args?: string[];
|
|
@@ -413,7 +480,7 @@ export interface CloudAgent {
|
|
|
413
480
|
binary?: AgentBinary;
|
|
414
481
|
reasoningEffort?: ReasoningEffort;
|
|
415
482
|
enabledSkills?: string[];
|
|
416
|
-
deepResearchModel?:
|
|
483
|
+
deepResearchModel?: DeepResearchModel;
|
|
417
484
|
metadata?: Record<string, unknown>;
|
|
418
485
|
createdAt: string;
|
|
419
486
|
updatedAt: string;
|
|
@@ -427,7 +494,7 @@ export interface CreateAgentParams {
|
|
|
427
494
|
binary?: AgentBinary;
|
|
428
495
|
reasoningEffort?: ReasoningEffort;
|
|
429
496
|
enabledSkills?: string[];
|
|
430
|
-
deepResearchModel?:
|
|
497
|
+
deepResearchModel?: DeepResearchModel;
|
|
431
498
|
metadata?: Record<string, unknown>;
|
|
432
499
|
}
|
|
433
500
|
export interface UpdateAgentParams {
|
|
@@ -637,7 +704,7 @@ export interface HealthCheck {
|
|
|
637
704
|
uptime: number;
|
|
638
705
|
checks: {
|
|
639
706
|
gcsfuseMount: boolean;
|
|
640
|
-
|
|
707
|
+
anthropicApiKey: boolean;
|
|
641
708
|
memory: {
|
|
642
709
|
used: number;
|
|
643
710
|
total: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export { ComputerAgentsClient, CloudClient, TestbaseClient, ApiClientError, } fr
|
|
|
24
24
|
export type { ComputerAgentsClientConfig, RunOptions, RunResult, ApiClientConfig, } from './ComputerAgentsClient';
|
|
25
25
|
export { ProjectsResource, EnvironmentsResource, ThreadsResource, RunsResource, AgentsResource, BudgetResource, BillingResource, SchedulesResource, GitResource, } from './cloud/resources';
|
|
26
26
|
export type { StreamEventCallback, SendMessageOptions, SendMessageResult, ListEnvironmentsParams, } from './cloud/resources';
|
|
27
|
-
export type { PaginationParams, PaginatedResponse, ApiError, Project, CreateProjectParams, UpdateProjectParams, ProjectStats, ProjectType, ProjectSource, Environment, CreateEnvironmentParams, UpdateEnvironmentParams, 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, StreamEvent, MessageStreamEvent, ResponseStartedEvent, ResponseItemCompletedEvent, ResponseCompletedEvent, StreamCompletedEvent, StreamErrorEvent, Run, CreateRunParams, UpdateRunParams, ListRunsParams, RunStatus, RunLogEntry, RunDiff, TokenUsage, CloudAgent, CreateAgentParams, UpdateAgentParams, AgentModel, ReasoningEffort, AgentBinary, BudgetStatus, CanExecuteResult, IncreaseBudgetParams, IncreaseBudgetResult, BillingRecord, ListBillingRecordsParams, BillingAccount, UsageStats, UsageStatsParams, FileEntry, ListFilesParams, UploadFileParams, CreateDirectoryParams, GitDiffFile, GitDiffResult, GitCommitParams, GitCommitResult, GitPushParams, GitPushResult, Schedule, CreateScheduleParams, UpdateScheduleParams, ScheduleType, HealthCheck, Metrics, } from './cloud/types';
|
|
27
|
+
export type { PaginationParams, PaginatedResponse, ApiError, Project, CreateProjectParams, UpdateProjectParams, ProjectStats, ProjectType, ProjectSource, Environment, CreateEnvironmentParams, UpdateEnvironmentParams, 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, AgentModel, ReasoningEffort, DeepResearchModel, AgentBinary, BudgetStatus, CanExecuteResult, IncreaseBudgetParams, IncreaseBudgetResult, BillingRecord, ListBillingRecordsParams, BillingAccount, UsageStats, UsageStatsParams, FileEntry, ListFilesParams, UploadFileParams, CreateDirectoryParams, GitDiffFile, GitDiffResult, GitCommitParams, GitCommitResult, GitPushParams, GitPushResult, Schedule, CreateScheduleParams, UpdateScheduleParams, ScheduleType, HealthCheck, Metrics, } from './cloud/types';
|
|
28
28
|
export { ApiClient } from './cloud/ApiClient';
|
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,+CAU2B;AATzB,6GAAA,gBAAgB,OAAA;AAChB,iHAAA,oBAAoB,OAAA;AACpB,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AACZ,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,wGAAA,WAAW,OAAA;
|
|
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,+CAU2B;AATzB,6GAAA,gBAAgB,OAAA;AAChB,iHAAA,oBAAoB,OAAA;AACpB,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AACZ,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,wGAAA,WAAW,OAAA;AAmIb,+EAA+E;AAC/E,4CAA4C;AAC5C,+EAA+E;AAE/E,+CAA8C;AAArC,sGAAA,SAAS,OAAA"}
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "computer-agents",
|
|
3
3
|
"repository": "https://github.com/TestBase-ai/computer-agents",
|
|
4
4
|
"homepage": "https://computer-agents.com",
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "Official SDK for the Computer Agents Cloud API. Execute AI agents in
|
|
5
|
+
"version": "2.1.0",
|
|
6
|
+
"description": "Official SDK for the Computer Agents Cloud API. Execute Claude-powered AI agents in isolated cloud containers.",
|
|
7
7
|
"author": "Computer Agents",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -23,11 +23,14 @@
|
|
|
23
23
|
"computer-agents",
|
|
24
24
|
"ai",
|
|
25
25
|
"agents",
|
|
26
|
+
"claude",
|
|
27
|
+
"anthropic",
|
|
26
28
|
"cloud",
|
|
27
29
|
"api",
|
|
28
30
|
"sdk",
|
|
29
31
|
"automation",
|
|
30
|
-
"code-generation"
|
|
32
|
+
"code-generation",
|
|
33
|
+
"mcp"
|
|
31
34
|
],
|
|
32
35
|
"license": "MIT",
|
|
33
36
|
"dependencies": {},
|