@agents24/node 0.1.0 → 0.2.1
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 +25 -3
- package/compatibility.json +10 -10
- package/dist/bff.cjs +466 -0
- package/dist/bff.cjs.map +1 -0
- package/dist/bff.d.cts +25 -0
- package/dist/bff.d.ts +25 -0
- package/dist/bff.js +464 -0
- package/dist/bff.js.map +1 -0
- package/dist/client-CnOaaCVH.d.cts +1018 -0
- package/dist/client-CnOaaCVH.d.ts +1018 -0
- package/dist/index.cjs +279 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -561
- package/dist/index.d.ts +4 -561
- package/dist/index.js +279 -55
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +52 -6
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +14 -2
- package/dist/server.d.ts +14 -2
- package/dist/server.js +50 -7
- package/dist/server.js.map +1 -1
- package/dist/types/agents.d.ts +5 -4
- package/dist/types/agents.d.ts.map +1 -1
- package/dist/types/bff.d.ts +22 -0
- package/dist/types/bff.d.ts.map +1 -0
- package/dist/types/builders.d.ts +2 -0
- package/dist/types/builders.d.ts.map +1 -1
- package/dist/types/client-runtime-admin.d.ts +3 -3
- package/dist/types/client-runtime-admin.d.ts.map +1 -1
- package/dist/types/client.d.ts +8 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/embed.d.ts +6 -4
- package/dist/types/embed.d.ts.map +1 -1
- package/dist/types/errors.d.ts +10 -2
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/generated/instructions.d.ts +8 -0
- package/dist/types/generated/instructions.d.ts.map +1 -0
- 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 +12 -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/generated/resourcePolicies.d.ts +14 -0
- package/dist/types/generated/resourcePolicies.d.ts.map +1 -0
- package/dist/types/http.d.ts +0 -2
- package/dist/types/http.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/runs.d.ts +4 -2
- package/dist/types/runs.d.ts.map +1 -1
- package/dist/types/server.d.ts +13 -1
- package/dist/types/server.d.ts.map +1 -1
- package/dist/types/types.d.ts +466 -61
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,1018 @@
|
|
|
1
|
+
import { ToolInputOverrides, ContextWindow, RuntimeEvent, RunCancelResult, AttachmentUploadResult, AttachmentContentAccess, RunResumeResult, ThreadsResponse, ThreadSummaryEvent, ThreadDetail, ThreadDeleteResult, RunContext } from '@agents24/client/protocol';
|
|
2
|
+
|
|
3
|
+
type Agents24SDKErrorKind = "protocol" | "network" | "http";
|
|
4
|
+
type Agents24NodeErrorKind = Agents24SDKErrorKind;
|
|
5
|
+
|
|
6
|
+
declare class Agents24SDKError extends Error {
|
|
7
|
+
readonly kind: Agents24SDKErrorKind;
|
|
8
|
+
readonly status?: number;
|
|
9
|
+
readonly failure?: FailureView;
|
|
10
|
+
readonly responseHeaders?: Readonly<Record<string, string>>;
|
|
11
|
+
constructor(message: string, options: {
|
|
12
|
+
kind: Agents24SDKErrorKind;
|
|
13
|
+
status?: number;
|
|
14
|
+
failure?: FailureView;
|
|
15
|
+
responseHeaders?: Readonly<Record<string, string>>;
|
|
16
|
+
cause?: unknown;
|
|
17
|
+
});
|
|
18
|
+
get code(): string | undefined;
|
|
19
|
+
get category(): string | undefined;
|
|
20
|
+
get failureId(): string | undefined;
|
|
21
|
+
get requestId(): string | undefined;
|
|
22
|
+
get retryable(): boolean;
|
|
23
|
+
get retryAfterMs(): number | undefined;
|
|
24
|
+
get details(): Readonly<Record<string, unknown>>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type Agents24NodeOptions = {
|
|
28
|
+
baseUrl: string;
|
|
29
|
+
apiKey: string;
|
|
30
|
+
fetchImpl?: typeof fetch;
|
|
31
|
+
};
|
|
32
|
+
/** @deprecated Use Agents24NodeOptions. */
|
|
33
|
+
type Agents24Options = Agents24NodeOptions;
|
|
34
|
+
type RequestOptions = {
|
|
35
|
+
idempotencyKey?: string;
|
|
36
|
+
dryRun?: boolean;
|
|
37
|
+
validateOnly?: boolean;
|
|
38
|
+
requestMetadata?: Record<string, unknown>;
|
|
39
|
+
};
|
|
40
|
+
type BackendSessionRequestOptions = RequestOptions & {
|
|
41
|
+
dpopProof?: string;
|
|
42
|
+
};
|
|
43
|
+
type StreamRequestOptions = RequestOptions & {
|
|
44
|
+
signal?: AbortSignal;
|
|
45
|
+
};
|
|
46
|
+
type AgentStreamRequest = {
|
|
47
|
+
input?: string;
|
|
48
|
+
messages?: Array<Record<string, unknown>>;
|
|
49
|
+
attachment_ids?: string[];
|
|
50
|
+
thread_id?: string;
|
|
51
|
+
runtime_context?: Record<string, unknown>;
|
|
52
|
+
tool_inputs?: ToolInputOverrides;
|
|
53
|
+
requested_model_id?: string;
|
|
54
|
+
requested_model_node_id?: string;
|
|
55
|
+
external_user_id?: string;
|
|
56
|
+
external_session_id?: string;
|
|
57
|
+
metadata?: Record<string, unknown>;
|
|
58
|
+
client?: Record<string, unknown>;
|
|
59
|
+
node_state?: Record<string, unknown>;
|
|
60
|
+
runtime_target?: "draft" | "published";
|
|
61
|
+
agent_version_id?: string;
|
|
62
|
+
};
|
|
63
|
+
type StreamResult = {
|
|
64
|
+
threadId: string | null;
|
|
65
|
+
runId: string | null;
|
|
66
|
+
};
|
|
67
|
+
type EmbedStreamRequest = {
|
|
68
|
+
agent_version_id?: string;
|
|
69
|
+
input?: string;
|
|
70
|
+
messages?: Array<Record<string, unknown>>;
|
|
71
|
+
attachment_ids?: string[];
|
|
72
|
+
thread_id?: string;
|
|
73
|
+
runtime_context?: Record<string, unknown>;
|
|
74
|
+
tool_inputs?: ToolInputOverrides;
|
|
75
|
+
requested_model_id?: string;
|
|
76
|
+
requested_model_node_id?: string;
|
|
77
|
+
external_user_id: string;
|
|
78
|
+
external_user_issuer?: string;
|
|
79
|
+
external_session_id?: string;
|
|
80
|
+
metadata?: Record<string, unknown>;
|
|
81
|
+
client?: Record<string, unknown>;
|
|
82
|
+
};
|
|
83
|
+
type AttachRunRequest = {
|
|
84
|
+
external_user_id: string;
|
|
85
|
+
external_session_id?: string;
|
|
86
|
+
metadata?: Record<string, unknown>;
|
|
87
|
+
client?: Record<string, unknown>;
|
|
88
|
+
cursor?: number;
|
|
89
|
+
};
|
|
90
|
+
type FeedbackRating = "like" | "dislike";
|
|
91
|
+
type FeedbackReason = "incorrect" | "irrelevant" | "incomplete" | "unsafe" | "citation_issue" | "other";
|
|
92
|
+
type ResponseFeedback = {
|
|
93
|
+
rating: FeedbackRating;
|
|
94
|
+
reason: FeedbackReason | null;
|
|
95
|
+
comment: string | null;
|
|
96
|
+
created_at: string;
|
|
97
|
+
updated_at: string;
|
|
98
|
+
};
|
|
99
|
+
type ResponseFeedbackResult = {
|
|
100
|
+
run_id: string;
|
|
101
|
+
feedback: ResponseFeedback | null;
|
|
102
|
+
};
|
|
103
|
+
type EmbeddedResponseFeedbackInput = {
|
|
104
|
+
external_user_id: string;
|
|
105
|
+
external_session_id?: string;
|
|
106
|
+
rating: FeedbackRating | null;
|
|
107
|
+
reason?: FeedbackReason | null;
|
|
108
|
+
comment?: string | null;
|
|
109
|
+
};
|
|
110
|
+
type HitlAction = "approve" | "reject" | "connect" | "skip" | "respond";
|
|
111
|
+
type HitlAnswer = {
|
|
112
|
+
question_id: string;
|
|
113
|
+
selected_option_ids: string[];
|
|
114
|
+
custom_text?: string;
|
|
115
|
+
};
|
|
116
|
+
type ResumeRunRequest = AttachRunRequest & {
|
|
117
|
+
schema_version: "agents24.hitl.resume.v2";
|
|
118
|
+
interrupt_id: string;
|
|
119
|
+
action: HitlAction;
|
|
120
|
+
comment?: string;
|
|
121
|
+
answers?: HitlAnswer[];
|
|
122
|
+
};
|
|
123
|
+
type McpAuthStartRequest = AttachRunRequest & {
|
|
124
|
+
interrupt_id: string;
|
|
125
|
+
callback_origin: string;
|
|
126
|
+
popup_nonce: string;
|
|
127
|
+
};
|
|
128
|
+
type McpAuthStartResult = {
|
|
129
|
+
authorization_url: string;
|
|
130
|
+
callback_origin: string;
|
|
131
|
+
};
|
|
132
|
+
type EmbedRuntimeBootstrap = {
|
|
133
|
+
version: string;
|
|
134
|
+
agent_name?: string;
|
|
135
|
+
agent_version_id?: string;
|
|
136
|
+
agent_version_number?: number;
|
|
137
|
+
features: Record<string, unknown>;
|
|
138
|
+
thread_events_path?: string | null;
|
|
139
|
+
thread_events_url?: string | null;
|
|
140
|
+
};
|
|
141
|
+
type MultiAgentThreadListRequest = {
|
|
142
|
+
agent_ids: string[];
|
|
143
|
+
external_user_id: string;
|
|
144
|
+
external_session_id?: string | null;
|
|
145
|
+
skip?: number;
|
|
146
|
+
limit?: number;
|
|
147
|
+
};
|
|
148
|
+
type ThreadListOptions = {
|
|
149
|
+
externalUserId: string;
|
|
150
|
+
externalSessionId?: string;
|
|
151
|
+
skip?: number;
|
|
152
|
+
limit?: number;
|
|
153
|
+
};
|
|
154
|
+
type ThreadDetailOptions = {
|
|
155
|
+
externalUserId: string;
|
|
156
|
+
externalSessionId?: string;
|
|
157
|
+
beforeTurnIndex?: number;
|
|
158
|
+
limit?: number;
|
|
159
|
+
includeSubthreads?: boolean;
|
|
160
|
+
subthreadDepth?: number;
|
|
161
|
+
subthreadTurnLimit?: number;
|
|
162
|
+
subthreadChildLimit?: number;
|
|
163
|
+
};
|
|
164
|
+
type RunContextOptions = {
|
|
165
|
+
externalUserId: string;
|
|
166
|
+
externalSessionId?: string;
|
|
167
|
+
};
|
|
168
|
+
type RunCancelOptions = {
|
|
169
|
+
externalUserId?: string;
|
|
170
|
+
externalSessionId?: string;
|
|
171
|
+
assistantOutputText?: string;
|
|
172
|
+
};
|
|
173
|
+
type EmbedRunCancelOptions = {
|
|
174
|
+
externalUserId?: string;
|
|
175
|
+
externalSessionId?: string;
|
|
176
|
+
};
|
|
177
|
+
type ThreadDeleteOptions = {
|
|
178
|
+
externalUserId: string;
|
|
179
|
+
externalSessionId?: string;
|
|
180
|
+
};
|
|
181
|
+
type ThreadSummaryEventOptions = {
|
|
182
|
+
externalUserId: string;
|
|
183
|
+
externalSessionId?: string | null;
|
|
184
|
+
cursor?: number | null;
|
|
185
|
+
signal?: AbortSignal;
|
|
186
|
+
};
|
|
187
|
+
type MultiAgentThreadSummaryEventOptions = ThreadSummaryEventOptions & {
|
|
188
|
+
agentIds: string[];
|
|
189
|
+
};
|
|
190
|
+
type ServerAttachmentUploadOptions = {
|
|
191
|
+
threadId?: string;
|
|
192
|
+
agentVersionId?: string;
|
|
193
|
+
files: File[];
|
|
194
|
+
idempotencyKey?: string;
|
|
195
|
+
};
|
|
196
|
+
type AttachmentContentAccessRequest = {
|
|
197
|
+
disposition: "inline" | "attachment";
|
|
198
|
+
};
|
|
199
|
+
type EmbedAttachmentContentAccessRequest = AttachmentContentAccessRequest & {
|
|
200
|
+
external_user_id: string;
|
|
201
|
+
external_session_id?: string | null;
|
|
202
|
+
};
|
|
203
|
+
type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
|
|
204
|
+
externalUserId: string;
|
|
205
|
+
externalSessionId?: string;
|
|
206
|
+
};
|
|
207
|
+
type GraphValueRef = {
|
|
208
|
+
namespace: "workflow_input" | "state" | "node_output";
|
|
209
|
+
key: string;
|
|
210
|
+
node_id?: string;
|
|
211
|
+
expected_type?: "string" | "number" | "boolean" | "object" | "list" | "unknown";
|
|
212
|
+
label?: string;
|
|
213
|
+
};
|
|
214
|
+
type WorkflowInputDefinition = {
|
|
215
|
+
key: string;
|
|
216
|
+
type: "string" | "number" | "boolean" | "object" | "list";
|
|
217
|
+
required?: boolean;
|
|
218
|
+
enabled?: boolean;
|
|
219
|
+
label?: string;
|
|
220
|
+
description?: string;
|
|
221
|
+
semantic_type?: string;
|
|
222
|
+
readonly?: boolean;
|
|
223
|
+
derived?: boolean;
|
|
224
|
+
};
|
|
225
|
+
type StateVariableDefinition = {
|
|
226
|
+
key: string;
|
|
227
|
+
type: "string" | "number" | "boolean" | "object" | "list";
|
|
228
|
+
description?: string;
|
|
229
|
+
schema?: Record<string, unknown>;
|
|
230
|
+
default_value?: unknown;
|
|
231
|
+
};
|
|
232
|
+
type GraphNode = {
|
|
233
|
+
id: string;
|
|
234
|
+
type: string;
|
|
235
|
+
position: {
|
|
236
|
+
x: number;
|
|
237
|
+
y: number;
|
|
238
|
+
};
|
|
239
|
+
config: Record<string, unknown>;
|
|
240
|
+
label?: string;
|
|
241
|
+
data?: Record<string, unknown>;
|
|
242
|
+
input_mappings?: Record<string, string>;
|
|
243
|
+
};
|
|
244
|
+
type GraphEdge = {
|
|
245
|
+
id: string;
|
|
246
|
+
source: string;
|
|
247
|
+
target: string;
|
|
248
|
+
type?: "control" | "data";
|
|
249
|
+
source_handle?: string;
|
|
250
|
+
target_handle?: string;
|
|
251
|
+
label?: string;
|
|
252
|
+
condition?: string;
|
|
253
|
+
};
|
|
254
|
+
type GraphDefinition = {
|
|
255
|
+
spec_version: "4.0";
|
|
256
|
+
graph_type: "agent";
|
|
257
|
+
workflow_contract: {
|
|
258
|
+
inputs: WorkflowInputDefinition[];
|
|
259
|
+
};
|
|
260
|
+
state_contract: {
|
|
261
|
+
variables: StateVariableDefinition[];
|
|
262
|
+
};
|
|
263
|
+
prompt_version_policies?: Record<string, unknown>;
|
|
264
|
+
nodes: GraphNode[];
|
|
265
|
+
edges: GraphEdge[];
|
|
266
|
+
metadata?: Record<string, unknown>;
|
|
267
|
+
};
|
|
268
|
+
type NodeCatalogItem = {
|
|
269
|
+
type: string;
|
|
270
|
+
title: string;
|
|
271
|
+
description?: string | null;
|
|
272
|
+
category: string;
|
|
273
|
+
input_type: string;
|
|
274
|
+
output_type: string;
|
|
275
|
+
required_config_fields: string[];
|
|
276
|
+
icon?: string | null;
|
|
277
|
+
color?: string | null;
|
|
278
|
+
editor?: string | null;
|
|
279
|
+
};
|
|
280
|
+
type BranchingHint = {
|
|
281
|
+
kind: string;
|
|
282
|
+
field?: string | null;
|
|
283
|
+
id_key?: string | null;
|
|
284
|
+
label_key?: string | null;
|
|
285
|
+
static_handles: string[];
|
|
286
|
+
default_handles: string[];
|
|
287
|
+
};
|
|
288
|
+
type GraphHints = {
|
|
289
|
+
editor: string;
|
|
290
|
+
branching?: BranchingHint | null;
|
|
291
|
+
};
|
|
292
|
+
type NodeAuthoringSpec = {
|
|
293
|
+
type: string;
|
|
294
|
+
title: string;
|
|
295
|
+
description?: string | null;
|
|
296
|
+
category: string;
|
|
297
|
+
input_type: string;
|
|
298
|
+
output_type: string;
|
|
299
|
+
config_schema: Record<string, unknown>;
|
|
300
|
+
input_schema?: Record<string, unknown> | null;
|
|
301
|
+
output_schema?: Record<string, unknown> | null;
|
|
302
|
+
field_contracts?: Record<string, unknown> | null;
|
|
303
|
+
graph_hints?: GraphHints | null;
|
|
304
|
+
node_template?: GraphNode | null;
|
|
305
|
+
normalization_defaults: Record<string, unknown>;
|
|
306
|
+
};
|
|
307
|
+
type NodeCatalogResponse = {
|
|
308
|
+
nodes: NodeCatalogItem[];
|
|
309
|
+
};
|
|
310
|
+
type NodeSchemaResponse = {
|
|
311
|
+
specs: Record<string, NodeAuthoringSpec>;
|
|
312
|
+
unknown: string[];
|
|
313
|
+
instance_contract: Record<string, unknown>;
|
|
314
|
+
};
|
|
315
|
+
type AgentValidationIssue = {
|
|
316
|
+
code: string;
|
|
317
|
+
message: string;
|
|
318
|
+
severity: "error" | "warning";
|
|
319
|
+
node_id?: string | null;
|
|
320
|
+
edge_id?: string | null;
|
|
321
|
+
path?: string | null;
|
|
322
|
+
expected?: unknown;
|
|
323
|
+
actual?: unknown;
|
|
324
|
+
repair_hint?: string | null;
|
|
325
|
+
};
|
|
326
|
+
type AgentValidationResult = {
|
|
327
|
+
valid: boolean;
|
|
328
|
+
errors: AgentValidationIssue[];
|
|
329
|
+
warnings: AgentValidationIssue[];
|
|
330
|
+
};
|
|
331
|
+
type AgentCreateRequest = {
|
|
332
|
+
name: string;
|
|
333
|
+
description?: string | null;
|
|
334
|
+
tags?: string[];
|
|
335
|
+
graph_definition: GraphDefinition;
|
|
336
|
+
memory_config?: Record<string, unknown>;
|
|
337
|
+
execution_constraints?: Record<string, unknown>;
|
|
338
|
+
};
|
|
339
|
+
type AgentUpdateRequest = Partial<AgentCreateRequest>;
|
|
340
|
+
type AgentSummary = {
|
|
341
|
+
id: string;
|
|
342
|
+
organization_id: string;
|
|
343
|
+
name: string;
|
|
344
|
+
description?: string | null;
|
|
345
|
+
tags: string[];
|
|
346
|
+
lifecycle_status: "active" | "deprecated" | "archived" | "disabled";
|
|
347
|
+
publication_state: "never_published" | "published";
|
|
348
|
+
draft_revision_number: number;
|
|
349
|
+
is_public: boolean;
|
|
350
|
+
show_in_playground: boolean;
|
|
351
|
+
share_enabled: boolean;
|
|
352
|
+
share_handle?: string | null;
|
|
353
|
+
share_url?: string | null;
|
|
354
|
+
share_theme: "soft" | "sharp";
|
|
355
|
+
share_client_deployment_id?: string | null;
|
|
356
|
+
resource_policy_set_id?: string | null;
|
|
357
|
+
tool_binding_status?: string | null;
|
|
358
|
+
is_tool_enabled: boolean;
|
|
359
|
+
created_at: string;
|
|
360
|
+
updated_at: string;
|
|
361
|
+
published_at?: string | null;
|
|
362
|
+
latest_published_version_id?: string | null;
|
|
363
|
+
has_unpublished_changes: boolean;
|
|
364
|
+
};
|
|
365
|
+
type AgentResponse = AgentSummary & {
|
|
366
|
+
graph_definition: GraphDefinition;
|
|
367
|
+
memory_config: Record<string, unknown>;
|
|
368
|
+
execution_constraints: Record<string, unknown>;
|
|
369
|
+
attached_tools: Array<Record<string, unknown>>;
|
|
370
|
+
};
|
|
371
|
+
type AgentListResponse = {
|
|
372
|
+
items: Array<AgentSummary | AgentResponse>;
|
|
373
|
+
total: number;
|
|
374
|
+
has_more: boolean;
|
|
375
|
+
skip: number;
|
|
376
|
+
limit: number;
|
|
377
|
+
view: "summary" | "full";
|
|
378
|
+
};
|
|
379
|
+
type StartRunResult = {
|
|
380
|
+
run_id: string;
|
|
381
|
+
thread_id?: string | null;
|
|
382
|
+
};
|
|
383
|
+
type FailureCategory = "validation" | "authentication" | "authorization" | "not_found" | "policy" | "conflict" | "billing" | "quota" | "rate_limit" | "capacity" | "dependency" | "protocol" | "timeout" | "internal";
|
|
384
|
+
type FailureView = {
|
|
385
|
+
schema_version: "agents24.failure.v1";
|
|
386
|
+
failure_id: string;
|
|
387
|
+
code: string;
|
|
388
|
+
category: FailureCategory;
|
|
389
|
+
message: string;
|
|
390
|
+
retryable: boolean;
|
|
391
|
+
request_id: string | null;
|
|
392
|
+
retry_after_ms: number | null;
|
|
393
|
+
details: Record<string, unknown>;
|
|
394
|
+
};
|
|
395
|
+
type RunStatus = {
|
|
396
|
+
id: string;
|
|
397
|
+
status: string;
|
|
398
|
+
result?: unknown;
|
|
399
|
+
failure?: FailureView | null;
|
|
400
|
+
checkpoint?: Record<string, unknown> | null;
|
|
401
|
+
run_usage?: Record<string, unknown>;
|
|
402
|
+
context_window?: ContextWindow | null;
|
|
403
|
+
lineage?: Record<string, unknown>;
|
|
404
|
+
pending_interrupts?: Array<Record<string, unknown>>;
|
|
405
|
+
run_tree?: Record<string, unknown>;
|
|
406
|
+
};
|
|
407
|
+
type ControlPlaneRunEventsResponse = {
|
|
408
|
+
events: RuntimeEvent[];
|
|
409
|
+
[key: string]: unknown;
|
|
410
|
+
};
|
|
411
|
+
type TraceSpanKind = "run" | "workflow_node" | "agent" | "model" | "tool";
|
|
412
|
+
type TraceSpanStatus = "running" | "waiting" | "succeeded" | "failed" | "cancelled" | "skipped";
|
|
413
|
+
type TraceContent = {
|
|
414
|
+
type: "messages" | "message" | "text" | "json";
|
|
415
|
+
value: unknown;
|
|
416
|
+
redacted: boolean;
|
|
417
|
+
truncated: boolean;
|
|
418
|
+
};
|
|
419
|
+
type TraceError = FailureView;
|
|
420
|
+
type TraceSpan = {
|
|
421
|
+
id: string;
|
|
422
|
+
span_id: string;
|
|
423
|
+
parent_id?: string | null;
|
|
424
|
+
run_id: string;
|
|
425
|
+
node_id?: string | null;
|
|
426
|
+
model_invocation_id?: string | null;
|
|
427
|
+
name: string;
|
|
428
|
+
kind: TraceSpanKind;
|
|
429
|
+
status: TraceSpanStatus;
|
|
430
|
+
sequence: number;
|
|
431
|
+
input?: TraceContent | null;
|
|
432
|
+
output?: TraceContent | null;
|
|
433
|
+
attributes: Record<string, unknown>;
|
|
434
|
+
diagnostics?: Record<string, unknown> | null;
|
|
435
|
+
failure?: TraceError | null;
|
|
436
|
+
started_at: string;
|
|
437
|
+
ended_at?: string | null;
|
|
438
|
+
duration_ms?: number | null;
|
|
439
|
+
};
|
|
440
|
+
type TraceView = {
|
|
441
|
+
schema_version?: string | null;
|
|
442
|
+
trace_id: string;
|
|
443
|
+
root_run_id: string;
|
|
444
|
+
focus_run_id: string;
|
|
445
|
+
status: string;
|
|
446
|
+
legacy: boolean;
|
|
447
|
+
raw_events_available: boolean;
|
|
448
|
+
spans: TraceSpan[];
|
|
449
|
+
content_protection: {
|
|
450
|
+
redacted_fields: number;
|
|
451
|
+
truncated_fields: number;
|
|
452
|
+
diagnostics_included: boolean;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
type RunTrace = TraceView;
|
|
456
|
+
type AgentRef = string | {
|
|
457
|
+
id: string;
|
|
458
|
+
};
|
|
459
|
+
type LatestOrPinnedPolicy = {
|
|
460
|
+
mode: "latest_published";
|
|
461
|
+
} | {
|
|
462
|
+
mode: "pinned";
|
|
463
|
+
versionId: string;
|
|
464
|
+
};
|
|
465
|
+
type AgentToolsetAttachment = {
|
|
466
|
+
toolset: AgentRef;
|
|
467
|
+
loadingMode?: "static" | "dynamic";
|
|
468
|
+
versionPolicy?: LatestOrPinnedPolicy;
|
|
469
|
+
};
|
|
470
|
+
type AgentDefinitionOptions = {
|
|
471
|
+
name: string;
|
|
472
|
+
description?: string;
|
|
473
|
+
instructions?: string;
|
|
474
|
+
model?: AgentRef;
|
|
475
|
+
tools?: AgentRef[];
|
|
476
|
+
toolsetAttachments?: AgentToolsetAttachment[];
|
|
477
|
+
knowledge?: AgentRef[];
|
|
478
|
+
memory?: Record<string, unknown>;
|
|
479
|
+
execution?: Record<string, unknown>;
|
|
480
|
+
};
|
|
481
|
+
type Agents24SDKSerializedError = {
|
|
482
|
+
message: string;
|
|
483
|
+
kind: Agents24SDKErrorKind;
|
|
484
|
+
status?: number;
|
|
485
|
+
details?: unknown;
|
|
486
|
+
};
|
|
487
|
+
type ClientAuthMode = "anonymous" | "backend_exchange" | "external_oidc";
|
|
488
|
+
type NativePlatform = "react_native" | "electron" | "tauri";
|
|
489
|
+
type ClientRuntimeNativeProfileInput = {
|
|
490
|
+
name: string;
|
|
491
|
+
platform: NativePlatform;
|
|
492
|
+
application_id: string;
|
|
493
|
+
redirect_uris: string[];
|
|
494
|
+
attestation_required?: boolean;
|
|
495
|
+
};
|
|
496
|
+
type ClientRuntimeOidcConfig = {
|
|
497
|
+
issuer: string;
|
|
498
|
+
client_id: string;
|
|
499
|
+
audience: string;
|
|
500
|
+
authorization_endpoint?: string | null;
|
|
501
|
+
token_endpoint?: string | null;
|
|
502
|
+
jwks_uri?: string | null;
|
|
503
|
+
redirect_uris?: string[];
|
|
504
|
+
algorithms?: ["RS256"];
|
|
505
|
+
max_authentication_age_seconds?: number;
|
|
506
|
+
};
|
|
507
|
+
type ClientRuntimePolicyInput = {
|
|
508
|
+
capabilities?: string[];
|
|
509
|
+
model_selection?: "auto" | "enabled" | "disabled" | null;
|
|
510
|
+
attachments?: {
|
|
511
|
+
enabled?: boolean;
|
|
512
|
+
max_attachments_per_turn?: number;
|
|
513
|
+
max_file_bytes?: number;
|
|
514
|
+
max_total_bytes?: number;
|
|
515
|
+
allowed_mime_types?: string[];
|
|
516
|
+
max_image_pixels?: number;
|
|
517
|
+
max_pdf_pages?: number;
|
|
518
|
+
max_extracted_characters?: number;
|
|
519
|
+
};
|
|
520
|
+
hitl?: {
|
|
521
|
+
enabled?: boolean;
|
|
522
|
+
allowed_actions?: HitlAction[];
|
|
523
|
+
};
|
|
524
|
+
mcp?: {
|
|
525
|
+
enabled?: boolean;
|
|
526
|
+
allow_anonymous?: boolean;
|
|
527
|
+
};
|
|
528
|
+
quotas?: {
|
|
529
|
+
session_mints_per_minute?: number;
|
|
530
|
+
refreshes_per_minute?: number;
|
|
531
|
+
chat_starts_per_minute?: number;
|
|
532
|
+
active_runs?: number;
|
|
533
|
+
concurrent_streams?: number;
|
|
534
|
+
upload_count_per_hour?: number;
|
|
535
|
+
upload_bytes_per_hour?: number;
|
|
536
|
+
hitl_resumes_per_minute?: number;
|
|
537
|
+
mcp_starts_per_minute?: number;
|
|
538
|
+
token_reservation_per_run?: number;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
type CreateClientDeploymentRequest = {
|
|
542
|
+
agent_id: string;
|
|
543
|
+
resource_policy_set_id: string;
|
|
544
|
+
version_policy?: {
|
|
545
|
+
mode: "latest_published";
|
|
546
|
+
} | {
|
|
547
|
+
mode: "pinned";
|
|
548
|
+
version_id: string;
|
|
549
|
+
};
|
|
550
|
+
name: string;
|
|
551
|
+
description?: string | null;
|
|
552
|
+
auth_modes: ClientAuthMode[];
|
|
553
|
+
allowed_origins?: string[];
|
|
554
|
+
native_profiles?: ClientRuntimeNativeProfileInput[];
|
|
555
|
+
oidc?: ClientRuntimeOidcConfig | null;
|
|
556
|
+
policy?: ClientRuntimePolicyInput;
|
|
557
|
+
};
|
|
558
|
+
type UpdateClientDeploymentRequest = Partial<Omit<CreateClientDeploymentRequest, "agent_id" | "resource_policy_set_id">> & {
|
|
559
|
+
resource_policy_set_id?: string | null;
|
|
560
|
+
lifecycle_status?: "active" | "inactive";
|
|
561
|
+
};
|
|
562
|
+
type ClientDeploymentListQuery = {
|
|
563
|
+
agentId: string;
|
|
564
|
+
lifecycleStatus?: "active" | "inactive";
|
|
565
|
+
cursor?: string;
|
|
566
|
+
limit?: number;
|
|
567
|
+
};
|
|
568
|
+
type ClientNativeProfile = {
|
|
569
|
+
id: string;
|
|
570
|
+
profile_id: string;
|
|
571
|
+
name: string;
|
|
572
|
+
platform: NativePlatform;
|
|
573
|
+
application_id: string;
|
|
574
|
+
redirect_uris: string[];
|
|
575
|
+
dpop_required: boolean;
|
|
576
|
+
attestation_policy: Record<string, unknown>;
|
|
577
|
+
status: string;
|
|
578
|
+
created_at: string;
|
|
579
|
+
updated_at: string;
|
|
580
|
+
revoked_at: string | null;
|
|
581
|
+
};
|
|
582
|
+
type ClientDeployment = {
|
|
583
|
+
id: string;
|
|
584
|
+
client_id: string;
|
|
585
|
+
organization_id: string;
|
|
586
|
+
agent_id: string;
|
|
587
|
+
resource_policy_set_id: string | null;
|
|
588
|
+
purpose: "client_integration" | "hosted_share";
|
|
589
|
+
version_policy: {
|
|
590
|
+
mode: "latest_published";
|
|
591
|
+
} | {
|
|
592
|
+
mode: "pinned";
|
|
593
|
+
version_id: string;
|
|
594
|
+
};
|
|
595
|
+
resolved_version: {
|
|
596
|
+
version_id: string;
|
|
597
|
+
version_number: number;
|
|
598
|
+
};
|
|
599
|
+
name: string;
|
|
600
|
+
description: string | null;
|
|
601
|
+
lifecycle_status: "active" | "inactive" | "deleted";
|
|
602
|
+
policy_epoch: number;
|
|
603
|
+
revocation_epoch: number;
|
|
604
|
+
auth_modes: ClientAuthMode[];
|
|
605
|
+
allowed_origins: string[];
|
|
606
|
+
scopes: string[];
|
|
607
|
+
capabilities: string[];
|
|
608
|
+
policy: Record<string, Record<string, unknown>>;
|
|
609
|
+
oidc: ClientRuntimeOidcConfig | null;
|
|
610
|
+
native_profiles: ClientNativeProfile[];
|
|
611
|
+
created_at: string;
|
|
612
|
+
updated_at: string;
|
|
613
|
+
deleted_at: string | null;
|
|
614
|
+
};
|
|
615
|
+
type ClientDeploymentListResponse = {
|
|
616
|
+
items: ClientDeployment[];
|
|
617
|
+
next_cursor: string | null;
|
|
618
|
+
};
|
|
619
|
+
type CreateBackendClientSessionRequest = {
|
|
620
|
+
subject: string;
|
|
621
|
+
subject_issuer?: string;
|
|
622
|
+
browser_origin?: string;
|
|
623
|
+
native_profile_id?: string;
|
|
624
|
+
requested_capabilities?: string[];
|
|
625
|
+
persistent?: boolean;
|
|
626
|
+
dpop_public_jwk?: Record<string, unknown>;
|
|
627
|
+
};
|
|
628
|
+
type ClientSessionCredentials = {
|
|
629
|
+
session_id: string;
|
|
630
|
+
access_token: string;
|
|
631
|
+
token_type: "Bearer" | "DPoP";
|
|
632
|
+
expires_at: string;
|
|
633
|
+
refresh_grant: string | null;
|
|
634
|
+
refresh_expires_at: string | null;
|
|
635
|
+
dpop_nonce: string | null;
|
|
636
|
+
};
|
|
637
|
+
type PortableResourceKind = "agent" | "rag_pipeline" | "instruction" | "knowledge_store";
|
|
638
|
+
type ResourceSelector = {
|
|
639
|
+
kind: PortableResourceKind;
|
|
640
|
+
id: string;
|
|
641
|
+
target: "draft" | "version";
|
|
642
|
+
version_id?: string;
|
|
643
|
+
};
|
|
644
|
+
type ResourcePackageExportRequest = {
|
|
645
|
+
selectors: ResourceSelector[];
|
|
646
|
+
};
|
|
647
|
+
type ResourcePackageArchive = {
|
|
648
|
+
data: Uint8Array;
|
|
649
|
+
filename: string;
|
|
650
|
+
};
|
|
651
|
+
type ResourcePackageUpload = {
|
|
652
|
+
data: Uint8Array;
|
|
653
|
+
filename?: string;
|
|
654
|
+
};
|
|
655
|
+
type ResourcePackageDiagnostic = {
|
|
656
|
+
severity: "error" | "warning";
|
|
657
|
+
code: string;
|
|
658
|
+
path: string;
|
|
659
|
+
message: string;
|
|
660
|
+
};
|
|
661
|
+
type ResourcePackageCompileResult = {
|
|
662
|
+
valid: boolean;
|
|
663
|
+
format: "agents24.resource_package";
|
|
664
|
+
schema_version: "1.0";
|
|
665
|
+
package: Record<string, unknown>;
|
|
666
|
+
resources: Array<Record<string, unknown>>;
|
|
667
|
+
requirements: string[];
|
|
668
|
+
tool_exports: Array<Record<string, unknown>>;
|
|
669
|
+
callable_bindings: Array<Record<string, unknown>>;
|
|
670
|
+
diagnostics: ResourcePackageDiagnostic[];
|
|
671
|
+
bundle?: ResourceBundle | null;
|
|
672
|
+
};
|
|
673
|
+
type ResourceBundleImportRequest = {
|
|
674
|
+
bundle: ResourceBundle;
|
|
675
|
+
selected_resource_keys?: string[];
|
|
676
|
+
mappings?: Record<string, string>;
|
|
677
|
+
};
|
|
678
|
+
type ResourceBundleOrigin = {
|
|
679
|
+
source_id: string;
|
|
680
|
+
target: "draft" | "version";
|
|
681
|
+
version_id?: string | null;
|
|
682
|
+
label: string;
|
|
683
|
+
};
|
|
684
|
+
type ResourceBundleResource = {
|
|
685
|
+
resource_key: string;
|
|
686
|
+
kind: PortableResourceKind;
|
|
687
|
+
name: string;
|
|
688
|
+
document: Record<string, unknown>;
|
|
689
|
+
origin?: ResourceBundleOrigin;
|
|
690
|
+
};
|
|
691
|
+
type ResourceBundleDependency = {
|
|
692
|
+
id: string;
|
|
693
|
+
from_resource_key: string;
|
|
694
|
+
to_resource_key?: string | null;
|
|
695
|
+
kind: string;
|
|
696
|
+
source_id: string;
|
|
697
|
+
source_name?: string | null;
|
|
698
|
+
document_path: string;
|
|
699
|
+
reference_type: string;
|
|
700
|
+
required: boolean;
|
|
701
|
+
bundled: boolean;
|
|
702
|
+
included?: boolean;
|
|
703
|
+
required_capability?: "chat" | "embedding";
|
|
704
|
+
};
|
|
705
|
+
type ResourceBundle = {
|
|
706
|
+
format: "agents24.resource_bundle";
|
|
707
|
+
schema_version: "1.0";
|
|
708
|
+
exported_at?: string;
|
|
709
|
+
resources: ResourceBundleResource[];
|
|
710
|
+
dependencies: ResourceBundleDependency[];
|
|
711
|
+
warnings: string[];
|
|
712
|
+
tool_exports?: Array<Record<string, unknown>>;
|
|
713
|
+
callable_bindings?: Array<Record<string, unknown>>;
|
|
714
|
+
};
|
|
715
|
+
type ResourceBundlePlan = Omit<ResourceBundle, "resources"> & {
|
|
716
|
+
resources: Array<Omit<ResourceBundleResource, "document">>;
|
|
717
|
+
blockers: Array<{
|
|
718
|
+
code: string;
|
|
719
|
+
message: string;
|
|
720
|
+
}>;
|
|
721
|
+
can_export: boolean;
|
|
722
|
+
external_references: ResourceBundleDependency[];
|
|
723
|
+
};
|
|
724
|
+
type ResourceBundleExportRequest = {
|
|
725
|
+
selectors: ResourceSelector[];
|
|
726
|
+
included_resource_keys?: string[];
|
|
727
|
+
};
|
|
728
|
+
type ResourceBundleCandidateList = {
|
|
729
|
+
items: Array<{
|
|
730
|
+
id: string;
|
|
731
|
+
name: string;
|
|
732
|
+
}>;
|
|
733
|
+
total: number;
|
|
734
|
+
};
|
|
735
|
+
type ResourceBundleCandidateOptions = {
|
|
736
|
+
kind: string;
|
|
737
|
+
query?: string;
|
|
738
|
+
limit?: number;
|
|
739
|
+
offset?: number;
|
|
740
|
+
requiredCapability?: "chat" | "embedding";
|
|
741
|
+
};
|
|
742
|
+
type ResourcePolicySummary = {
|
|
743
|
+
id: string;
|
|
744
|
+
name: string;
|
|
745
|
+
is_active: boolean;
|
|
746
|
+
[key: string]: unknown;
|
|
747
|
+
};
|
|
748
|
+
type ResourcePolicyList = ResourcePolicySummary[];
|
|
749
|
+
type CustomerIdentityRequest = {
|
|
750
|
+
issuer: string;
|
|
751
|
+
subject: string;
|
|
752
|
+
};
|
|
753
|
+
type SetCustomerResourcePolicyAssignmentRequest = CustomerIdentityRequest & {
|
|
754
|
+
policy_set_id: string;
|
|
755
|
+
};
|
|
756
|
+
type EffectiveCustomerResourcePolicyRequest = CustomerIdentityRequest & {
|
|
757
|
+
deployment_id: string;
|
|
758
|
+
};
|
|
759
|
+
type ResourcePolicySubjectRef = {
|
|
760
|
+
kind: "agent" | "client_deployment" | "organization_user" | "customer_principal";
|
|
761
|
+
id: string;
|
|
762
|
+
};
|
|
763
|
+
type ResourcePolicyQuotaSchedule = {
|
|
764
|
+
reset_anchor_at: string | null;
|
|
765
|
+
period_start: string;
|
|
766
|
+
next_reset_at: string;
|
|
767
|
+
};
|
|
768
|
+
type CustomerResourcePolicyAssignment = {
|
|
769
|
+
customer_principal_ref: string;
|
|
770
|
+
subject_ref: ResourcePolicySubjectRef;
|
|
771
|
+
assignment: {
|
|
772
|
+
id: string;
|
|
773
|
+
policy_set: {
|
|
774
|
+
id: string;
|
|
775
|
+
name: string;
|
|
776
|
+
};
|
|
777
|
+
} | null;
|
|
778
|
+
quota_schedule: ResourcePolicyQuotaSchedule | null;
|
|
779
|
+
};
|
|
780
|
+
type ClearCustomerResourcePolicyAssignmentResult = {
|
|
781
|
+
customer_principal_ref: string | null;
|
|
782
|
+
cleared: boolean;
|
|
783
|
+
};
|
|
784
|
+
type EffectiveResourcePolicy = {
|
|
785
|
+
customer_principal_ref: string | null;
|
|
786
|
+
model_selection: {
|
|
787
|
+
selectable: boolean;
|
|
788
|
+
node_id: string | null;
|
|
789
|
+
default_id: string | null;
|
|
790
|
+
options: Array<{
|
|
791
|
+
id: string;
|
|
792
|
+
label: string;
|
|
793
|
+
}>;
|
|
794
|
+
};
|
|
795
|
+
quota_constraints: Array<{
|
|
796
|
+
model: {
|
|
797
|
+
id: string;
|
|
798
|
+
name: string;
|
|
799
|
+
};
|
|
800
|
+
boundary_kind: ResourcePolicySubjectRef["kind"];
|
|
801
|
+
boundary_ref: string;
|
|
802
|
+
used: number;
|
|
803
|
+
reserved: number;
|
|
804
|
+
limit: number;
|
|
805
|
+
remaining: number;
|
|
806
|
+
period_start: string;
|
|
807
|
+
reset_at: string;
|
|
808
|
+
blocked: boolean;
|
|
809
|
+
}>;
|
|
810
|
+
customer_assignment?: CustomerResourcePolicyAssignment;
|
|
811
|
+
};
|
|
812
|
+
type SetResourcePolicyQuotaScheduleRequest = {
|
|
813
|
+
subject_ref: ResourcePolicySubjectRef;
|
|
814
|
+
reset_anchor_at: string | null;
|
|
815
|
+
};
|
|
816
|
+
type ResetResourcePolicyQuotaRequest = {
|
|
817
|
+
subject_ref: ResourcePolicySubjectRef;
|
|
818
|
+
};
|
|
819
|
+
type ResourcePolicyQuotaScheduleResult = {
|
|
820
|
+
subject_ref: ResourcePolicySubjectRef;
|
|
821
|
+
quota_schedule: ResourcePolicyQuotaSchedule;
|
|
822
|
+
};
|
|
823
|
+
type ResourceBundleImportPreview = {
|
|
824
|
+
resources: Array<Record<string, unknown>>;
|
|
825
|
+
dependencies: Array<Record<string, unknown>>;
|
|
826
|
+
warnings: unknown[];
|
|
827
|
+
blockers: unknown[];
|
|
828
|
+
can_import: boolean;
|
|
829
|
+
[key: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
type ResourceBundleImportResult = {
|
|
832
|
+
status: "created";
|
|
833
|
+
resources: Array<Record<string, unknown>>;
|
|
834
|
+
id_map: Record<string, string>;
|
|
835
|
+
warnings: unknown[];
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
type RequestConfig = {
|
|
839
|
+
method?: string;
|
|
840
|
+
query?: Record<string, unknown>;
|
|
841
|
+
body?: unknown;
|
|
842
|
+
headers?: HeadersInit;
|
|
843
|
+
options?: RequestOptions;
|
|
844
|
+
mutation?: boolean;
|
|
845
|
+
};
|
|
846
|
+
declare class Agents24HttpClient {
|
|
847
|
+
private readonly base;
|
|
848
|
+
private readonly apiKey;
|
|
849
|
+
private readonly fetchImpl;
|
|
850
|
+
constructor(options: Agents24NodeOptions);
|
|
851
|
+
url(requestPath: string, query?: Record<string, unknown>): string;
|
|
852
|
+
jsonHeaders(extra?: HeadersInit, options?: RequestOptions, mutation?: boolean): HeadersInit;
|
|
853
|
+
streamHeaders(extra?: HeadersInit, options?: RequestOptions, mutation?: boolean): HeadersInit;
|
|
854
|
+
multipartHeaders(extra?: HeadersInit, options?: RequestOptions, mutation?: boolean): HeadersInit;
|
|
855
|
+
requestJson<T>(requestPath: string, config?: RequestConfig): Promise<T>;
|
|
856
|
+
fetchOrThrow(url: string, init: RequestInit, message: string): Promise<Response>;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
type ListAgentsOptions = {
|
|
860
|
+
status?: string;
|
|
861
|
+
skip?: number;
|
|
862
|
+
limit?: number;
|
|
863
|
+
view?: "summary" | "full" | string;
|
|
864
|
+
};
|
|
865
|
+
declare class AgentsNamespace {
|
|
866
|
+
private readonly http;
|
|
867
|
+
constructor(http: Agents24HttpClient);
|
|
868
|
+
list(options?: ListAgentsOptions): Promise<AgentListResponse>;
|
|
869
|
+
get(agentId: string): Promise<AgentResponse>;
|
|
870
|
+
create(request: AgentCreateRequest, options?: RequestOptions): Promise<AgentResponse>;
|
|
871
|
+
update(agentId: string, request: AgentUpdateRequest, options?: RequestOptions): Promise<AgentResponse>;
|
|
872
|
+
updateGraph(agentId: string, graph: GraphDefinition, options?: RequestOptions): Promise<AgentResponse>;
|
|
873
|
+
delete(agentId: string, options?: RequestOptions): Promise<unknown>;
|
|
874
|
+
catalog(): Promise<NodeCatalogResponse>;
|
|
875
|
+
schema(nodeTypes: string[]): Promise<NodeSchemaResponse>;
|
|
876
|
+
validate(agentId: string): Promise<AgentValidationResult>;
|
|
877
|
+
publish(agentId: string, options?: RequestOptions): Promise<AgentResponse>;
|
|
878
|
+
startRun(agentId: string, payload: AgentStreamRequest, options?: RequestOptions): Promise<StartRunResult>;
|
|
879
|
+
stream(agentId: string, payload: AgentStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, mode?: "debug" | "production" | string, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
880
|
+
resumeRun(runId: string, payload: Record<string, unknown>, options?: RequestOptions): Promise<Record<string, unknown>>;
|
|
881
|
+
cancelRun(runId: string, options?: RunCancelOptions): Promise<RunCancelResult>;
|
|
882
|
+
uploadAttachments(agentId: string, options: ServerAttachmentUploadOptions): Promise<AttachmentUploadResult>;
|
|
883
|
+
createAttachmentContentAccess(agentId: string, attachmentId: string, request: AttachmentContentAccessRequest, options?: RequestOptions): Promise<AttachmentContentAccess>;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
declare class AgentDefinitionBuilder {
|
|
887
|
+
private readonly agents;
|
|
888
|
+
private readonly options;
|
|
889
|
+
constructor(agents: AgentsNamespace, options: AgentDefinitionOptions);
|
|
890
|
+
toGraph(): GraphDefinition;
|
|
891
|
+
toCreateRequest(): AgentCreateRequest;
|
|
892
|
+
create(options?: RequestOptions): Promise<AgentResponse>;
|
|
893
|
+
}
|
|
894
|
+
declare class GraphBuilder {
|
|
895
|
+
private readonly nodes;
|
|
896
|
+
private readonly edges;
|
|
897
|
+
node(type: string, config?: Record<string, unknown>, options?: {
|
|
898
|
+
id?: string;
|
|
899
|
+
x?: number;
|
|
900
|
+
y?: number;
|
|
901
|
+
label?: string;
|
|
902
|
+
}): GraphNode;
|
|
903
|
+
connect(source: GraphNode | string, target: GraphNode | string, options?: {
|
|
904
|
+
id?: string;
|
|
905
|
+
sourceHandle?: string;
|
|
906
|
+
targetHandle?: string;
|
|
907
|
+
type?: "control" | "data";
|
|
908
|
+
condition?: string;
|
|
909
|
+
}): this;
|
|
910
|
+
toGraph(): GraphDefinition;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
declare class ClientDeploymentsNamespace {
|
|
914
|
+
private readonly http;
|
|
915
|
+
constructor(http: Agents24HttpClient);
|
|
916
|
+
create(request: CreateClientDeploymentRequest, options?: RequestOptions): Promise<ClientDeployment>;
|
|
917
|
+
list(query: ClientDeploymentListQuery): Promise<ClientDeploymentListResponse>;
|
|
918
|
+
get(deploymentId: string): Promise<ClientDeployment>;
|
|
919
|
+
update(deploymentId: string, request: UpdateClientDeploymentRequest, options?: RequestOptions): Promise<ClientDeployment>;
|
|
920
|
+
delete(deploymentId: string, options?: RequestOptions): Promise<ClientDeployment>;
|
|
921
|
+
}
|
|
922
|
+
declare class ClientSessionsNamespace {
|
|
923
|
+
private readonly http;
|
|
924
|
+
constructor(http: Agents24HttpClient);
|
|
925
|
+
createBackendSession(deploymentId: string, request: CreateBackendClientSessionRequest, options?: BackendSessionRequestOptions): Promise<ClientSessionCredentials>;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
declare class EmbedNamespace {
|
|
929
|
+
private readonly http;
|
|
930
|
+
constructor(http: Agents24HttpClient);
|
|
931
|
+
streamAgent(agentId: string, payload: EmbedStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
932
|
+
attachAgentRun(agentId: string, runId: string, payload: AttachRunRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
933
|
+
private stream;
|
|
934
|
+
resumeAgentRun(agentId: string, runId: string, payload: ResumeRunRequest, options?: RequestOptions): Promise<RunResumeResult>;
|
|
935
|
+
startAgentRunMcpAuth(agentId: string, runId: string, serverId: string, payload: McpAuthStartRequest, options?: RequestOptions): Promise<McpAuthStartResult>;
|
|
936
|
+
getRuntimeBootstrap(agentId: string, agentVersionId?: string): Promise<EmbedRuntimeBootstrap>;
|
|
937
|
+
listAgentThreads(agentId: string, options: ThreadListOptions): Promise<ThreadsResponse>;
|
|
938
|
+
listAgentThreadsMulti(options: MultiAgentThreadListRequest): Promise<ThreadsResponse>;
|
|
939
|
+
subscribeAgentThreadEvents(agentId: string, options: ThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
|
|
940
|
+
subscribeAgentThreadEventsMulti(options: MultiAgentThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
|
|
941
|
+
getAgentThread(agentId: string, threadId: string, options: ThreadDetailOptions): Promise<ThreadDetail>;
|
|
942
|
+
deleteAgentThread(agentId: string, threadId: string, options: ThreadDeleteOptions, requestOptions?: RequestOptions): Promise<ThreadDeleteResult>;
|
|
943
|
+
getAgentRunContext(agentId: string, runId: string, options: RunContextOptions): Promise<RunContext>;
|
|
944
|
+
cancelAgentRun(agentId: string, runId: string, options: EmbedRunCancelOptions, requestOptions?: RequestOptions): Promise<RunCancelResult>;
|
|
945
|
+
setAgentRunFeedback(agentId: string, runId: string, payload: EmbeddedResponseFeedbackInput): Promise<ResponseFeedbackResult>;
|
|
946
|
+
uploadAgentAttachments(agentId: string, options: ServerEmbedAttachmentUploadOptions): Promise<AttachmentUploadResult>;
|
|
947
|
+
createAttachmentContentAccess(agentId: string, attachmentId: string, request: EmbedAttachmentContentAccessRequest, options?: RequestOptions): Promise<AttachmentContentAccess>;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
declare class ResourceBundlesNamespace {
|
|
951
|
+
protected readonly http: Agents24HttpClient;
|
|
952
|
+
constructor(http: Agents24HttpClient);
|
|
953
|
+
exportPlan(request: ResourceBundleExportRequest): Promise<ResourceBundlePlan>;
|
|
954
|
+
exportBundle(request: ResourceBundleExportRequest): Promise<ResourceBundle>;
|
|
955
|
+
candidates(options: ResourceBundleCandidateOptions): Promise<ResourceBundleCandidateList>;
|
|
956
|
+
importPreview(request: ResourceBundleImportRequest): Promise<ResourceBundleImportPreview>;
|
|
957
|
+
importBundle(request: ResourceBundleImportRequest, options?: RequestOptions): Promise<ResourceBundleImportResult>;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
declare class ResourcePackagesNamespace {
|
|
961
|
+
protected readonly http: Agents24HttpClient;
|
|
962
|
+
constructor(http: Agents24HttpClient);
|
|
963
|
+
exportPackage(request: ResourcePackageExportRequest): Promise<ResourcePackageArchive>;
|
|
964
|
+
validatePackage(upload: ResourcePackageUpload): Promise<ResourcePackageCompileResult>;
|
|
965
|
+
compilePackage(upload: ResourcePackageUpload): Promise<ResourcePackageCompileResult>;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
declare class RunsNamespace {
|
|
969
|
+
private readonly http;
|
|
970
|
+
constructor(http: Agents24HttpClient);
|
|
971
|
+
get(runId: string, options?: {
|
|
972
|
+
includeTree?: boolean;
|
|
973
|
+
}): Promise<RunStatus>;
|
|
974
|
+
getTree(runId: string): Promise<Record<string, unknown>>;
|
|
975
|
+
getEvents(runId: string, options?: {
|
|
976
|
+
afterSequence?: number;
|
|
977
|
+
limit?: number;
|
|
978
|
+
}): Promise<ControlPlaneRunEventsResponse>;
|
|
979
|
+
getContext(runId: string): Promise<RunContext>;
|
|
980
|
+
getTrace(runId: string, options?: {
|
|
981
|
+
includeDiagnostics?: boolean;
|
|
982
|
+
}): Promise<TraceView>;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
declare class InstructionsNamespace {
|
|
986
|
+
protected readonly http: Agents24HttpClient;
|
|
987
|
+
constructor(http: Agents24HttpClient);
|
|
988
|
+
publish(instructionId: string, options?: RequestOptions): Promise<Record<string, unknown>>;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
declare class ResourcePoliciesNamespace {
|
|
992
|
+
protected readonly http: Agents24HttpClient;
|
|
993
|
+
constructor(http: Agents24HttpClient);
|
|
994
|
+
list(): Promise<ResourcePolicyList>;
|
|
995
|
+
setCustomerAssignment(request: SetCustomerResourcePolicyAssignmentRequest, options?: RequestOptions): Promise<CustomerResourcePolicyAssignment>;
|
|
996
|
+
getCustomerAssignment(request: CustomerIdentityRequest): Promise<CustomerResourcePolicyAssignment>;
|
|
997
|
+
clearCustomerAssignment(request: CustomerIdentityRequest, options?: RequestOptions): Promise<ClearCustomerResourcePolicyAssignmentResult>;
|
|
998
|
+
getEffectiveCustomerPolicy(request: EffectiveCustomerResourcePolicyRequest): Promise<EffectiveResourcePolicy>;
|
|
999
|
+
setQuotaSchedule(request: SetResourcePolicyQuotaScheduleRequest, options?: RequestOptions): Promise<ResourcePolicyQuotaScheduleResult>;
|
|
1000
|
+
resetQuotaNow(request: ResetResourcePolicyQuotaRequest, options?: RequestOptions): Promise<ResourcePolicyQuotaScheduleResult>;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
declare class Agents24 {
|
|
1004
|
+
readonly agents: AgentsNamespace;
|
|
1005
|
+
readonly embed: EmbedNamespace;
|
|
1006
|
+
readonly runs: RunsNamespace;
|
|
1007
|
+
readonly resourceBundles: ResourceBundlesNamespace;
|
|
1008
|
+
readonly resourcePackages: ResourcePackagesNamespace;
|
|
1009
|
+
readonly clientDeployments: ClientDeploymentsNamespace;
|
|
1010
|
+
readonly clientSessions: ClientSessionsNamespace;
|
|
1011
|
+
readonly instructions: InstructionsNamespace;
|
|
1012
|
+
readonly resourcePolicies: ResourcePoliciesNamespace;
|
|
1013
|
+
constructor(options: Agents24NodeOptions);
|
|
1014
|
+
agent(options: AgentDefinitionOptions): AgentDefinitionBuilder;
|
|
1015
|
+
graph(): GraphBuilder;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
export { type GraphNode as $, Agents24 as A, type BackendSessionRequestOptions as B, type ClearCustomerResourcePolicyAssignmentResult as C, type ClientRuntimeNativeProfileInput as D, type ClientRuntimeOidcConfig as E, type ClientRuntimePolicyInput as F, type ClientSessionCredentials as G, type ControlPlaneRunEventsResponse as H, type CreateBackendClientSessionRequest as I, type CreateClientDeploymentRequest as J, type CustomerIdentityRequest as K, type CustomerResourcePolicyAssignment as L, type EffectiveCustomerResourcePolicyRequest as M, type EffectiveResourcePolicy as N, type EmbedAttachmentContentAccessRequest as O, type EmbedRunCancelOptions as P, type EmbedRuntimeBootstrap as Q, type EmbedStreamRequest as R, type EmbeddedResponseFeedbackInput as S, type FailureCategory as T, type FailureView as U, type FeedbackRating as V, type FeedbackReason as W, GraphBuilder as X, type GraphDefinition as Y, type GraphEdge as Z, type GraphHints as _, type AgentCreateRequest as a, type UpdateClientDeploymentRequest as a$, type GraphValueRef as a0, type HitlAction as a1, type HitlAnswer as a2, type LatestOrPinnedPolicy as a3, type McpAuthStartRequest as a4, type McpAuthStartResult as a5, type MultiAgentThreadListRequest as a6, type MultiAgentThreadSummaryEventOptions as a7, type NativePlatform as a8, type NodeAuthoringSpec as a9, type ResourcePolicySummary as aA, type ResourceSelector as aB, type ResponseFeedback as aC, type ResponseFeedbackResult as aD, type ResumeRunRequest as aE, type RunCancelOptions as aF, type RunContextOptions as aG, type RunStatus as aH, type RunTrace as aI, type ServerAttachmentUploadOptions as aJ, type ServerEmbedAttachmentUploadOptions as aK, type SetCustomerResourcePolicyAssignmentRequest as aL, type SetResourcePolicyQuotaScheduleRequest as aM, type StartRunResult as aN, type StateVariableDefinition as aO, type StreamRequestOptions as aP, type StreamResult as aQ, type ThreadDeleteOptions as aR, type ThreadDetailOptions as aS, type ThreadListOptions as aT, type ThreadSummaryEventOptions as aU, type TraceContent as aV, type TraceError as aW, type TraceSpan as aX, type TraceSpanKind as aY, type TraceSpanStatus as aZ, type TraceView as a_, type NodeCatalogItem as aa, type NodeCatalogResponse as ab, type NodeSchemaResponse as ac, type PortableResourceKind as ad, type RequestOptions as ae, type ResetResourcePolicyQuotaRequest as af, type ResourceBundle as ag, type ResourceBundleCandidateList as ah, type ResourceBundleCandidateOptions as ai, type ResourceBundleDependency as aj, type ResourceBundleExportRequest as ak, type ResourceBundleImportPreview as al, type ResourceBundleImportRequest as am, type ResourceBundleImportResult as an, type ResourceBundleOrigin as ao, type ResourceBundlePlan as ap, type ResourceBundleResource as aq, type ResourcePackageArchive as ar, type ResourcePackageCompileResult as as, type ResourcePackageDiagnostic as at, type ResourcePackageExportRequest as au, type ResourcePackageUpload as av, type ResourcePolicyList as aw, type ResourcePolicyQuotaSchedule as ax, type ResourcePolicyQuotaScheduleResult as ay, type ResourcePolicySubjectRef as az, AgentDefinitionBuilder as b, type WorkflowInputDefinition as b0, type AgentDefinitionOptions as c, type AgentListResponse as d, type AgentRef as e, type AgentResponse as f, type AgentStreamRequest as g, type AgentSummary as h, type AgentToolsetAttachment as i, type AgentUpdateRequest as j, type AgentValidationIssue as k, type AgentValidationResult as l, Agents24SDKError as m, type Agents24NodeErrorKind as n, type Agents24NodeOptions as o, type Agents24Options as p, type Agents24SDKErrorKind as q, type Agents24SDKSerializedError as r, type AttachRunRequest as s, type AttachmentContentAccessRequest as t, type BranchingHint as u, type ClientAuthMode as v, type ClientDeployment as w, type ClientDeploymentListQuery as x, type ClientDeploymentListResponse as y, type ClientNativeProfile as z };
|