computer-agents 2.4.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.
Files changed (36) hide show
  1. package/README.md +61 -18
  2. package/dist/ComputerAgentsClient.d.ts +64 -17
  3. package/dist/ComputerAgentsClient.js +66 -22
  4. package/dist/ComputerAgentsClient.js.map +1 -1
  5. package/dist/cloud/resources/AgentsResource.d.ts +12 -1
  6. package/dist/cloud/resources/AgentsResource.js +16 -0
  7. package/dist/cloud/resources/AgentsResource.js.map +1 -1
  8. package/dist/cloud/resources/DatabasesResource.d.ts +36 -0
  9. package/dist/cloud/resources/DatabasesResource.js +68 -0
  10. package/dist/cloud/resources/DatabasesResource.js.map +1 -0
  11. package/dist/cloud/resources/EnvironmentsResource.d.ts +114 -0
  12. package/dist/cloud/resources/EnvironmentsResource.js +79 -0
  13. package/dist/cloud/resources/EnvironmentsResource.js.map +1 -1
  14. package/dist/cloud/resources/GitResource.d.ts +60 -2
  15. package/dist/cloud/resources/GitResource.js +86 -10
  16. package/dist/cloud/resources/GitResource.js.map +1 -1
  17. package/dist/cloud/resources/ProductResources.d.ts +79 -0
  18. package/dist/cloud/resources/ProductResources.js +123 -0
  19. package/dist/cloud/resources/ProductResources.js.map +1 -0
  20. package/dist/cloud/resources/ResourcesResource.d.ts +92 -0
  21. package/dist/cloud/resources/ResourcesResource.js +151 -0
  22. package/dist/cloud/resources/ResourcesResource.js.map +1 -0
  23. package/dist/cloud/resources/SkillsResource.d.ts +17 -0
  24. package/dist/cloud/resources/SkillsResource.js +36 -0
  25. package/dist/cloud/resources/SkillsResource.js.map +1 -0
  26. package/dist/cloud/resources/ThreadsResource.d.ts +78 -0
  27. package/dist/cloud/resources/ThreadsResource.js +64 -0
  28. package/dist/cloud/resources/ThreadsResource.js.map +1 -1
  29. package/dist/cloud/resources/index.d.ts +8 -1
  30. package/dist/cloud/resources/index.js +15 -3
  31. package/dist/cloud/resources/index.js.map +1 -1
  32. package/dist/cloud/types.d.ts +229 -5
  33. package/dist/index.d.ts +4 -4
  34. package/dist/index.js +11 -3
  35. package/dist/index.js.map +1 -1
  36. package/package.json +3 -4
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/computer-agents.svg?color=success)](https://www.npmjs.com/package/computer-agents)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
- Official TypeScript/JavaScript SDK for the [Computer Agents Cloud API](https://computer-agents.com). Execute Claude-powered AI agents in isolated cloud containers.
6
+ Official TypeScript/JavaScript SDK for the [Computer Agents Cloud API](https://computer-agents.com). Build against the Agentic Compute Platform with threads, computers, resources, databases, skills, and agents.
7
7
 
8
8
  ## Installation
9
9
 
@@ -30,12 +30,12 @@ console.log(result.content);
30
30
 
31
31
  ## Features
32
32
 
33
- - **Claude-powered** — agents run on Claude Opus 4.6, Sonnet 4.5, or Haiku 4.5
34
- - **Cloud execution** — isolated containers with persistent workspaces
33
+ - **Managed and external models** — use built-in Claude and Gemini models or connect external models on Team and Enterprise plans
34
+ - **Persistent computers** — isolated execution environments with stateful workspaces
35
35
  - **SSE streaming** — real-time execution progress and tool calls
36
36
  - **Session continuity** — multi-turn conversations via threads
37
37
  - **MCP integration** — extend capabilities with Model Context Protocol servers
38
- - **Skills** — web search, image generation, deep research
38
+ - **Skills and resources** — connect system skills, custom skills, and published resources
39
39
  - **Zero dependencies** — uses native `fetch`
40
40
  - **Full TypeScript support** — complete type definitions
41
41
 
@@ -44,8 +44,12 @@ console.log(result.content);
44
44
  | Model | ID | Use Case |
45
45
  |-------|-----|----------|
46
46
  | Claude 4.6 Opus | `claude-opus-4-6` | Most capable, complex tasks |
47
- | Claude 4.5 Sonnet | `claude-sonnet-4-5` | Balanced (default) |
47
+ | Claude 4.5 Sonnet | `claude-sonnet-4-5` | Balanced default |
48
48
  | Claude 4.5 Haiku | `claude-haiku-4-5` | Fast, efficient |
49
+ | Gemini 3 Flash | `gemini-3-flash` | Low-latency general workflows |
50
+ | Gemini 3.1 Pro | `gemini-3-1-pro` | Broader reasoning and research tasks |
51
+
52
+ Team and Enterprise plans can also connect external models with IDs in the form `external:{provider}:{model}`.
49
53
 
50
54
  ## API Reference
51
55
 
@@ -65,7 +69,7 @@ const client = new ComputerAgentsClient({
65
69
  ```typescript
66
70
  // One-shot execution
67
71
  const result = await client.run('Fix the TypeScript errors', {
68
- environmentId: 'env_xxx'
72
+ computerId: 'env_xxx'
69
73
  });
70
74
 
71
75
  // With streaming
@@ -85,7 +89,7 @@ Multi-turn conversations with persistent context:
85
89
  ```typescript
86
90
  // Create a thread
87
91
  const thread = await client.threads.create({
88
- environmentId: 'env_xxx'
92
+ computerId: 'env_xxx'
89
93
  });
90
94
 
91
95
  // Send messages — the agent remembers the full context
@@ -134,30 +138,30 @@ const agent = await client.agents.create({
134
138
 
135
139
  // Use the agent in a thread
136
140
  const thread = await client.threads.create({
137
- environmentId: 'env_xxx',
141
+ computerId: 'env_xxx',
138
142
  agentId: agent.id
139
143
  });
140
144
  ```
141
145
 
142
- ### Environments
146
+ ### Computers
143
147
 
144
- Isolated containers with custom runtimes, packages, and configuration:
148
+ Persistent execution environments with custom runtimes, packages, secrets, and MCP setup:
145
149
 
146
150
  ```typescript
147
- // Create an environment
148
- const env = await client.environments.create({
151
+ // Create a computer (same manager is also available as client.environments)
152
+ const computer = await client.computers.create({
149
153
  name: 'python-dev',
150
154
  internetAccess: true
151
155
  });
152
156
 
153
157
  // Configure runtimes
154
- await client.environments.setRuntimes(env.id, {
158
+ await client.computers.setRuntimes(computer.id, {
155
159
  python: '3.12',
156
160
  nodejs: '20'
157
161
  });
158
162
 
159
163
  // Install packages
160
- await client.environments.installPackages(env.id, {
164
+ await client.computers.installPackages(computer.id, {
161
165
  packages: [
162
166
  { type: 'python', name: 'flask' },
163
167
  { type: 'python', name: 'pytest' },
@@ -166,7 +170,7 @@ await client.environments.installPackages(env.id, {
166
170
  });
167
171
 
168
172
  // Add MCP servers
169
- await client.environments.update(env.id, {
173
+ await client.computers.update(computer.id, {
170
174
  mcpServers: [
171
175
  {
172
176
  type: 'stdio',
@@ -184,12 +188,12 @@ await client.environments.update(env.id, {
184
188
  });
185
189
 
186
190
  // Trigger a build
187
- await client.environments.build(env.id);
191
+ await client.computers.build(computer.id);
188
192
  ```
189
193
 
190
194
  ### Files
191
195
 
192
- Manage files in environment workspaces:
196
+ Manage files in computer workspaces:
193
197
 
194
198
  ```typescript
195
199
  // Upload a file
@@ -209,9 +213,48 @@ const files = await client.files.listFiles('env_xxx');
209
213
  await client.files.deleteFile('env_xxx', 'src/app.py');
210
214
  ```
211
215
 
216
+ ### Resources
217
+
218
+ Publish web apps, functions, auth modules, and agent runtimes:
219
+
220
+ ```typescript
221
+ const resource = await client.resources.create({
222
+ name: 'crm-web',
223
+ kind: 'web_app',
224
+ authMode: 'public',
225
+ });
226
+
227
+ await client.resources.deploy(resource.id);
228
+ const analytics = await client.resources.getAnalytics(resource.id);
229
+ ```
230
+
231
+ ### Databases
232
+
233
+ Create Firestore-backed data surfaces and work with collections/documents:
234
+
235
+ ```typescript
236
+ const database = await client.databases.create({
237
+ name: 'crm-data',
238
+ });
239
+
240
+ await client.databases.createCollection(database.id, { name: 'leads' });
241
+ await client.databases.createDocument(database.id, 'leads', {
242
+ data: { company: 'Acme', stage: 'new' },
243
+ });
244
+ ```
245
+
246
+ ### Skills
247
+
248
+ Manage custom ACP skills:
249
+
250
+ ```typescript
251
+ const skills = await client.skills.list();
252
+ console.log(skills.map((skill) => skill.name));
253
+ ```
254
+
212
255
  ### Git
213
256
 
214
- Version control on workspaces:
257
+ Version control on computer workspaces:
215
258
 
216
259
  ```typescript
217
260
  // View uncommitted changes
@@ -27,8 +27,8 @@
27
27
  */
28
28
  import { ApiClientError } from './cloud/ApiClient';
29
29
  import type { ApiClientConfig } from './cloud/ApiClient';
30
- import { EnvironmentsResource, ThreadsResource, AgentsResource, BudgetResource, BillingResource, SchedulesResource, TriggersResource, OrchestrationsResource, GitResource, FilesResource } from './cloud/resources';
31
- import type { HealthCheck, Metrics, Project, Environment, MessageStreamEvent } from './cloud/types';
30
+ import { EnvironmentsResource, ThreadsResource, AgentsResource, ResourcesResource, WebAppsResource, FunctionsResource, AuthResource, AgentRuntimesResource, DatabasesResource, SkillsResource, BudgetResource, BillingResource, SchedulesResource, TriggersResource, OrchestrationsResource, GitResource, FilesResource } from './cloud/resources';
31
+ import type { HealthCheck, Metrics, Project, Environment, MessageStreamEvent, AgentModel } from './cloud/types';
32
32
  export { ApiClientError };
33
33
  export type { ApiClientConfig };
34
34
  /**
@@ -61,10 +61,14 @@ export interface ComputerAgentsClientConfig {
61
61
  */
62
62
  export interface RunOptions {
63
63
  /**
64
- * Environment ID to execute in.
65
- * If not provided, a default environment is created automatically.
64
+ * Computer ID to execute in.
65
+ * The raw API route still uses `environmentId`.
66
66
  */
67
67
  environmentId?: string;
68
+ /**
69
+ * Product-level alias for `environmentId`.
70
+ */
71
+ computerId?: string;
68
72
  /**
69
73
  * Thread ID to continue (optional - creates new thread if not provided)
70
74
  */
@@ -73,7 +77,7 @@ export interface RunOptions {
73
77
  * Agent configuration override
74
78
  */
75
79
  agentConfig?: {
76
- model?: 'claude-opus-4-6' | 'claude-sonnet-4-5' | 'claude-haiku-4-5';
80
+ model?: AgentModel;
77
81
  instructions?: string;
78
82
  reasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
79
83
  };
@@ -118,12 +122,16 @@ export interface RunResult {
118
122
  * resources through typed methods:
119
123
  *
120
124
  * - `threads` - Conversation management with SSE streaming
121
- * - `environments` - Environment configuration and container lifecycle
125
+ * - `environments` / `computers` - Computer configuration and lifecycle
126
+ * - `resources` - Deployable apps, functions, auth modules, and runtimes
127
+ * - `webApps` / `functions` / `auth` / `runtimes` - Product-shaped resource managers
128
+ * - `databases` - Managed database surfaces
129
+ * - `skills` - Custom ACP skills
122
130
  * - `agents` - Agent configuration
123
- * - `files` - File management (via projects resource)
131
+ * - `files` - File management in computer workspaces
124
132
  * - `schedules` - Scheduled task management
125
133
  * - `billing` - Budget and usage tracking
126
- * - `git` - Git operations on workspaces
134
+ * - `git` - Git operations on computers (compatibility helper)
127
135
  *
128
136
  * For simple use cases, use the `run()` method which handles thread
129
137
  * creation and streaming automatically.
@@ -158,16 +166,21 @@ export declare class ComputerAgentsClient {
158
166
  * ```typescript
159
167
  * const env = await client.environments.create({
160
168
  * name: 'production',
169
+ * computeProfile: 'standard',
161
170
  * internetAccess: true
162
171
  * });
163
172
  * ```
164
173
  */
165
174
  readonly environments: EnvironmentsResource;
175
+ /**
176
+ * Product-level alias for `environments`.
177
+ */
178
+ readonly computers: EnvironmentsResource;
166
179
  /**
167
180
  * Agent configuration
168
181
  *
169
- * Create and manage agent configurations with Claude models, instructions, and skills.
170
- * All agents execute via Claude Code CLI in isolated containers.
182
+ * Create and manage agent configurations with built-in or external models,
183
+ * instructions, and enabled skills.
171
184
  *
172
185
  * @example
173
186
  * ```typescript
@@ -179,6 +192,38 @@ export declare class ComputerAgentsClient {
179
192
  * ```
180
193
  */
181
194
  readonly agents: AgentsResource;
195
+ /**
196
+ * Managed resource surfaces such as web apps, functions, auth modules, and agent runtimes.
197
+ */
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;
219
+ /**
220
+ * Managed database surfaces and document operations.
221
+ */
222
+ readonly databases: DatabasesResource;
223
+ /**
224
+ * Custom skill management.
225
+ */
226
+ readonly skills: SkillsResource;
182
227
  /**
183
228
  * File operations
184
229
  *
@@ -313,7 +358,7 @@ export declare class ComputerAgentsClient {
313
358
  * Execute a task with automatic thread management
314
359
  *
315
360
  * This is the simplest way to run an agent task. It handles:
316
- * - Auto-creating a default environment (if environmentId not provided)
361
+ * - Auto-creating a default computer (if no computer/environment ID is provided)
317
362
  * - Creating a thread (if threadId not provided)
318
363
  * - Sending the message with SSE streaming
319
364
  * - Returning the result with thread ID for follow-ups
@@ -342,25 +387,25 @@ export declare class ComputerAgentsClient {
342
387
  * threadId: result.threadId
343
388
  * });
344
389
  *
345
- * // Explicit environment
390
+ * // Explicit computer
346
391
  * const result = await client.run('Deploy', {
347
- * environmentId: 'env_xxx'
392
+ * computerId: 'env_xxx'
348
393
  * });
349
394
  * ```
350
395
  */
351
396
  run(task: string, options?: RunOptions): Promise<RunResult>;
352
397
  /**
353
- * Quick setup with default environment
398
+ * Quick setup with default computer
354
399
  *
355
- * Creates a default environment if none exists, returning both
356
- * the project and environment ready for execution.
400
+ * Creates a default computer if none exists, returning both
401
+ * the project and computer ready for execution.
357
402
  *
358
403
  * Note: You usually don't need to call this directly. `run()` auto-creates
359
404
  * a default environment when `environmentId` is omitted.
360
405
  *
361
406
  * @example
362
407
  * ```typescript
363
- * const { project, environment } = await client.quickSetup({
408
+ * const { project, computer } = await client.quickSetup({
364
409
  * internetAccess: true
365
410
  * });
366
411
  * ```
@@ -368,9 +413,11 @@ export declare class ComputerAgentsClient {
368
413
  quickSetup(options?: {
369
414
  internetAccess?: boolean;
370
415
  environmentName?: string;
416
+ computerName?: string;
371
417
  }): Promise<{
372
418
  project: Project;
373
419
  environment: Environment;
420
+ computer: Environment;
374
421
  }>;
375
422
  /**
376
423
  * Check API health status
@@ -38,12 +38,16 @@ const resources_1 = require("./cloud/resources");
38
38
  * resources through typed methods:
39
39
  *
40
40
  * - `threads` - Conversation management with SSE streaming
41
- * - `environments` - Environment configuration and container lifecycle
41
+ * - `environments` / `computers` - Computer configuration and lifecycle
42
+ * - `resources` - Deployable apps, functions, auth modules, and runtimes
43
+ * - `webApps` / `functions` / `auth` / `runtimes` - Product-shaped resource managers
44
+ * - `databases` - Managed database surfaces
45
+ * - `skills` - Custom ACP skills
42
46
  * - `agents` - Agent configuration
43
- * - `files` - File management (via projects resource)
47
+ * - `files` - File management in computer workspaces
44
48
  * - `schedules` - Scheduled task management
45
49
  * - `billing` - Budget and usage tracking
46
- * - `git` - Git operations on workspaces
50
+ * - `git` - Git operations on computers (compatibility helper)
47
51
  *
48
52
  * For simple use cases, use the `run()` method which handles thread
49
53
  * creation and streaming automatically.
@@ -83,16 +87,21 @@ class ComputerAgentsClient {
83
87
  * ```typescript
84
88
  * const env = await client.environments.create({
85
89
  * name: 'production',
90
+ * computeProfile: 'standard',
86
91
  * internetAccess: true
87
92
  * });
88
93
  * ```
89
94
  */
90
95
  environments;
96
+ /**
97
+ * Product-level alias for `environments`.
98
+ */
99
+ computers;
91
100
  /**
92
101
  * Agent configuration
93
102
  *
94
- * Create and manage agent configurations with Claude models, instructions, and skills.
95
- * All agents execute via Claude Code CLI in isolated containers.
103
+ * Create and manage agent configurations with built-in or external models,
104
+ * instructions, and enabled skills.
96
105
  *
97
106
  * @example
98
107
  * ```typescript
@@ -104,6 +113,38 @@ class ComputerAgentsClient {
104
113
  * ```
105
114
  */
106
115
  agents;
116
+ /**
117
+ * Managed resource surfaces such as web apps, functions, auth modules, and agent runtimes.
118
+ */
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;
140
+ /**
141
+ * Managed database surfaces and document operations.
142
+ */
143
+ databases;
144
+ /**
145
+ * Custom skill management.
146
+ */
147
+ skills;
107
148
  /**
108
149
  * File operations
109
150
  *
@@ -234,12 +275,7 @@ class ComputerAgentsClient {
234
275
  */
235
276
  git;
236
277
  /**
237
- * Run tracking (internal)
238
- * @internal
239
- */
240
- runs;
241
- /**
242
- * Project access (internal - use files for file operations)
278
+ * Project access (internal - use files/resources/databases for data operations)
243
279
  * @internal
244
280
  */
245
281
  projects;
@@ -268,7 +304,16 @@ class ComputerAgentsClient {
268
304
  // Initialize all resource managers
269
305
  this.threads = new resources_1.ThreadsResource(this.api);
270
306
  this.environments = new resources_1.EnvironmentsResource(this.api);
307
+ this.computers = this.environments;
271
308
  this.agents = new resources_1.AgentsResource(this.api);
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;
315
+ this.databases = new resources_1.DatabasesResource(this.api);
316
+ this.skills = new resources_1.SkillsResource(this.api);
272
317
  this.files = new resources_1.FilesResource(this.api);
273
318
  this.schedules = new resources_1.SchedulesResource(this.api);
274
319
  this.triggers = new resources_1.TriggersResource(this.api);
@@ -276,7 +321,6 @@ class ComputerAgentsClient {
276
321
  this.budget = new resources_1.BudgetResource(this.api);
277
322
  this.billing = new resources_1.BillingResource(this.api);
278
323
  this.git = new resources_1.GitResource(this.api);
279
- this.runs = new resources_1.RunsResource(this.api);
280
324
  this.projects = new resources_1.ProjectsResource(this.api);
281
325
  }
282
326
  // =========================================================================
@@ -286,7 +330,7 @@ class ComputerAgentsClient {
286
330
  * Execute a task with automatic thread management
287
331
  *
288
332
  * This is the simplest way to run an agent task. It handles:
289
- * - Auto-creating a default environment (if environmentId not provided)
333
+ * - Auto-creating a default computer (if no computer/environment ID is provided)
290
334
  * - Creating a thread (if threadId not provided)
291
335
  * - Sending the message with SSE streaming
292
336
  * - Returning the result with thread ID for follow-ups
@@ -315,15 +359,15 @@ class ComputerAgentsClient {
315
359
  * threadId: result.threadId
316
360
  * });
317
361
  *
318
- * // Explicit environment
362
+ * // Explicit computer
319
363
  * const result = await client.run('Deploy', {
320
- * environmentId: 'env_xxx'
364
+ * computerId: 'env_xxx'
321
365
  * });
322
366
  * ```
323
367
  */
324
368
  async run(task, options = {}) {
325
369
  // Auto-resolve environment if not provided
326
- const environmentId = options.environmentId || await this._ensureDefaultEnvironment();
370
+ const environmentId = options.computerId || options.environmentId || await this._ensureDefaultEnvironment();
327
371
  // Create or reuse thread
328
372
  let threadId = options.threadId;
329
373
  if (!threadId) {
@@ -366,17 +410,17 @@ class ComputerAgentsClient {
366
410
  return this._defaultEnvironmentId;
367
411
  }
368
412
  /**
369
- * Quick setup with default environment
413
+ * Quick setup with default computer
370
414
  *
371
- * Creates a default environment if none exists, returning both
372
- * the project and environment ready for execution.
415
+ * Creates a default computer if none exists, returning both
416
+ * the project and computer ready for execution.
373
417
  *
374
418
  * Note: You usually don't need to call this directly. `run()` auto-creates
375
419
  * a default environment when `environmentId` is omitted.
376
420
  *
377
421
  * @example
378
422
  * ```typescript
379
- * const { project, environment } = await client.quickSetup({
423
+ * const { project, computer } = await client.quickSetup({
380
424
  * internetAccess: true
381
425
  * });
382
426
  * ```
@@ -390,12 +434,12 @@ class ComputerAgentsClient {
390
434
  // Create default environment if none exists
391
435
  if (!environment) {
392
436
  environment = await this.environments.create({
393
- name: options.environmentName || 'default',
437
+ name: options.computerName || options.environmentName || 'default',
394
438
  internetAccess: options.internetAccess ?? true,
395
439
  isDefault: true,
396
440
  });
397
441
  }
398
- return { project, environment };
442
+ return { project, environment, computer: environment };
399
443
  }
400
444
  // =========================================================================
401
445
  // Health & Monitoring
@@ -1 +1 @@
1
- {"version":3,"file":"ComputerAgentsClient.js","sourceRoot":"","sources":["../src/ComputerAgentsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;AAEH,iDAA8D;AAyBrD,+FAzBW,0BAAc,OAyBX;AAvBvB,iDAa2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AAS,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,YAAY,IAAI,OAAO,CAAC,eAAe,IAAI,SAAS;gBAClE,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,IAAI;gBAC9C,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IACzD,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;AA9cD,oDA8cC;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 { CloudAgent, CreateAgentParams, UpdateAgentParams } from '../types';
11
+ import type { AgentAnalyticsResponse, AgentModelCatalogEntry, CloudAgent, CreateAgentParams, UpdateAgentParams } from '../types';
12
12
  export declare class AgentsResource {
13
13
  private readonly client;
14
14
  constructor(client: ApiClient);
@@ -24,6 +24,13 @@ export declare class AgentsResource {
24
24
  * Project is determined automatically from the API key.
25
25
  */
26
26
  list(): Promise<CloudAgent[]>;
27
+ /**
28
+ * List managed and external model entries available in the current workspace.
29
+ */
30
+ listModels(): Promise<{
31
+ tier?: string;
32
+ models: AgentModelCatalogEntry[];
33
+ }>;
27
34
  /**
28
35
  * Get an agent by ID
29
36
  */
@@ -32,6 +39,10 @@ export declare class AgentsResource {
32
39
  * Update an agent
33
40
  */
34
41
  update(agentId: string, params: UpdateAgentParams): Promise<CloudAgent>;
42
+ /**
43
+ * Summarize recent activity for an agent or team.
44
+ */
45
+ getAnalytics(agentId: string): Promise<AgentAnalyticsResponse>;
35
46
  /**
36
47
  * Delete an agent
37
48
  */
@@ -33,6 +33,16 @@ class AgentsResource {
33
33
  const response = await this.client.get(`/agents`);
34
34
  return response.data;
35
35
  }
36
+ /**
37
+ * List managed and external model entries available in the current workspace.
38
+ */
39
+ async listModels() {
40
+ const response = await this.client.get(`/agents/models`);
41
+ return {
42
+ tier: response.tier,
43
+ models: response.models,
44
+ };
45
+ }
36
46
  /**
37
47
  * Get an agent by ID
38
48
  */
@@ -47,6 +57,12 @@ class AgentsResource {
47
57
  const response = await this.client.patch(`/agents/${agentId}`, params);
48
58
  return response.agent;
49
59
  }
60
+ /**
61
+ * Summarize recent activity for an agent or team.
62
+ */
63
+ async getAnalytics(agentId) {
64
+ return this.client.get(`/agents/${agentId}/analytics`);
65
+ }
50
66
  /**
51
67
  * Delete an agent
52
68
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AgentsResource.js","sourceRoot":"","sources":["../../../src/cloud/resources/AgentsResource.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AASH,MAAa,cAAc;IACI;IAA7B,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAElD;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAAyB;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACrC,SAAS,EACT,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI;QACR,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,SAAS,CACV,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,WAAW,OAAO,EAAE,CACrB,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAe,EACf,MAAyB;QAEzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CACtC,WAAW,OAAO,EAAE,EACpB,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,OAAgB,KAAK;QACjD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CACtB,WAAW,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAChD,CAAC;IACJ,CAAC;CACF;AA5DD,wCA4DC"}
1
+ {"version":3,"file":"AgentsResource.js","sourceRoot":"","sources":["../../../src/cloud/resources/AgentsResource.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAWH,MAAa,cAAc;IACI;IAA7B,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAElD;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAAyB;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACrC,SAAS,EACT,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI;QACR,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,SAAS,CACV,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU;QAId,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsD,gBAAgB,CAAC,CAAC;QAC9G,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;SACxB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,WAAW,OAAO,EAAE,CACrB,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAe,EACf,MAAyB;QAEzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CACtC,WAAW,OAAO,EAAE,EACpB,MAAM,CACP,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,OAAe;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,OAAO,YAAY,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,OAAgB,KAAK;QACjD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CACtB,WAAW,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAChD,CAAC;IACJ,CAAC;CACF;AAjFD,wCAiFC"}
@@ -0,0 +1,36 @@
1
+ import type { ApiClient } from '../ApiClient';
2
+ import type { CreateDatabaseParams, Database, DatabaseCollection, DatabaseDocument, UpdateDatabaseParams } from '../types';
3
+ export interface ListDatabasesParams {
4
+ projectId?: string;
5
+ }
6
+ export interface CreateDatabaseCollectionParams {
7
+ name: string;
8
+ description?: string;
9
+ }
10
+ export interface CreateDatabaseDocumentParams {
11
+ id?: string;
12
+ data: Record<string, unknown>;
13
+ }
14
+ export interface UpdateDatabaseDocumentParams {
15
+ data: Record<string, unknown>;
16
+ }
17
+ export declare class DatabasesResource {
18
+ private readonly client;
19
+ constructor(client: ApiClient);
20
+ create(params: CreateDatabaseParams): Promise<Database>;
21
+ list(params?: ListDatabasesParams): Promise<Database[]>;
22
+ get(databaseId: string): Promise<Database>;
23
+ update(databaseId: string, params: UpdateDatabaseParams): Promise<Database>;
24
+ delete(databaseId: string): Promise<boolean>;
25
+ getAnalytics(databaseId: string): Promise<Record<string, unknown>>;
26
+ listCollections(databaseId: string): Promise<DatabaseCollection[]>;
27
+ createCollection(databaseId: string, params: CreateDatabaseCollectionParams): Promise<DatabaseCollection>;
28
+ deleteCollection(databaseId: string, collectionId: string): Promise<boolean>;
29
+ listDocuments(databaseId: string, collectionId: string, params?: {
30
+ limit?: number;
31
+ }): Promise<DatabaseDocument[]>;
32
+ createDocument(databaseId: string, collectionId: string, params: CreateDatabaseDocumentParams): Promise<DatabaseDocument>;
33
+ getDocument(databaseId: string, collectionId: string, documentId: string): Promise<DatabaseDocument>;
34
+ updateDocument(databaseId: string, collectionId: string, documentId: string, params: UpdateDatabaseDocumentParams): Promise<DatabaseDocument>;
35
+ deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<boolean>;
36
+ }