@agents24/node 0.1.0 → 0.2.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/README.md +10 -1
- package/compatibility.json +6 -6
- package/dist/bff.cjs +295 -0
- package/dist/bff.cjs.map +1 -0
- package/dist/bff.d.cts +23 -0
- package/dist/bff.d.ts +23 -0
- package/dist/bff.js +293 -0
- package/dist/bff.js.map +1 -0
- package/dist/client-6MWalxux.d.cts +658 -0
- package/dist/client-6MWalxux.d.ts +658 -0
- package/dist/index.cjs +95 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -560
- package/dist/index.d.ts +3 -560
- package/dist/index.js +95 -13
- package/dist/index.js.map +1 -1
- package/dist/types/bff.d.ts +20 -0
- package/dist/types/bff.d.ts.map +1 -0
- package/dist/types/client-runtime-admin.d.ts +2 -2
- package/dist/types/client-runtime-admin.d.ts.map +1 -1
- package/dist/types/client.d.ts +4 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/embed.d.ts +1 -1
- package/dist/types/embed.d.ts.map +1 -1
- package/dist/types/generated/manifest.d.ts +1 -1
- package/dist/types/generated/manifest.d.ts.map +1 -1
- package/dist/types/generated/resourceBundles.d.ts +9 -0
- package/dist/types/generated/resourceBundles.d.ts.map +1 -0
- package/dist/types/generated/resourcePackages.d.ts +10 -0
- package/dist/types/generated/resourcePackages.d.ts.map +1 -0
- package/dist/types/types.d.ts +89 -8
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
import { ToolInputOverrides, ContextWindow, RuntimeEvent, RunContext, RunCancelResult, AttachmentUploadResult, RunResumeResult, ThreadsResponse, ThreadSummaryEvent, ThreadDetail, ThreadDeleteResult } from '@agents24/client/protocol';
|
|
2
|
+
|
|
3
|
+
type Agents24SDKErrorKind = "protocol" | "network" | "http";
|
|
4
|
+
type Agents24NodeErrorKind = Agents24SDKErrorKind;
|
|
5
|
+
declare class Agents24SDKError extends Error {
|
|
6
|
+
readonly kind: Agents24SDKErrorKind;
|
|
7
|
+
readonly status?: number;
|
|
8
|
+
readonly details?: unknown;
|
|
9
|
+
readonly responseHeaders?: Readonly<Record<string, string>>;
|
|
10
|
+
constructor(message: string, options: {
|
|
11
|
+
kind: Agents24SDKErrorKind;
|
|
12
|
+
status?: number;
|
|
13
|
+
details?: unknown;
|
|
14
|
+
responseHeaders?: Readonly<Record<string, string>>;
|
|
15
|
+
cause?: unknown;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type Agents24NodeOptions = {
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
apiKey: string;
|
|
22
|
+
organizationId: string;
|
|
23
|
+
projectId: string;
|
|
24
|
+
fetchImpl?: typeof fetch;
|
|
25
|
+
};
|
|
26
|
+
/** @deprecated Use Agents24NodeOptions. */
|
|
27
|
+
type Agents24Options = Agents24NodeOptions;
|
|
28
|
+
type RequestOptions = {
|
|
29
|
+
idempotencyKey?: string;
|
|
30
|
+
dryRun?: boolean;
|
|
31
|
+
validateOnly?: boolean;
|
|
32
|
+
requestMetadata?: Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
type BackendSessionRequestOptions = RequestOptions & {
|
|
35
|
+
dpopProof?: string;
|
|
36
|
+
};
|
|
37
|
+
type StreamRequestOptions = RequestOptions & {
|
|
38
|
+
signal?: AbortSignal;
|
|
39
|
+
};
|
|
40
|
+
type AgentStreamRequest = {
|
|
41
|
+
input?: string;
|
|
42
|
+
messages?: Array<Record<string, unknown>>;
|
|
43
|
+
attachment_ids?: string[];
|
|
44
|
+
thread_id?: string;
|
|
45
|
+
runtime_context?: Record<string, unknown>;
|
|
46
|
+
tool_inputs?: ToolInputOverrides;
|
|
47
|
+
requested_model_id?: string;
|
|
48
|
+
requested_model_node_id?: string;
|
|
49
|
+
external_user_id?: string;
|
|
50
|
+
external_session_id?: string;
|
|
51
|
+
metadata?: Record<string, unknown>;
|
|
52
|
+
client?: Record<string, unknown>;
|
|
53
|
+
node_state?: Record<string, unknown>;
|
|
54
|
+
runtime_target?: "draft" | "published";
|
|
55
|
+
agent_version_id?: string;
|
|
56
|
+
};
|
|
57
|
+
type StreamResult = {
|
|
58
|
+
threadId: string | null;
|
|
59
|
+
runId: string | null;
|
|
60
|
+
};
|
|
61
|
+
type EmbedStreamRequest = {
|
|
62
|
+
agent_version_id?: string;
|
|
63
|
+
input?: string;
|
|
64
|
+
messages?: Array<Record<string, unknown>>;
|
|
65
|
+
attachment_ids?: string[];
|
|
66
|
+
thread_id?: string;
|
|
67
|
+
runtime_context?: Record<string, unknown>;
|
|
68
|
+
tool_inputs?: ToolInputOverrides;
|
|
69
|
+
requested_model_id?: string;
|
|
70
|
+
requested_model_node_id?: string;
|
|
71
|
+
external_user_id: string;
|
|
72
|
+
external_session_id?: string;
|
|
73
|
+
metadata?: Record<string, unknown>;
|
|
74
|
+
client?: Record<string, unknown>;
|
|
75
|
+
};
|
|
76
|
+
type AttachRunRequest = {
|
|
77
|
+
external_user_id: string;
|
|
78
|
+
external_session_id?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
client?: Record<string, unknown>;
|
|
81
|
+
};
|
|
82
|
+
type HitlAction = "approve" | "reject" | "connect" | "skip";
|
|
83
|
+
type ResumeRunRequest = AttachRunRequest & {
|
|
84
|
+
schema_version: "agents24.hitl.resume.v2";
|
|
85
|
+
interrupt_id: string;
|
|
86
|
+
action: HitlAction;
|
|
87
|
+
comment?: string;
|
|
88
|
+
};
|
|
89
|
+
type McpAuthStartRequest = AttachRunRequest & {
|
|
90
|
+
interrupt_id: string;
|
|
91
|
+
callback_origin: string;
|
|
92
|
+
popup_nonce: string;
|
|
93
|
+
};
|
|
94
|
+
type McpAuthStartResult = {
|
|
95
|
+
authorization_url: string;
|
|
96
|
+
callback_origin: string;
|
|
97
|
+
};
|
|
98
|
+
type EmbedRuntimeBootstrap = {
|
|
99
|
+
version: string;
|
|
100
|
+
agent_name?: string;
|
|
101
|
+
agent_version_id?: string;
|
|
102
|
+
agent_version_number?: number;
|
|
103
|
+
model_selector?: Record<string, unknown> | null;
|
|
104
|
+
thread_events_path?: string | null;
|
|
105
|
+
thread_events_url?: string | null;
|
|
106
|
+
};
|
|
107
|
+
type MultiAgentThreadListRequest = {
|
|
108
|
+
agent_ids: string[];
|
|
109
|
+
external_user_id: string;
|
|
110
|
+
external_session_id?: string | null;
|
|
111
|
+
skip?: number;
|
|
112
|
+
limit?: number;
|
|
113
|
+
};
|
|
114
|
+
type ThreadListOptions = {
|
|
115
|
+
externalUserId: string;
|
|
116
|
+
externalSessionId?: string;
|
|
117
|
+
skip?: number;
|
|
118
|
+
limit?: number;
|
|
119
|
+
};
|
|
120
|
+
type ThreadDetailOptions = {
|
|
121
|
+
externalUserId: string;
|
|
122
|
+
externalSessionId?: string;
|
|
123
|
+
beforeTurnIndex?: number;
|
|
124
|
+
limit?: number;
|
|
125
|
+
includeRunEvents?: boolean;
|
|
126
|
+
includeSubthreads?: boolean;
|
|
127
|
+
subthreadDepth?: number;
|
|
128
|
+
subthreadTurnLimit?: number;
|
|
129
|
+
subthreadChildLimit?: number;
|
|
130
|
+
};
|
|
131
|
+
type RunContextOptions = {
|
|
132
|
+
externalUserId: string;
|
|
133
|
+
externalSessionId?: string;
|
|
134
|
+
};
|
|
135
|
+
type RunCancelOptions = {
|
|
136
|
+
externalUserId?: string;
|
|
137
|
+
externalSessionId?: string;
|
|
138
|
+
assistantOutputText?: string;
|
|
139
|
+
};
|
|
140
|
+
type EmbedRunCancelOptions = {
|
|
141
|
+
externalUserId?: string;
|
|
142
|
+
externalSessionId?: string;
|
|
143
|
+
};
|
|
144
|
+
type ThreadDeleteOptions = {
|
|
145
|
+
externalUserId: string;
|
|
146
|
+
externalSessionId?: string;
|
|
147
|
+
};
|
|
148
|
+
type ThreadSummaryEventOptions = {
|
|
149
|
+
externalUserId: string;
|
|
150
|
+
externalSessionId?: string | null;
|
|
151
|
+
cursor?: number | null;
|
|
152
|
+
signal?: AbortSignal;
|
|
153
|
+
};
|
|
154
|
+
type MultiAgentThreadSummaryEventOptions = ThreadSummaryEventOptions & {
|
|
155
|
+
agentIds: string[];
|
|
156
|
+
};
|
|
157
|
+
type ServerAttachmentUploadOptions = {
|
|
158
|
+
threadId?: string;
|
|
159
|
+
files: File[];
|
|
160
|
+
idempotencyKey?: string;
|
|
161
|
+
};
|
|
162
|
+
type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
|
|
163
|
+
externalUserId: string;
|
|
164
|
+
externalSessionId?: string;
|
|
165
|
+
};
|
|
166
|
+
type GraphNode = {
|
|
167
|
+
id: string;
|
|
168
|
+
type: string;
|
|
169
|
+
position: {
|
|
170
|
+
x: number;
|
|
171
|
+
y: number;
|
|
172
|
+
};
|
|
173
|
+
config: Record<string, unknown>;
|
|
174
|
+
label?: string;
|
|
175
|
+
data?: Record<string, unknown>;
|
|
176
|
+
input_mappings?: Record<string, unknown>;
|
|
177
|
+
};
|
|
178
|
+
type GraphEdge = {
|
|
179
|
+
id: string;
|
|
180
|
+
source: string;
|
|
181
|
+
target: string;
|
|
182
|
+
type?: string;
|
|
183
|
+
source_handle?: string;
|
|
184
|
+
target_handle?: string;
|
|
185
|
+
label?: string;
|
|
186
|
+
condition?: Record<string, unknown>;
|
|
187
|
+
};
|
|
188
|
+
type GraphDefinition = {
|
|
189
|
+
spec_version?: string;
|
|
190
|
+
graph_type?: "agent";
|
|
191
|
+
workflow_contract?: Record<string, unknown>;
|
|
192
|
+
state_contract?: Record<string, unknown>;
|
|
193
|
+
nodes: GraphNode[];
|
|
194
|
+
edges: GraphEdge[];
|
|
195
|
+
};
|
|
196
|
+
type AgentCreateRequest = {
|
|
197
|
+
name: string;
|
|
198
|
+
description?: string | null;
|
|
199
|
+
graph_definition: GraphDefinition;
|
|
200
|
+
memory_config?: Record<string, unknown>;
|
|
201
|
+
execution_constraints?: Record<string, unknown>;
|
|
202
|
+
};
|
|
203
|
+
type AgentUpdateRequest = Partial<AgentCreateRequest> & {
|
|
204
|
+
status?: string;
|
|
205
|
+
is_active?: boolean;
|
|
206
|
+
};
|
|
207
|
+
type AgentResponse = {
|
|
208
|
+
id: string;
|
|
209
|
+
organization_id: string;
|
|
210
|
+
project_id?: string | null;
|
|
211
|
+
name: string;
|
|
212
|
+
description?: string | null;
|
|
213
|
+
graph_definition: GraphDefinition;
|
|
214
|
+
memory_config: Record<string, unknown>;
|
|
215
|
+
execution_constraints: Record<string, unknown>;
|
|
216
|
+
status: string;
|
|
217
|
+
version: number;
|
|
218
|
+
is_active: boolean;
|
|
219
|
+
is_public: boolean;
|
|
220
|
+
show_in_playground: boolean;
|
|
221
|
+
default_embed_policy_set_id?: string | null;
|
|
222
|
+
created_at: string;
|
|
223
|
+
updated_at: string;
|
|
224
|
+
published_at?: string | null;
|
|
225
|
+
latest_published_version_id?: string | null;
|
|
226
|
+
has_unpublished_changes: boolean;
|
|
227
|
+
};
|
|
228
|
+
type AgentListResponse = {
|
|
229
|
+
items: AgentResponse[];
|
|
230
|
+
total: number;
|
|
231
|
+
};
|
|
232
|
+
type StartRunResult = {
|
|
233
|
+
run_id: string;
|
|
234
|
+
thread_id?: string | null;
|
|
235
|
+
};
|
|
236
|
+
type RunStatus = {
|
|
237
|
+
id: string;
|
|
238
|
+
status: string;
|
|
239
|
+
result?: unknown;
|
|
240
|
+
error?: string | null;
|
|
241
|
+
checkpoint?: Record<string, unknown> | null;
|
|
242
|
+
run_usage?: Record<string, unknown>;
|
|
243
|
+
context_window?: ContextWindow | null;
|
|
244
|
+
lineage?: Record<string, unknown>;
|
|
245
|
+
pending_interrupts?: Array<Record<string, unknown>>;
|
|
246
|
+
run_tree?: Record<string, unknown>;
|
|
247
|
+
};
|
|
248
|
+
type ControlPlaneRunEventsResponse = {
|
|
249
|
+
events: RuntimeEvent[];
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
};
|
|
252
|
+
type RunTrace = {
|
|
253
|
+
run: RunStatus;
|
|
254
|
+
tree: Record<string, unknown>;
|
|
255
|
+
events: ControlPlaneRunEventsResponse;
|
|
256
|
+
context: RunContext;
|
|
257
|
+
};
|
|
258
|
+
type AgentRef = string | {
|
|
259
|
+
id: string;
|
|
260
|
+
};
|
|
261
|
+
type LatestOrPinnedPolicy = {
|
|
262
|
+
mode: "latest_published";
|
|
263
|
+
} | {
|
|
264
|
+
mode: "pinned";
|
|
265
|
+
versionId: string;
|
|
266
|
+
};
|
|
267
|
+
type AgentToolsetAttachment = {
|
|
268
|
+
toolset: AgentRef;
|
|
269
|
+
loadingMode?: "static" | "dynamic";
|
|
270
|
+
versionPolicy?: LatestOrPinnedPolicy;
|
|
271
|
+
};
|
|
272
|
+
type AgentDefinitionOptions = {
|
|
273
|
+
name: string;
|
|
274
|
+
description?: string;
|
|
275
|
+
instructions?: string;
|
|
276
|
+
model?: AgentRef;
|
|
277
|
+
tools?: AgentRef[];
|
|
278
|
+
toolsetAttachments?: AgentToolsetAttachment[];
|
|
279
|
+
knowledge?: AgentRef[];
|
|
280
|
+
memory?: Record<string, unknown>;
|
|
281
|
+
execution?: Record<string, unknown>;
|
|
282
|
+
};
|
|
283
|
+
type Agents24SDKSerializedError = {
|
|
284
|
+
message: string;
|
|
285
|
+
kind: Agents24SDKErrorKind;
|
|
286
|
+
status?: number;
|
|
287
|
+
details?: unknown;
|
|
288
|
+
};
|
|
289
|
+
type ClientAuthMode = "anonymous" | "backend_exchange" | "external_oidc";
|
|
290
|
+
type NativePlatform = "react_native" | "electron" | "tauri";
|
|
291
|
+
type ClientRuntimeNativeProfileInput = {
|
|
292
|
+
name: string;
|
|
293
|
+
platform: NativePlatform;
|
|
294
|
+
application_id: string;
|
|
295
|
+
redirect_uris: string[];
|
|
296
|
+
attestation_required?: boolean;
|
|
297
|
+
};
|
|
298
|
+
type ClientRuntimeOidcConfig = {
|
|
299
|
+
issuer: string;
|
|
300
|
+
client_id: string;
|
|
301
|
+
audience: string;
|
|
302
|
+
authorization_endpoint?: string | null;
|
|
303
|
+
token_endpoint?: string | null;
|
|
304
|
+
jwks_uri?: string | null;
|
|
305
|
+
redirect_uris?: string[];
|
|
306
|
+
algorithms?: ["RS256"];
|
|
307
|
+
max_authentication_age_seconds?: number;
|
|
308
|
+
};
|
|
309
|
+
type ClientRuntimePolicyInput = {
|
|
310
|
+
capabilities?: string[];
|
|
311
|
+
model?: {
|
|
312
|
+
allow_selection?: boolean;
|
|
313
|
+
allowed_model_ids?: string[];
|
|
314
|
+
default_model_id?: string | null;
|
|
315
|
+
};
|
|
316
|
+
tools?: {
|
|
317
|
+
allowed_tool_ids?: string[];
|
|
318
|
+
allow_input_overrides?: boolean;
|
|
319
|
+
allow_side_effecting_anonymous?: boolean;
|
|
320
|
+
};
|
|
321
|
+
attachments?: {
|
|
322
|
+
enabled?: boolean;
|
|
323
|
+
max_files_per_request?: number;
|
|
324
|
+
max_file_bytes?: number;
|
|
325
|
+
max_total_bytes?: number;
|
|
326
|
+
allowed_mime_types?: string[];
|
|
327
|
+
max_image_pixels?: number;
|
|
328
|
+
max_pdf_pages?: number;
|
|
329
|
+
max_extracted_characters?: number;
|
|
330
|
+
retention_seconds?: number;
|
|
331
|
+
malware_scan_required?: boolean;
|
|
332
|
+
};
|
|
333
|
+
hitl?: {
|
|
334
|
+
enabled?: boolean;
|
|
335
|
+
allowed_actions?: HitlAction[];
|
|
336
|
+
};
|
|
337
|
+
mcp?: {
|
|
338
|
+
enabled?: boolean;
|
|
339
|
+
allowed_server_ids?: string[];
|
|
340
|
+
};
|
|
341
|
+
quotas?: {
|
|
342
|
+
session_mints_per_minute?: number;
|
|
343
|
+
refreshes_per_minute?: number;
|
|
344
|
+
chat_starts_per_minute?: number;
|
|
345
|
+
active_runs?: number;
|
|
346
|
+
concurrent_streams?: number;
|
|
347
|
+
upload_count_per_hour?: number;
|
|
348
|
+
upload_bytes_per_hour?: number;
|
|
349
|
+
hitl_resumes_per_minute?: number;
|
|
350
|
+
mcp_starts_per_minute?: number;
|
|
351
|
+
token_reservation_per_run?: number;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
type CreateClientDeploymentRequest = {
|
|
355
|
+
agent_id: string;
|
|
356
|
+
version_policy?: {
|
|
357
|
+
mode: "latest_published";
|
|
358
|
+
} | {
|
|
359
|
+
mode: "pinned";
|
|
360
|
+
version_id: string;
|
|
361
|
+
};
|
|
362
|
+
name: string;
|
|
363
|
+
description?: string | null;
|
|
364
|
+
auth_modes: ClientAuthMode[];
|
|
365
|
+
allowed_origins?: string[];
|
|
366
|
+
native_profiles?: ClientRuntimeNativeProfileInput[];
|
|
367
|
+
oidc?: ClientRuntimeOidcConfig | null;
|
|
368
|
+
policy?: ClientRuntimePolicyInput;
|
|
369
|
+
};
|
|
370
|
+
type UpdateClientDeploymentRequest = Partial<Omit<CreateClientDeploymentRequest, "agent_id">> & {
|
|
371
|
+
enabled?: boolean;
|
|
372
|
+
};
|
|
373
|
+
type ClientDeploymentListQuery = {
|
|
374
|
+
agentId: string;
|
|
375
|
+
status?: "active" | "revoked";
|
|
376
|
+
cursor?: string;
|
|
377
|
+
limit?: number;
|
|
378
|
+
};
|
|
379
|
+
type ClientNativeProfile = {
|
|
380
|
+
id: string;
|
|
381
|
+
profile_id: string;
|
|
382
|
+
name: string;
|
|
383
|
+
platform: NativePlatform;
|
|
384
|
+
application_id: string;
|
|
385
|
+
redirect_uris: string[];
|
|
386
|
+
dpop_required: boolean;
|
|
387
|
+
attestation_policy: Record<string, unknown>;
|
|
388
|
+
status: string;
|
|
389
|
+
created_at: string;
|
|
390
|
+
updated_at: string;
|
|
391
|
+
revoked_at: string | null;
|
|
392
|
+
};
|
|
393
|
+
type ClientDeployment = {
|
|
394
|
+
id: string;
|
|
395
|
+
client_id: string;
|
|
396
|
+
organization_id: string;
|
|
397
|
+
project_id: string;
|
|
398
|
+
agent_id: string;
|
|
399
|
+
purpose: "client_integration" | "hosted_share";
|
|
400
|
+
version_policy: {
|
|
401
|
+
mode: "latest_published";
|
|
402
|
+
} | {
|
|
403
|
+
mode: "pinned";
|
|
404
|
+
version_id: string;
|
|
405
|
+
};
|
|
406
|
+
resolved_version: {
|
|
407
|
+
version_id: string;
|
|
408
|
+
version_number: number;
|
|
409
|
+
};
|
|
410
|
+
name: string;
|
|
411
|
+
description: string | null;
|
|
412
|
+
enabled: boolean;
|
|
413
|
+
status: "active" | "revoked";
|
|
414
|
+
policy_epoch: number;
|
|
415
|
+
revocation_epoch: number;
|
|
416
|
+
auth_modes: ClientAuthMode[];
|
|
417
|
+
allowed_origins: string[];
|
|
418
|
+
scopes: string[];
|
|
419
|
+
capabilities: string[];
|
|
420
|
+
policy: Record<string, Record<string, unknown>>;
|
|
421
|
+
oidc: ClientRuntimeOidcConfig | null;
|
|
422
|
+
native_profiles: ClientNativeProfile[];
|
|
423
|
+
created_at: string;
|
|
424
|
+
updated_at: string;
|
|
425
|
+
revoked_at: string | null;
|
|
426
|
+
};
|
|
427
|
+
type ClientDeploymentListResponse = {
|
|
428
|
+
items: ClientDeployment[];
|
|
429
|
+
next_cursor: string | null;
|
|
430
|
+
};
|
|
431
|
+
type CreateBackendClientSessionRequest = {
|
|
432
|
+
subject: string;
|
|
433
|
+
subject_issuer?: string;
|
|
434
|
+
browser_origin?: string;
|
|
435
|
+
native_profile_id?: string;
|
|
436
|
+
requested_capabilities?: string[];
|
|
437
|
+
persistent?: boolean;
|
|
438
|
+
dpop_public_jwk?: Record<string, unknown>;
|
|
439
|
+
};
|
|
440
|
+
type ClientSessionCredentials = {
|
|
441
|
+
session_id: string;
|
|
442
|
+
access_token: string;
|
|
443
|
+
token_type: "Bearer" | "DPoP";
|
|
444
|
+
expires_at: string;
|
|
445
|
+
refresh_grant: string | null;
|
|
446
|
+
refresh_expires_at: string | null;
|
|
447
|
+
dpop_nonce: string | null;
|
|
448
|
+
};
|
|
449
|
+
type PortableResourceKind = "agent" | "rag_pipeline" | "instruction";
|
|
450
|
+
type ResourceSelector = {
|
|
451
|
+
kind: PortableResourceKind;
|
|
452
|
+
id: string;
|
|
453
|
+
target: "draft" | "version";
|
|
454
|
+
version_id?: string;
|
|
455
|
+
};
|
|
456
|
+
type ResourcePackageExportRequest = {
|
|
457
|
+
root: ResourceSelector;
|
|
458
|
+
};
|
|
459
|
+
type ResourcePackageArchive = {
|
|
460
|
+
data: Uint8Array;
|
|
461
|
+
filename: string;
|
|
462
|
+
};
|
|
463
|
+
type ResourcePackageUpload = {
|
|
464
|
+
data: Uint8Array;
|
|
465
|
+
filename?: string;
|
|
466
|
+
};
|
|
467
|
+
type ResourcePackageDiagnostic = {
|
|
468
|
+
severity: "error" | "warning";
|
|
469
|
+
code: string;
|
|
470
|
+
path: string;
|
|
471
|
+
message: string;
|
|
472
|
+
};
|
|
473
|
+
type ResourcePackageCompileResult = {
|
|
474
|
+
valid: boolean;
|
|
475
|
+
format: "agents24.resource_package";
|
|
476
|
+
schema_version: "1.0";
|
|
477
|
+
package: Record<string, unknown>;
|
|
478
|
+
entrypoint: string;
|
|
479
|
+
resources: Array<Record<string, unknown>>;
|
|
480
|
+
requirements: string[];
|
|
481
|
+
tool_exports: Array<Record<string, unknown>>;
|
|
482
|
+
callable_bindings: Array<Record<string, unknown>>;
|
|
483
|
+
diagnostics: ResourcePackageDiagnostic[];
|
|
484
|
+
bundle?: Record<string, unknown> | null;
|
|
485
|
+
};
|
|
486
|
+
type ResourceBundleImportRequest = {
|
|
487
|
+
bundle: Record<string, unknown>;
|
|
488
|
+
selected_resource_keys?: string[];
|
|
489
|
+
mappings?: Record<string, string>;
|
|
490
|
+
};
|
|
491
|
+
type ResourceBundleImportPreview = {
|
|
492
|
+
resources: Array<Record<string, unknown>>;
|
|
493
|
+
dependencies: Array<Record<string, unknown>>;
|
|
494
|
+
warnings: unknown[];
|
|
495
|
+
blockers: unknown[];
|
|
496
|
+
can_import: boolean;
|
|
497
|
+
[key: string]: unknown;
|
|
498
|
+
};
|
|
499
|
+
type ResourceBundleImportResult = {
|
|
500
|
+
status: "created";
|
|
501
|
+
resources: Array<Record<string, unknown>>;
|
|
502
|
+
id_map: Record<string, string>;
|
|
503
|
+
warnings: unknown[];
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
type RequestConfig = {
|
|
507
|
+
method?: string;
|
|
508
|
+
query?: Record<string, unknown>;
|
|
509
|
+
body?: unknown;
|
|
510
|
+
headers?: HeadersInit;
|
|
511
|
+
options?: RequestOptions;
|
|
512
|
+
mutation?: boolean;
|
|
513
|
+
};
|
|
514
|
+
declare class Agents24HttpClient {
|
|
515
|
+
private readonly base;
|
|
516
|
+
private readonly apiKey;
|
|
517
|
+
private readonly organizationId;
|
|
518
|
+
private readonly projectId;
|
|
519
|
+
private readonly fetchImpl;
|
|
520
|
+
constructor(options: Agents24NodeOptions);
|
|
521
|
+
url(requestPath: string, query?: Record<string, unknown>): string;
|
|
522
|
+
jsonHeaders(extra?: HeadersInit, options?: RequestOptions, mutation?: boolean): HeadersInit;
|
|
523
|
+
streamHeaders(extra?: HeadersInit, options?: RequestOptions, mutation?: boolean): HeadersInit;
|
|
524
|
+
multipartHeaders(extra?: HeadersInit, options?: RequestOptions, mutation?: boolean): HeadersInit;
|
|
525
|
+
requestJson<T>(requestPath: string, config?: RequestConfig): Promise<T>;
|
|
526
|
+
fetchOrThrow(url: string, init: RequestInit, message: string): Promise<Response>;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
type ListAgentsOptions = {
|
|
530
|
+
status?: string;
|
|
531
|
+
skip?: number;
|
|
532
|
+
limit?: number;
|
|
533
|
+
view?: "summary" | "full" | string;
|
|
534
|
+
};
|
|
535
|
+
declare class AgentsNamespace {
|
|
536
|
+
private readonly http;
|
|
537
|
+
constructor(http: Agents24HttpClient);
|
|
538
|
+
list(options?: ListAgentsOptions): Promise<AgentListResponse>;
|
|
539
|
+
get(agentId: string): Promise<AgentResponse>;
|
|
540
|
+
create(request: AgentCreateRequest, options?: RequestOptions): Promise<AgentResponse>;
|
|
541
|
+
update(agentId: string, request: AgentUpdateRequest, options?: RequestOptions): Promise<AgentResponse>;
|
|
542
|
+
updateGraph(agentId: string, graph: GraphDefinition, options?: RequestOptions): Promise<AgentResponse>;
|
|
543
|
+
delete(agentId: string, options?: RequestOptions): Promise<unknown>;
|
|
544
|
+
catalog(): Promise<Record<string, unknown>>;
|
|
545
|
+
schema(nodeTypes: string[]): Promise<Record<string, unknown>>;
|
|
546
|
+
validate(agentId: string): Promise<Record<string, unknown>>;
|
|
547
|
+
publish(agentId: string, options?: RequestOptions): Promise<AgentResponse>;
|
|
548
|
+
startRun(agentId: string, payload: AgentStreamRequest, options?: RequestOptions): Promise<StartRunResult>;
|
|
549
|
+
stream(agentId: string, payload: AgentStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, mode?: "debug" | "production" | string, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
550
|
+
resumeRun(runId: string, payload: Record<string, unknown>, options?: RequestOptions): Promise<Record<string, unknown>>;
|
|
551
|
+
cancelRun(runId: string, options?: RunCancelOptions): Promise<RunCancelResult>;
|
|
552
|
+
uploadAttachments(agentId: string, options: ServerAttachmentUploadOptions): Promise<AttachmentUploadResult>;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare class AgentDefinitionBuilder {
|
|
556
|
+
private readonly agents;
|
|
557
|
+
private readonly options;
|
|
558
|
+
constructor(agents: AgentsNamespace, options: AgentDefinitionOptions);
|
|
559
|
+
toGraph(): GraphDefinition;
|
|
560
|
+
toCreateRequest(): AgentCreateRequest;
|
|
561
|
+
create(options?: RequestOptions): Promise<AgentResponse>;
|
|
562
|
+
}
|
|
563
|
+
declare class GraphBuilder {
|
|
564
|
+
private readonly nodes;
|
|
565
|
+
private readonly edges;
|
|
566
|
+
node(type: string, config?: Record<string, unknown>, options?: {
|
|
567
|
+
id?: string;
|
|
568
|
+
x?: number;
|
|
569
|
+
y?: number;
|
|
570
|
+
label?: string;
|
|
571
|
+
}): GraphNode;
|
|
572
|
+
connect(source: GraphNode | string, target: GraphNode | string, options?: {
|
|
573
|
+
id?: string;
|
|
574
|
+
sourceHandle?: string;
|
|
575
|
+
targetHandle?: string;
|
|
576
|
+
}): this;
|
|
577
|
+
toGraph(): GraphDefinition;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
declare class ClientDeploymentsNamespace {
|
|
581
|
+
private readonly http;
|
|
582
|
+
constructor(http: Agents24HttpClient);
|
|
583
|
+
create(request: CreateClientDeploymentRequest, options?: RequestOptions): Promise<ClientDeployment>;
|
|
584
|
+
list(query: ClientDeploymentListQuery): Promise<ClientDeploymentListResponse>;
|
|
585
|
+
get(deploymentId: string): Promise<ClientDeployment>;
|
|
586
|
+
update(deploymentId: string, request: UpdateClientDeploymentRequest, options?: RequestOptions): Promise<ClientDeployment>;
|
|
587
|
+
revoke(deploymentId: string, options?: RequestOptions): Promise<ClientDeployment>;
|
|
588
|
+
}
|
|
589
|
+
declare class ClientSessionsNamespace {
|
|
590
|
+
private readonly http;
|
|
591
|
+
constructor(http: Agents24HttpClient);
|
|
592
|
+
createBackendSession(deploymentId: string, request: CreateBackendClientSessionRequest, options?: BackendSessionRequestOptions): Promise<ClientSessionCredentials>;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
declare class EmbedNamespace {
|
|
596
|
+
private readonly http;
|
|
597
|
+
constructor(http: Agents24HttpClient);
|
|
598
|
+
streamAgent(agentId: string, payload: EmbedStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
599
|
+
attachAgentRun(agentId: string, runId: string, payload: AttachRunRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
600
|
+
private stream;
|
|
601
|
+
resumeAgentRun(agentId: string, runId: string, payload: ResumeRunRequest, options?: RequestOptions): Promise<RunResumeResult>;
|
|
602
|
+
startAgentRunMcpAuth(agentId: string, runId: string, serverId: string, payload: McpAuthStartRequest, options?: RequestOptions): Promise<McpAuthStartResult>;
|
|
603
|
+
getRuntimeBootstrap(agentId: string, agentVersionId?: string): Promise<EmbedRuntimeBootstrap>;
|
|
604
|
+
listAgentThreads(agentId: string, options: ThreadListOptions): Promise<ThreadsResponse>;
|
|
605
|
+
listAgentThreadsMulti(options: MultiAgentThreadListRequest): Promise<ThreadsResponse>;
|
|
606
|
+
subscribeAgentThreadEvents(agentId: string, options: ThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
|
|
607
|
+
subscribeAgentThreadEventsMulti(options: MultiAgentThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
|
|
608
|
+
getAgentThread(agentId: string, threadId: string, options: ThreadDetailOptions): Promise<ThreadDetail>;
|
|
609
|
+
deleteAgentThread(agentId: string, threadId: string, options: ThreadDeleteOptions): Promise<ThreadDeleteResult>;
|
|
610
|
+
getAgentRunContext(agentId: string, runId: string, options: RunContextOptions): Promise<RunContext>;
|
|
611
|
+
cancelAgentRun(agentId: string, runId: string, options: EmbedRunCancelOptions): Promise<RunCancelResult>;
|
|
612
|
+
uploadAgentAttachments(agentId: string, options: ServerEmbedAttachmentUploadOptions): Promise<AttachmentUploadResult>;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
declare class ResourceBundlesNamespace {
|
|
616
|
+
protected readonly http: Agents24HttpClient;
|
|
617
|
+
constructor(http: Agents24HttpClient);
|
|
618
|
+
importPreview(request: ResourceBundleImportRequest): Promise<ResourceBundleImportPreview>;
|
|
619
|
+
importBundle(request: ResourceBundleImportRequest, options?: RequestOptions): Promise<ResourceBundleImportResult>;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
declare class ResourcePackagesNamespace {
|
|
623
|
+
protected readonly http: Agents24HttpClient;
|
|
624
|
+
constructor(http: Agents24HttpClient);
|
|
625
|
+
exportPackage(request: ResourcePackageExportRequest): Promise<ResourcePackageArchive>;
|
|
626
|
+
validatePackage(upload: ResourcePackageUpload): Promise<ResourcePackageCompileResult>;
|
|
627
|
+
compilePackage(upload: ResourcePackageUpload): Promise<ResourcePackageCompileResult>;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
declare class RunsNamespace {
|
|
631
|
+
private readonly http;
|
|
632
|
+
constructor(http: Agents24HttpClient);
|
|
633
|
+
get(runId: string, options?: {
|
|
634
|
+
includeTree?: boolean;
|
|
635
|
+
}): Promise<RunStatus>;
|
|
636
|
+
getTree(runId: string): Promise<Record<string, unknown>>;
|
|
637
|
+
getEvents(runId: string, options?: {
|
|
638
|
+
afterSequence?: number;
|
|
639
|
+
limit?: number;
|
|
640
|
+
}): Promise<ControlPlaneRunEventsResponse>;
|
|
641
|
+
getContext(runId: string): Promise<RunContext>;
|
|
642
|
+
getTrace(runId: string): Promise<RunTrace>;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
declare class Agents24 {
|
|
646
|
+
readonly agents: AgentsNamespace;
|
|
647
|
+
readonly embed: EmbedNamespace;
|
|
648
|
+
readonly runs: RunsNamespace;
|
|
649
|
+
readonly resourceBundles: ResourceBundlesNamespace;
|
|
650
|
+
readonly resourcePackages: ResourcePackagesNamespace;
|
|
651
|
+
readonly clientDeployments: ClientDeploymentsNamespace;
|
|
652
|
+
readonly clientSessions: ClientSessionsNamespace;
|
|
653
|
+
constructor(options: Agents24NodeOptions);
|
|
654
|
+
agent(options: AgentDefinitionOptions): AgentDefinitionBuilder;
|
|
655
|
+
graph(): GraphBuilder;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export { type ResourcePackageUpload as $, Agents24 as A, type BackendSessionRequestOptions as B, type ClientAuthMode as C, type CreateClientDeploymentRequest as D, type EmbedRunCancelOptions as E, type EmbedRuntimeBootstrap as F, type EmbedStreamRequest as G, GraphBuilder as H, type GraphDefinition as I, type GraphEdge as J, type GraphNode as K, type HitlAction as L, type LatestOrPinnedPolicy as M, type McpAuthStartRequest as N, type McpAuthStartResult as O, type MultiAgentThreadListRequest as P, type MultiAgentThreadSummaryEventOptions as Q, type NativePlatform as R, type PortableResourceKind as S, type RequestOptions as T, type ResourceBundleImportPreview as U, type ResourceBundleImportRequest as V, type ResourceBundleImportResult as W, type ResourcePackageArchive as X, type ResourcePackageCompileResult as Y, type ResourcePackageDiagnostic as Z, type ResourcePackageExportRequest as _, type AgentCreateRequest as a, type ResourceSelector as a0, type ResumeRunRequest as a1, type RunCancelOptions as a2, type RunContextOptions as a3, type RunStatus as a4, type RunTrace as a5, type ServerAttachmentUploadOptions as a6, type ServerEmbedAttachmentUploadOptions as a7, type StartRunResult as a8, type StreamRequestOptions as a9, type StreamResult as aa, type ThreadDeleteOptions as ab, type ThreadDetailOptions as ac, type ThreadListOptions as ad, type ThreadSummaryEventOptions as ae, type UpdateClientDeploymentRequest as af, AgentDefinitionBuilder as b, type AgentDefinitionOptions as c, type AgentListResponse as d, type AgentRef as e, type AgentResponse as f, type AgentStreamRequest as g, type AgentToolsetAttachment as h, type AgentUpdateRequest as i, Agents24SDKError as j, type Agents24NodeErrorKind as k, type Agents24NodeOptions as l, type Agents24Options as m, type Agents24SDKErrorKind as n, type Agents24SDKSerializedError as o, type AttachRunRequest as p, type ClientDeployment as q, type ClientDeploymentListQuery as r, type ClientDeploymentListResponse as s, type ClientNativeProfile as t, type ClientRuntimeNativeProfileInput as u, type ClientRuntimeOidcConfig as v, type ClientRuntimePolicyInput as w, type ClientSessionCredentials as x, type ControlPlaneRunEventsResponse as y, type CreateBackendClientSessionRequest as z };
|