@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.
Files changed (57) hide show
  1. package/README.md +25 -3
  2. package/compatibility.json +10 -10
  3. package/dist/bff.cjs +466 -0
  4. package/dist/bff.cjs.map +1 -0
  5. package/dist/bff.d.cts +25 -0
  6. package/dist/bff.d.ts +25 -0
  7. package/dist/bff.js +464 -0
  8. package/dist/bff.js.map +1 -0
  9. package/dist/client-CnOaaCVH.d.cts +1018 -0
  10. package/dist/client-CnOaaCVH.d.ts +1018 -0
  11. package/dist/index.cjs +279 -55
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +4 -561
  14. package/dist/index.d.ts +4 -561
  15. package/dist/index.js +279 -55
  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 +22 -0
  26. package/dist/types/bff.d.ts.map +1 -0
  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 +3 -3
  30. package/dist/types/client-runtime-admin.d.ts.map +1 -1
  31. package/dist/types/client.d.ts +8 -0
  32. package/dist/types/client.d.ts.map +1 -1
  33. package/dist/types/embed.d.ts +6 -4
  34. package/dist/types/embed.d.ts.map +1 -1
  35. package/dist/types/errors.d.ts +10 -2
  36. package/dist/types/errors.d.ts.map +1 -1
  37. package/dist/types/generated/instructions.d.ts +8 -0
  38. package/dist/types/generated/instructions.d.ts.map +1 -0
  39. package/dist/types/generated/manifest.d.ts +1 -1
  40. package/dist/types/generated/manifest.d.ts.map +1 -1
  41. package/dist/types/generated/resourceBundles.d.ts +12 -0
  42. package/dist/types/generated/resourceBundles.d.ts.map +1 -0
  43. package/dist/types/generated/resourcePackages.d.ts +10 -0
  44. package/dist/types/generated/resourcePackages.d.ts.map +1 -0
  45. package/dist/types/generated/resourcePolicies.d.ts +14 -0
  46. package/dist/types/generated/resourcePolicies.d.ts.map +1 -0
  47. package/dist/types/http.d.ts +0 -2
  48. package/dist/types/http.d.ts.map +1 -1
  49. package/dist/types/index.d.ts +1 -1
  50. package/dist/types/index.d.ts.map +1 -1
  51. package/dist/types/runs.d.ts +4 -2
  52. package/dist/types/runs.d.ts.map +1 -1
  53. package/dist/types/server.d.ts +13 -1
  54. package/dist/types/server.d.ts.map +1 -1
  55. package/dist/types/types.d.ts +466 -61
  56. package/dist/types/types.d.ts.map +1 -1
  57. package/package.json +8 -2
@@ -1,11 +1,9 @@
1
1
  import type { Agents24SDKErrorKind } from "./errors.js";
2
- import type { ActiveThreadRun, Attachment, AttachmentUploadResult, ContextCompression, ContextWindow, ContextWindowConfidence, ContextWindowSource, ContextWindowStage, ContextWindowTracker, PublicResponseBlock, RunCancelResult, RunContext, RunResumeResult, RuntimeEvent, ThreadDeleteResult, ThreadDetail, ThreadSummary, ThreadSummaryEvent, ThreadTurn, ThreadsResponse, ToolInputOverrides } from "@agents24/client/protocol";
3
- export type { ActiveThreadRun, Attachment, AttachmentUploadResult, ContextCompression, ContextWindow, ContextWindowConfidence, ContextWindowSource, ContextWindowStage, ContextWindowTracker, PublicResponseBlock as ResponseBlock, RunCancelResult, RunContext, RunResumeResult, RuntimeEvent, ThreadDeleteResult, ThreadDetail, ThreadSummary, ThreadSummaryEvent, ThreadTurn, ThreadsResponse, ToolInputOverrides, };
2
+ import type { ActiveThreadRun, Attachment, AttachmentContentAccess, AttachmentUploadResult, ContextCompression, ContextWindow, ContextWindowConfidence, ContextWindowSource, ContextWindowStage, ContextWindowTracker, PublicResponseBlock, RunCancelResult, RunContext, RunResumeResult, RuntimeEvent, ThreadDeleteResult, ThreadDetail, ThreadSummary, ThreadSummaryEvent, ThreadTurn, ThreadsResponse, ToolInputOverrides } from "@agents24/client/protocol";
3
+ export type { ActiveThreadRun, Attachment, AttachmentContentAccess, AttachmentUploadResult, ContextCompression, ContextWindow, ContextWindowConfidence, ContextWindowSource, ContextWindowStage, ContextWindowTracker, PublicResponseBlock as ResponseBlock, RunCancelResult, RunContext, RunResumeResult, RuntimeEvent, ThreadDeleteResult, ThreadDetail, ThreadSummary, ThreadSummaryEvent, ThreadTurn, ThreadsResponse, ToolInputOverrides, };
4
4
  export type Agents24NodeOptions = {
5
5
  baseUrl: string;
6
6
  apiKey: string;
7
- organizationId: string;
8
- projectId: string;
9
7
  fetchImpl?: typeof fetch;
10
8
  };
11
9
  /** @deprecated Use Agents24NodeOptions. */
@@ -44,6 +42,7 @@ export type StreamResult = {
44
42
  runId: string | null;
45
43
  };
46
44
  export type EmbedStreamRequest = {
45
+ agent_version_id?: string;
47
46
  input?: string;
48
47
  messages?: Array<Record<string, unknown>>;
49
48
  attachment_ids?: string[];
@@ -53,6 +52,7 @@ export type EmbedStreamRequest = {
53
52
  requested_model_id?: string;
54
53
  requested_model_node_id?: string;
55
54
  external_user_id: string;
55
+ external_user_issuer?: string;
56
56
  external_session_id?: string;
57
57
  metadata?: Record<string, unknown>;
58
58
  client?: Record<string, unknown>;
@@ -62,13 +62,40 @@ export type AttachRunRequest = {
62
62
  external_session_id?: string;
63
63
  metadata?: Record<string, unknown>;
64
64
  client?: Record<string, unknown>;
65
+ cursor?: number;
66
+ };
67
+ export type FeedbackRating = "like" | "dislike";
68
+ export type FeedbackReason = "incorrect" | "irrelevant" | "incomplete" | "unsafe" | "citation_issue" | "other";
69
+ export type ResponseFeedback = {
70
+ rating: FeedbackRating;
71
+ reason: FeedbackReason | null;
72
+ comment: string | null;
73
+ created_at: string;
74
+ updated_at: string;
75
+ };
76
+ export type ResponseFeedbackResult = {
77
+ run_id: string;
78
+ feedback: ResponseFeedback | null;
79
+ };
80
+ export type EmbeddedResponseFeedbackInput = {
81
+ external_user_id: string;
82
+ external_session_id?: string;
83
+ rating: FeedbackRating | null;
84
+ reason?: FeedbackReason | null;
85
+ comment?: string | null;
86
+ };
87
+ export type HitlAction = "approve" | "reject" | "connect" | "skip" | "respond";
88
+ export type HitlAnswer = {
89
+ question_id: string;
90
+ selected_option_ids: string[];
91
+ custom_text?: string;
65
92
  };
66
- export type HitlAction = "approve" | "reject" | "connect" | "skip";
67
93
  export type ResumeRunRequest = AttachRunRequest & {
68
94
  schema_version: "agents24.hitl.resume.v2";
69
95
  interrupt_id: string;
70
96
  action: HitlAction;
71
97
  comment?: string;
98
+ answers?: HitlAnswer[];
72
99
  };
73
100
  export type McpAuthStartRequest = AttachRunRequest & {
74
101
  interrupt_id: string;
@@ -81,7 +108,10 @@ export type McpAuthStartResult = {
81
108
  };
82
109
  export type EmbedRuntimeBootstrap = {
83
110
  version: string;
84
- model_selector?: Record<string, unknown> | null;
111
+ agent_name?: string;
112
+ agent_version_id?: string;
113
+ agent_version_number?: number;
114
+ features: Record<string, unknown>;
85
115
  thread_events_path?: string | null;
86
116
  thread_events_url?: string | null;
87
117
  };
@@ -103,7 +133,6 @@ export type ThreadDetailOptions = {
103
133
  externalSessionId?: string;
104
134
  beforeTurnIndex?: number;
105
135
  limit?: number;
106
- includeRunEvents?: boolean;
107
136
  includeSubthreads?: boolean;
108
137
  subthreadDepth?: number;
109
138
  subthreadTurnLimit?: number;
@@ -137,13 +166,46 @@ export type MultiAgentThreadSummaryEventOptions = ThreadSummaryEventOptions & {
137
166
  };
138
167
  export type ServerAttachmentUploadOptions = {
139
168
  threadId?: string;
169
+ agentVersionId?: string;
140
170
  files: File[];
141
171
  idempotencyKey?: string;
142
172
  };
173
+ export type AttachmentContentAccessRequest = {
174
+ disposition: "inline" | "attachment";
175
+ };
176
+ export type EmbedAttachmentContentAccessRequest = AttachmentContentAccessRequest & {
177
+ external_user_id: string;
178
+ external_session_id?: string | null;
179
+ };
143
180
  export type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
144
181
  externalUserId: string;
145
182
  externalSessionId?: string;
146
183
  };
184
+ export type GraphValueRef = {
185
+ namespace: "workflow_input" | "state" | "node_output";
186
+ key: string;
187
+ node_id?: string;
188
+ expected_type?: "string" | "number" | "boolean" | "object" | "list" | "unknown";
189
+ label?: string;
190
+ };
191
+ export type WorkflowInputDefinition = {
192
+ key: string;
193
+ type: "string" | "number" | "boolean" | "object" | "list";
194
+ required?: boolean;
195
+ enabled?: boolean;
196
+ label?: string;
197
+ description?: string;
198
+ semantic_type?: string;
199
+ readonly?: boolean;
200
+ derived?: boolean;
201
+ };
202
+ export type StateVariableDefinition = {
203
+ key: string;
204
+ type: "string" | "number" | "boolean" | "object" | "list";
205
+ description?: string;
206
+ schema?: Record<string, unknown>;
207
+ default_value?: unknown;
208
+ };
147
209
  export type GraphNode = {
148
210
  id: string;
149
211
  type: string;
@@ -154,71 +216,164 @@ export type GraphNode = {
154
216
  config: Record<string, unknown>;
155
217
  label?: string;
156
218
  data?: Record<string, unknown>;
157
- input_mappings?: Record<string, unknown>;
219
+ input_mappings?: Record<string, string>;
158
220
  };
159
221
  export type GraphEdge = {
160
222
  id: string;
161
223
  source: string;
162
224
  target: string;
163
- type?: string;
225
+ type?: "control" | "data";
164
226
  source_handle?: string;
165
227
  target_handle?: string;
166
228
  label?: string;
167
- condition?: Record<string, unknown>;
229
+ condition?: string;
168
230
  };
169
231
  export type GraphDefinition = {
170
- spec_version?: string;
171
- graph_type?: "agent";
172
- workflow_contract?: Record<string, unknown>;
173
- state_contract?: Record<string, unknown>;
232
+ spec_version: "4.0";
233
+ graph_type: "agent";
234
+ workflow_contract: {
235
+ inputs: WorkflowInputDefinition[];
236
+ };
237
+ state_contract: {
238
+ variables: StateVariableDefinition[];
239
+ };
240
+ prompt_version_policies?: Record<string, unknown>;
174
241
  nodes: GraphNode[];
175
242
  edges: GraphEdge[];
243
+ metadata?: Record<string, unknown>;
244
+ };
245
+ export type NodeCatalogItem = {
246
+ type: string;
247
+ title: string;
248
+ description?: string | null;
249
+ category: string;
250
+ input_type: string;
251
+ output_type: string;
252
+ required_config_fields: string[];
253
+ icon?: string | null;
254
+ color?: string | null;
255
+ editor?: string | null;
256
+ };
257
+ export type BranchingHint = {
258
+ kind: string;
259
+ field?: string | null;
260
+ id_key?: string | null;
261
+ label_key?: string | null;
262
+ static_handles: string[];
263
+ default_handles: string[];
264
+ };
265
+ export type GraphHints = {
266
+ editor: string;
267
+ branching?: BranchingHint | null;
268
+ };
269
+ export type NodeAuthoringSpec = {
270
+ type: string;
271
+ title: string;
272
+ description?: string | null;
273
+ category: string;
274
+ input_type: string;
275
+ output_type: string;
276
+ config_schema: Record<string, unknown>;
277
+ input_schema?: Record<string, unknown> | null;
278
+ output_schema?: Record<string, unknown> | null;
279
+ field_contracts?: Record<string, unknown> | null;
280
+ graph_hints?: GraphHints | null;
281
+ node_template?: GraphNode | null;
282
+ normalization_defaults: Record<string, unknown>;
283
+ };
284
+ export type NodeCatalogResponse = {
285
+ nodes: NodeCatalogItem[];
286
+ };
287
+ export type NodeSchemaResponse = {
288
+ specs: Record<string, NodeAuthoringSpec>;
289
+ unknown: string[];
290
+ instance_contract: Record<string, unknown>;
291
+ };
292
+ export type AgentValidationIssue = {
293
+ code: string;
294
+ message: string;
295
+ severity: "error" | "warning";
296
+ node_id?: string | null;
297
+ edge_id?: string | null;
298
+ path?: string | null;
299
+ expected?: unknown;
300
+ actual?: unknown;
301
+ repair_hint?: string | null;
302
+ };
303
+ export type AgentValidationResult = {
304
+ valid: boolean;
305
+ errors: AgentValidationIssue[];
306
+ warnings: AgentValidationIssue[];
176
307
  };
177
308
  export type AgentCreateRequest = {
178
309
  name: string;
179
310
  description?: string | null;
311
+ tags?: string[];
180
312
  graph_definition: GraphDefinition;
181
313
  memory_config?: Record<string, unknown>;
182
314
  execution_constraints?: Record<string, unknown>;
183
315
  };
184
- export type AgentUpdateRequest = Partial<AgentCreateRequest> & {
185
- status?: string;
186
- is_active?: boolean;
187
- };
188
- export type AgentResponse = {
316
+ export type AgentUpdateRequest = Partial<AgentCreateRequest>;
317
+ export type AgentSummary = {
189
318
  id: string;
190
319
  organization_id: string;
191
- project_id?: string | null;
192
320
  name: string;
193
321
  description?: string | null;
194
- graph_definition: GraphDefinition;
195
- memory_config: Record<string, unknown>;
196
- execution_constraints: Record<string, unknown>;
197
- status: string;
198
- version: number;
199
- is_active: boolean;
322
+ tags: string[];
323
+ lifecycle_status: "active" | "deprecated" | "archived" | "disabled";
324
+ publication_state: "never_published" | "published";
325
+ draft_revision_number: number;
200
326
  is_public: boolean;
201
327
  show_in_playground: boolean;
202
- default_embed_policy_set_id?: string | null;
328
+ share_enabled: boolean;
329
+ share_handle?: string | null;
330
+ share_url?: string | null;
331
+ share_theme: "soft" | "sharp";
332
+ share_client_deployment_id?: string | null;
333
+ resource_policy_set_id?: string | null;
334
+ tool_binding_status?: string | null;
335
+ is_tool_enabled: boolean;
203
336
  created_at: string;
204
337
  updated_at: string;
205
338
  published_at?: string | null;
206
- active_published_version_id?: string | null;
339
+ latest_published_version_id?: string | null;
207
340
  has_unpublished_changes: boolean;
208
341
  };
342
+ export type AgentResponse = AgentSummary & {
343
+ graph_definition: GraphDefinition;
344
+ memory_config: Record<string, unknown>;
345
+ execution_constraints: Record<string, unknown>;
346
+ attached_tools: Array<Record<string, unknown>>;
347
+ };
209
348
  export type AgentListResponse = {
210
- items: AgentResponse[];
349
+ items: Array<AgentSummary | AgentResponse>;
211
350
  total: number;
351
+ has_more: boolean;
352
+ skip: number;
353
+ limit: number;
354
+ view: "summary" | "full";
212
355
  };
213
356
  export type StartRunResult = {
214
357
  run_id: string;
215
358
  thread_id?: string | null;
216
359
  };
360
+ export type FailureCategory = "validation" | "authentication" | "authorization" | "not_found" | "policy" | "conflict" | "billing" | "quota" | "rate_limit" | "capacity" | "dependency" | "protocol" | "timeout" | "internal";
361
+ export type FailureView = {
362
+ schema_version: "agents24.failure.v1";
363
+ failure_id: string;
364
+ code: string;
365
+ category: FailureCategory;
366
+ message: string;
367
+ retryable: boolean;
368
+ request_id: string | null;
369
+ retry_after_ms: number | null;
370
+ details: Record<string, unknown>;
371
+ };
217
372
  export type RunStatus = {
218
373
  id: string;
219
374
  status: string;
220
375
  result?: unknown;
221
- error?: string | null;
376
+ failure?: FailureView | null;
222
377
  checkpoint?: Record<string, unknown> | null;
223
378
  run_usage?: Record<string, unknown>;
224
379
  context_window?: ContextWindow | null;
@@ -230,17 +385,56 @@ export type ControlPlaneRunEventsResponse = {
230
385
  events: RuntimeEvent[];
231
386
  [key: string]: unknown;
232
387
  };
233
- export type RunTrace = {
234
- run: RunStatus;
235
- tree: Record<string, unknown>;
236
- events: ControlPlaneRunEventsResponse;
237
- context: RunContext;
388
+ export type TraceSpanKind = "run" | "workflow_node" | "agent" | "model" | "tool";
389
+ export type TraceSpanStatus = "running" | "waiting" | "succeeded" | "failed" | "cancelled" | "skipped";
390
+ export type TraceContent = {
391
+ type: "messages" | "message" | "text" | "json";
392
+ value: unknown;
393
+ redacted: boolean;
394
+ truncated: boolean;
395
+ };
396
+ export type TraceError = FailureView;
397
+ export type TraceSpan = {
398
+ id: string;
399
+ span_id: string;
400
+ parent_id?: string | null;
401
+ run_id: string;
402
+ node_id?: string | null;
403
+ model_invocation_id?: string | null;
404
+ name: string;
405
+ kind: TraceSpanKind;
406
+ status: TraceSpanStatus;
407
+ sequence: number;
408
+ input?: TraceContent | null;
409
+ output?: TraceContent | null;
410
+ attributes: Record<string, unknown>;
411
+ diagnostics?: Record<string, unknown> | null;
412
+ failure?: TraceError | null;
413
+ started_at: string;
414
+ ended_at?: string | null;
415
+ duration_ms?: number | null;
416
+ };
417
+ export type TraceView = {
418
+ schema_version?: string | null;
419
+ trace_id: string;
420
+ root_run_id: string;
421
+ focus_run_id: string;
422
+ status: string;
423
+ legacy: boolean;
424
+ raw_events_available: boolean;
425
+ spans: TraceSpan[];
426
+ content_protection: {
427
+ redacted_fields: number;
428
+ truncated_fields: number;
429
+ diagnostics_included: boolean;
430
+ };
238
431
  };
432
+ export type RunTrace = TraceView;
239
433
  export type AgentRef = string | {
240
434
  id: string;
241
435
  };
242
436
  export type LatestOrPinnedPolicy = {
243
- mode: "latest";
437
+ mode: "latest_published";
244
438
  } | {
245
439
  mode: "pinned";
246
440
  versionId: string;
@@ -289,27 +483,16 @@ export type ClientRuntimeOidcConfig = {
289
483
  };
290
484
  export type ClientRuntimePolicyInput = {
291
485
  capabilities?: string[];
292
- model?: {
293
- allow_selection?: boolean;
294
- allowed_model_ids?: string[];
295
- default_model_id?: string | null;
296
- };
297
- tools?: {
298
- allowed_tool_ids?: string[];
299
- allow_input_overrides?: boolean;
300
- allow_side_effecting_anonymous?: boolean;
301
- };
486
+ model_selection?: "auto" | "enabled" | "disabled" | null;
302
487
  attachments?: {
303
488
  enabled?: boolean;
304
- max_files_per_request?: number;
489
+ max_attachments_per_turn?: number;
305
490
  max_file_bytes?: number;
306
491
  max_total_bytes?: number;
307
492
  allowed_mime_types?: string[];
308
493
  max_image_pixels?: number;
309
494
  max_pdf_pages?: number;
310
495
  max_extracted_characters?: number;
311
- retention_seconds?: number;
312
- malware_scan_required?: boolean;
313
496
  };
314
497
  hitl?: {
315
498
  enabled?: boolean;
@@ -317,7 +500,7 @@ export type ClientRuntimePolicyInput = {
317
500
  };
318
501
  mcp?: {
319
502
  enabled?: boolean;
320
- allowed_server_ids?: string[];
503
+ allow_anonymous?: boolean;
321
504
  };
322
505
  quotas?: {
323
506
  session_mints_per_minute?: number;
@@ -334,7 +517,13 @@ export type ClientRuntimePolicyInput = {
334
517
  };
335
518
  export type CreateClientDeploymentRequest = {
336
519
  agent_id: string;
337
- agent_version_id: string;
520
+ resource_policy_set_id: string;
521
+ version_policy?: {
522
+ mode: "latest_published";
523
+ } | {
524
+ mode: "pinned";
525
+ version_id: string;
526
+ };
338
527
  name: string;
339
528
  description?: string | null;
340
529
  auth_modes: ClientAuthMode[];
@@ -343,11 +532,15 @@ export type CreateClientDeploymentRequest = {
343
532
  oidc?: ClientRuntimeOidcConfig | null;
344
533
  policy?: ClientRuntimePolicyInput;
345
534
  };
346
- export type UpdateClientDeploymentRequest = Partial<Omit<CreateClientDeploymentRequest, "agent_id" | "agent_version_id">> & {
347
- enabled?: boolean;
535
+ export type UpdateClientDeploymentRequest = Partial<Omit<CreateClientDeploymentRequest, "agent_id" | "resource_policy_set_id">> & {
536
+ resource_policy_set_id?: string | null;
537
+ lifecycle_status?: "active" | "inactive";
348
538
  };
349
- export type PromoteClientDeploymentRequest = {
350
- agent_version_id: string;
539
+ export type ClientDeploymentListQuery = {
540
+ agentId: string;
541
+ lifecycleStatus?: "active" | "inactive";
542
+ cursor?: string;
543
+ limit?: number;
351
544
  };
352
545
  export type ClientNativeProfile = {
353
546
  id: string;
@@ -367,13 +560,22 @@ export type ClientDeployment = {
367
560
  id: string;
368
561
  client_id: string;
369
562
  organization_id: string;
370
- project_id: string;
371
563
  agent_id: string;
372
- agent_version_id: string;
564
+ resource_policy_set_id: string | null;
565
+ purpose: "client_integration" | "hosted_share";
566
+ version_policy: {
567
+ mode: "latest_published";
568
+ } | {
569
+ mode: "pinned";
570
+ version_id: string;
571
+ };
572
+ resolved_version: {
573
+ version_id: string;
574
+ version_number: number;
575
+ };
373
576
  name: string;
374
577
  description: string | null;
375
- enabled: boolean;
376
- status: "active" | "revoked";
578
+ lifecycle_status: "active" | "inactive" | "deleted";
377
579
  policy_epoch: number;
378
580
  revocation_epoch: number;
379
581
  auth_modes: ClientAuthMode[];
@@ -385,8 +587,11 @@ export type ClientDeployment = {
385
587
  native_profiles: ClientNativeProfile[];
386
588
  created_at: string;
387
589
  updated_at: string;
388
- promoted_at: string | null;
389
- revoked_at: string | null;
590
+ deleted_at: string | null;
591
+ };
592
+ export type ClientDeploymentListResponse = {
593
+ items: ClientDeployment[];
594
+ next_cursor: string | null;
390
595
  };
391
596
  export type CreateBackendClientSessionRequest = {
392
597
  subject: string;
@@ -406,4 +611,204 @@ export type ClientSessionCredentials = {
406
611
  refresh_expires_at: string | null;
407
612
  dpop_nonce: string | null;
408
613
  };
614
+ export type PortableResourceKind = "agent" | "rag_pipeline" | "instruction" | "knowledge_store";
615
+ export type ResourceSelector = {
616
+ kind: PortableResourceKind;
617
+ id: string;
618
+ target: "draft" | "version";
619
+ version_id?: string;
620
+ };
621
+ export type ResourcePackageExportRequest = {
622
+ selectors: ResourceSelector[];
623
+ };
624
+ export type ResourcePackageArchive = {
625
+ data: Uint8Array;
626
+ filename: string;
627
+ };
628
+ export type ResourcePackageUpload = {
629
+ data: Uint8Array;
630
+ filename?: string;
631
+ };
632
+ export type ResourcePackageDiagnostic = {
633
+ severity: "error" | "warning";
634
+ code: string;
635
+ path: string;
636
+ message: string;
637
+ };
638
+ export type ResourcePackageCompileResult = {
639
+ valid: boolean;
640
+ format: "agents24.resource_package";
641
+ schema_version: "1.0";
642
+ package: Record<string, unknown>;
643
+ resources: Array<Record<string, unknown>>;
644
+ requirements: string[];
645
+ tool_exports: Array<Record<string, unknown>>;
646
+ callable_bindings: Array<Record<string, unknown>>;
647
+ diagnostics: ResourcePackageDiagnostic[];
648
+ bundle?: ResourceBundle | null;
649
+ };
650
+ export type ResourceBundleImportRequest = {
651
+ bundle: ResourceBundle;
652
+ selected_resource_keys?: string[];
653
+ mappings?: Record<string, string>;
654
+ };
655
+ export type ResourceBundleOrigin = {
656
+ source_id: string;
657
+ target: "draft" | "version";
658
+ version_id?: string | null;
659
+ label: string;
660
+ };
661
+ export type ResourceBundleResource = {
662
+ resource_key: string;
663
+ kind: PortableResourceKind;
664
+ name: string;
665
+ document: Record<string, unknown>;
666
+ origin?: ResourceBundleOrigin;
667
+ };
668
+ export type ResourceBundleDependency = {
669
+ id: string;
670
+ from_resource_key: string;
671
+ to_resource_key?: string | null;
672
+ kind: string;
673
+ source_id: string;
674
+ source_name?: string | null;
675
+ document_path: string;
676
+ reference_type: string;
677
+ required: boolean;
678
+ bundled: boolean;
679
+ included?: boolean;
680
+ required_capability?: "chat" | "embedding";
681
+ };
682
+ export type ResourceBundle = {
683
+ format: "agents24.resource_bundle";
684
+ schema_version: "1.0";
685
+ exported_at?: string;
686
+ resources: ResourceBundleResource[];
687
+ dependencies: ResourceBundleDependency[];
688
+ warnings: string[];
689
+ tool_exports?: Array<Record<string, unknown>>;
690
+ callable_bindings?: Array<Record<string, unknown>>;
691
+ };
692
+ export type ResourceBundlePlan = Omit<ResourceBundle, "resources"> & {
693
+ resources: Array<Omit<ResourceBundleResource, "document">>;
694
+ blockers: Array<{
695
+ code: string;
696
+ message: string;
697
+ }>;
698
+ can_export: boolean;
699
+ external_references: ResourceBundleDependency[];
700
+ };
701
+ export type ResourceBundleExportRequest = {
702
+ selectors: ResourceSelector[];
703
+ included_resource_keys?: string[];
704
+ };
705
+ export type ResourceBundleCandidateList = {
706
+ items: Array<{
707
+ id: string;
708
+ name: string;
709
+ }>;
710
+ total: number;
711
+ };
712
+ export type ResourceBundleCandidateOptions = {
713
+ kind: string;
714
+ query?: string;
715
+ limit?: number;
716
+ offset?: number;
717
+ requiredCapability?: "chat" | "embedding";
718
+ };
719
+ export type ResourcePolicySummary = {
720
+ id: string;
721
+ name: string;
722
+ is_active: boolean;
723
+ [key: string]: unknown;
724
+ };
725
+ export type ResourcePolicyList = ResourcePolicySummary[];
726
+ export type CustomerIdentityRequest = {
727
+ issuer: string;
728
+ subject: string;
729
+ };
730
+ export type SetCustomerResourcePolicyAssignmentRequest = CustomerIdentityRequest & {
731
+ policy_set_id: string;
732
+ };
733
+ export type EffectiveCustomerResourcePolicyRequest = CustomerIdentityRequest & {
734
+ deployment_id: string;
735
+ };
736
+ export type ResourcePolicySubjectRef = {
737
+ kind: "agent" | "client_deployment" | "organization_user" | "customer_principal";
738
+ id: string;
739
+ };
740
+ export type ResourcePolicyQuotaSchedule = {
741
+ reset_anchor_at: string | null;
742
+ period_start: string;
743
+ next_reset_at: string;
744
+ };
745
+ export type CustomerResourcePolicyAssignment = {
746
+ customer_principal_ref: string;
747
+ subject_ref: ResourcePolicySubjectRef;
748
+ assignment: {
749
+ id: string;
750
+ policy_set: {
751
+ id: string;
752
+ name: string;
753
+ };
754
+ } | null;
755
+ quota_schedule: ResourcePolicyQuotaSchedule | null;
756
+ };
757
+ export type ClearCustomerResourcePolicyAssignmentResult = {
758
+ customer_principal_ref: string | null;
759
+ cleared: boolean;
760
+ };
761
+ export type EffectiveResourcePolicy = {
762
+ customer_principal_ref: string | null;
763
+ model_selection: {
764
+ selectable: boolean;
765
+ node_id: string | null;
766
+ default_id: string | null;
767
+ options: Array<{
768
+ id: string;
769
+ label: string;
770
+ }>;
771
+ };
772
+ quota_constraints: Array<{
773
+ model: {
774
+ id: string;
775
+ name: string;
776
+ };
777
+ boundary_kind: ResourcePolicySubjectRef["kind"];
778
+ boundary_ref: string;
779
+ used: number;
780
+ reserved: number;
781
+ limit: number;
782
+ remaining: number;
783
+ period_start: string;
784
+ reset_at: string;
785
+ blocked: boolean;
786
+ }>;
787
+ customer_assignment?: CustomerResourcePolicyAssignment;
788
+ };
789
+ export type SetResourcePolicyQuotaScheduleRequest = {
790
+ subject_ref: ResourcePolicySubjectRef;
791
+ reset_anchor_at: string | null;
792
+ };
793
+ export type ResetResourcePolicyQuotaRequest = {
794
+ subject_ref: ResourcePolicySubjectRef;
795
+ };
796
+ export type ResourcePolicyQuotaScheduleResult = {
797
+ subject_ref: ResourcePolicySubjectRef;
798
+ quota_schedule: ResourcePolicyQuotaSchedule;
799
+ };
800
+ export type ResourceBundleImportPreview = {
801
+ resources: Array<Record<string, unknown>>;
802
+ dependencies: Array<Record<string, unknown>>;
803
+ warnings: unknown[];
804
+ blockers: unknown[];
805
+ can_import: boolean;
806
+ [key: string]: unknown;
807
+ };
808
+ export type ResourceBundleImportResult = {
809
+ status: "created";
810
+ resources: Array<Record<string, unknown>>;
811
+ id_map: Record<string, string>;
812
+ warnings: unknown[];
813
+ };
409
814
  //# sourceMappingURL=types.d.ts.map