@agents24/node 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +17 -4
  2. package/compatibility.json +10 -10
  3. package/dist/bff.cjs +202 -33
  4. package/dist/bff.cjs.map +1 -1
  5. package/dist/bff.d.cts +3 -2
  6. package/dist/bff.d.ts +3 -2
  7. package/dist/bff.js +202 -33
  8. package/dist/bff.js.map +1 -1
  9. package/dist/{client-6MWalxux.d.cts → client-Rmk3dh_D.d.cts} +437 -71
  10. package/dist/{client-6MWalxux.d.ts → client-Rmk3dh_D.d.ts} +437 -71
  11. package/dist/index.cjs +194 -45
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +3 -3
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +194 -45
  16. package/dist/index.js.map +1 -1
  17. package/dist/server.cjs +52 -6
  18. package/dist/server.cjs.map +1 -1
  19. package/dist/server.d.cts +14 -2
  20. package/dist/server.d.ts +14 -2
  21. package/dist/server.js +50 -7
  22. package/dist/server.js.map +1 -1
  23. package/dist/types/agents.d.ts +5 -4
  24. package/dist/types/agents.d.ts.map +1 -1
  25. package/dist/types/bff.d.ts +2 -1
  26. package/dist/types/bff.d.ts.map +1 -1
  27. package/dist/types/builders.d.ts +2 -0
  28. package/dist/types/builders.d.ts.map +1 -1
  29. package/dist/types/client-runtime-admin.d.ts +1 -1
  30. package/dist/types/client.d.ts +4 -0
  31. package/dist/types/client.d.ts.map +1 -1
  32. package/dist/types/embed.d.ts +6 -3
  33. package/dist/types/embed.d.ts.map +1 -1
  34. package/dist/types/errors.d.ts +10 -2
  35. package/dist/types/errors.d.ts.map +1 -1
  36. package/dist/types/generated/instructions.d.ts +8 -0
  37. package/dist/types/generated/instructions.d.ts.map +1 -0
  38. package/dist/types/generated/manifest.d.ts +1 -1
  39. package/dist/types/generated/manifest.d.ts.map +1 -1
  40. package/dist/types/generated/resourceBundles.d.ts +4 -1
  41. package/dist/types/generated/resourceBundles.d.ts.map +1 -1
  42. package/dist/types/generated/resourcePolicies.d.ts +14 -0
  43. package/dist/types/generated/resourcePolicies.d.ts.map +1 -0
  44. package/dist/types/http.d.ts +0 -2
  45. package/dist/types/http.d.ts.map +1 -1
  46. package/dist/types/index.d.ts +1 -1
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/runs.d.ts +4 -2
  49. package/dist/types/runs.d.ts.map +1 -1
  50. package/dist/types/server.d.ts +13 -1
  51. package/dist/types/server.d.ts.map +1 -1
  52. package/dist/types/types.d.ts +389 -60
  53. package/dist/types/types.d.ts.map +1 -1
  54. package/package.json +2 -2
@@ -1,26 +1,32 @@
1
- import { ToolInputOverrides, ContextWindow, RuntimeEvent, RunContext, RunCancelResult, AttachmentUploadResult, RunResumeResult, ThreadsResponse, ThreadSummaryEvent, ThreadDetail, ThreadDeleteResult } from '@agents24/client/protocol';
1
+ import { ToolInputOverrides, ContextWindow, RuntimeEvent, RunCancelResult, AttachmentUploadResult, AttachmentContentAccess, RunResumeResult, ThreadsResponse, ThreadSummaryEvent, ThreadDetail, ThreadDeleteResult, RunContext } from '@agents24/client/protocol';
2
2
 
3
3
  type Agents24SDKErrorKind = "protocol" | "network" | "http";
4
4
  type Agents24NodeErrorKind = Agents24SDKErrorKind;
5
+
5
6
  declare class Agents24SDKError extends Error {
6
7
  readonly kind: Agents24SDKErrorKind;
7
8
  readonly status?: number;
8
- readonly details?: unknown;
9
+ readonly failure?: FailureView;
9
10
  readonly responseHeaders?: Readonly<Record<string, string>>;
10
11
  constructor(message: string, options: {
11
12
  kind: Agents24SDKErrorKind;
12
13
  status?: number;
13
- details?: unknown;
14
+ failure?: FailureView;
14
15
  responseHeaders?: Readonly<Record<string, string>>;
15
16
  cause?: unknown;
16
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>>;
17
25
  }
18
26
 
19
27
  type Agents24NodeOptions = {
20
28
  baseUrl: string;
21
29
  apiKey: string;
22
- organizationId: string;
23
- projectId: string;
24
30
  fetchImpl?: typeof fetch;
25
31
  };
26
32
  /** @deprecated Use Agents24NodeOptions. */
@@ -69,6 +75,7 @@ type EmbedStreamRequest = {
69
75
  requested_model_id?: string;
70
76
  requested_model_node_id?: string;
71
77
  external_user_id: string;
78
+ external_user_issuer?: string;
72
79
  external_session_id?: string;
73
80
  metadata?: Record<string, unknown>;
74
81
  client?: Record<string, unknown>;
@@ -78,13 +85,40 @@ type AttachRunRequest = {
78
85
  external_session_id?: string;
79
86
  metadata?: Record<string, unknown>;
80
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;
81
115
  };
82
- type HitlAction = "approve" | "reject" | "connect" | "skip";
83
116
  type ResumeRunRequest = AttachRunRequest & {
84
117
  schema_version: "agents24.hitl.resume.v2";
85
118
  interrupt_id: string;
86
119
  action: HitlAction;
87
120
  comment?: string;
121
+ answers?: HitlAnswer[];
88
122
  };
89
123
  type McpAuthStartRequest = AttachRunRequest & {
90
124
  interrupt_id: string;
@@ -100,7 +134,7 @@ type EmbedRuntimeBootstrap = {
100
134
  agent_name?: string;
101
135
  agent_version_id?: string;
102
136
  agent_version_number?: number;
103
- model_selector?: Record<string, unknown> | null;
137
+ features: Record<string, unknown>;
104
138
  thread_events_path?: string | null;
105
139
  thread_events_url?: string | null;
106
140
  };
@@ -122,7 +156,6 @@ type ThreadDetailOptions = {
122
156
  externalSessionId?: string;
123
157
  beforeTurnIndex?: number;
124
158
  limit?: number;
125
- includeRunEvents?: boolean;
126
159
  includeSubthreads?: boolean;
127
160
  subthreadDepth?: number;
128
161
  subthreadTurnLimit?: number;
@@ -156,13 +189,46 @@ type MultiAgentThreadSummaryEventOptions = ThreadSummaryEventOptions & {
156
189
  };
157
190
  type ServerAttachmentUploadOptions = {
158
191
  threadId?: string;
192
+ agentVersionId?: string;
159
193
  files: File[];
160
194
  idempotencyKey?: string;
161
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
+ };
162
203
  type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
163
204
  externalUserId: string;
164
205
  externalSessionId?: string;
165
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
+ };
166
232
  type GraphNode = {
167
233
  id: string;
168
234
  type: string;
@@ -173,71 +239,164 @@ type GraphNode = {
173
239
  config: Record<string, unknown>;
174
240
  label?: string;
175
241
  data?: Record<string, unknown>;
176
- input_mappings?: Record<string, unknown>;
242
+ input_mappings?: Record<string, string>;
177
243
  };
178
244
  type GraphEdge = {
179
245
  id: string;
180
246
  source: string;
181
247
  target: string;
182
- type?: string;
248
+ type?: "control" | "data";
183
249
  source_handle?: string;
184
250
  target_handle?: string;
185
251
  label?: string;
186
- condition?: Record<string, unknown>;
252
+ condition?: string;
187
253
  };
188
254
  type GraphDefinition = {
189
- spec_version?: string;
190
- graph_type?: "agent";
191
- workflow_contract?: Record<string, unknown>;
192
- state_contract?: Record<string, unknown>;
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>;
193
264
  nodes: GraphNode[];
194
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[];
195
330
  };
196
331
  type AgentCreateRequest = {
197
332
  name: string;
198
333
  description?: string | null;
334
+ tags?: string[];
199
335
  graph_definition: GraphDefinition;
200
336
  memory_config?: Record<string, unknown>;
201
337
  execution_constraints?: Record<string, unknown>;
202
338
  };
203
- type AgentUpdateRequest = Partial<AgentCreateRequest> & {
204
- status?: string;
205
- is_active?: boolean;
206
- };
207
- type AgentResponse = {
339
+ type AgentUpdateRequest = Partial<AgentCreateRequest>;
340
+ type AgentSummary = {
208
341
  id: string;
209
342
  organization_id: string;
210
- project_id?: string | null;
211
343
  name: string;
212
344
  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;
345
+ tags: string[];
346
+ lifecycle_status: "active" | "deprecated" | "archived" | "disabled";
347
+ publication_state: "never_published" | "published";
348
+ draft_revision_number: number;
219
349
  is_public: boolean;
220
350
  show_in_playground: boolean;
221
- default_embed_policy_set_id?: string | null;
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;
222
359
  created_at: string;
223
360
  updated_at: string;
224
361
  published_at?: string | null;
225
362
  latest_published_version_id?: string | null;
226
363
  has_unpublished_changes: boolean;
227
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
+ };
228
371
  type AgentListResponse = {
229
- items: AgentResponse[];
372
+ items: Array<AgentSummary | AgentResponse>;
230
373
  total: number;
374
+ has_more: boolean;
375
+ skip: number;
376
+ limit: number;
377
+ view: "summary" | "full";
231
378
  };
232
379
  type StartRunResult = {
233
380
  run_id: string;
234
381
  thread_id?: string | null;
235
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
+ };
236
395
  type RunStatus = {
237
396
  id: string;
238
397
  status: string;
239
398
  result?: unknown;
240
- error?: string | null;
399
+ failure?: FailureView | null;
241
400
  checkpoint?: Record<string, unknown> | null;
242
401
  run_usage?: Record<string, unknown>;
243
402
  context_window?: ContextWindow | null;
@@ -249,12 +408,51 @@ type ControlPlaneRunEventsResponse = {
249
408
  events: RuntimeEvent[];
250
409
  [key: string]: unknown;
251
410
  };
252
- type RunTrace = {
253
- run: RunStatus;
254
- tree: Record<string, unknown>;
255
- events: ControlPlaneRunEventsResponse;
256
- context: RunContext;
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;
257
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;
258
456
  type AgentRef = string | {
259
457
  id: string;
260
458
  };
@@ -308,27 +506,16 @@ type ClientRuntimeOidcConfig = {
308
506
  };
309
507
  type ClientRuntimePolicyInput = {
310
508
  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
- };
509
+ model_selection?: "auto" | "enabled" | "disabled" | null;
321
510
  attachments?: {
322
511
  enabled?: boolean;
323
- max_files_per_request?: number;
512
+ max_attachments_per_turn?: number;
324
513
  max_file_bytes?: number;
325
514
  max_total_bytes?: number;
326
515
  allowed_mime_types?: string[];
327
516
  max_image_pixels?: number;
328
517
  max_pdf_pages?: number;
329
518
  max_extracted_characters?: number;
330
- retention_seconds?: number;
331
- malware_scan_required?: boolean;
332
519
  };
333
520
  hitl?: {
334
521
  enabled?: boolean;
@@ -336,7 +523,7 @@ type ClientRuntimePolicyInput = {
336
523
  };
337
524
  mcp?: {
338
525
  enabled?: boolean;
339
- allowed_server_ids?: string[];
526
+ allow_anonymous?: boolean;
340
527
  };
341
528
  quotas?: {
342
529
  session_mints_per_minute?: number;
@@ -353,6 +540,7 @@ type ClientRuntimePolicyInput = {
353
540
  };
354
541
  type CreateClientDeploymentRequest = {
355
542
  agent_id: string;
543
+ resource_policy_set_id: string;
356
544
  version_policy?: {
357
545
  mode: "latest_published";
358
546
  } | {
@@ -367,12 +555,13 @@ type CreateClientDeploymentRequest = {
367
555
  oidc?: ClientRuntimeOidcConfig | null;
368
556
  policy?: ClientRuntimePolicyInput;
369
557
  };
370
- type UpdateClientDeploymentRequest = Partial<Omit<CreateClientDeploymentRequest, "agent_id">> & {
371
- enabled?: boolean;
558
+ type UpdateClientDeploymentRequest = Partial<Omit<CreateClientDeploymentRequest, "agent_id" | "resource_policy_set_id">> & {
559
+ resource_policy_set_id?: string | null;
560
+ lifecycle_status?: "active" | "inactive";
372
561
  };
373
562
  type ClientDeploymentListQuery = {
374
563
  agentId: string;
375
- status?: "active" | "revoked";
564
+ lifecycleStatus?: "active" | "inactive";
376
565
  cursor?: string;
377
566
  limit?: number;
378
567
  };
@@ -394,8 +583,8 @@ type ClientDeployment = {
394
583
  id: string;
395
584
  client_id: string;
396
585
  organization_id: string;
397
- project_id: string;
398
586
  agent_id: string;
587
+ resource_policy_set_id: string | null;
399
588
  purpose: "client_integration" | "hosted_share";
400
589
  version_policy: {
401
590
  mode: "latest_published";
@@ -409,8 +598,7 @@ type ClientDeployment = {
409
598
  };
410
599
  name: string;
411
600
  description: string | null;
412
- enabled: boolean;
413
- status: "active" | "revoked";
601
+ lifecycle_status: "active" | "inactive" | "deleted";
414
602
  policy_epoch: number;
415
603
  revocation_epoch: number;
416
604
  auth_modes: ClientAuthMode[];
@@ -422,7 +610,7 @@ type ClientDeployment = {
422
610
  native_profiles: ClientNativeProfile[];
423
611
  created_at: string;
424
612
  updated_at: string;
425
- revoked_at: string | null;
613
+ deleted_at: string | null;
426
614
  };
427
615
  type ClientDeploymentListResponse = {
428
616
  items: ClientDeployment[];
@@ -446,7 +634,7 @@ type ClientSessionCredentials = {
446
634
  refresh_expires_at: string | null;
447
635
  dpop_nonce: string | null;
448
636
  };
449
- type PortableResourceKind = "agent" | "rag_pipeline" | "instruction";
637
+ type PortableResourceKind = "agent" | "rag_pipeline" | "instruction" | "knowledge_store";
450
638
  type ResourceSelector = {
451
639
  kind: PortableResourceKind;
452
640
  id: string;
@@ -454,7 +642,7 @@ type ResourceSelector = {
454
642
  version_id?: string;
455
643
  };
456
644
  type ResourcePackageExportRequest = {
457
- root: ResourceSelector;
645
+ selectors: ResourceSelector[];
458
646
  };
459
647
  type ResourcePackageArchive = {
460
648
  data: Uint8Array;
@@ -475,19 +663,168 @@ type ResourcePackageCompileResult = {
475
663
  format: "agents24.resource_package";
476
664
  schema_version: "1.0";
477
665
  package: Record<string, unknown>;
478
- entrypoint: string;
479
666
  resources: Array<Record<string, unknown>>;
480
667
  requirements: string[];
481
668
  tool_exports: Array<Record<string, unknown>>;
482
669
  callable_bindings: Array<Record<string, unknown>>;
483
670
  diagnostics: ResourcePackageDiagnostic[];
484
- bundle?: Record<string, unknown> | null;
671
+ bundle?: ResourceBundle | null;
485
672
  };
486
673
  type ResourceBundleImportRequest = {
487
- bundle: Record<string, unknown>;
674
+ bundle: ResourceBundle;
488
675
  selected_resource_keys?: string[];
489
676
  mappings?: Record<string, string>;
490
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 EmbedResourcePolicyRequest = {
760
+ external_user_id: string;
761
+ external_user_issuer?: string;
762
+ agent_version_id?: string;
763
+ };
764
+ type ResourcePolicySubjectRef = {
765
+ kind: "agent" | "client_deployment" | "organization_user" | "customer_principal";
766
+ id: string;
767
+ };
768
+ type ResourcePolicyQuotaSchedule = {
769
+ reset_anchor_at: string | null;
770
+ period_start: string;
771
+ next_reset_at: string;
772
+ };
773
+ type CustomerResourcePolicyAssignment = {
774
+ customer_principal_ref: string;
775
+ subject_ref: ResourcePolicySubjectRef;
776
+ assignment: {
777
+ id: string;
778
+ policy_set: {
779
+ id: string;
780
+ name: string;
781
+ };
782
+ } | null;
783
+ quota_schedule: ResourcePolicyQuotaSchedule | null;
784
+ };
785
+ type ClearCustomerResourcePolicyAssignmentResult = {
786
+ customer_principal_ref: string | null;
787
+ cleared: boolean;
788
+ };
789
+ type EffectiveResourcePolicy = {
790
+ customer_principal_ref: string | null;
791
+ model_selection: {
792
+ selectable: boolean;
793
+ node_id: string | null;
794
+ default_id: string | null;
795
+ options: Array<{
796
+ id: string;
797
+ label: string;
798
+ }>;
799
+ };
800
+ quota_constraints: Array<{
801
+ model: {
802
+ id: string;
803
+ name: string;
804
+ };
805
+ boundary_kind: ResourcePolicySubjectRef["kind"];
806
+ boundary_ref: string;
807
+ used: number;
808
+ reserved: number;
809
+ limit: number;
810
+ remaining: number;
811
+ period_start: string;
812
+ reset_at: string;
813
+ blocked: boolean;
814
+ }>;
815
+ customer_assignment?: CustomerResourcePolicyAssignment;
816
+ };
817
+ type SetResourcePolicyQuotaScheduleRequest = {
818
+ subject_ref: ResourcePolicySubjectRef;
819
+ reset_anchor_at: string | null;
820
+ };
821
+ type ResetResourcePolicyQuotaRequest = {
822
+ subject_ref: ResourcePolicySubjectRef;
823
+ };
824
+ type ResourcePolicyQuotaScheduleResult = {
825
+ subject_ref: ResourcePolicySubjectRef;
826
+ quota_schedule: ResourcePolicyQuotaSchedule;
827
+ };
491
828
  type ResourceBundleImportPreview = {
492
829
  resources: Array<Record<string, unknown>>;
493
830
  dependencies: Array<Record<string, unknown>>;
@@ -514,8 +851,6 @@ type RequestConfig = {
514
851
  declare class Agents24HttpClient {
515
852
  private readonly base;
516
853
  private readonly apiKey;
517
- private readonly organizationId;
518
- private readonly projectId;
519
854
  private readonly fetchImpl;
520
855
  constructor(options: Agents24NodeOptions);
521
856
  url(requestPath: string, query?: Record<string, unknown>): string;
@@ -541,15 +876,16 @@ declare class AgentsNamespace {
541
876
  update(agentId: string, request: AgentUpdateRequest, options?: RequestOptions): Promise<AgentResponse>;
542
877
  updateGraph(agentId: string, graph: GraphDefinition, options?: RequestOptions): Promise<AgentResponse>;
543
878
  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>>;
879
+ catalog(): Promise<NodeCatalogResponse>;
880
+ schema(nodeTypes: string[]): Promise<NodeSchemaResponse>;
881
+ validate(agentId: string): Promise<AgentValidationResult>;
547
882
  publish(agentId: string, options?: RequestOptions): Promise<AgentResponse>;
548
883
  startRun(agentId: string, payload: AgentStreamRequest, options?: RequestOptions): Promise<StartRunResult>;
549
884
  stream(agentId: string, payload: AgentStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, mode?: "debug" | "production" | string, options?: StreamRequestOptions): Promise<StreamResult>;
550
885
  resumeRun(runId: string, payload: Record<string, unknown>, options?: RequestOptions): Promise<Record<string, unknown>>;
551
886
  cancelRun(runId: string, options?: RunCancelOptions): Promise<RunCancelResult>;
552
887
  uploadAttachments(agentId: string, options: ServerAttachmentUploadOptions): Promise<AttachmentUploadResult>;
888
+ createAttachmentContentAccess(agentId: string, attachmentId: string, request: AttachmentContentAccessRequest, options?: RequestOptions): Promise<AttachmentContentAccess>;
553
889
  }
554
890
 
555
891
  declare class AgentDefinitionBuilder {
@@ -573,6 +909,8 @@ declare class GraphBuilder {
573
909
  id?: string;
574
910
  sourceHandle?: string;
575
911
  targetHandle?: string;
912
+ type?: "control" | "data";
913
+ condition?: string;
576
914
  }): this;
577
915
  toGraph(): GraphDefinition;
578
916
  }
@@ -584,7 +922,7 @@ declare class ClientDeploymentsNamespace {
584
922
  list(query: ClientDeploymentListQuery): Promise<ClientDeploymentListResponse>;
585
923
  get(deploymentId: string): Promise<ClientDeployment>;
586
924
  update(deploymentId: string, request: UpdateClientDeploymentRequest, options?: RequestOptions): Promise<ClientDeployment>;
587
- revoke(deploymentId: string, options?: RequestOptions): Promise<ClientDeployment>;
925
+ delete(deploymentId: string, options?: RequestOptions): Promise<ClientDeployment>;
588
926
  }
589
927
  declare class ClientSessionsNamespace {
590
928
  private readonly http;
@@ -601,20 +939,26 @@ declare class EmbedNamespace {
601
939
  resumeAgentRun(agentId: string, runId: string, payload: ResumeRunRequest, options?: RequestOptions): Promise<RunResumeResult>;
602
940
  startAgentRunMcpAuth(agentId: string, runId: string, serverId: string, payload: McpAuthStartRequest, options?: RequestOptions): Promise<McpAuthStartResult>;
603
941
  getRuntimeBootstrap(agentId: string, agentVersionId?: string): Promise<EmbedRuntimeBootstrap>;
942
+ getResourcePolicy(agentId: string, request: EmbedResourcePolicyRequest): Promise<EffectiveResourcePolicy>;
604
943
  listAgentThreads(agentId: string, options: ThreadListOptions): Promise<ThreadsResponse>;
605
944
  listAgentThreadsMulti(options: MultiAgentThreadListRequest): Promise<ThreadsResponse>;
606
945
  subscribeAgentThreadEvents(agentId: string, options: ThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
607
946
  subscribeAgentThreadEventsMulti(options: MultiAgentThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
608
947
  getAgentThread(agentId: string, threadId: string, options: ThreadDetailOptions): Promise<ThreadDetail>;
609
- deleteAgentThread(agentId: string, threadId: string, options: ThreadDeleteOptions): Promise<ThreadDeleteResult>;
948
+ deleteAgentThread(agentId: string, threadId: string, options: ThreadDeleteOptions, requestOptions?: RequestOptions): Promise<ThreadDeleteResult>;
610
949
  getAgentRunContext(agentId: string, runId: string, options: RunContextOptions): Promise<RunContext>;
611
- cancelAgentRun(agentId: string, runId: string, options: EmbedRunCancelOptions): Promise<RunCancelResult>;
950
+ cancelAgentRun(agentId: string, runId: string, options: EmbedRunCancelOptions, requestOptions?: RequestOptions): Promise<RunCancelResult>;
951
+ setAgentRunFeedback(agentId: string, runId: string, payload: EmbeddedResponseFeedbackInput): Promise<ResponseFeedbackResult>;
612
952
  uploadAgentAttachments(agentId: string, options: ServerEmbedAttachmentUploadOptions): Promise<AttachmentUploadResult>;
953
+ createAttachmentContentAccess(agentId: string, attachmentId: string, request: EmbedAttachmentContentAccessRequest, options?: RequestOptions): Promise<AttachmentContentAccess>;
613
954
  }
614
955
 
615
956
  declare class ResourceBundlesNamespace {
616
957
  protected readonly http: Agents24HttpClient;
617
958
  constructor(http: Agents24HttpClient);
959
+ exportPlan(request: ResourceBundleExportRequest): Promise<ResourceBundlePlan>;
960
+ exportBundle(request: ResourceBundleExportRequest): Promise<ResourceBundle>;
961
+ candidates(options: ResourceBundleCandidateOptions): Promise<ResourceBundleCandidateList>;
618
962
  importPreview(request: ResourceBundleImportRequest): Promise<ResourceBundleImportPreview>;
619
963
  importBundle(request: ResourceBundleImportRequest, options?: RequestOptions): Promise<ResourceBundleImportResult>;
620
964
  }
@@ -639,7 +983,27 @@ declare class RunsNamespace {
639
983
  limit?: number;
640
984
  }): Promise<ControlPlaneRunEventsResponse>;
641
985
  getContext(runId: string): Promise<RunContext>;
642
- getTrace(runId: string): Promise<RunTrace>;
986
+ getTrace(runId: string, options?: {
987
+ includeDiagnostics?: boolean;
988
+ }): Promise<TraceView>;
989
+ }
990
+
991
+ declare class InstructionsNamespace {
992
+ protected readonly http: Agents24HttpClient;
993
+ constructor(http: Agents24HttpClient);
994
+ publish(instructionId: string, options?: RequestOptions): Promise<Record<string, unknown>>;
995
+ }
996
+
997
+ declare class ResourcePoliciesNamespace {
998
+ protected readonly http: Agents24HttpClient;
999
+ constructor(http: Agents24HttpClient);
1000
+ list(): Promise<ResourcePolicyList>;
1001
+ setCustomerAssignment(request: SetCustomerResourcePolicyAssignmentRequest, options?: RequestOptions): Promise<CustomerResourcePolicyAssignment>;
1002
+ getCustomerAssignment(request: CustomerIdentityRequest): Promise<CustomerResourcePolicyAssignment>;
1003
+ clearCustomerAssignment(request: CustomerIdentityRequest, options?: RequestOptions): Promise<ClearCustomerResourcePolicyAssignmentResult>;
1004
+ getEffectiveCustomerPolicy(request: EffectiveCustomerResourcePolicyRequest): Promise<EffectiveResourcePolicy>;
1005
+ setQuotaSchedule(request: SetResourcePolicyQuotaScheduleRequest, options?: RequestOptions): Promise<ResourcePolicyQuotaScheduleResult>;
1006
+ resetQuotaNow(request: ResetResourcePolicyQuotaRequest, options?: RequestOptions): Promise<ResourcePolicyQuotaScheduleResult>;
643
1007
  }
644
1008
 
645
1009
  declare class Agents24 {
@@ -650,9 +1014,11 @@ declare class Agents24 {
650
1014
  readonly resourcePackages: ResourcePackagesNamespace;
651
1015
  readonly clientDeployments: ClientDeploymentsNamespace;
652
1016
  readonly clientSessions: ClientSessionsNamespace;
1017
+ readonly instructions: InstructionsNamespace;
1018
+ readonly resourcePolicies: ResourcePoliciesNamespace;
653
1019
  constructor(options: Agents24NodeOptions);
654
1020
  agent(options: AgentDefinitionOptions): AgentDefinitionBuilder;
655
1021
  graph(): GraphBuilder;
656
1022
  }
657
1023
 
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 };
1024
+ export { type GraphHints 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 EmbedResourcePolicyRequest as P, type EmbedRunCancelOptions as Q, type EmbedRuntimeBootstrap as R, type EmbedStreamRequest as S, type EmbeddedResponseFeedbackInput as T, type FailureCategory as U, type FailureView as V, type FeedbackRating as W, type FeedbackReason as X, GraphBuilder as Y, type GraphDefinition as Z, type GraphEdge as _, type AgentCreateRequest as a, type TraceView as a$, type GraphNode as a0, type GraphValueRef as a1, type HitlAction as a2, type HitlAnswer as a3, type LatestOrPinnedPolicy as a4, type McpAuthStartRequest as a5, type McpAuthStartResult as a6, type MultiAgentThreadListRequest as a7, type MultiAgentThreadSummaryEventOptions as a8, type NativePlatform as a9, type ResourcePolicySubjectRef as aA, type ResourcePolicySummary as aB, type ResourceSelector as aC, type ResponseFeedback as aD, type ResponseFeedbackResult as aE, type ResumeRunRequest as aF, type RunCancelOptions as aG, type RunContextOptions as aH, type RunStatus as aI, type RunTrace as aJ, type ServerAttachmentUploadOptions as aK, type ServerEmbedAttachmentUploadOptions as aL, type SetCustomerResourcePolicyAssignmentRequest as aM, type SetResourcePolicyQuotaScheduleRequest as aN, type StartRunResult as aO, type StateVariableDefinition as aP, type StreamRequestOptions as aQ, type StreamResult as aR, type ThreadDeleteOptions as aS, type ThreadDetailOptions as aT, type ThreadListOptions as aU, type ThreadSummaryEventOptions as aV, type TraceContent as aW, type TraceError as aX, type TraceSpan as aY, type TraceSpanKind as aZ, type TraceSpanStatus as a_, type NodeAuthoringSpec as aa, type NodeCatalogItem as ab, type NodeCatalogResponse as ac, type NodeSchemaResponse as ad, type PortableResourceKind as ae, type RequestOptions as af, type ResetResourcePolicyQuotaRequest as ag, type ResourceBundle as ah, type ResourceBundleCandidateList as ai, type ResourceBundleCandidateOptions as aj, type ResourceBundleDependency as ak, type ResourceBundleExportRequest as al, type ResourceBundleImportPreview as am, type ResourceBundleImportRequest as an, type ResourceBundleImportResult as ao, type ResourceBundleOrigin as ap, type ResourceBundlePlan as aq, type ResourceBundleResource as ar, type ResourcePackageArchive as as, type ResourcePackageCompileResult as at, type ResourcePackageDiagnostic as au, type ResourcePackageExportRequest as av, type ResourcePackageUpload as aw, type ResourcePolicyList as ax, type ResourcePolicyQuotaSchedule as ay, type ResourcePolicyQuotaScheduleResult as az, AgentDefinitionBuilder as b, type UpdateClientDeploymentRequest as b0, type WorkflowInputDefinition as b1, 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 };