@agents24/node 0.2.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.
Files changed (54) hide show
  1. package/README.md +17 -4
  2. package/compatibility.json +10 -10
  3. package/dist/bff.cjs +204 -33
  4. package/dist/bff.cjs.map +1 -1
  5. package/dist/bff.d.cts +5 -3
  6. package/dist/bff.d.ts +5 -3
  7. package/dist/bff.js +204 -33
  8. package/dist/bff.js.map +1 -1
  9. package/dist/{client-6MWalxux.d.cts → client-CnOaaCVH.d.cts} +431 -71
  10. package/dist/{client-6MWalxux.d.ts → client-CnOaaCVH.d.ts} +431 -71
  11. package/dist/index.cjs +187 -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 +187 -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 +4 -2
  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 +5 -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 +384 -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;
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
+ };
257
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,163 @@ 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 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
+ };
491
823
  type ResourceBundleImportPreview = {
492
824
  resources: Array<Record<string, unknown>>;
493
825
  dependencies: Array<Record<string, unknown>>;
@@ -514,8 +846,6 @@ type RequestConfig = {
514
846
  declare class Agents24HttpClient {
515
847
  private readonly base;
516
848
  private readonly apiKey;
517
- private readonly organizationId;
518
- private readonly projectId;
519
849
  private readonly fetchImpl;
520
850
  constructor(options: Agents24NodeOptions);
521
851
  url(requestPath: string, query?: Record<string, unknown>): string;
@@ -541,15 +871,16 @@ declare class AgentsNamespace {
541
871
  update(agentId: string, request: AgentUpdateRequest, options?: RequestOptions): Promise<AgentResponse>;
542
872
  updateGraph(agentId: string, graph: GraphDefinition, options?: RequestOptions): Promise<AgentResponse>;
543
873
  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>>;
874
+ catalog(): Promise<NodeCatalogResponse>;
875
+ schema(nodeTypes: string[]): Promise<NodeSchemaResponse>;
876
+ validate(agentId: string): Promise<AgentValidationResult>;
547
877
  publish(agentId: string, options?: RequestOptions): Promise<AgentResponse>;
548
878
  startRun(agentId: string, payload: AgentStreamRequest, options?: RequestOptions): Promise<StartRunResult>;
549
879
  stream(agentId: string, payload: AgentStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, mode?: "debug" | "production" | string, options?: StreamRequestOptions): Promise<StreamResult>;
550
880
  resumeRun(runId: string, payload: Record<string, unknown>, options?: RequestOptions): Promise<Record<string, unknown>>;
551
881
  cancelRun(runId: string, options?: RunCancelOptions): Promise<RunCancelResult>;
552
882
  uploadAttachments(agentId: string, options: ServerAttachmentUploadOptions): Promise<AttachmentUploadResult>;
883
+ createAttachmentContentAccess(agentId: string, attachmentId: string, request: AttachmentContentAccessRequest, options?: RequestOptions): Promise<AttachmentContentAccess>;
553
884
  }
554
885
 
555
886
  declare class AgentDefinitionBuilder {
@@ -573,6 +904,8 @@ declare class GraphBuilder {
573
904
  id?: string;
574
905
  sourceHandle?: string;
575
906
  targetHandle?: string;
907
+ type?: "control" | "data";
908
+ condition?: string;
576
909
  }): this;
577
910
  toGraph(): GraphDefinition;
578
911
  }
@@ -584,7 +917,7 @@ declare class ClientDeploymentsNamespace {
584
917
  list(query: ClientDeploymentListQuery): Promise<ClientDeploymentListResponse>;
585
918
  get(deploymentId: string): Promise<ClientDeployment>;
586
919
  update(deploymentId: string, request: UpdateClientDeploymentRequest, options?: RequestOptions): Promise<ClientDeployment>;
587
- revoke(deploymentId: string, options?: RequestOptions): Promise<ClientDeployment>;
920
+ delete(deploymentId: string, options?: RequestOptions): Promise<ClientDeployment>;
588
921
  }
589
922
  declare class ClientSessionsNamespace {
590
923
  private readonly http;
@@ -606,15 +939,20 @@ declare class EmbedNamespace {
606
939
  subscribeAgentThreadEvents(agentId: string, options: ThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
607
940
  subscribeAgentThreadEventsMulti(options: MultiAgentThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
608
941
  getAgentThread(agentId: string, threadId: string, options: ThreadDetailOptions): Promise<ThreadDetail>;
609
- deleteAgentThread(agentId: string, threadId: string, options: ThreadDeleteOptions): Promise<ThreadDeleteResult>;
942
+ deleteAgentThread(agentId: string, threadId: string, options: ThreadDeleteOptions, requestOptions?: RequestOptions): Promise<ThreadDeleteResult>;
610
943
  getAgentRunContext(agentId: string, runId: string, options: RunContextOptions): Promise<RunContext>;
611
- cancelAgentRun(agentId: string, runId: string, options: EmbedRunCancelOptions): Promise<RunCancelResult>;
944
+ cancelAgentRun(agentId: string, runId: string, options: EmbedRunCancelOptions, requestOptions?: RequestOptions): Promise<RunCancelResult>;
945
+ setAgentRunFeedback(agentId: string, runId: string, payload: EmbeddedResponseFeedbackInput): Promise<ResponseFeedbackResult>;
612
946
  uploadAgentAttachments(agentId: string, options: ServerEmbedAttachmentUploadOptions): Promise<AttachmentUploadResult>;
947
+ createAttachmentContentAccess(agentId: string, attachmentId: string, request: EmbedAttachmentContentAccessRequest, options?: RequestOptions): Promise<AttachmentContentAccess>;
613
948
  }
614
949
 
615
950
  declare class ResourceBundlesNamespace {
616
951
  protected readonly http: Agents24HttpClient;
617
952
  constructor(http: Agents24HttpClient);
953
+ exportPlan(request: ResourceBundleExportRequest): Promise<ResourceBundlePlan>;
954
+ exportBundle(request: ResourceBundleExportRequest): Promise<ResourceBundle>;
955
+ candidates(options: ResourceBundleCandidateOptions): Promise<ResourceBundleCandidateList>;
618
956
  importPreview(request: ResourceBundleImportRequest): Promise<ResourceBundleImportPreview>;
619
957
  importBundle(request: ResourceBundleImportRequest, options?: RequestOptions): Promise<ResourceBundleImportResult>;
620
958
  }
@@ -639,7 +977,27 @@ declare class RunsNamespace {
639
977
  limit?: number;
640
978
  }): Promise<ControlPlaneRunEventsResponse>;
641
979
  getContext(runId: string): Promise<RunContext>;
642
- getTrace(runId: string): Promise<RunTrace>;
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>;
643
1001
  }
644
1002
 
645
1003
  declare class Agents24 {
@@ -650,9 +1008,11 @@ declare class Agents24 {
650
1008
  readonly resourcePackages: ResourcePackagesNamespace;
651
1009
  readonly clientDeployments: ClientDeploymentsNamespace;
652
1010
  readonly clientSessions: ClientSessionsNamespace;
1011
+ readonly instructions: InstructionsNamespace;
1012
+ readonly resourcePolicies: ResourcePoliciesNamespace;
653
1013
  constructor(options: Agents24NodeOptions);
654
1014
  agent(options: AgentDefinitionOptions): AgentDefinitionBuilder;
655
1015
  graph(): GraphBuilder;
656
1016
  }
657
1017
 
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 };
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 };