@agent-commons/sdk 0.3.0 → 0.5.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/LICENSE +21 -0
- package/README.md +230 -0
- package/dist/index.cjs +854 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1307 -106
- package/dist/index.d.ts +1307 -106
- package/dist/index.mjs +854 -58
- package/dist/index.mjs.map +1 -1
- package/package.json +27 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ModelProvider =
|
|
1
|
+
type ModelProvider = "openai" | "anthropic" | "google" | "mistral" | "groq" | "ollama" | "openrouter" | "xai" | "custom";
|
|
2
2
|
interface ModelConfig {
|
|
3
3
|
provider: ModelProvider;
|
|
4
4
|
modelId: string;
|
|
@@ -7,8 +7,28 @@ interface ModelConfig {
|
|
|
7
7
|
temperature?: number;
|
|
8
8
|
maxTokens?: number;
|
|
9
9
|
topP?: number;
|
|
10
|
-
reasoningEffort?:
|
|
11
|
-
verbosity?:
|
|
10
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
11
|
+
verbosity?: "low" | "medium" | "high";
|
|
12
|
+
}
|
|
13
|
+
type AgentRuntimeType = "native" | "openclaw" | "hermes" | "custom";
|
|
14
|
+
type AgentRuntimeStatus = "disabled" | "provisioning" | "starting" | "ready" | "degraded" | "stopped" | "failed";
|
|
15
|
+
interface AgentRuntimeConfig {
|
|
16
|
+
deploymentMode?: "managed" | "external";
|
|
17
|
+
channelPolicy?: "pairing" | "allowlist" | "open" | "disabled";
|
|
18
|
+
enabledPlugins?: string[];
|
|
19
|
+
enabledToolsets?: string[];
|
|
20
|
+
memoryMode?: "native" | "platform" | "hybrid";
|
|
21
|
+
metadata?: Record<string, string | number | boolean>;
|
|
22
|
+
}
|
|
23
|
+
interface AgentRuntime {
|
|
24
|
+
runtimeType: AgentRuntimeType;
|
|
25
|
+
version?: string | null;
|
|
26
|
+
status: AgentRuntimeStatus;
|
|
27
|
+
config: AgentRuntimeConfig;
|
|
28
|
+
capabilities: Record<string, boolean>;
|
|
29
|
+
updatedAt?: string | null;
|
|
30
|
+
managed: boolean;
|
|
31
|
+
computer?: AgentComputer | null;
|
|
12
32
|
}
|
|
13
33
|
interface Agent {
|
|
14
34
|
agentId: string;
|
|
@@ -31,36 +51,179 @@ interface Agent {
|
|
|
31
51
|
isLiaison?: boolean;
|
|
32
52
|
externalUrl?: string;
|
|
33
53
|
createdAt: string;
|
|
54
|
+
isDefault?: boolean;
|
|
55
|
+
isSystemManaged?: boolean;
|
|
56
|
+
copilotAccessMode?: "full" | "scoped" | "confirm" | null;
|
|
57
|
+
copilotScopes?: string[];
|
|
58
|
+
runtimeType?: AgentRuntimeType;
|
|
59
|
+
runtimeVersion?: string | null;
|
|
60
|
+
runtimeStatus?: AgentRuntimeStatus;
|
|
61
|
+
runtimeConfig?: AgentRuntimeConfig;
|
|
62
|
+
runtimeCapabilities?: Record<string, boolean>;
|
|
63
|
+
}
|
|
64
|
+
interface CopilotChange {
|
|
65
|
+
changeId: string;
|
|
66
|
+
agentId: string;
|
|
67
|
+
ownerUserId: string;
|
|
68
|
+
scope: string;
|
|
69
|
+
resourceType: string;
|
|
70
|
+
resourceId?: string | null;
|
|
71
|
+
action: "create" | "update" | "delete";
|
|
72
|
+
status: "pending" | "applied" | "rejected" | "reverted";
|
|
73
|
+
title: string;
|
|
74
|
+
description?: string | null;
|
|
75
|
+
before?: unknown;
|
|
76
|
+
after?: unknown;
|
|
77
|
+
diff?: unknown;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
reviewedAt?: string | null;
|
|
80
|
+
appliedAt?: string | null;
|
|
81
|
+
}
|
|
82
|
+
/** Agent computers are durable. Runtime pods may be replaced, but this identity persists. */
|
|
83
|
+
type AgentComputerLifecycle = "persistent";
|
|
84
|
+
type ComputerPersistence = AgentComputerLifecycle;
|
|
85
|
+
type ComputerLifecycle = AgentComputerLifecycle;
|
|
86
|
+
type ComputerResourceProfile = "starter" | "standard" | "performance" | "gpu";
|
|
87
|
+
type ComputerResourceMode = "fixed" | "elastic";
|
|
88
|
+
type AgentComputerResourceProfile = ComputerResourceProfile;
|
|
89
|
+
type AgentComputerResourceMode = ComputerResourceMode;
|
|
90
|
+
/**
|
|
91
|
+
* Common accelerator names. Providers may expose additional values without
|
|
92
|
+
* requiring an SDK release, so string extensions remain valid.
|
|
93
|
+
*/
|
|
94
|
+
type ComputerGpuType = "nvidia-t4" | "nvidia-l4" | "nvidia-a10" | "nvidia-a100" | "nvidia-h100" | "nvidia-h200" | "nvidia-b200" | (string & {});
|
|
95
|
+
interface ComputerGpu {
|
|
96
|
+
count: number;
|
|
97
|
+
type?: ComputerGpuType;
|
|
98
|
+
}
|
|
99
|
+
type AgentComputerGpuType = ComputerGpuType;
|
|
100
|
+
type AgentComputerGpu = ComputerGpu;
|
|
101
|
+
/** Public, provider-neutral resource units. */
|
|
102
|
+
interface ComputerResources {
|
|
103
|
+
vcpu: number;
|
|
104
|
+
memoryGiB: number;
|
|
105
|
+
storageGiB: number;
|
|
106
|
+
gpu?: ComputerGpu | null;
|
|
107
|
+
}
|
|
108
|
+
type AgentComputerResources = ComputerResources;
|
|
109
|
+
interface ComputerResourceUpdate {
|
|
110
|
+
vcpu?: number;
|
|
111
|
+
memoryGiB?: number;
|
|
112
|
+
storageGiB?: number;
|
|
113
|
+
gpu?: ComputerGpu | null;
|
|
114
|
+
}
|
|
115
|
+
type AgentComputerDesiredState = "running" | "sleeping" | "disabled";
|
|
116
|
+
type AgentComputerStatus = "disabled" | "provisioning" | "starting" | "running" | "idle" | "sleeping" | "resizing" | "restarting" | "stopping" | "error" | "unavailable" | "stopped" | "terminated" | "failed";
|
|
117
|
+
type ComputerNetworkAccess = "standard" | "restricted" | "disabled" | (string & {});
|
|
118
|
+
/**
|
|
119
|
+
* Mutable computer settings only. Server-owned identity, provider, billing,
|
|
120
|
+
* timestamps, and runtime fields intentionally cannot be submitted here.
|
|
121
|
+
*/
|
|
122
|
+
interface ComputerConfigUpdate {
|
|
123
|
+
enabled?: boolean;
|
|
124
|
+
autoWake?: boolean;
|
|
125
|
+
allowAgentUse?: boolean;
|
|
126
|
+
allowBrowser?: boolean;
|
|
127
|
+
allowTerminal?: boolean;
|
|
128
|
+
allowFilesystem?: boolean;
|
|
129
|
+
networkAccess?: ComputerNetworkAccess;
|
|
130
|
+
resourceProfile?: ComputerResourceProfile;
|
|
131
|
+
resourceMode?: ComputerResourceMode;
|
|
132
|
+
resources?: ComputerResourceUpdate;
|
|
34
133
|
}
|
|
35
|
-
type AgentComputerLifecycle = 'persistent' | 'ephemeral';
|
|
36
|
-
type AgentComputerStatus = 'provisioning' | 'starting' | 'running' | 'idle' | 'stopping' | 'stopped' | 'terminated' | 'failed' | 'error' | 'unavailable';
|
|
37
134
|
interface AgentComputerConfig {
|
|
38
135
|
configId: string;
|
|
39
136
|
agentId: string;
|
|
40
137
|
enabled: boolean;
|
|
41
|
-
|
|
138
|
+
/** @deprecated Computers are always persistent. */
|
|
139
|
+
defaultMode: AgentComputerLifecycle | "ephemeral";
|
|
140
|
+
/** @deprecated Use autoWake. */
|
|
42
141
|
autoStart: boolean;
|
|
142
|
+
/** @deprecated Use allowAgentUse. */
|
|
43
143
|
allowAgentStart: boolean;
|
|
144
|
+
/** @deprecated The singleton computer is selected implicitly. */
|
|
44
145
|
allowUserSelect: boolean;
|
|
45
146
|
allowBrowser: boolean;
|
|
46
147
|
allowTerminal: boolean;
|
|
47
148
|
allowFilesystem: boolean;
|
|
48
|
-
networkAccess:
|
|
149
|
+
networkAccess: ComputerNetworkAccess;
|
|
150
|
+
/** @deprecated The singleton limit is always one. */
|
|
49
151
|
maxPersistentComputers: number;
|
|
152
|
+
/** @deprecated Ephemeral computers are no longer supported. */
|
|
50
153
|
maxEphemeralComputers: number;
|
|
154
|
+
/** @deprecated The singleton limit is always one. */
|
|
51
155
|
maxConcurrentComputers: number;
|
|
156
|
+
/** @deprecated Use the service's sleep policy. */
|
|
52
157
|
idleTtlMinutes: number;
|
|
158
|
+
/** @deprecated Persistent computers are not scoped to chat sessions. */
|
|
53
159
|
sessionTtlMinutes: number;
|
|
54
160
|
image?: string | null;
|
|
161
|
+
/** @deprecated Provider quantities are represented by resources. */
|
|
55
162
|
cpuLimit?: string | null;
|
|
163
|
+
/** @deprecated Provider quantities are represented by resources. */
|
|
56
164
|
memoryLimit?: string | null;
|
|
165
|
+
/** @deprecated Provider quantities are represented by resources. */
|
|
57
166
|
storageLimit?: string | null;
|
|
58
167
|
region?: string | null;
|
|
59
168
|
provider: string;
|
|
60
169
|
metadata?: Record<string, any> | null;
|
|
61
170
|
createdAt: string;
|
|
62
171
|
updatedAt: string;
|
|
172
|
+
persistence?: ComputerPersistence;
|
|
173
|
+
autoWake?: boolean;
|
|
174
|
+
allowAgentUse?: boolean;
|
|
175
|
+
resourceProfile?: ComputerResourceProfile;
|
|
176
|
+
resourceMode?: ComputerResourceMode;
|
|
177
|
+
resources?: ComputerResources;
|
|
178
|
+
cpuRequest?: string | null;
|
|
179
|
+
memoryRequest?: string | null;
|
|
180
|
+
gpuType?: ComputerGpuType | null;
|
|
181
|
+
gpuCount?: number;
|
|
182
|
+
billingMode?: "tier" | "usage" | (string & {});
|
|
183
|
+
}
|
|
184
|
+
interface AgentComputerBrowser {
|
|
185
|
+
status?: "off" | "starting" | "on" | "error";
|
|
186
|
+
url?: string | null;
|
|
187
|
+
title?: string | null;
|
|
188
|
+
screenshot?: string | null;
|
|
189
|
+
lastAction?: string | null;
|
|
190
|
+
error?: string | null;
|
|
191
|
+
updatedAt?: string | null;
|
|
192
|
+
}
|
|
193
|
+
interface AgentComputerTerminal {
|
|
194
|
+
lastCommand?: string | null;
|
|
195
|
+
lastExitCode?: number | null;
|
|
196
|
+
lastOutput?: string | null;
|
|
197
|
+
updatedAt?: string | null;
|
|
198
|
+
}
|
|
199
|
+
/** The one persistent cloud computer assigned to an agent. */
|
|
200
|
+
interface AgentComputer {
|
|
201
|
+
computerId: string;
|
|
202
|
+
agentId: string;
|
|
203
|
+
enabled: boolean;
|
|
204
|
+
persistence: ComputerPersistence;
|
|
205
|
+
desiredState: AgentComputerDesiredState;
|
|
206
|
+
status: AgentComputerStatus;
|
|
207
|
+
resourceProfile: ComputerResourceProfile;
|
|
208
|
+
resourceMode: ComputerResourceMode;
|
|
209
|
+
resources: ComputerResources;
|
|
210
|
+
provider?: string;
|
|
211
|
+
cloudProvider?: string | null;
|
|
212
|
+
region?: string | null;
|
|
213
|
+
runtimeId?: string | null;
|
|
214
|
+
runtimeGeneration?: number;
|
|
215
|
+
namespaceId?: string | null;
|
|
216
|
+
workspaceRoot?: string | null;
|
|
217
|
+
browser?: AgentComputerBrowser | null;
|
|
218
|
+
terminal?: AgentComputerTerminal | null;
|
|
219
|
+
lastActivityAt?: string | null;
|
|
220
|
+
startedAt?: string | null;
|
|
221
|
+
sleptAt?: string | null;
|
|
222
|
+
errorMessage?: string | null;
|
|
223
|
+
createdAt: string;
|
|
224
|
+
updatedAt: string;
|
|
63
225
|
}
|
|
226
|
+
/** @deprecated Use AgentComputer. */
|
|
64
227
|
interface AgentComputerInstance {
|
|
65
228
|
computerId: string;
|
|
66
229
|
agentId: string;
|
|
@@ -68,7 +231,8 @@ interface AgentComputerInstance {
|
|
|
68
231
|
ownerUserId?: string | null;
|
|
69
232
|
workspaceId?: string | null;
|
|
70
233
|
name: string;
|
|
71
|
-
|
|
234
|
+
/** @deprecated Ephemeral values may be read from historical records only. */
|
|
235
|
+
lifecycle: AgentComputerLifecycle | "ephemeral";
|
|
72
236
|
status: AgentComputerStatus;
|
|
73
237
|
provider: string;
|
|
74
238
|
cloudProvider?: string | null;
|
|
@@ -81,21 +245,8 @@ interface AgentComputerInstance {
|
|
|
81
245
|
storageLimit?: string | null;
|
|
82
246
|
workspaceRoot?: string | null;
|
|
83
247
|
workspaceSnapshot?: string | null;
|
|
84
|
-
browser?:
|
|
85
|
-
|
|
86
|
-
url?: string | null;
|
|
87
|
-
title?: string | null;
|
|
88
|
-
screenshot?: string | null;
|
|
89
|
-
lastAction?: string | null;
|
|
90
|
-
error?: string | null;
|
|
91
|
-
updatedAt?: string | null;
|
|
92
|
-
} | null;
|
|
93
|
-
terminal?: {
|
|
94
|
-
lastCommand?: string | null;
|
|
95
|
-
lastExitCode?: number | null;
|
|
96
|
-
lastOutput?: string | null;
|
|
97
|
-
updatedAt?: string | null;
|
|
98
|
-
} | null;
|
|
248
|
+
browser?: AgentComputerBrowser | null;
|
|
249
|
+
terminal?: AgentComputerTerminal | null;
|
|
99
250
|
metadata?: Record<string, any> | null;
|
|
100
251
|
lastActivityAt?: string | null;
|
|
101
252
|
expiresAt?: string | null;
|
|
@@ -104,6 +255,42 @@ interface AgentComputerInstance {
|
|
|
104
255
|
errorMessage?: string | null;
|
|
105
256
|
createdAt: string;
|
|
106
257
|
updatedAt: string;
|
|
258
|
+
canonical?: boolean;
|
|
259
|
+
enabled?: boolean;
|
|
260
|
+
persistence?: ComputerPersistence;
|
|
261
|
+
desiredState?: AgentComputerDesiredState;
|
|
262
|
+
resourceProfile?: ComputerResourceProfile;
|
|
263
|
+
resourceMode?: ComputerResourceMode;
|
|
264
|
+
resources?: ComputerResources;
|
|
265
|
+
cpuRequest?: string | null;
|
|
266
|
+
memoryRequest?: string | null;
|
|
267
|
+
gpuType?: ComputerGpuType | null;
|
|
268
|
+
gpuCount?: number;
|
|
269
|
+
runtimeId?: string | null;
|
|
270
|
+
runtimeGeneration?: number;
|
|
271
|
+
persistentVolumeId?: string | null;
|
|
272
|
+
computeTenantId?: string | null;
|
|
273
|
+
computeCellId?: string | null;
|
|
274
|
+
}
|
|
275
|
+
interface ComputerActionParams {
|
|
276
|
+
reason?: string;
|
|
277
|
+
}
|
|
278
|
+
interface ComputerResizeParams {
|
|
279
|
+
resourceProfile?: ComputerResourceProfile;
|
|
280
|
+
resourceMode?: ComputerResourceMode;
|
|
281
|
+
resources?: ComputerResourceUpdate;
|
|
282
|
+
}
|
|
283
|
+
interface ComputerCommandParams {
|
|
284
|
+
command: string;
|
|
285
|
+
cwd?: string;
|
|
286
|
+
timeoutSeconds?: number;
|
|
287
|
+
}
|
|
288
|
+
interface ComputerFile {
|
|
289
|
+
path: string;
|
|
290
|
+
content: string;
|
|
291
|
+
}
|
|
292
|
+
interface ComputerBrowserOpenParams {
|
|
293
|
+
url: string;
|
|
107
294
|
}
|
|
108
295
|
interface AgentComputerEvent {
|
|
109
296
|
eventId: string;
|
|
@@ -136,6 +323,9 @@ interface CreateAgentParams {
|
|
|
136
323
|
topP?: number;
|
|
137
324
|
commonTools?: string[];
|
|
138
325
|
avatar?: string;
|
|
326
|
+
runtimeType?: AgentRuntimeType;
|
|
327
|
+
runtimeVersion?: string;
|
|
328
|
+
runtimeConfig?: AgentRuntimeConfig;
|
|
139
329
|
}
|
|
140
330
|
interface Session {
|
|
141
331
|
sessionId: string;
|
|
@@ -147,9 +337,9 @@ interface Session {
|
|
|
147
337
|
};
|
|
148
338
|
createdAt: string;
|
|
149
339
|
/** 'cli' | 'web' — origin of the session, used for filtering in the UI */
|
|
150
|
-
source?:
|
|
340
|
+
source?: "cli" | "web";
|
|
151
341
|
/** Same as source; returned from the backend column `initiator_type` */
|
|
152
|
-
initiatorType?:
|
|
342
|
+
initiatorType?: "cli" | "web";
|
|
153
343
|
}
|
|
154
344
|
interface RunParams {
|
|
155
345
|
agentId: string;
|
|
@@ -158,8 +348,10 @@ interface RunParams {
|
|
|
158
348
|
initiatorId?: string;
|
|
159
349
|
computerRequest?: {
|
|
160
350
|
enabled: boolean;
|
|
351
|
+
/** @deprecated The agent's singleton computer is selected implicitly. */
|
|
161
352
|
computerIds?: string[];
|
|
162
|
-
|
|
353
|
+
/** @deprecated Computers are always persistent; this value is ignored. */
|
|
354
|
+
lifecycle?: AgentComputerLifecycle | "ephemeral";
|
|
163
355
|
};
|
|
164
356
|
/** Uploaded file references. Raw file bytes must be uploaded separately. */
|
|
165
357
|
attachments?: Array<{
|
|
@@ -175,12 +367,12 @@ interface RunParams {
|
|
|
175
367
|
}>;
|
|
176
368
|
}
|
|
177
369
|
interface ChatMessage {
|
|
178
|
-
role:
|
|
370
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
179
371
|
content: string | Array<{
|
|
180
|
-
type:
|
|
372
|
+
type: "text";
|
|
181
373
|
text: string;
|
|
182
374
|
} | {
|
|
183
|
-
type:
|
|
375
|
+
type: "image_url";
|
|
184
376
|
image_url: {
|
|
185
377
|
url: string;
|
|
186
378
|
};
|
|
@@ -188,18 +380,18 @@ interface ChatMessage {
|
|
|
188
380
|
tool_call_id?: string;
|
|
189
381
|
name?: string;
|
|
190
382
|
}
|
|
191
|
-
type StreamEventType =
|
|
383
|
+
type StreamEventType = "token" | "tool" | "toolProgress" | "toolStart" | "toolEnd" | "agent_step" | "run_started" | "final" | "completed" | "failed" | "cancelled" | "status" | "keepalive" | "cli_tool_request" | "error";
|
|
192
384
|
interface StreamEvent {
|
|
193
385
|
type: StreamEventType;
|
|
194
386
|
/** Identifies the run; pass to POST /v1/agents/runs/:runId/stream to resume a dropped stream. */
|
|
195
387
|
runId?: string;
|
|
196
388
|
/** Monotonic per-run sequence number; resume with `after: <last seen seq>` to avoid duplicates. */
|
|
197
389
|
seq?: number;
|
|
198
|
-
phase?:
|
|
390
|
+
phase?: "commentary" | "final_answer" | string;
|
|
199
391
|
role?: string;
|
|
200
392
|
content?: string;
|
|
201
393
|
stage?: string;
|
|
202
|
-
status?:
|
|
394
|
+
status?: "queued" | "running" | "completed" | "failed" | string;
|
|
203
395
|
name?: string;
|
|
204
396
|
toolName?: string;
|
|
205
397
|
tool?: string;
|
|
@@ -221,7 +413,7 @@ interface Workflow {
|
|
|
221
413
|
description?: string;
|
|
222
414
|
definition: WorkflowDefinition;
|
|
223
415
|
ownerId: string;
|
|
224
|
-
ownerType:
|
|
416
|
+
ownerType: "user" | "agent";
|
|
225
417
|
isPublic?: boolean;
|
|
226
418
|
category?: string;
|
|
227
419
|
tags?: string[];
|
|
@@ -234,11 +426,16 @@ interface WorkflowDefinition {
|
|
|
234
426
|
edges: WorkflowEdge[];
|
|
235
427
|
outputMapping?: Record<string, string>;
|
|
236
428
|
}
|
|
237
|
-
type WorkflowNodeType =
|
|
429
|
+
type WorkflowNodeType = "tool" | "input" | "output" | "condition" | "transform" | "loop" | "agent_processor" | "workflow" | "human_approval";
|
|
238
430
|
interface WorkflowNode {
|
|
239
431
|
id: string;
|
|
240
432
|
type: WorkflowNodeType | string;
|
|
241
433
|
toolId?: string;
|
|
434
|
+
toolName?: string;
|
|
435
|
+
agentId?: string;
|
|
436
|
+
agentAvatar?: string;
|
|
437
|
+
workflowId?: string;
|
|
438
|
+
label?: string;
|
|
242
439
|
position?: {
|
|
243
440
|
x: number;
|
|
244
441
|
y: number;
|
|
@@ -253,15 +450,22 @@ interface WorkflowEdge {
|
|
|
253
450
|
sourceHandle?: string;
|
|
254
451
|
targetHandle?: string;
|
|
255
452
|
mapping?: Record<string, string>;
|
|
453
|
+
/** Runtime target types used for dynamic (`any`) values and safe coercion. */
|
|
454
|
+
targetTypes?: Record<string, string>;
|
|
455
|
+
mappingMode?: "exact" | "dynamic" | "coerce";
|
|
256
456
|
}
|
|
257
457
|
interface WorkflowExecution {
|
|
258
458
|
executionId: string;
|
|
259
459
|
workflowId: string;
|
|
260
|
-
status:
|
|
460
|
+
status: "running" | "completed" | "failed" | "cancelled" | "awaiting_approval";
|
|
261
461
|
startedAt?: string;
|
|
262
462
|
completedAt?: string;
|
|
263
463
|
outputData?: any;
|
|
464
|
+
/** Alias returned by the immediate execute/status REST response. */
|
|
465
|
+
result?: any;
|
|
264
466
|
nodeResults?: Record<string, any>;
|
|
467
|
+
/** Alias returned by the immediate execute/status REST response. */
|
|
468
|
+
stepResults?: Record<string, any>;
|
|
265
469
|
errorMessage?: string;
|
|
266
470
|
currentNode?: string;
|
|
267
471
|
/** Set when status is 'awaiting_approval' */
|
|
@@ -274,8 +478,8 @@ interface Task {
|
|
|
274
478
|
sessionId: string;
|
|
275
479
|
title: string;
|
|
276
480
|
description?: string;
|
|
277
|
-
status:
|
|
278
|
-
executionMode:
|
|
481
|
+
status: "pending" | "started" | "running" | "completed" | "failed" | "cancelled";
|
|
482
|
+
executionMode: "single" | "workflow" | "sequential";
|
|
279
483
|
workflowId?: string;
|
|
280
484
|
cronExpression?: string;
|
|
281
485
|
isRecurring?: boolean;
|
|
@@ -294,7 +498,7 @@ interface Task {
|
|
|
294
498
|
summary?: string;
|
|
295
499
|
errorMessage?: string;
|
|
296
500
|
createdBy: string;
|
|
297
|
-
createdByType:
|
|
501
|
+
createdByType: "user" | "agent";
|
|
298
502
|
createdAt: string;
|
|
299
503
|
updatedAt?: string;
|
|
300
504
|
}
|
|
@@ -303,7 +507,7 @@ interface CreateTaskParams {
|
|
|
303
507
|
sessionId: string;
|
|
304
508
|
title: string;
|
|
305
509
|
description?: string;
|
|
306
|
-
executionMode?:
|
|
510
|
+
executionMode?: "single" | "workflow" | "sequential";
|
|
307
511
|
workflowId?: string;
|
|
308
512
|
workflowInputs?: Record<string, any>;
|
|
309
513
|
cronExpression?: string;
|
|
@@ -311,13 +515,13 @@ interface CreateTaskParams {
|
|
|
311
515
|
isRecurring?: boolean;
|
|
312
516
|
dependsOn?: string[];
|
|
313
517
|
tools?: string[];
|
|
314
|
-
toolConstraintType?:
|
|
518
|
+
toolConstraintType?: "hard" | "soft" | "none";
|
|
315
519
|
toolInstructions?: string;
|
|
316
520
|
priority?: number;
|
|
317
521
|
/** Max execution time in milliseconds for workflow tasks */
|
|
318
522
|
timeoutMs?: number;
|
|
319
523
|
createdBy: string;
|
|
320
|
-
createdByType:
|
|
524
|
+
createdByType: "user" | "agent";
|
|
321
525
|
}
|
|
322
526
|
interface Tool {
|
|
323
527
|
toolId: string;
|
|
@@ -338,15 +542,15 @@ interface CreateToolParams {
|
|
|
338
542
|
apiSpec?: {
|
|
339
543
|
baseUrl: string;
|
|
340
544
|
path: string;
|
|
341
|
-
method:
|
|
545
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | string;
|
|
342
546
|
headers?: Record<string, string>;
|
|
343
547
|
queryParams?: Record<string, string>;
|
|
344
548
|
bodyTemplate?: any;
|
|
345
|
-
authType?:
|
|
549
|
+
authType?: "none" | "bearer" | "api-key" | "basic" | "oauth2" | string;
|
|
346
550
|
authKeyName?: string;
|
|
347
551
|
oauthProviderKey?: string;
|
|
348
552
|
oauthScopes?: string[];
|
|
349
|
-
oauthTokenLocation?:
|
|
553
|
+
oauthTokenLocation?: "header" | "query" | "body";
|
|
350
554
|
oauthTokenKey?: string;
|
|
351
555
|
oauthTokenPrefix?: string;
|
|
352
556
|
};
|
|
@@ -355,8 +559,8 @@ interface CreateToolParams {
|
|
|
355
559
|
inputSchema?: any;
|
|
356
560
|
outputSchema?: any;
|
|
357
561
|
owner?: string;
|
|
358
|
-
ownerType?:
|
|
359
|
-
visibility?:
|
|
562
|
+
ownerType?: "user" | "agent";
|
|
563
|
+
visibility?: "private" | "public" | "platform";
|
|
360
564
|
tags?: string[];
|
|
361
565
|
version?: string;
|
|
362
566
|
rateLimitPerMinute?: number;
|
|
@@ -366,7 +570,7 @@ interface ToolKey {
|
|
|
366
570
|
keyId: string;
|
|
367
571
|
toolId?: string;
|
|
368
572
|
ownerId: string;
|
|
369
|
-
ownerType:
|
|
573
|
+
ownerType: "user" | "agent";
|
|
370
574
|
keyName: string;
|
|
371
575
|
displayName?: string;
|
|
372
576
|
description?: string;
|
|
@@ -377,37 +581,40 @@ interface ToolKey {
|
|
|
377
581
|
}
|
|
378
582
|
interface CreateToolKeyParams {
|
|
379
583
|
toolId?: string;
|
|
380
|
-
|
|
381
|
-
|
|
584
|
+
/** @deprecated Ownership is derived from the authenticated principal. */
|
|
585
|
+
ownerId?: string;
|
|
586
|
+
/** @deprecated Ownership is derived from the authenticated principal. */
|
|
587
|
+
ownerType?: "user" | "agent";
|
|
382
588
|
keyName: string;
|
|
383
589
|
value: string;
|
|
384
590
|
displayName?: string;
|
|
385
591
|
description?: string;
|
|
386
|
-
keyType?:
|
|
592
|
+
keyType?: "api-key" | "bearer-token" | "oauth-token" | "secret";
|
|
593
|
+
expiresAt?: string;
|
|
387
594
|
}
|
|
388
595
|
interface ToolPermission {
|
|
389
596
|
id: string;
|
|
390
597
|
toolId: string;
|
|
391
598
|
subjectId: string;
|
|
392
|
-
subjectType:
|
|
393
|
-
permission:
|
|
599
|
+
subjectType: "user" | "agent";
|
|
600
|
+
permission: "read" | "execute" | "admin";
|
|
394
601
|
grantedBy?: string;
|
|
395
602
|
createdAt: string;
|
|
396
603
|
expiresAt?: string;
|
|
397
604
|
}
|
|
398
|
-
type A2ATaskState =
|
|
605
|
+
type A2ATaskState = "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled";
|
|
399
606
|
interface A2ATextPart {
|
|
400
|
-
type:
|
|
607
|
+
type: "text";
|
|
401
608
|
text: string;
|
|
402
609
|
metadata?: Record<string, any>;
|
|
403
610
|
}
|
|
404
611
|
interface A2ADataPart {
|
|
405
|
-
type:
|
|
612
|
+
type: "data";
|
|
406
613
|
data: Record<string, any>;
|
|
407
614
|
metadata?: Record<string, any>;
|
|
408
615
|
}
|
|
409
616
|
interface A2AFilePart {
|
|
410
|
-
type:
|
|
617
|
+
type: "file";
|
|
411
618
|
file: {
|
|
412
619
|
name?: string;
|
|
413
620
|
mimeType?: string;
|
|
@@ -418,7 +625,7 @@ interface A2AFilePart {
|
|
|
418
625
|
}
|
|
419
626
|
type A2AMessagePart = A2ATextPart | A2ADataPart | A2AFilePart;
|
|
420
627
|
interface A2AMessage {
|
|
421
|
-
role:
|
|
628
|
+
role: "user" | "agent";
|
|
422
629
|
parts: A2AMessagePart[];
|
|
423
630
|
contextId?: string;
|
|
424
631
|
messageId?: string;
|
|
@@ -476,19 +683,19 @@ interface A2ASendTaskParams {
|
|
|
476
683
|
token?: string;
|
|
477
684
|
};
|
|
478
685
|
}
|
|
479
|
-
type McpConnectionType =
|
|
686
|
+
type McpConnectionType = "stdio" | "sse" | "http" | "streamable-http";
|
|
480
687
|
interface McpServer {
|
|
481
688
|
serverId: string;
|
|
482
689
|
name: string;
|
|
483
690
|
description?: string;
|
|
484
691
|
connectionType: McpConnectionType;
|
|
485
692
|
connectionConfig: Record<string, any>;
|
|
486
|
-
status:
|
|
693
|
+
status: "connected" | "disconnected" | "error";
|
|
487
694
|
toolsCount: number;
|
|
488
695
|
capabilities?: Record<string, any>;
|
|
489
696
|
isPublic: boolean;
|
|
490
697
|
ownerId: string;
|
|
491
|
-
ownerType:
|
|
698
|
+
ownerType: "user" | "agent";
|
|
492
699
|
createdAt: string;
|
|
493
700
|
}
|
|
494
701
|
interface McpResource {
|
|
@@ -509,6 +716,13 @@ interface McpPrompt {
|
|
|
509
716
|
interface CommonsClientConfig {
|
|
510
717
|
/** Defaults to the unified Commons API platform. */
|
|
511
718
|
baseUrl?: string;
|
|
719
|
+
/** Commons Identity origin used for developer projects and project API keys. */
|
|
720
|
+
identityUrl?: string;
|
|
721
|
+
/**
|
|
722
|
+
* Commons account session or OAuth access token for Commons Identity.
|
|
723
|
+
* This is distinct from `apiKey`, which authenticates platform API calls.
|
|
724
|
+
*/
|
|
725
|
+
identityToken?: string;
|
|
512
726
|
apiKey?: string;
|
|
513
727
|
initiator?: string;
|
|
514
728
|
/** Fetch implementation — defaults to global fetch */
|
|
@@ -552,15 +766,15 @@ interface CreateSkillParams {
|
|
|
552
766
|
tools?: string[];
|
|
553
767
|
triggers?: string[];
|
|
554
768
|
ownerId?: string;
|
|
555
|
-
ownerType?:
|
|
769
|
+
ownerType?: "platform" | "user" | "agent";
|
|
556
770
|
isPublic?: boolean;
|
|
557
771
|
tags?: string[];
|
|
558
772
|
icon?: string;
|
|
559
773
|
source?: string;
|
|
560
774
|
sourceUrl?: string;
|
|
561
775
|
}
|
|
562
|
-
type MemoryType =
|
|
563
|
-
type MemorySourceType =
|
|
776
|
+
type MemoryType = "episodic" | "semantic" | "procedural";
|
|
777
|
+
type MemorySourceType = "auto" | "manual";
|
|
564
778
|
interface AgentMemory {
|
|
565
779
|
memoryId: string;
|
|
566
780
|
agentId: string;
|
|
@@ -602,6 +816,18 @@ interface UpdateMemoryParams {
|
|
|
602
816
|
isActive?: boolean;
|
|
603
817
|
memoryType?: MemoryType;
|
|
604
818
|
}
|
|
819
|
+
interface SharedMemoryScope {
|
|
820
|
+
scopeId: string;
|
|
821
|
+
name: string;
|
|
822
|
+
description?: string | null;
|
|
823
|
+
access?: "read" | "write" | "admin";
|
|
824
|
+
updatedAt: string;
|
|
825
|
+
}
|
|
826
|
+
interface CreateSharedMemoryScopeParams {
|
|
827
|
+
name: string;
|
|
828
|
+
description?: string;
|
|
829
|
+
agentIds: string[];
|
|
830
|
+
}
|
|
605
831
|
interface UsageEvent {
|
|
606
832
|
eventId: string;
|
|
607
833
|
agentId: string;
|
|
@@ -629,15 +855,15 @@ interface UsageAggregation {
|
|
|
629
855
|
callCount: number;
|
|
630
856
|
events: UsageEvent[];
|
|
631
857
|
}
|
|
632
|
-
type CreditDirection =
|
|
633
|
-
type CreditPlatform =
|
|
858
|
+
type CreditDirection = "grant" | "debit" | "adjustment" | "refund" | "expiration";
|
|
859
|
+
type CreditPlatform = "agent_commons" | "commonlab" | "common_os" | "system";
|
|
634
860
|
interface CreditLedgerEntry {
|
|
635
861
|
entryId: string;
|
|
636
862
|
principalId: string;
|
|
637
|
-
principalType:
|
|
863
|
+
principalType: "user" | "agent" | "service";
|
|
638
864
|
workspaceId?: string | null;
|
|
639
865
|
amount: number;
|
|
640
|
-
currency:
|
|
866
|
+
currency: "credits";
|
|
641
867
|
direction: CreditDirection;
|
|
642
868
|
eventType: string;
|
|
643
869
|
sourcePlatform: CreditPlatform;
|
|
@@ -661,11 +887,42 @@ interface CreditBalance {
|
|
|
661
887
|
principalId: string;
|
|
662
888
|
workspaceId?: string | null;
|
|
663
889
|
balance: number;
|
|
664
|
-
|
|
890
|
+
reserved: number;
|
|
891
|
+
available: number;
|
|
892
|
+
currency: "credits";
|
|
893
|
+
}
|
|
894
|
+
interface CreditCampaign {
|
|
895
|
+
campaignKey: string;
|
|
896
|
+
name: string;
|
|
897
|
+
description?: string | null;
|
|
898
|
+
rewardCredits: number;
|
|
899
|
+
triggerType: "once" | "daily" | "monthly" | "event";
|
|
900
|
+
sourcePlatform: CreditPlatform;
|
|
901
|
+
claimable: boolean;
|
|
902
|
+
claimed: boolean;
|
|
903
|
+
}
|
|
904
|
+
interface CreditTransfer {
|
|
905
|
+
transferId: string;
|
|
906
|
+
senderPrincipalId: string;
|
|
907
|
+
recipientPrincipalId: string;
|
|
908
|
+
amount: number;
|
|
909
|
+
message?: string | null;
|
|
910
|
+
status: "completed" | "reversed";
|
|
911
|
+
createdAt: string;
|
|
912
|
+
}
|
|
913
|
+
interface CreditSummary {
|
|
914
|
+
balance: CreditBalance;
|
|
915
|
+
month: {
|
|
916
|
+
earned: number;
|
|
917
|
+
spent: number;
|
|
918
|
+
};
|
|
919
|
+
recent: CreditLedgerEntry[];
|
|
920
|
+
campaigns: CreditCampaign[];
|
|
921
|
+
transfers: CreditTransfer[];
|
|
665
922
|
}
|
|
666
923
|
interface CreditWriteParams {
|
|
667
924
|
principalId: string;
|
|
668
|
-
principalType?:
|
|
925
|
+
principalType?: "user" | "agent" | "service";
|
|
669
926
|
workspaceId?: string | null;
|
|
670
927
|
amount: number;
|
|
671
928
|
eventType: string;
|
|
@@ -681,7 +938,222 @@ interface CreditWriteParams {
|
|
|
681
938
|
usageEventId?: string;
|
|
682
939
|
metadata?: Record<string, unknown>;
|
|
683
940
|
}
|
|
684
|
-
type
|
|
941
|
+
type PlanKey = "free" | "plus" | "pro" | "max";
|
|
942
|
+
type ComputeProfile = "starter" | "standard" | "performance" | "gpu";
|
|
943
|
+
type ModelTier = "frontier" | "standard" | "fast" | "local";
|
|
944
|
+
interface PlanEntitlements {
|
|
945
|
+
computerUse: boolean;
|
|
946
|
+
allowedProfiles: ComputeProfile[];
|
|
947
|
+
maxComputerAgents: number;
|
|
948
|
+
maxConcurrentComputers: number;
|
|
949
|
+
modelTiers: ModelTier[];
|
|
950
|
+
maxConcurrentRuns: number;
|
|
951
|
+
}
|
|
952
|
+
interface BillingCatalog {
|
|
953
|
+
creditsPerUsd: number;
|
|
954
|
+
plans: Array<{
|
|
955
|
+
key: PlanKey;
|
|
956
|
+
name: string;
|
|
957
|
+
priceUsd: number;
|
|
958
|
+
monthlyCredits: number;
|
|
959
|
+
entitlements: PlanEntitlements;
|
|
960
|
+
}>;
|
|
961
|
+
topups: Array<{
|
|
962
|
+
key: string;
|
|
963
|
+
name: string;
|
|
964
|
+
credits: number;
|
|
965
|
+
priceUsd: number;
|
|
966
|
+
}>;
|
|
967
|
+
}
|
|
968
|
+
interface SubscriptionInfo {
|
|
969
|
+
planKey: PlanKey;
|
|
970
|
+
planName: string;
|
|
971
|
+
monthlyCredits: number;
|
|
972
|
+
entitlements: PlanEntitlements;
|
|
973
|
+
status: string;
|
|
974
|
+
currentPeriodEnd: string | null;
|
|
975
|
+
cancelAtPeriodEnd: boolean;
|
|
976
|
+
}
|
|
977
|
+
interface FlagEvaluation {
|
|
978
|
+
key: string;
|
|
979
|
+
enabled: boolean;
|
|
980
|
+
variant: string | null;
|
|
981
|
+
payload?: unknown;
|
|
982
|
+
}
|
|
983
|
+
interface ActivityEvent {
|
|
984
|
+
eventId?: string;
|
|
985
|
+
actorId: string;
|
|
986
|
+
actorType?: "user" | "agent" | "service" | string;
|
|
987
|
+
eventType: string;
|
|
988
|
+
resourceType?: string | null;
|
|
989
|
+
resourceId?: string | null;
|
|
990
|
+
metadata?: Record<string, unknown> | null;
|
|
991
|
+
createdAt: string;
|
|
992
|
+
}
|
|
993
|
+
interface AgentLog {
|
|
994
|
+
logId?: string;
|
|
995
|
+
agentId: string;
|
|
996
|
+
sessionId?: string | null;
|
|
997
|
+
action?: string;
|
|
998
|
+
message?: string | null;
|
|
999
|
+
status?: "success" | "error" | "warning" | string;
|
|
1000
|
+
responseTime?: number | null;
|
|
1001
|
+
tools?: unknown[];
|
|
1002
|
+
timestamp: string;
|
|
1003
|
+
[key: string]: unknown;
|
|
1004
|
+
}
|
|
1005
|
+
interface FileArtifact {
|
|
1006
|
+
fileId: string;
|
|
1007
|
+
name?: string;
|
|
1008
|
+
originalName?: string;
|
|
1009
|
+
mimeType?: string;
|
|
1010
|
+
size?: number;
|
|
1011
|
+
storageProvider?: "s3" | "ipfs" | string;
|
|
1012
|
+
agentId?: string | null;
|
|
1013
|
+
sessionId?: string | null;
|
|
1014
|
+
ownerId?: string | null;
|
|
1015
|
+
workspaceId?: string | null;
|
|
1016
|
+
createdAt?: string;
|
|
1017
|
+
[key: string]: unknown;
|
|
1018
|
+
}
|
|
1019
|
+
interface FileContent {
|
|
1020
|
+
fileId?: string;
|
|
1021
|
+
content?: string;
|
|
1022
|
+
mimeType?: string;
|
|
1023
|
+
offset?: number;
|
|
1024
|
+
nextOffset?: number | null;
|
|
1025
|
+
truncated?: boolean;
|
|
1026
|
+
imageUrls?: string[];
|
|
1027
|
+
downloadUrl?: string;
|
|
1028
|
+
[key: string]: unknown;
|
|
1029
|
+
}
|
|
1030
|
+
interface UploadFileInput {
|
|
1031
|
+
data: Blob;
|
|
1032
|
+
name?: string;
|
|
1033
|
+
}
|
|
1034
|
+
interface LibraryItem extends FileArtifact {
|
|
1035
|
+
itemId?: string;
|
|
1036
|
+
description?: string | null;
|
|
1037
|
+
isFavorite?: boolean;
|
|
1038
|
+
source?: string;
|
|
1039
|
+
grants?: LibraryGrant[];
|
|
1040
|
+
shareLinks?: LibraryShareLink[];
|
|
1041
|
+
}
|
|
1042
|
+
interface LibraryGrant {
|
|
1043
|
+
grantId: string;
|
|
1044
|
+
subjectType: "user" | "agent" | "workspace";
|
|
1045
|
+
subjectId: string;
|
|
1046
|
+
permission: "read" | "edit" | "manage";
|
|
1047
|
+
expiresAt?: string | null;
|
|
1048
|
+
[key: string]: unknown;
|
|
1049
|
+
}
|
|
1050
|
+
interface LibraryShareLink {
|
|
1051
|
+
shareId: string;
|
|
1052
|
+
token?: string;
|
|
1053
|
+
url?: string;
|
|
1054
|
+
expiresAt?: string | null;
|
|
1055
|
+
[key: string]: unknown;
|
|
1056
|
+
}
|
|
1057
|
+
interface Space {
|
|
1058
|
+
spaceId: string;
|
|
1059
|
+
name: string;
|
|
1060
|
+
description?: string | null;
|
|
1061
|
+
visibility?: string;
|
|
1062
|
+
createdBy?: string;
|
|
1063
|
+
createdByType?: "agent" | "human";
|
|
1064
|
+
createdAt?: string;
|
|
1065
|
+
updatedAt?: string;
|
|
1066
|
+
members?: SpaceMember[];
|
|
1067
|
+
[key: string]: unknown;
|
|
1068
|
+
}
|
|
1069
|
+
interface SpaceMember {
|
|
1070
|
+
memberId: string;
|
|
1071
|
+
memberType: "agent" | "human";
|
|
1072
|
+
role?: string;
|
|
1073
|
+
status?: string;
|
|
1074
|
+
permissions?: Record<string, unknown>;
|
|
1075
|
+
[key: string]: unknown;
|
|
1076
|
+
}
|
|
1077
|
+
interface SpaceMessage {
|
|
1078
|
+
messageId: string;
|
|
1079
|
+
spaceId: string;
|
|
1080
|
+
senderId: string;
|
|
1081
|
+
senderType: "agent" | "human";
|
|
1082
|
+
content: string;
|
|
1083
|
+
metadata?: Record<string, unknown>;
|
|
1084
|
+
createdAt?: string;
|
|
1085
|
+
updatedAt?: string;
|
|
1086
|
+
[key: string]: unknown;
|
|
1087
|
+
}
|
|
1088
|
+
interface CodeProjectFile {
|
|
1089
|
+
path: string;
|
|
1090
|
+
content: string;
|
|
1091
|
+
}
|
|
1092
|
+
interface CodeProject {
|
|
1093
|
+
projectId: string;
|
|
1094
|
+
agentId: string;
|
|
1095
|
+
name: string;
|
|
1096
|
+
description?: string | null;
|
|
1097
|
+
sessionId?: string | null;
|
|
1098
|
+
files?: CodeProjectFile[];
|
|
1099
|
+
previewSlug?: string | null;
|
|
1100
|
+
previewUrl?: string | null;
|
|
1101
|
+
createdAt?: string;
|
|
1102
|
+
updatedAt?: string;
|
|
1103
|
+
[key: string]: unknown;
|
|
1104
|
+
}
|
|
1105
|
+
interface Goal {
|
|
1106
|
+
goalId: string;
|
|
1107
|
+
status: "pending" | "started" | "completed" | "failed";
|
|
1108
|
+
progress: number;
|
|
1109
|
+
title?: string;
|
|
1110
|
+
description?: string;
|
|
1111
|
+
agentId?: string;
|
|
1112
|
+
[key: string]: unknown;
|
|
1113
|
+
}
|
|
1114
|
+
interface OAuthProvider {
|
|
1115
|
+
providerKey: string;
|
|
1116
|
+
displayName: string;
|
|
1117
|
+
isActive: boolean;
|
|
1118
|
+
scopes?: string[];
|
|
1119
|
+
scopeGroups?: Record<string, string[]>;
|
|
1120
|
+
[key: string]: unknown;
|
|
1121
|
+
}
|
|
1122
|
+
interface OAuthConnection {
|
|
1123
|
+
connectionId: string;
|
|
1124
|
+
providerKey: string;
|
|
1125
|
+
providerDisplayName?: string;
|
|
1126
|
+
providerUserId?: string | null;
|
|
1127
|
+
providerUserEmail?: string | null;
|
|
1128
|
+
providerUserName?: string | null;
|
|
1129
|
+
scopes: string[];
|
|
1130
|
+
status: string;
|
|
1131
|
+
lastUsedAt?: string | null;
|
|
1132
|
+
expiresAt?: string | null;
|
|
1133
|
+
metadata?: Record<string, unknown> | null;
|
|
1134
|
+
[key: string]: unknown;
|
|
1135
|
+
}
|
|
1136
|
+
interface BillingInvoice {
|
|
1137
|
+
id: string;
|
|
1138
|
+
status?: string | null;
|
|
1139
|
+
currency?: string;
|
|
1140
|
+
amountDue?: number;
|
|
1141
|
+
amountPaid?: number;
|
|
1142
|
+
created?: number | string;
|
|
1143
|
+
hostedInvoiceUrl?: string | null;
|
|
1144
|
+
invoicePdf?: string | null;
|
|
1145
|
+
[key: string]: unknown;
|
|
1146
|
+
}
|
|
1147
|
+
interface BillingPaymentMethod {
|
|
1148
|
+
id: string;
|
|
1149
|
+
type: string;
|
|
1150
|
+
brand?: string;
|
|
1151
|
+
last4?: string;
|
|
1152
|
+
expMonth?: number;
|
|
1153
|
+
expYear?: number;
|
|
1154
|
+
[key: string]: unknown;
|
|
1155
|
+
}
|
|
1156
|
+
type WalletType = "eoa" | "erc4337" | "external";
|
|
685
1157
|
interface AgentWallet {
|
|
686
1158
|
id: string;
|
|
687
1159
|
agentId: string;
|
|
@@ -707,7 +1179,7 @@ interface CreateWalletParams {
|
|
|
707
1179
|
externalAddress?: string;
|
|
708
1180
|
chainId?: string;
|
|
709
1181
|
}
|
|
710
|
-
type ApiKeyPrincipalType =
|
|
1182
|
+
type ApiKeyPrincipalType = "user" | "agent";
|
|
711
1183
|
interface ApiKey {
|
|
712
1184
|
id: string;
|
|
713
1185
|
label?: string | null;
|
|
@@ -726,15 +1198,70 @@ interface CreateApiKeyParams {
|
|
|
726
1198
|
interface CreatedApiKey extends ApiKey {
|
|
727
1199
|
key: string;
|
|
728
1200
|
}
|
|
1201
|
+
type DeveloperProjectEnvironment = "production" | "development" | "staging";
|
|
1202
|
+
interface DeveloperProject {
|
|
1203
|
+
id: string;
|
|
1204
|
+
workspaceId: string;
|
|
1205
|
+
name: string;
|
|
1206
|
+
slug: string;
|
|
1207
|
+
environment: DeveloperProjectEnvironment;
|
|
1208
|
+
status: string;
|
|
1209
|
+
createdAt: string;
|
|
1210
|
+
}
|
|
1211
|
+
interface DeveloperApiKey {
|
|
1212
|
+
id: string;
|
|
1213
|
+
projectId: string;
|
|
1214
|
+
keyPrefix: string;
|
|
1215
|
+
name: string;
|
|
1216
|
+
scopes: string[];
|
|
1217
|
+
status: string;
|
|
1218
|
+
expiresAt?: string | null;
|
|
1219
|
+
lastUsedAt?: string | null;
|
|
1220
|
+
createdAt: string;
|
|
1221
|
+
}
|
|
1222
|
+
interface CreatedDeveloperApiKey extends DeveloperApiKey {
|
|
1223
|
+
/** Plaintext key — shown once at creation time. */
|
|
1224
|
+
key: string;
|
|
1225
|
+
}
|
|
1226
|
+
type WorkflowValueKind = "text" | "markdown" | "number" | "boolean" | "json" | "image" | "audio" | "video" | "file" | "link" | "email" | "calendar_event" | "tool_result";
|
|
1227
|
+
interface WorkflowValue {
|
|
1228
|
+
kind: WorkflowValueKind;
|
|
1229
|
+
/** Canonical string representation — always present. */
|
|
1230
|
+
text: string;
|
|
1231
|
+
data?: Record<string, any>;
|
|
1232
|
+
mime?: string;
|
|
1233
|
+
label?: string;
|
|
1234
|
+
meta?: Record<string, any>;
|
|
1235
|
+
}
|
|
1236
|
+
/** Optional hint a tool/node declares for how its output should be presented. */
|
|
1237
|
+
interface OutputPresentation {
|
|
1238
|
+
kind?: WorkflowValueKind;
|
|
1239
|
+
textPath?: string;
|
|
1240
|
+
fieldMap?: Record<string, string>;
|
|
1241
|
+
label?: string;
|
|
1242
|
+
}
|
|
729
1243
|
|
|
1244
|
+
interface CommonsRequestOptions {
|
|
1245
|
+
headers?: Record<string, string>;
|
|
1246
|
+
signal?: AbortSignal;
|
|
1247
|
+
}
|
|
730
1248
|
declare class CommonsClient {
|
|
731
1249
|
private readonly baseUrl;
|
|
1250
|
+
private readonly identityUrl;
|
|
1251
|
+
private readonly identityToken?;
|
|
732
1252
|
private readonly apiKey?;
|
|
733
1253
|
private readonly initiator?;
|
|
734
1254
|
private readonly _fetch;
|
|
735
1255
|
constructor(config: CommonsClientConfig);
|
|
736
1256
|
private headers;
|
|
737
|
-
|
|
1257
|
+
/**
|
|
1258
|
+
* Call an API route that is not yet represented by a resource namespace.
|
|
1259
|
+
* Most applications should use the typed helpers below.
|
|
1260
|
+
*/
|
|
1261
|
+
request<T>(method: string, path: string, body?: unknown, options?: CommonsRequestOptions): Promise<T>;
|
|
1262
|
+
private errorPayload;
|
|
1263
|
+
private errorMessage;
|
|
1264
|
+
private identityRequest;
|
|
738
1265
|
get models(): {
|
|
739
1266
|
/** List all available LLM models from the registry */
|
|
740
1267
|
list: () => Promise<{
|
|
@@ -755,6 +1282,33 @@ declare class CommonsClient {
|
|
|
755
1282
|
update: (agentId: string, params: Partial<CreateAgentParams>) => Promise<{
|
|
756
1283
|
data: Agent;
|
|
757
1284
|
}>;
|
|
1285
|
+
getRuntime: (agentId: string) => Promise<{
|
|
1286
|
+
data: AgentRuntime;
|
|
1287
|
+
}>;
|
|
1288
|
+
configureRuntime: (agentId: string, params: {
|
|
1289
|
+
runtimeType?: AgentRuntimeType;
|
|
1290
|
+
version?: string | null;
|
|
1291
|
+
config?: AgentRuntimeConfig;
|
|
1292
|
+
deploy?: boolean;
|
|
1293
|
+
}) => Promise<{
|
|
1294
|
+
data: AgentRuntime;
|
|
1295
|
+
}>;
|
|
1296
|
+
deployRuntime: (agentId: string) => Promise<{
|
|
1297
|
+
data: AgentRuntime;
|
|
1298
|
+
}>;
|
|
1299
|
+
sleepRuntime: (agentId: string) => Promise<{
|
|
1300
|
+
data: AgentRuntime;
|
|
1301
|
+
}>;
|
|
1302
|
+
restartRuntime: (agentId: string) => Promise<{
|
|
1303
|
+
data: AgentRuntime;
|
|
1304
|
+
}>;
|
|
1305
|
+
manageRuntimeChannel: (agentId: string, channel: string, action: string, params?: {
|
|
1306
|
+
pairingCode?: string;
|
|
1307
|
+
target?: string;
|
|
1308
|
+
message?: string;
|
|
1309
|
+
}) => Promise<{
|
|
1310
|
+
data: unknown;
|
|
1311
|
+
}>;
|
|
758
1312
|
/** List tools assigned to an agent. */
|
|
759
1313
|
listTools: (agentId: string) => Promise<{
|
|
760
1314
|
data: any[];
|
|
@@ -766,6 +1320,13 @@ declare class CommonsClient {
|
|
|
766
1320
|
}) => Promise<{
|
|
767
1321
|
data: any;
|
|
768
1322
|
}>;
|
|
1323
|
+
/** Update an agent tool assignment. */
|
|
1324
|
+
updateTool: (assignmentId: string, params: {
|
|
1325
|
+
usageComments?: string;
|
|
1326
|
+
enabled?: boolean;
|
|
1327
|
+
}) => Promise<{
|
|
1328
|
+
data: any;
|
|
1329
|
+
}>;
|
|
769
1330
|
/** Remove a tool assignment from an agent. */
|
|
770
1331
|
removeTool: (assignmentId: string) => Promise<void>;
|
|
771
1332
|
/** Create a liaison agent for an external agent. */
|
|
@@ -780,6 +1341,11 @@ declare class CommonsClient {
|
|
|
780
1341
|
* }
|
|
781
1342
|
*/
|
|
782
1343
|
stream: (params: RunParams) => AsyncGenerator<StreamEvent>;
|
|
1344
|
+
/** Resume a streamed run after executing a caller-owned CLI tool. */
|
|
1345
|
+
submitCliToolResult: (requestId: string, result: string) => Promise<{
|
|
1346
|
+
data?: unknown;
|
|
1347
|
+
message?: string;
|
|
1348
|
+
}>;
|
|
783
1349
|
/** Get the current heartbeat status for an agent. */
|
|
784
1350
|
getAutonomy: (agentId: string) => Promise<{
|
|
785
1351
|
data: {
|
|
@@ -838,16 +1404,59 @@ declare class CommonsClient {
|
|
|
838
1404
|
getComputerConfig: (agentId: string) => Promise<{
|
|
839
1405
|
data: AgentComputerConfig;
|
|
840
1406
|
}>;
|
|
841
|
-
updateComputerConfig: (agentId: string, params:
|
|
1407
|
+
updateComputerConfig: (agentId: string, params: ComputerConfigUpdate) => Promise<{
|
|
842
1408
|
data: AgentComputerConfig;
|
|
843
1409
|
}>;
|
|
844
|
-
|
|
1410
|
+
/** Get the agent's one persistent cloud computer. */
|
|
1411
|
+
getComputer: (agentId: string, _legacyComputerId?: string) => Promise<{
|
|
1412
|
+
data: AgentComputer | null;
|
|
1413
|
+
}>;
|
|
1414
|
+
/** Wake the agent's persistent cloud computer, provisioning it if needed. */
|
|
1415
|
+
wakeComputer: (agentId: string, params?: ComputerActionParams) => Promise<{
|
|
1416
|
+
data: AgentComputer;
|
|
1417
|
+
}>;
|
|
1418
|
+
/** Sleep the runtime while preserving the computer's durable workspace. */
|
|
1419
|
+
sleepComputer: (agentId: string, params?: ComputerActionParams) => Promise<{
|
|
1420
|
+
data: AgentComputer;
|
|
1421
|
+
}>;
|
|
1422
|
+
/** Replace the runtime without replacing the persistent computer. */
|
|
1423
|
+
restartComputer: (agentId: string, params?: ComputerActionParams) => Promise<{
|
|
1424
|
+
data: AgentComputer;
|
|
1425
|
+
}>;
|
|
1426
|
+
resizeComputer: (agentId: string, params: ComputerResizeParams) => Promise<{
|
|
1427
|
+
data: AgentComputer;
|
|
1428
|
+
}>;
|
|
1429
|
+
execComputer: (agentId: string, params: ComputerCommandParams) => Promise<{
|
|
1430
|
+
data: any;
|
|
1431
|
+
}>;
|
|
1432
|
+
readComputerFile: (agentId: string, pathOrLegacyComputerId: string, legacyPath?: string) => Promise<{
|
|
1433
|
+
data: ComputerFile;
|
|
1434
|
+
}>;
|
|
1435
|
+
writeComputerFile: (agentId: string, params: {
|
|
1436
|
+
path: string;
|
|
1437
|
+
content: string;
|
|
1438
|
+
encoding?: "utf8" | "base64";
|
|
1439
|
+
}) => Promise<{
|
|
1440
|
+
data: ComputerFile;
|
|
1441
|
+
}>;
|
|
1442
|
+
openComputerBrowser: (agentId: string, paramsOrLegacyComputerId: ComputerBrowserOpenParams | string, legacyParams?: ComputerBrowserOpenParams) => Promise<{
|
|
1443
|
+
data: any;
|
|
1444
|
+
}>;
|
|
1445
|
+
testComputerBrowser: (agentId: string) => Promise<{
|
|
1446
|
+
data: Record<string, unknown>;
|
|
1447
|
+
}>;
|
|
1448
|
+
listComputerEvents: (agentId: string, limitOrLegacyComputerId?: number | string, legacyLimit?: number) => Promise<{
|
|
1449
|
+
data: AgentComputerEvent[];
|
|
1450
|
+
}>;
|
|
1451
|
+
/** @deprecated Use getComputer. The singleton is returned as a one-item list. */
|
|
1452
|
+
listComputers: (agentId: string, _filter?: {
|
|
845
1453
|
sessionId?: string;
|
|
846
1454
|
includeTerminated?: boolean;
|
|
847
1455
|
}) => Promise<{
|
|
848
1456
|
data: AgentComputerInstance[];
|
|
849
1457
|
}>;
|
|
850
|
-
|
|
1458
|
+
/** @deprecated Use wakeComputer. Lifecycle, name, and session are ignored. */
|
|
1459
|
+
startComputer: (agentId: string, params?: {
|
|
851
1460
|
sessionId?: string;
|
|
852
1461
|
lifecycle?: "persistent" | "ephemeral";
|
|
853
1462
|
name?: string;
|
|
@@ -855,36 +1464,18 @@ declare class CommonsClient {
|
|
|
855
1464
|
}) => Promise<{
|
|
856
1465
|
data: AgentComputerInstance;
|
|
857
1466
|
}>;
|
|
858
|
-
getComputer
|
|
1467
|
+
/** @deprecated Use getComputer. Computer IDs are ignored. */
|
|
1468
|
+
refreshComputer: (agentId: string, _computerId?: string) => Promise<{
|
|
859
1469
|
data: AgentComputerInstance;
|
|
860
1470
|
}>;
|
|
861
|
-
|
|
1471
|
+
/** @deprecated Use sleepComputer. Computer IDs are ignored. */
|
|
1472
|
+
stopComputer: (agentId: string, _computerId?: string) => Promise<{
|
|
862
1473
|
data: AgentComputerInstance;
|
|
863
1474
|
}>;
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
}>;
|
|
867
|
-
readComputerFile: (agentId: string, computerId: string, path: string) => Promise<{
|
|
868
|
-
data: {
|
|
869
|
-
path: string;
|
|
870
|
-
content: string;
|
|
871
|
-
};
|
|
872
|
-
}>;
|
|
873
|
-
runComputerCommand: (agentId: string, computerId: string, params: {
|
|
874
|
-
command: string;
|
|
875
|
-
cwd?: string;
|
|
876
|
-
timeoutSeconds?: number;
|
|
877
|
-
}) => Promise<{
|
|
878
|
-
data: any;
|
|
879
|
-
}>;
|
|
880
|
-
openComputerBrowser: (agentId: string, computerId: string, params: {
|
|
881
|
-
url: string;
|
|
882
|
-
}) => Promise<{
|
|
1475
|
+
/** @deprecated Use execComputer. Computer IDs are ignored. */
|
|
1476
|
+
runComputerCommand: (agentId: string, paramsOrLegacyComputerId: ComputerCommandParams | string, legacyParams?: ComputerCommandParams) => Promise<{
|
|
883
1477
|
data: any;
|
|
884
1478
|
}>;
|
|
885
|
-
listComputerEvents: (agentId: string, computerId: string, limit?: number) => Promise<{
|
|
886
|
-
data: AgentComputerEvent[];
|
|
887
|
-
}>;
|
|
888
1479
|
/**
|
|
889
1480
|
* List available TTS voices for a provider.
|
|
890
1481
|
* @param provider - 'openai' (default) or 'elevenlabs'
|
|
@@ -894,6 +1485,33 @@ declare class CommonsClient {
|
|
|
894
1485
|
data: any[];
|
|
895
1486
|
}>;
|
|
896
1487
|
};
|
|
1488
|
+
get copilot(): {
|
|
1489
|
+
get: () => Promise<{
|
|
1490
|
+
data: Agent | null;
|
|
1491
|
+
}>;
|
|
1492
|
+
updateSettings: (params: {
|
|
1493
|
+
accessMode: "full" | "scoped" | "confirm";
|
|
1494
|
+
scopes?: string[];
|
|
1495
|
+
}) => Promise<{
|
|
1496
|
+
data: Agent;
|
|
1497
|
+
}>;
|
|
1498
|
+
listChanges: (filter?: {
|
|
1499
|
+
status?: string;
|
|
1500
|
+
resourceType?: string;
|
|
1501
|
+
resourceId?: string;
|
|
1502
|
+
}) => Promise<{
|
|
1503
|
+
data: CopilotChange[];
|
|
1504
|
+
}>;
|
|
1505
|
+
acceptChange: (changeId: string) => Promise<{
|
|
1506
|
+
data: CopilotChange;
|
|
1507
|
+
}>;
|
|
1508
|
+
rejectChange: (changeId: string) => Promise<{
|
|
1509
|
+
data: CopilotChange;
|
|
1510
|
+
}>;
|
|
1511
|
+
revertChange: (changeId: string) => Promise<{
|
|
1512
|
+
data: CopilotChange;
|
|
1513
|
+
}>;
|
|
1514
|
+
};
|
|
897
1515
|
get run(): {
|
|
898
1516
|
once: (params: RunParams) => Promise<any>;
|
|
899
1517
|
};
|
|
@@ -909,11 +1527,34 @@ declare class CommonsClient {
|
|
|
909
1527
|
tags?: string[];
|
|
910
1528
|
}) => Promise<Workflow>;
|
|
911
1529
|
list: (ownerId: string, ownerType: "user" | "agent") => Promise<Workflow[]>;
|
|
1530
|
+
discoverPublic: (filter?: {
|
|
1531
|
+
category?: string;
|
|
1532
|
+
tags?: string[];
|
|
1533
|
+
limit?: number;
|
|
1534
|
+
}) => Promise<Workflow[]>;
|
|
912
1535
|
get: (workflowId: string) => Promise<Workflow>;
|
|
913
1536
|
update: (workflowId: string, updates: Partial<Workflow>) => Promise<Workflow>;
|
|
914
1537
|
delete: (workflowId: string) => Promise<{
|
|
915
1538
|
success: boolean;
|
|
916
1539
|
}>;
|
|
1540
|
+
fork: (workflowId: string, params: {
|
|
1541
|
+
newOwnerId: string;
|
|
1542
|
+
newOwnerType: "user" | "agent";
|
|
1543
|
+
customizations?: {
|
|
1544
|
+
name?: string;
|
|
1545
|
+
description?: string;
|
|
1546
|
+
isPublic?: boolean;
|
|
1547
|
+
};
|
|
1548
|
+
}) => Promise<Workflow>;
|
|
1549
|
+
getWebhook: (workflowId: string) => Promise<Record<string, unknown>>;
|
|
1550
|
+
rotateWebhookToken: (workflowId: string) => Promise<{
|
|
1551
|
+
token: string;
|
|
1552
|
+
webhookUrl: string;
|
|
1553
|
+
}>;
|
|
1554
|
+
disableWebhook: (workflowId: string) => Promise<{
|
|
1555
|
+
success: boolean;
|
|
1556
|
+
}>;
|
|
1557
|
+
executeWebhook: (token: string, payload: unknown, query?: Record<string, string>) => Promise<unknown>;
|
|
917
1558
|
execute: (workflowId: string, params: {
|
|
918
1559
|
agentId?: string;
|
|
919
1560
|
sessionId?: string;
|
|
@@ -1022,6 +1663,18 @@ declare class CommonsClient {
|
|
|
1022
1663
|
getFull: (sessionId: string) => Promise<{
|
|
1023
1664
|
data: any;
|
|
1024
1665
|
}>;
|
|
1666
|
+
/** Rename a session. */
|
|
1667
|
+
rename: (sessionId: string, title: string) => Promise<{
|
|
1668
|
+
data: Session;
|
|
1669
|
+
}>;
|
|
1670
|
+
/** Delete a session and its owned session data. */
|
|
1671
|
+
delete: (sessionId: string) => Promise<{
|
|
1672
|
+
data: unknown;
|
|
1673
|
+
}>;
|
|
1674
|
+
/** Get the full chat transcript for a session. */
|
|
1675
|
+
getChat: (sessionId: string) => Promise<{
|
|
1676
|
+
data: unknown;
|
|
1677
|
+
}>;
|
|
1025
1678
|
};
|
|
1026
1679
|
get tools(): {
|
|
1027
1680
|
list: (filter?: {
|
|
@@ -1049,12 +1702,69 @@ declare class CommonsClient {
|
|
|
1049
1702
|
data: Tool[];
|
|
1050
1703
|
}>;
|
|
1051
1704
|
};
|
|
1052
|
-
get
|
|
1053
|
-
|
|
1705
|
+
get oauth(): {
|
|
1706
|
+
/** List OAuth providers available on the platform (Google Workspace, GitHub, …). */
|
|
1707
|
+
listProviders: () => Promise<{
|
|
1708
|
+
providers: OAuthProvider[];
|
|
1709
|
+
}>;
|
|
1710
|
+
/** Get one provider's details, including its scope groups. */
|
|
1711
|
+
getProvider: (providerKey: string) => Promise<{
|
|
1712
|
+
provider: OAuthProvider;
|
|
1713
|
+
}>;
|
|
1714
|
+
/**
|
|
1715
|
+
* List the caller's OAuth connections (the accounts agents act with).
|
|
1716
|
+
* `ownerId` is only needed when authenticating with a management key.
|
|
1717
|
+
*/
|
|
1718
|
+
listConnections: (params?: {
|
|
1054
1719
|
ownerId?: string;
|
|
1055
|
-
ownerType?:
|
|
1056
|
-
|
|
1720
|
+
ownerType?: "user" | "agent";
|
|
1721
|
+
}) => Promise<{
|
|
1722
|
+
connections: OAuthConnection[];
|
|
1723
|
+
}>;
|
|
1724
|
+
/** Get one OAuth connection. */
|
|
1725
|
+
getConnection: (connectionId: string) => Promise<{
|
|
1726
|
+
connection: OAuthConnection;
|
|
1727
|
+
}>;
|
|
1728
|
+
/** Update connection metadata or its active status. */
|
|
1729
|
+
updateConnection: (connectionId: string, params: {
|
|
1730
|
+
displayName?: string;
|
|
1731
|
+
isActive?: boolean;
|
|
1057
1732
|
}) => Promise<{
|
|
1733
|
+
success: boolean;
|
|
1734
|
+
connection: OAuthConnection;
|
|
1735
|
+
}>;
|
|
1736
|
+
/**
|
|
1737
|
+
* Start an OAuth connect flow. Returns the authorization URL the user
|
|
1738
|
+
* must open in a browser to grant access.
|
|
1739
|
+
*/
|
|
1740
|
+
connect: (params: {
|
|
1741
|
+
providerKey: string;
|
|
1742
|
+
scopes?: string[];
|
|
1743
|
+
redirectUri?: string;
|
|
1744
|
+
}) => Promise<{
|
|
1745
|
+
authorizationUrl: string;
|
|
1746
|
+
state: string;
|
|
1747
|
+
expiresAt: string;
|
|
1748
|
+
}>;
|
|
1749
|
+
/** Refresh a connection's access token now. */
|
|
1750
|
+
refresh: (connectionId: string) => Promise<{
|
|
1751
|
+
success: boolean;
|
|
1752
|
+
}>;
|
|
1753
|
+
/** Check whether a connection's token is valid. */
|
|
1754
|
+
test: (connectionId: string) => Promise<{
|
|
1755
|
+
success: boolean;
|
|
1756
|
+
status: string;
|
|
1757
|
+
accessTokenValid: boolean;
|
|
1758
|
+
providerUserEmail?: string;
|
|
1759
|
+
error?: string;
|
|
1760
|
+
}>;
|
|
1761
|
+
/** Revoke a connection and delete its tokens. */
|
|
1762
|
+
revoke: (connectionId: string) => Promise<{
|
|
1763
|
+
success: boolean;
|
|
1764
|
+
}>;
|
|
1765
|
+
};
|
|
1766
|
+
get toolKeys(): {
|
|
1767
|
+
list: () => Promise<{
|
|
1058
1768
|
success: boolean;
|
|
1059
1769
|
data: ToolKey[];
|
|
1060
1770
|
}>;
|
|
@@ -1062,28 +1772,112 @@ declare class CommonsClient {
|
|
|
1062
1772
|
success: boolean;
|
|
1063
1773
|
data: ToolKey;
|
|
1064
1774
|
}>;
|
|
1775
|
+
get: (keyId: string) => Promise<{
|
|
1776
|
+
success: boolean;
|
|
1777
|
+
data: ToolKey;
|
|
1778
|
+
}>;
|
|
1779
|
+
updateMetadata: (keyId: string, params: {
|
|
1780
|
+
displayName?: string;
|
|
1781
|
+
description?: string;
|
|
1782
|
+
isActive?: boolean;
|
|
1783
|
+
expiresAt?: string;
|
|
1784
|
+
}) => Promise<{
|
|
1785
|
+
success: boolean;
|
|
1786
|
+
data: ToolKey;
|
|
1787
|
+
}>;
|
|
1788
|
+
updateValue: (keyId: string, value: string) => Promise<{
|
|
1789
|
+
success: boolean;
|
|
1790
|
+
data: unknown;
|
|
1791
|
+
}>;
|
|
1792
|
+
test: (keyId: string) => Promise<{
|
|
1793
|
+
success: boolean;
|
|
1794
|
+
data: unknown;
|
|
1795
|
+
}>;
|
|
1796
|
+
mapToTool: (params: {
|
|
1797
|
+
toolId: string;
|
|
1798
|
+
keyId: string;
|
|
1799
|
+
contextId: string;
|
|
1800
|
+
contextType: "user" | "agent" | "global";
|
|
1801
|
+
priority?: number;
|
|
1802
|
+
}) => Promise<{
|
|
1803
|
+
success: boolean;
|
|
1804
|
+
data: unknown;
|
|
1805
|
+
}>;
|
|
1806
|
+
removeMapping: (mappingId: string) => Promise<{
|
|
1807
|
+
success: boolean;
|
|
1808
|
+
}>;
|
|
1065
1809
|
delete: (keyId: string) => Promise<{
|
|
1066
1810
|
success: boolean;
|
|
1067
1811
|
}>;
|
|
1068
1812
|
};
|
|
1069
1813
|
get toolPermissions(): {
|
|
1070
|
-
|
|
1814
|
+
/** @deprecated Use listForTool with a tool ID. */
|
|
1815
|
+
list: (toolId: string) => Promise<{
|
|
1816
|
+
success: boolean;
|
|
1817
|
+
data: ToolPermission[];
|
|
1818
|
+
}>;
|
|
1819
|
+
listForTool: (toolId: string) => Promise<{
|
|
1820
|
+
success: boolean;
|
|
1821
|
+
data: ToolPermission[];
|
|
1822
|
+
}>;
|
|
1823
|
+
listForSubject: (subjectId: string, subjectType: "user" | "agent") => Promise<{
|
|
1071
1824
|
success: boolean;
|
|
1072
1825
|
data: ToolPermission[];
|
|
1073
1826
|
}>;
|
|
1827
|
+
accessibleTools: (subjectId: string, subjectType: "user" | "agent") => Promise<{
|
|
1828
|
+
success: boolean;
|
|
1829
|
+
data: Tool[];
|
|
1830
|
+
}>;
|
|
1074
1831
|
grant: (params: {
|
|
1075
1832
|
toolId: string;
|
|
1076
1833
|
subjectId: string;
|
|
1077
1834
|
subjectType: "user" | "agent";
|
|
1078
1835
|
permission: "read" | "execute" | "admin";
|
|
1079
|
-
grantedBy
|
|
1836
|
+
grantedBy: string;
|
|
1837
|
+
expiresAt?: string;
|
|
1080
1838
|
}) => Promise<{
|
|
1081
1839
|
success: boolean;
|
|
1082
1840
|
data: ToolPermission;
|
|
1083
1841
|
}>;
|
|
1842
|
+
batchGrant: (params: {
|
|
1843
|
+
toolId: string;
|
|
1844
|
+
subjects: Array<{
|
|
1845
|
+
subjectId: string;
|
|
1846
|
+
subjectType: "user" | "agent";
|
|
1847
|
+
}>;
|
|
1848
|
+
permission: "read" | "execute" | "admin";
|
|
1849
|
+
grantedBy: string;
|
|
1850
|
+
expiresAt?: string;
|
|
1851
|
+
}) => Promise<{
|
|
1852
|
+
success: boolean;
|
|
1853
|
+
data: ToolPermission[];
|
|
1854
|
+
}>;
|
|
1084
1855
|
revoke: (permissionId: string) => Promise<{
|
|
1085
1856
|
success: boolean;
|
|
1086
1857
|
}>;
|
|
1858
|
+
check: (params: {
|
|
1859
|
+
toolId: string;
|
|
1860
|
+
subjectId: string;
|
|
1861
|
+
subjectType: "user" | "agent";
|
|
1862
|
+
permission: "read" | "execute" | "admin";
|
|
1863
|
+
}) => Promise<{
|
|
1864
|
+
success: boolean;
|
|
1865
|
+
data: {
|
|
1866
|
+
hasPermission: boolean;
|
|
1867
|
+
};
|
|
1868
|
+
}>;
|
|
1869
|
+
checkAgentAccess: (toolId: string, agentId: string, userId?: string) => Promise<{
|
|
1870
|
+
success: boolean;
|
|
1871
|
+
data: unknown;
|
|
1872
|
+
}>;
|
|
1873
|
+
transferOwnership: (params: {
|
|
1874
|
+
toolId: string;
|
|
1875
|
+
newOwnerId: string;
|
|
1876
|
+
newOwnerType: "user" | "agent";
|
|
1877
|
+
}) => Promise<{
|
|
1878
|
+
success: boolean;
|
|
1879
|
+
data: Tool;
|
|
1880
|
+
}>;
|
|
1087
1881
|
};
|
|
1088
1882
|
get skills(): {
|
|
1089
1883
|
list: (filter?: {
|
|
@@ -1158,6 +1952,38 @@ declare class CommonsClient {
|
|
|
1158
1952
|
principalType: string | null;
|
|
1159
1953
|
}>;
|
|
1160
1954
|
};
|
|
1955
|
+
get developer(): {
|
|
1956
|
+
scopes: () => Promise<{
|
|
1957
|
+
data: string[];
|
|
1958
|
+
}>;
|
|
1959
|
+
listProjects: () => Promise<{
|
|
1960
|
+
data: DeveloperProject[];
|
|
1961
|
+
}>;
|
|
1962
|
+
createProject: (params: {
|
|
1963
|
+
workspaceId: string;
|
|
1964
|
+
name: string;
|
|
1965
|
+
environment?: DeveloperProjectEnvironment;
|
|
1966
|
+
}) => Promise<{
|
|
1967
|
+
data: DeveloperProject;
|
|
1968
|
+
}>;
|
|
1969
|
+
listApiKeys: (projectId: string) => Promise<{
|
|
1970
|
+
data: DeveloperApiKey[];
|
|
1971
|
+
}>;
|
|
1972
|
+
createApiKey: (projectId: string, params: {
|
|
1973
|
+
name: string;
|
|
1974
|
+
scopes?: string[];
|
|
1975
|
+
expiresAt?: string | null;
|
|
1976
|
+
}) => Promise<{
|
|
1977
|
+
data: CreatedDeveloperApiKey;
|
|
1978
|
+
}>;
|
|
1979
|
+
revokeApiKey: (keyId: string) => Promise<void>;
|
|
1980
|
+
};
|
|
1981
|
+
/**
|
|
1982
|
+
* Legacy per-principal keys (`sk-ac-*`).
|
|
1983
|
+
*
|
|
1984
|
+
* New developer integrations should use `client.developer`, which creates
|
|
1985
|
+
* project-scoped `csk_*` keys with explicit environments and scopes.
|
|
1986
|
+
*/
|
|
1161
1987
|
get apiKeys(): {
|
|
1162
1988
|
/**
|
|
1163
1989
|
* Generate a new API key for a principal (user or agent).
|
|
@@ -1305,6 +2131,14 @@ declare class CommonsClient {
|
|
|
1305
2131
|
}>;
|
|
1306
2132
|
/** Soft-delete (deactivate) a memory. */
|
|
1307
2133
|
delete: (memoryId: string) => Promise<void>;
|
|
2134
|
+
/** Create an append-only memory scope shared by a set of owned agents. */
|
|
2135
|
+
createSharedScope: (params: CreateSharedMemoryScopeParams) => Promise<{
|
|
2136
|
+
data: SharedMemoryScope;
|
|
2137
|
+
}>;
|
|
2138
|
+
/** List shared-memory scopes available to an agent. */
|
|
2139
|
+
listSharedScopes: (agentId: string) => Promise<{
|
|
2140
|
+
data: SharedMemoryScope[];
|
|
2141
|
+
}>;
|
|
1308
2142
|
};
|
|
1309
2143
|
get usage(): {
|
|
1310
2144
|
/** Get aggregated token + cost usage for an agent. */
|
|
@@ -1319,6 +2153,298 @@ declare class CommonsClient {
|
|
|
1319
2153
|
data: UsageAggregation;
|
|
1320
2154
|
}>;
|
|
1321
2155
|
};
|
|
2156
|
+
get activity(): {
|
|
2157
|
+
list: (filter?: {
|
|
2158
|
+
actorId?: string;
|
|
2159
|
+
eventType?: string;
|
|
2160
|
+
since?: string;
|
|
2161
|
+
limit?: number;
|
|
2162
|
+
}) => Promise<{
|
|
2163
|
+
data: ActivityEvent[];
|
|
2164
|
+
}>;
|
|
2165
|
+
};
|
|
2166
|
+
get logs(): {
|
|
2167
|
+
list: (agentId: string, filter?: {
|
|
2168
|
+
sessionId?: string;
|
|
2169
|
+
limit?: number;
|
|
2170
|
+
}) => Promise<{
|
|
2171
|
+
data: AgentLog[];
|
|
2172
|
+
}>;
|
|
2173
|
+
observability: (agentId: string, filter?: {
|
|
2174
|
+
from?: string;
|
|
2175
|
+
to?: string;
|
|
2176
|
+
limit?: number;
|
|
2177
|
+
}) => Promise<Record<string, unknown>>;
|
|
2178
|
+
};
|
|
2179
|
+
get files(): {
|
|
2180
|
+
upload: (files: UploadFileInput[], params?: {
|
|
2181
|
+
agentId?: string;
|
|
2182
|
+
sessionId?: string;
|
|
2183
|
+
workspaceId?: string;
|
|
2184
|
+
storageProvider?: "s3" | "ipfs";
|
|
2185
|
+
}) => Promise<{
|
|
2186
|
+
data: FileArtifact[];
|
|
2187
|
+
}>;
|
|
2188
|
+
get: (fileId: string, context?: {
|
|
2189
|
+
agentId?: string;
|
|
2190
|
+
sessionId?: string;
|
|
2191
|
+
}) => Promise<{
|
|
2192
|
+
data: FileArtifact;
|
|
2193
|
+
}>;
|
|
2194
|
+
content: (fileId: string, options?: {
|
|
2195
|
+
agentId?: string;
|
|
2196
|
+
sessionId?: string;
|
|
2197
|
+
offset?: number;
|
|
2198
|
+
maxChars?: number;
|
|
2199
|
+
includeImageUrls?: boolean;
|
|
2200
|
+
includeDownloadUrl?: boolean;
|
|
2201
|
+
}) => Promise<{
|
|
2202
|
+
data: FileContent;
|
|
2203
|
+
}>;
|
|
2204
|
+
};
|
|
2205
|
+
get library(): {
|
|
2206
|
+
list: (filter?: {
|
|
2207
|
+
query?: string;
|
|
2208
|
+
view?: string;
|
|
2209
|
+
source?: string;
|
|
2210
|
+
favorite?: boolean;
|
|
2211
|
+
sessionId?: string;
|
|
2212
|
+
limit?: number;
|
|
2213
|
+
offset?: number;
|
|
2214
|
+
}) => Promise<{
|
|
2215
|
+
data: LibraryItem[];
|
|
2216
|
+
total?: number;
|
|
2217
|
+
}>;
|
|
2218
|
+
get: (itemId: string) => Promise<{
|
|
2219
|
+
data: LibraryItem;
|
|
2220
|
+
}>;
|
|
2221
|
+
download: (itemId: string) => Promise<Record<string, unknown>>;
|
|
2222
|
+
preview: (itemId: string) => Promise<Record<string, unknown>>;
|
|
2223
|
+
update: (itemId: string, params: {
|
|
2224
|
+
name?: string;
|
|
2225
|
+
description?: string;
|
|
2226
|
+
isFavorite?: boolean;
|
|
2227
|
+
}) => Promise<{
|
|
2228
|
+
data: LibraryItem;
|
|
2229
|
+
}>;
|
|
2230
|
+
delete: (itemId: string) => Promise<{
|
|
2231
|
+
success?: boolean;
|
|
2232
|
+
}>;
|
|
2233
|
+
storagePreference: () => Promise<{
|
|
2234
|
+
data?: {
|
|
2235
|
+
defaultStorageProvider: "s3" | "ipfs";
|
|
2236
|
+
};
|
|
2237
|
+
defaultStorageProvider?: "s3" | "ipfs";
|
|
2238
|
+
}>;
|
|
2239
|
+
setStoragePreference: (defaultStorageProvider: "s3" | "ipfs") => Promise<{
|
|
2240
|
+
data?: {
|
|
2241
|
+
defaultStorageProvider: "s3" | "ipfs";
|
|
2242
|
+
};
|
|
2243
|
+
defaultStorageProvider?: "s3" | "ipfs";
|
|
2244
|
+
}>;
|
|
2245
|
+
grant: (itemId: string, params: {
|
|
2246
|
+
subjectType: "user" | "agent" | "workspace";
|
|
2247
|
+
subjectId: string;
|
|
2248
|
+
permission?: "read" | "edit" | "manage";
|
|
2249
|
+
expiresAt?: string | null;
|
|
2250
|
+
}) => Promise<{
|
|
2251
|
+
data: LibraryGrant;
|
|
2252
|
+
}>;
|
|
2253
|
+
revokeGrant: (itemId: string, grantId: string) => Promise<{
|
|
2254
|
+
success?: boolean;
|
|
2255
|
+
}>;
|
|
2256
|
+
createShareLink: (itemId: string, expiresAt?: string | null) => Promise<{
|
|
2257
|
+
data: LibraryShareLink;
|
|
2258
|
+
}>;
|
|
2259
|
+
revokeShareLink: (itemId: string, shareId: string) => Promise<{
|
|
2260
|
+
success?: boolean;
|
|
2261
|
+
}>;
|
|
2262
|
+
resolveShare: (token: string) => Promise<{
|
|
2263
|
+
data: LibraryItem;
|
|
2264
|
+
}>;
|
|
2265
|
+
};
|
|
2266
|
+
get spaces(): {
|
|
2267
|
+
list: (filter?: {
|
|
2268
|
+
memberId?: string;
|
|
2269
|
+
memberType?: "agent" | "human";
|
|
2270
|
+
agentIds?: string[];
|
|
2271
|
+
publicOnly?: boolean;
|
|
2272
|
+
search?: string;
|
|
2273
|
+
includeMembers?: boolean;
|
|
2274
|
+
limit?: number;
|
|
2275
|
+
offset?: number;
|
|
2276
|
+
}) => Promise<{
|
|
2277
|
+
data: Space[];
|
|
2278
|
+
total?: number;
|
|
2279
|
+
limit?: number;
|
|
2280
|
+
offset?: number;
|
|
2281
|
+
}>;
|
|
2282
|
+
create: (params: {
|
|
2283
|
+
name: string;
|
|
2284
|
+
description?: string;
|
|
2285
|
+
sessionId?: string;
|
|
2286
|
+
isPublic?: boolean;
|
|
2287
|
+
maxMembers?: number;
|
|
2288
|
+
image?: string;
|
|
2289
|
+
settings?: Record<string, unknown>;
|
|
2290
|
+
}, creator: {
|
|
2291
|
+
id: string;
|
|
2292
|
+
type: "agent" | "human";
|
|
2293
|
+
}) => Promise<{
|
|
2294
|
+
data: Space;
|
|
2295
|
+
}>;
|
|
2296
|
+
get: (spaceId: string) => Promise<{
|
|
2297
|
+
data: Space;
|
|
2298
|
+
}>;
|
|
2299
|
+
getFull: (spaceId: string) => Promise<{
|
|
2300
|
+
data: Space;
|
|
2301
|
+
}>;
|
|
2302
|
+
update: (spaceId: string, params: Partial<{
|
|
2303
|
+
name: string;
|
|
2304
|
+
description: string;
|
|
2305
|
+
sessionId: string;
|
|
2306
|
+
isPublic: boolean;
|
|
2307
|
+
maxMembers: number;
|
|
2308
|
+
image: string;
|
|
2309
|
+
settings: Record<string, unknown>;
|
|
2310
|
+
}>) => Promise<{
|
|
2311
|
+
data: Space;
|
|
2312
|
+
}>;
|
|
2313
|
+
delete: (spaceId: string) => Promise<{
|
|
2314
|
+
success?: boolean;
|
|
2315
|
+
}>;
|
|
2316
|
+
issueRtcTicket: (spaceId: string) => Promise<{
|
|
2317
|
+
data: {
|
|
2318
|
+
ticket: string;
|
|
2319
|
+
};
|
|
2320
|
+
}>;
|
|
2321
|
+
listMembers: (spaceId: string) => Promise<{
|
|
2322
|
+
data: SpaceMember[];
|
|
2323
|
+
}>;
|
|
2324
|
+
addMember: (spaceId: string, params: {
|
|
2325
|
+
memberId: string;
|
|
2326
|
+
memberType: "agent" | "human";
|
|
2327
|
+
role?: string;
|
|
2328
|
+
permissions?: Record<string, unknown>;
|
|
2329
|
+
}) => Promise<{
|
|
2330
|
+
data: SpaceMember;
|
|
2331
|
+
}>;
|
|
2332
|
+
updateMember: (spaceId: string, memberId: string, memberType: "agent" | "human", params: {
|
|
2333
|
+
role?: string;
|
|
2334
|
+
permissions?: Record<string, unknown>;
|
|
2335
|
+
status?: string;
|
|
2336
|
+
}) => Promise<{
|
|
2337
|
+
data: SpaceMember;
|
|
2338
|
+
}>;
|
|
2339
|
+
removeMember: (spaceId: string, memberId: string, memberType: "agent" | "human") => Promise<{
|
|
2340
|
+
success?: boolean;
|
|
2341
|
+
}>;
|
|
2342
|
+
listMessages: (spaceId: string, filter?: {
|
|
2343
|
+
limit?: number;
|
|
2344
|
+
offset?: number;
|
|
2345
|
+
memberId?: string;
|
|
2346
|
+
}) => Promise<{
|
|
2347
|
+
data: SpaceMessage[];
|
|
2348
|
+
}>;
|
|
2349
|
+
sendMessage: (spaceId: string, params: {
|
|
2350
|
+
content: string;
|
|
2351
|
+
targetType?: "broadcast" | "direct" | "group";
|
|
2352
|
+
targetIds?: string[];
|
|
2353
|
+
messageType?: string;
|
|
2354
|
+
metadata?: Record<string, unknown>;
|
|
2355
|
+
sessionId?: string;
|
|
2356
|
+
}, sender: {
|
|
2357
|
+
id: string;
|
|
2358
|
+
type: "agent" | "human";
|
|
2359
|
+
}) => Promise<{
|
|
2360
|
+
data: SpaceMessage;
|
|
2361
|
+
}>;
|
|
2362
|
+
updateMessage: (spaceId: string, messageId: string, params: {
|
|
2363
|
+
content?: string;
|
|
2364
|
+
metadata?: Record<string, unknown>;
|
|
2365
|
+
}) => Promise<{
|
|
2366
|
+
data: SpaceMessage;
|
|
2367
|
+
}>;
|
|
2368
|
+
deleteMessage: (spaceId: string, messageId: string) => Promise<{
|
|
2369
|
+
success?: boolean;
|
|
2370
|
+
}>;
|
|
2371
|
+
};
|
|
2372
|
+
get projects(): {
|
|
2373
|
+
list: (agentId: string) => Promise<{
|
|
2374
|
+
data: CodeProject[];
|
|
2375
|
+
}>;
|
|
2376
|
+
create: (agentId: string, params: {
|
|
2377
|
+
name: string;
|
|
2378
|
+
description?: string;
|
|
2379
|
+
sessionId?: string;
|
|
2380
|
+
files?: CodeProjectFile[];
|
|
2381
|
+
}) => Promise<{
|
|
2382
|
+
data: CodeProject;
|
|
2383
|
+
}>;
|
|
2384
|
+
get: (agentId: string, projectId: string) => Promise<{
|
|
2385
|
+
data: CodeProject;
|
|
2386
|
+
}>;
|
|
2387
|
+
writeFiles: (agentId: string, projectId: string, files: CodeProjectFile[], replace?: boolean) => Promise<{
|
|
2388
|
+
data: CodeProject;
|
|
2389
|
+
}>;
|
|
2390
|
+
publish: (agentId: string, projectId: string) => Promise<{
|
|
2391
|
+
data: Record<string, unknown>;
|
|
2392
|
+
}>;
|
|
2393
|
+
verify: (agentId: string, projectId: string, actions?: Array<Record<string, unknown>>) => Promise<{
|
|
2394
|
+
data: Record<string, unknown>;
|
|
2395
|
+
}>;
|
|
2396
|
+
exportToComputer: (agentId: string, projectId: string, params?: {
|
|
2397
|
+
directory?: string;
|
|
2398
|
+
sessionId?: string;
|
|
2399
|
+
}) => Promise<{
|
|
2400
|
+
data: Record<string, unknown>;
|
|
2401
|
+
}>;
|
|
2402
|
+
exportToGitHub: (agentId: string, projectId: string, params?: {
|
|
2403
|
+
repositoryName?: string;
|
|
2404
|
+
private?: boolean;
|
|
2405
|
+
}) => Promise<{
|
|
2406
|
+
data: Record<string, unknown>;
|
|
2407
|
+
}>;
|
|
2408
|
+
};
|
|
2409
|
+
get goals(): {
|
|
2410
|
+
create: (params: Record<string, unknown>) => Promise<{
|
|
2411
|
+
data: Goal;
|
|
2412
|
+
}>;
|
|
2413
|
+
get: (goalId: string) => Promise<{
|
|
2414
|
+
data: Goal;
|
|
2415
|
+
}>;
|
|
2416
|
+
updateProgress: (goalId: string, progress: number, status: Goal["status"]) => Promise<{
|
|
2417
|
+
data: Goal;
|
|
2418
|
+
}>;
|
|
2419
|
+
};
|
|
2420
|
+
get audio(): {
|
|
2421
|
+
transcribe: (file: UploadFileInput, options?: {
|
|
2422
|
+
durationMs?: number;
|
|
2423
|
+
idempotencyKey?: string;
|
|
2424
|
+
}) => Promise<{
|
|
2425
|
+
data: {
|
|
2426
|
+
text: string;
|
|
2427
|
+
};
|
|
2428
|
+
}>;
|
|
2429
|
+
};
|
|
2430
|
+
get liaisons(): {
|
|
2431
|
+
create: (params: {
|
|
2432
|
+
name: string;
|
|
2433
|
+
owner: string;
|
|
2434
|
+
externalOwner: string;
|
|
2435
|
+
persona?: string;
|
|
2436
|
+
instructions?: string;
|
|
2437
|
+
externalUrl?: string;
|
|
2438
|
+
externalEndpoint?: string;
|
|
2439
|
+
}) => Promise<{
|
|
2440
|
+
data: Agent;
|
|
2441
|
+
liaisonKey: string;
|
|
2442
|
+
note: string;
|
|
2443
|
+
}>;
|
|
2444
|
+
interact: (liaisonAgentId: string, liaisonKey: string, message?: string) => Promise<{
|
|
2445
|
+
data: unknown;
|
|
2446
|
+
}>;
|
|
2447
|
+
};
|
|
1322
2448
|
get credits(): {
|
|
1323
2449
|
balance: (filter?: {
|
|
1324
2450
|
principalId?: string;
|
|
@@ -1333,6 +2459,31 @@ declare class CommonsClient {
|
|
|
1333
2459
|
}) => Promise<{
|
|
1334
2460
|
data: CreditLedgerEntry[];
|
|
1335
2461
|
}>;
|
|
2462
|
+
summary: () => Promise<{
|
|
2463
|
+
data: CreditSummary;
|
|
2464
|
+
}>;
|
|
2465
|
+
campaigns: () => Promise<{
|
|
2466
|
+
data: CreditCampaign[];
|
|
2467
|
+
}>;
|
|
2468
|
+
claimCampaign: (params: {
|
|
2469
|
+
campaignKey: string;
|
|
2470
|
+
eventId?: string;
|
|
2471
|
+
}) => Promise<{
|
|
2472
|
+
data: {
|
|
2473
|
+
alreadyClaimed: boolean;
|
|
2474
|
+
};
|
|
2475
|
+
}>;
|
|
2476
|
+
transfers: () => Promise<{
|
|
2477
|
+
data: CreditTransfer[];
|
|
2478
|
+
}>;
|
|
2479
|
+
gift: (params: {
|
|
2480
|
+
recipientPrincipalId: string;
|
|
2481
|
+
amount: number;
|
|
2482
|
+
message?: string;
|
|
2483
|
+
idempotencyKey: string;
|
|
2484
|
+
}) => Promise<{
|
|
2485
|
+
data: CreditTransfer;
|
|
2486
|
+
}>;
|
|
1336
2487
|
grant: (params: CreditWriteParams) => Promise<{
|
|
1337
2488
|
data: CreditLedgerEntry;
|
|
1338
2489
|
}>;
|
|
@@ -1340,6 +2491,56 @@ declare class CommonsClient {
|
|
|
1340
2491
|
data: CreditLedgerEntry;
|
|
1341
2492
|
}>;
|
|
1342
2493
|
};
|
|
2494
|
+
get billing(): {
|
|
2495
|
+
/** Public product catalog served from the backend source of truth. */
|
|
2496
|
+
catalog: () => Promise<{
|
|
2497
|
+
data: BillingCatalog;
|
|
2498
|
+
}>;
|
|
2499
|
+
/** Current plan, status, and entitlements for the caller. */
|
|
2500
|
+
subscription: () => Promise<{
|
|
2501
|
+
data: SubscriptionInfo;
|
|
2502
|
+
}>;
|
|
2503
|
+
/** Entitlements only (what paid features the caller may use). */
|
|
2504
|
+
entitlements: () => Promise<{
|
|
2505
|
+
data: PlanEntitlements;
|
|
2506
|
+
}>;
|
|
2507
|
+
/** Stripe invoice history for the caller. */
|
|
2508
|
+
invoices: () => Promise<{
|
|
2509
|
+
data: BillingInvoice[];
|
|
2510
|
+
}>;
|
|
2511
|
+
/** Saved Stripe payment methods for the caller. */
|
|
2512
|
+
paymentMethods: () => Promise<{
|
|
2513
|
+
data: BillingPaymentMethod[];
|
|
2514
|
+
}>;
|
|
2515
|
+
/** Create a Stripe Checkout session for a subscription plan. */
|
|
2516
|
+
subscribe: (planKey: "plus" | "pro" | "max") => Promise<{
|
|
2517
|
+
data: {
|
|
2518
|
+
url: string;
|
|
2519
|
+
};
|
|
2520
|
+
}>;
|
|
2521
|
+
/** Create a Stripe Checkout session for a one-time credit top-up. */
|
|
2522
|
+
topup: (packKey: string) => Promise<{
|
|
2523
|
+
data: {
|
|
2524
|
+
url: string;
|
|
2525
|
+
};
|
|
2526
|
+
}>;
|
|
2527
|
+
/** Open the Stripe billing portal. */
|
|
2528
|
+
portal: () => Promise<{
|
|
2529
|
+
data: {
|
|
2530
|
+
url: string;
|
|
2531
|
+
};
|
|
2532
|
+
}>;
|
|
2533
|
+
};
|
|
2534
|
+
get flags(): {
|
|
2535
|
+
/** Evaluate all active flags for the caller (call once at boot). */
|
|
2536
|
+
all: () => Promise<{
|
|
2537
|
+
data: Record<string, FlagEvaluation>;
|
|
2538
|
+
}>;
|
|
2539
|
+
/** Evaluate a single flag for the caller. */
|
|
2540
|
+
evaluate: (key: string) => Promise<{
|
|
2541
|
+
data: FlagEvaluation;
|
|
2542
|
+
}>;
|
|
2543
|
+
};
|
|
1343
2544
|
}
|
|
1344
2545
|
declare class CommonsError extends Error {
|
|
1345
2546
|
readonly status: number;
|
|
@@ -1383,4 +2584,4 @@ declare function listWorkflowTemplates(): readonly [{
|
|
|
1383
2584
|
}];
|
|
1384
2585
|
declare function buildWorkflowTemplate(templateName: WorkflowTemplateName, ctx: WorkflowTemplateContext): WorkflowTemplateBuild;
|
|
1385
2586
|
|
|
1386
|
-
export { type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AMessage, type A2AMessagePart, type A2ASendTaskParams, type A2ASkill, type A2ATask, type A2ATaskState, type A2ATextPart, type Agent, type AgentCard, type AgentMemory, type AgentWallet, type ApiKey, type ApiKeyPrincipalType, type ChatMessage, CommonsClient, type CommonsClientConfig, CommonsError, type CreateAgentParams, type CreateApiKeyParams, type CreateMemoryParams, type CreateSkillParams, type CreateTaskParams, type CreateToolKeyParams, type CreateToolParams, type CreateWalletParams, type CreatedApiKey, type McpConnectionType, type McpPrompt, type McpResource, type McpServer, type MemorySourceType, type MemoryStats, type MemoryType, type ModelConfig, type ModelProvider, type RunParams, type Session, type Skill, type SkillIndex, type StreamEvent, type StreamEventType, type Task, type Tool, type ToolKey, type ToolPermission, type UpdateMemoryParams, type UsageAggregation, type UsageEvent, type WalletBalance, type WalletType, type Workflow, type WorkflowDefinition, type WorkflowEdge, type WorkflowExecution, type WorkflowNode, type WorkflowNodeType, type WorkflowTemplateBuild, type WorkflowTemplateContext, type WorkflowTemplateName, type WorkflowTemplateTool, buildWorkflowTemplate, listWorkflowTemplates };
|
|
2587
|
+
export { type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AMessage, type A2AMessagePart, type A2ASendTaskParams, type A2ASkill, type A2ATask, type A2ATaskState, type A2ATextPart, type ActivityEvent, type Agent, type AgentCard, type AgentComputer, type AgentComputerBrowser, type AgentComputerConfig, type AgentComputerDesiredState, type AgentComputerEvent, type AgentComputerGpu, type AgentComputerGpuType, type AgentComputerInstance, type AgentComputerLifecycle, type AgentComputerResourceMode, type AgentComputerResourceProfile, type AgentComputerResources, type AgentComputerStatus, type AgentComputerTerminal, type AgentLog, type AgentMemory, type AgentWallet, type ApiKey, type ApiKeyPrincipalType, type BillingCatalog, type BillingInvoice, type BillingPaymentMethod, type ChatMessage, type CodeProject, type CodeProjectFile, CommonsClient, type CommonsClientConfig, CommonsError, type CommonsRequestOptions, type ComputeProfile, type ComputerActionParams, type ComputerBrowserOpenParams, type ComputerCommandParams, type ComputerConfigUpdate, type ComputerFile, type ComputerGpu, type ComputerGpuType, type ComputerLifecycle, type ComputerNetworkAccess, type ComputerPersistence, type ComputerResizeParams, type ComputerResourceMode, type ComputerResourceProfile, type ComputerResourceUpdate, type ComputerResources, type CreateAgentParams, type CreateApiKeyParams, type CreateMemoryParams, type CreateSkillParams, type CreateTaskParams, type CreateToolKeyParams, type CreateToolParams, type CreateWalletParams, type CreatedApiKey, type CreatedDeveloperApiKey, type CreditBalance, type CreditCampaign, type CreditDirection, type CreditLedgerEntry, type CreditPlatform, type CreditSummary, type CreditTransfer, type CreditWriteParams, type DeveloperApiKey, type DeveloperProject, type DeveloperProjectEnvironment, type FileArtifact, type FileContent, type FlagEvaluation, type Goal, type LibraryGrant, type LibraryItem, type LibraryShareLink, type McpConnectionType, type McpPrompt, type McpResource, type McpServer, type MemorySourceType, type MemoryStats, type MemoryType, type ModelConfig, type ModelProvider, type ModelTier, type OAuthConnection, type OAuthProvider, type OutputPresentation, type PlanEntitlements, type PlanKey, type RunParams, type Session, type Skill, type SkillIndex, type Space, type SpaceMember, type SpaceMessage, type StreamEvent, type StreamEventType, type SubscriptionInfo, type Task, type Tool, type ToolKey, type ToolPermission, type UpdateMemoryParams, type UploadFileInput, type UsageAggregation, type UsageEvent, type WalletBalance, type WalletType, type Workflow, type WorkflowDefinition, type WorkflowEdge, type WorkflowExecution, type WorkflowNode, type WorkflowNodeType, type WorkflowTemplateBuild, type WorkflowTemplateContext, type WorkflowTemplateName, type WorkflowTemplateTool, type WorkflowValue, type WorkflowValueKind, buildWorkflowTemplate, listWorkflowTemplates };
|