@seclai/sdk 1.2.0 → 1.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.
package/dist/index.d.ts CHANGED
@@ -20,18 +20,37 @@ interface components {
20
20
  */
21
21
  user_input: string;
22
22
  };
23
+ /**
24
+ * AgentAttachmentRefsApiResponse
25
+ * @description Static attachment-reference contract for an agent.
26
+ *
27
+ * Mirrors the MCP ``get_agent_attachment_references`` tool: returns
28
+ * what files (if any) an agent's templates expect on a run so API
29
+ * consumers can stage uploads correctly before calling
30
+ * ``POST /agents/{id}/runs``.
31
+ */
32
+ AgentAttachmentRefsApiResponse: {
33
+ /** @description Aggregated selector summary across all consumer steps. ``exact_names`` entries must each appear in the upload batch; ``indexes_max+1`` is the minimum file count; every ``patterns`` glob must match at least one upload. */
34
+ agent?: components["schemas"]["AttachmentRefsSourceApiSummary"];
35
+ /**
36
+ * Requires Uploads
37
+ * @description When ``false`` the agent's definition does NOT reference any uploaded attachments — ``POST /agents/{id}/upload-input`` will reject with HTTP 400. When ``true`` the ``agent`` block lists the specific selectors a run-time batch must satisfy.
38
+ */
39
+ requires_uploads: boolean;
40
+ };
23
41
  /**
24
42
  * AgentDefinitionImportErrorResponse
25
43
  * @description 422 body for invalid `agent_definition` payloads.
26
44
  *
27
- * Mirrors :py:meth:`AgentDefinitionImportError.to_response_dict`.
45
+ * Mirrors `AgentDefinitionImportError.to_response_dict`.
28
46
  */
29
47
  AgentDefinitionImportErrorResponse: {
30
48
  /**
31
49
  * Error
32
- * @default invalid_agent_definition
50
+ * @description Stable machine-readable error code.
51
+ * @constant
33
52
  */
34
- error: string;
53
+ error: "invalid_agent_definition";
35
54
  /** Errors */
36
55
  errors: components["schemas"]["ImportFieldErrorModel"][];
37
56
  /** Message */
@@ -51,7 +70,7 @@ interface components {
51
70
  change_id: string;
52
71
  /**
53
72
  * Definition
54
- * @description The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, regex_replace, gate, retry, evaluate_step, extract_data, extract_content, add_chat_turn, load_chat_history, add_memory, search_memory, load_memory, streaming_result, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, merge, for_each, and others.
73
+ * @description The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, regex_replace, gate, retry, evaluate_step, extract_data, extract_content, add_chat_turn, load_chat_history, add_memory, search_memory, load_memory, streaming_result, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, merge, for_each, if_else, switch, and others.
55
74
  */
56
75
  definition: {
57
76
  [key: string]: unknown;
@@ -177,9 +196,18 @@ interface components {
177
196
  input?: string | null;
178
197
  /**
179
198
  * Input Upload Id
180
- * @description ID of a previously uploaded file (via POST /{agent_id}/upload-input) to use as the run input for dynamic-input triggers. Mutually exclusive with the 'input' field.
199
+ * @description ID of a previously uploaded file (via POST /{agent_id}/upload-input) to use as the run input for dynamic-input triggers. Mutually exclusive with the 'input' field. Use ``input_upload_ids`` to attach multiple files.
200
+ *
201
+ * **Attachment visibility:** a step only sees the upload when its template references the input — via ``{{input}}`` / ``{{agent.input}}`` / ``{{step.<id>.input|output}}`` (implicit, all attachments) or the ``{{attachments[…]}}`` family (explicit narrowing — e.g. ``{{attachments[0]}}``, ``{{attachments[*.pdf]}}``).
202
+ *
203
+ * **Per-batch validation:** every selector the agent's definition declares must be satisfied or the run is rejected with HTTP 400. Exact-name selectors require that filename to be present; indexed selectors require at least N+1 files; glob patterns require at least one matching filename.
181
204
  */
182
205
  input_upload_id?: string | null;
206
+ /**
207
+ * Input Upload Ids
208
+ * @description IDs of multiple previously uploaded files. Each upload's extracted text is concatenated under a heading; each upload's binary is surfaced as a separate ``MediaAttachment`` so multi-modal prompt steps reason over all files at once. Steps narrow visibility via ``{{attachments[…]}}`` selectors (by index, filename, or fnmatch glob). The batch must satisfy every selector the agent declares — exact names, indexed references (length must exceed the highest index), and glob patterns (each pattern needs at least one match). Mismatches return HTTP 400 with the unmet requirements listed. Mutually exclusive with ``input`` and ``input_upload_id`` — pass exactly one of the three. Max 20 uploads per run.
209
+ */
210
+ input_upload_ids?: string[] | null;
183
211
  /**
184
212
  * Metadata
185
213
  * @description Metadata to make available for string substitution expressions in agent tasks.
@@ -193,6 +221,11 @@ interface components {
193
221
  * @default false
194
222
  */
195
223
  priority: boolean;
224
+ /**
225
+ * Replay Of Run Id
226
+ * @description Re-run this agent reusing a prior run's uploaded input files. The files are re-resolved server-side from the source run (which must belong to this account and agent) — you do not re-upload them. Combine with ``input`` to change the text while keeping the files. A fresh upload batch (``input_upload_id(s)``) takes precedence and disables replay. Binaries swept by retention fall back to their extracted text.
227
+ */
228
+ replay_of_run_id?: string | null;
196
229
  };
197
230
  /** AgentRunResponse */
198
231
  AgentRunResponse: {
@@ -231,6 +264,11 @@ interface components {
231
264
  * @description Milliseconds spent waiting for governance input evaluation.
232
265
  */
233
266
  governance_input_wait_ms?: number | null;
267
+ /**
268
+ * Hitl Wait Ms
269
+ * @description Cumulative milliseconds the run was parked waiting for a human decision on a human_in_the_loop step. Subtracted from active duration in run-detail and duration-stats responses.
270
+ */
271
+ hitl_wait_ms?: number | null;
234
272
  /**
235
273
  * Input
236
274
  * @description Input provided to the agent for this run.
@@ -246,6 +284,11 @@ interface components {
246
284
  * @description Output produced by the agent run.
247
285
  */
248
286
  output: string | null;
287
+ /**
288
+ * Output Content Type
289
+ * @description MIME type of `output` — mirrors the terminal step's `output_content_type`. Consumers interpret `output` differently depending on this value: `application/vnd.seclai.manifest+json` is a multi-asset manifest with shape `{text, attachments: [{storage_key, mime, name, bytes}]}` — fetch each attachment via `GET /authenticated/storage-blobs/{storage_key}`. `text/plain` / `text/*` are free-form text. `application/json` is a JSON document. Null on runs that produced no terminal output or that pre-date this column.
290
+ */
291
+ output_content_type?: string | null;
249
292
  /**
250
293
  * Priority
251
294
  * @description Indicates if the run was treated as a priority execution.
@@ -318,6 +361,11 @@ interface components {
318
361
  * @description Type of the agent step.
319
362
  */
320
363
  step_type: string;
364
+ /**
365
+ * Tool Calls
366
+ * @description LLM tool calls made during this step (prompt_call steps only), ordered by execution. Empty for steps that invoked no tools.
367
+ */
368
+ tool_calls?: components["schemas"]["AgentRunToolCallResponse"][];
321
369
  };
322
370
  /** AgentRunStreamRequest */
323
371
  AgentRunStreamRequest: {
@@ -328,9 +376,14 @@ interface components {
328
376
  input?: string | null;
329
377
  /**
330
378
  * Input Upload Id
331
- * @description ID of a previously uploaded file (via POST /{agent_id}/upload-input) to use as the run input for dynamic-input triggers. Mutually exclusive with the 'input' field.
379
+ * @description ID of a previously uploaded file (via POST /{agent_id}/upload-input) to use as the run input for dynamic-input triggers. Mutually exclusive with the 'input' field. Use ``input_upload_ids`` to attach multiple files. Subject to the same per-batch attachment-selector validation as the non-streaming endpoint.
332
380
  */
333
381
  input_upload_id?: string | null;
382
+ /**
383
+ * Input Upload Ids
384
+ * @description IDs of multiple previously uploaded files. See the non-streaming endpoint for full semantics, including per-batch selector validation (exact names, indexed references, and glob patterns must all be satisfied or the run is rejected with HTTP 400). Max 20.
385
+ */
386
+ input_upload_ids?: string[] | null;
334
387
  /**
335
388
  * Metadata
336
389
  * @description Metadata to make available for string substitution expressions in agent tasks.
@@ -338,6 +391,81 @@ interface components {
338
391
  metadata?: {
339
392
  [key: string]: components["schemas"]["JsonValue"];
340
393
  } | null;
394
+ /**
395
+ * Replay Of Run Id
396
+ * @description Re-run reusing a prior run's uploaded input files (re-resolved server-side from the source run, which must belong to this account and agent). A fresh upload batch takes precedence.
397
+ */
398
+ replay_of_run_id?: string | null;
399
+ };
400
+ /**
401
+ * AgentRunToolCallResponse
402
+ * @description A single LLM tool call made during a prompt_call step.
403
+ */
404
+ AgentRunToolCallResponse: {
405
+ /**
406
+ * Credits Used
407
+ * @description Credits consumed by this tool call (0 for tools that don't bill).
408
+ * @default 0
409
+ */
410
+ credits_used: number;
411
+ /**
412
+ * Duration Seconds
413
+ * @description Duration of the tool call in seconds.
414
+ */
415
+ duration_seconds?: number | null;
416
+ /**
417
+ * Ended At
418
+ * @description Timestamp when the tool call ended.
419
+ */
420
+ ended_at?: string | null;
421
+ /**
422
+ * Error
423
+ * @description Error message when the tool call failed.
424
+ */
425
+ error?: string | null;
426
+ /**
427
+ * Function Name
428
+ * @description Name of the tool/function invoked.
429
+ */
430
+ function_name: string;
431
+ /**
432
+ * Id
433
+ * @description Tool call identifier.
434
+ */
435
+ id: string;
436
+ /**
437
+ * Input
438
+ * @description JSON arguments the LLM passed to the tool, if persisted.
439
+ */
440
+ input?: string | null;
441
+ /**
442
+ * Output
443
+ * @description JSON result the tool returned to the LLM, if persisted.
444
+ */
445
+ output?: string | null;
446
+ /**
447
+ * Round Index
448
+ * @description 0-based tool-loop round this call belonged to.
449
+ * @default 0
450
+ */
451
+ round_index: number;
452
+ /**
453
+ * Sequence
454
+ * @description 0-based ordinal of this call within its step run.
455
+ * @default 0
456
+ */
457
+ sequence: number;
458
+ /**
459
+ * Started At
460
+ * @description Timestamp when the tool call started.
461
+ */
462
+ started_at?: string | null;
463
+ /**
464
+ * Succeeded
465
+ * @description Whether the tool call completed without error.
466
+ * @default true
467
+ */
468
+ succeeded: boolean;
341
469
  };
342
470
  /** AgentSummaryResponse */
343
471
  AgentSummaryResponse: {
@@ -417,7 +545,7 @@ interface components {
417
545
  * Trigger Type
418
546
  * @description Trigger type for the agent.
419
547
  */
420
- trigger_type: string | null;
548
+ trigger_type?: string | null;
421
549
  /**
422
550
  * Updated At
423
551
  * @description ISO 8601 last-updated timestamp.
@@ -533,17 +661,6 @@ interface components {
533
661
  /** Flagged */
534
662
  flagged: boolean;
535
663
  };
536
- /**
537
- * AiAssistantGenerateRequest
538
- * @description Request body for AI assistant generate endpoints.
539
- */
540
- AiAssistantGenerateRequest: {
541
- /**
542
- * User Input
543
- * @description User input describing what to do
544
- */
545
- user_input: string;
546
- };
547
664
  /**
548
665
  * AiAssistantGenerateResponse
549
666
  * @description Response from an AI assistant generate endpoint.
@@ -667,6 +784,20 @@ interface components {
667
784
  */
668
785
  success: boolean;
669
786
  };
787
+ /**
788
+ * AttachmentRefsSourceApiSummary
789
+ * @description Per-source attachment-reference summary.
790
+ */
791
+ AttachmentRefsSourceApiSummary: {
792
+ /** Exact Names */
793
+ exact_names?: string[];
794
+ /** Indexes Max */
795
+ indexes_max?: number | null;
796
+ /** Kinds */
797
+ kinds?: string[];
798
+ /** Patterns */
799
+ patterns?: string[];
800
+ };
670
801
  /** Body_upload_file_to_content_api_contents__source_connection_content_version__upload_post */
671
802
  Body_upload_file_to_content_api_contents__source_connection_content_version__upload_post: {
672
803
  /**
@@ -1695,8 +1826,8 @@ interface components {
1695
1826
  *
1696
1827
  * Used as the element type for ``import_warnings`` on every
1697
1828
  * response model that accepts an ``agent_definition`` payload.
1698
- * See :py:class:`services.agent_definition_import.AgentImportSkip`
1699
- * for the full category list.
1829
+ * See ``services.agent_definition_import.AgentImportSkip`` for the
1830
+ * full category list.
1700
1831
  *
1701
1832
  * Lives here (not on each router) so the authenticated and public
1702
1833
  * API responses share one definition — keeping the shape that
@@ -1779,6 +1910,35 @@ interface components {
1779
1910
  */
1780
1911
  title?: string | null;
1781
1912
  };
1913
+ /**
1914
+ * InsufficientCreditsDetail
1915
+ * @description ``detail`` body for a 402 ``insufficient_credits`` response.
1916
+ */
1917
+ InsufficientCreditsDetail: {
1918
+ /**
1919
+ * Account Id
1920
+ * @description UUID of the account that ran out of credits.
1921
+ */
1922
+ account_id: string;
1923
+ /**
1924
+ * Error
1925
+ * @description Stable machine-readable error code.
1926
+ * @constant
1927
+ */
1928
+ error: "insufficient_credits";
1929
+ /**
1930
+ * Message
1931
+ * @description Human-readable explanation.
1932
+ */
1933
+ message: string;
1934
+ };
1935
+ /**
1936
+ * InsufficientCreditsResponse
1937
+ * @description 402 envelope returned when the account has exhausted its credits.
1938
+ */
1939
+ InsufficientCreditsResponse: {
1940
+ detail: components["schemas"]["InsufficientCreditsDetail"];
1941
+ };
1782
1942
  JsonValue: unknown;
1783
1943
  /**
1784
1944
  * KnowledgeBaseListResponseModel
@@ -2104,6 +2264,24 @@ interface components {
2104
2264
  */
2105
2265
  updated_at: string;
2106
2266
  };
2267
+ /**
2268
+ * ModalityRateResponse
2269
+ * @description Per-modality rate for an LLM that prices image/audio/video output
2270
+ * (or input) at a rate distinct from the default text rate.
2271
+ *
2272
+ * Example: Gemini 3.1 Flash Image charges $3/1M output tokens for
2273
+ * text but $60/1M output tokens for generated images. The image rate
2274
+ * surfaces here with ``modality="image"`` and ``output_credits_per_1000_tokens``
2275
+ * set; the default text rate stays on the parent model fields.
2276
+ */
2277
+ ModalityRateResponse: {
2278
+ /** Input Credits Per 1000 Tokens */
2279
+ input_credits_per_1000_tokens?: number | null;
2280
+ /** Modality */
2281
+ modality: string;
2282
+ /** Output Credits Per 1000 Tokens */
2283
+ output_credits_per_1000_tokens?: number | null;
2284
+ };
2107
2285
  /** OrganizationAlertPreferenceListResponse */
2108
2286
  OrganizationAlertPreferenceListResponse: {
2109
2287
  /** Preferences */
@@ -2148,7 +2326,7 @@ interface components {
2148
2326
  * PendingProcessingCompletedFailedStatus
2149
2327
  * @enum {string}
2150
2328
  */
2151
- PendingProcessingCompletedFailedStatus: "pending" | "processing" | "completed" | "failed";
2329
+ PendingProcessingCompletedFailedStatus: "pending" | "processing" | "completed" | "failed" | "waiting_human";
2152
2330
  /**
2153
2331
  * PlaygroundCreateRequest
2154
2332
  * @description Create a model playground experiment via the public API.
@@ -3627,11 +3805,6 @@ interface components {
3627
3805
  * @description Request body for the memory bank AI assistant.
3628
3806
  */
3629
3807
  routers__api__memory_banks__MemoryBankAiAssistantRequest: {
3630
- /**
3631
- * Conversation Id
3632
- * @description Previous conversation ID to continue.
3633
- */
3634
- conversation_id?: string | null;
3635
3808
  /**
3636
3809
  * Current Config
3637
3810
  * @description Current configuration to refine, if any.
@@ -3639,6 +3812,11 @@ interface components {
3639
3812
  current_config?: {
3640
3813
  [key: string]: unknown;
3641
3814
  } | null;
3815
+ /**
3816
+ * History Since
3817
+ * @description Optional ISO 8601 timestamp. When set, only conversation turns created at or after this timestamp are loaded as context, scoping history to the current session so the assistant remembers earlier turns in a multi-turn refinement.
3818
+ */
3819
+ history_since?: string | null;
3642
3820
  /**
3643
3821
  * User Input
3644
3822
  * @description Natural-language description of the memory bank.
@@ -3732,6 +3910,22 @@ interface components {
3732
3910
  */
3733
3911
  solution_name?: string | null;
3734
3912
  };
3913
+ /**
3914
+ * AiAssistantGenerateRequest
3915
+ * @description Request body for AI assistant generate endpoints.
3916
+ */
3917
+ routers__api__solutions__AiAssistantGenerateRequest: {
3918
+ /**
3919
+ * History Since
3920
+ * @description Optional ISO 8601 timestamp. When set, only conversation turns created at or after this timestamp are loaded as context, scoping history to the current session so the assistant remembers earlier turns in a create flow.
3921
+ */
3922
+ history_since?: string | null;
3923
+ /**
3924
+ * User Input
3925
+ * @description User input describing what to do
3926
+ */
3927
+ user_input: string;
3928
+ };
3735
3929
  /** SolutionAgentResponse */
3736
3930
  routers__api__solutions__SolutionAgentResponse: {
3737
3931
  /**
@@ -4071,6 +4265,11 @@ interface components {
4071
4265
  * @description ID of the created content version
4072
4266
  */
4073
4267
  content_version_id: string | null;
4268
+ /**
4269
+ * Embedder Warning
4270
+ * @description Set when the file is non-text but the source's embedder is text-only — indexing will rely on OCR / transcription and may produce a FAILED row if no text can be extracted.
4271
+ */
4272
+ embedder_warning?: string | null;
4074
4273
  /**
4075
4274
  * Filename
4076
4275
  * @description Original filename
@@ -4157,6 +4356,8 @@ interface components {
4157
4356
  * @description Source URL used to derive payload_schema guidance for this model.
4158
4357
  */
4159
4358
  payload_schema_source_url?: string | null;
4359
+ /** Per Modality Rates */
4360
+ per_modality_rates?: components["schemas"]["ModalityRateResponse"][];
4160
4361
  /** Provider */
4161
4362
  provider: string;
4162
4363
  /** Released At */
@@ -4179,6 +4380,8 @@ interface components {
4179
4380
  supported_input_media?: string[] | null;
4180
4381
  /** Supported Languages */
4181
4382
  supported_languages?: string[] | null;
4383
+ /** Supported Output Media */
4384
+ supported_output_media?: string[] | null;
4182
4385
  /**
4183
4386
  * Supports Openai Arguments
4184
4387
  * @default false
@@ -4337,6 +4540,8 @@ type AgentRunListResponse = components["schemas"]["routers__api__agents__AgentRu
4337
4540
  type AgentRunStepResponse = components["schemas"]["AgentRunStepResponse"];
4338
4541
  /** Details of a single attempt within an agent run step. */
4339
4542
  type AgentRunAttemptResponse = components["schemas"]["AgentRunAttemptResponse"];
4543
+ /** A single LLM tool call made during a `prompt_call` step (within {@link AgentRunStepResponse}'s `tool_calls`). */
4544
+ type AgentRunToolCallResponse = components["schemas"]["AgentRunToolCallResponse"];
4340
4545
  /** Search request for agent runs (traces). */
4341
4546
  type AgentTraceSearchRequest = components["schemas"]["routers__api__agents__AgentTraceSearchRequest"];
4342
4547
  /** Search response containing matching agent runs. */
@@ -4345,6 +4550,13 @@ type AgentTraceSearchResponse = components["schemas"]["AgentTraceSearchResponse"
4345
4550
  type AgentTraceMatchResponse = components["schemas"]["AgentTraceMatchResponse"];
4346
4551
  /** Response from uploading a file input for an agent run. */
4347
4552
  type UploadAgentInputApiResponse = components["schemas"]["UploadAgentInputApiResponse"];
4553
+ /**
4554
+ * Static attachment-reference contract for an agent — what files (if any) its
4555
+ * templates expect on a run, so uploads can be staged before calling `runAgent`.
4556
+ */
4557
+ type AgentAttachmentRefsApiResponse = components["schemas"]["AgentAttachmentRefsApiResponse"];
4558
+ /** Per-source attachment-reference summary (exact names, indexes, glob patterns) within an {@link AgentAttachmentRefsApiResponse}. */
4559
+ type AttachmentRefsSourceApiSummary = components["schemas"]["AttachmentRefsSourceApiSummary"];
4348
4560
  /** Request body for generating agent workflow steps via AI. */
4349
4561
  type GenerateAgentStepsRequest = components["schemas"]["GenerateAgentStepsRequest"];
4350
4562
  /** Response containing AI-generated agent workflow steps. */
@@ -4498,7 +4710,7 @@ type AddConversationTurnRequest = components["schemas"]["AddConversationTurnRequ
4498
4710
  /** Request body for marking a conversation turn. */
4499
4711
  type MarkConversationTurnRequest = components["schemas"]["MarkConversationTurnRequest"];
4500
4712
  /** AI assistant generate request for solutions. */
4501
- type AiAssistantGenerateRequest = components["schemas"]["AiAssistantGenerateRequest"];
4713
+ type AiAssistantGenerateRequest = components["schemas"]["routers__api__solutions__AiAssistantGenerateRequest"];
4502
4714
  /** AI assistant generate response for solutions. */
4503
4715
  type AiAssistantGenerateResponse = components["schemas"]["AiAssistantGenerateResponse"];
4504
4716
  /** AI assistant accept request for solutions. */
@@ -4551,6 +4763,8 @@ type ProviderGroupResponse = components["schemas"]["schemas__model_responses__Pr
4551
4763
  type PromptModelResponse = components["schemas"]["schemas__model_responses__PromptModelResponse"];
4552
4764
  /** Prompt tool configuration within a model. */
4553
4765
  type PromptToolResponse = components["schemas"]["PromptToolResponse"];
4766
+ /** Per-modality rate for a model that prices image/audio/video distinctly from its default text rate. */
4767
+ type ModalityRateResponse = components["schemas"]["ModalityRateResponse"];
4554
4768
  /** Variant category for model pricing tiers. */
4555
4769
  type VariantCategoryResponse = components["schemas"]["VariantCategoryResponse"];
4556
4770
  /** Variant option with credit pricing and context limits. */
@@ -4564,6 +4778,10 @@ type PlaygroundCreateRequest = components["schemas"]["PlaygroundCreateRequest"];
4564
4778
  * server-side default and can be omitted.
4565
4779
  */
4566
4780
  type CreateExperimentInput = Pick<PlaygroundCreateRequest, "model_ids" | "prompt"> & Partial<Omit<PlaygroundCreateRequest, "model_ids" | "prompt">>;
4781
+ /** 402 envelope returned when an account has exhausted its credits. */
4782
+ type InsufficientCreditsResponse = components["schemas"]["InsufficientCreditsResponse"];
4783
+ /** `detail` body of an {@link InsufficientCreditsResponse} (error code, message, and account id). */
4784
+ type InsufficientCreditsDetail = components["schemas"]["InsufficientCreditsDetail"];
4567
4785
  /** Source index mode: fast_and_cheap, balanced, slow_and_thorough, or custom. */
4568
4786
  type SourceIndexMode = components["schemas"]["SourceIndexMode"];
4569
4787
  /** Processing status: pending, processing, completed, or failed. */
@@ -4938,6 +5156,33 @@ declare class Seclai {
4938
5156
  * @returns Upload status and metadata.
4939
5157
  */
4940
5158
  getAgentInputUploadStatus(agentId: string, uploadId: string): Promise<UploadAgentInputApiResponse>;
5159
+ /**
5160
+ * Get the static attachment-reference contract for an agent — what files (if
5161
+ * any) its definition expects on a run.
5162
+ *
5163
+ * Call this before staging uploads to learn whether the agent accepts files
5164
+ * at all (`requires_uploads`) and which specific filenames, indexes, or glob
5165
+ * patterns its templates reference. A run-time upload batch that doesn't
5166
+ * satisfy every declared selector is rejected with HTTP 400.
5167
+ *
5168
+ * @param agentId - Agent identifier.
5169
+ * @returns The agent's attachment-reference contract.
5170
+ */
5171
+ getAgentAttachmentReferences(agentId: string): Promise<AgentAttachmentRefsApiResponse>;
5172
+ /**
5173
+ * Download a file attachment emitted by a step in an agent run.
5174
+ *
5175
+ * Returns the raw `Response` so you can stream or save the binary data.
5176
+ *
5177
+ * @param runId - Run identifier.
5178
+ * @param attachmentId - URL-safe-base64-encoded `storage_key` of the attachment
5179
+ * (as surfaced in run output manifests and webhook/email payloads).
5180
+ * @param opts - Optional `downloadName` filename hint for the download disposition.
5181
+ * @returns Raw response with the attachment bytes.
5182
+ */
5183
+ downloadAgentRunAttachment(runId: string, attachmentId: string, opts?: {
5184
+ downloadName?: string;
5185
+ }): Promise<Response>;
4941
5186
  /**
4942
5187
  * Generate agent workflow steps from natural language using AI.
4943
5188
  *
@@ -5712,6 +5957,15 @@ declare class Seclai {
5712
5957
  * @param experimentId - Experiment identifier.
5713
5958
  */
5714
5959
  cancelExperiment(experimentId: string): Promise<unknown>;
5960
+ /**
5961
+ * Soft-delete a model playground experiment.
5962
+ *
5963
+ * Removes the experiment from list/detail views while preserving audit
5964
+ * history. Returns HTTP 204 with no body.
5965
+ *
5966
+ * @param experimentId - Experiment identifier.
5967
+ */
5968
+ deleteExperiment(experimentId: string): Promise<void>;
5715
5969
  /**
5716
5970
  * Search across all resource types in your account.
5717
5971
  *
@@ -5759,7 +6013,7 @@ declare class Seclai {
5759
6013
  *
5760
6014
  * @param body - Generation request.
5761
6015
  */
5762
- aiAssistantMemoryBank(body: AiAssistantGenerateRequest): Promise<MemoryBankAiAssistantResponse>;
6016
+ aiAssistantMemoryBank(body: MemoryBankAiAssistantRequest): Promise<MemoryBankAiAssistantResponse>;
5763
6017
  /**
5764
6018
  * Get AI assistant memory bank conversation history.
5765
6019
  */
@@ -5990,4 +6244,4 @@ declare class SeclaiStreamingError extends SeclaiError {
5990
6244
  constructor(message: string, runId?: string);
5991
6245
  }
5992
6246
 
5993
- export { type AccessTokenProvider, type AddCommentRequest, type AddConversationTurnRequest, type AgentDefinitionImportErrorResponse, type AgentDefinitionResponse, type AgentEvaluationTier, type AgentExportResponse, type AgentImportPreviewRequest, type AgentImportPreviewResponse, type AgentListResponse, type AgentRunAttemptResponse, type AgentRunEvent, type AgentRunListResponse, type AgentRunRequest, type AgentRunResponse, type AgentRunStepResponse, type AgentRunStreamRequest, type AgentSummaryResponse, type AgentTraceMatchResponse, type AgentTraceSearchRequest, type AgentTraceSearchResponse, type AiAssistantAcceptRequest, type AiAssistantAcceptResponse, type AiAssistantFeedbackRequest, type AiAssistantFeedbackResponse, type AiAssistantGenerateRequest, type AiAssistantGenerateResponse, type AiConversationHistoryResponse, type AiConversationTurnResponse, type AuthState, type ChangeStatusRequest, type CompactionEvaluationModel, type CompactionTestResponse, type CompatibleRunListResponse, type CompatibleRunResponse, type ContentDetailResponse, type ContentEmbeddingResponse, type ContentEmbeddingsListResponse, type ContentFileUploadResponse, type CreateAgentRequest, type CreateAlertConfigRequest, type CreateEvaluationCriteriaRequest, type CreateEvaluationResultRequest, type CreateExperimentInput, type CreateExportRequest, type CreateKnowledgeBaseBody, type CreateMemoryBankBody, type CreateSolutionRequest, type CreateSourceBody, type CredentialChainOptions, DEFAULT_SSO_CLIENT_ID, DEFAULT_SSO_DOMAIN, DEFAULT_SSO_REGION, type EstimateExportRequest, type EstimateExportResponse, type EvaluationCriteriaResponse, type EvaluationResultListResponse, type EvaluationResultResponse, type EvaluationResultSummaryResponse, type EvaluationResultWithCriteriaListResponse, type EvaluationResultWithCriteriaResponse, type EvaluationRunSummaryListResponse, type EvaluationRunSummaryResponse, type EvaluationStatus, type ExamplePrompt, type ExecutedActionResponse, type ExportFormat, type ExportListResponse, type ExportResponse, type FetchLike, type FileUploadResponse, type GenerateAgentStepsRequest, type GenerateAgentStepsResponse, type GenerateStepConfigRequest, type GenerateStepConfigResponse, type GovernanceAiAcceptResponse, type GovernanceAiAssistantRequest, type GovernanceAiAssistantResponse, type GovernanceAppliedActionResponse, type GovernanceConversationResponse, type GovernancePolicyRefResponse, type GovernanceProposedPolicyActionResponse, type HTTPValidationError, type ImportFieldErrorModel, type ImportSkipResponse, type InlineTextReplaceRequest, type InlineTextUploadRequest, type JSONValue, type KnowledgeBaseListResponse, type KnowledgeBaseResponse, type LinkResourcesRequest, type ListOptions, type MarkAiSuggestionRequest, type MarkConversationTurnRequest, type MemoryBankAcceptRequest, type MemoryBankAiAssistantRequest, type MemoryBankAiAssistantResponse, type MemoryBankConfigResponse, type MemoryBankConversationTurnResponse, type MemoryBankLastConversationResponse, type MemoryBankListResponse, type MemoryBankResponse, type NonManualEvaluationModeStatResponse, type NonManualEvaluationSummaryResponse, type OrganizationAlertPreferenceListResponse, type OrganizationAlertPreferenceResponse, type PaginationResponse, type PendingProcessingCompletedFailedStatus, type PlaygroundCreateRequest, type PromptModelAutoUpgradeStrategy, type PromptModelResponse, type PromptToolResponse, type ProposedActionResponse, type ProviderGroupResponse, SECLAI_API_URL, Seclai, SeclaiAPIStatusError, SeclaiAPIValidationError, SeclaiConfigurationError, SeclaiError, type SeclaiOptions, SeclaiStreamingError, type SolutionAgentResponse, type SolutionConversationResponse, type SolutionKnowledgeBaseResponse, type SolutionListResponse, type SolutionResponse, type SolutionSourceConnectionResponse, type SolutionSummaryResponse, type SortableListOptions, type SourceConnectionResponse, type SourceEmbeddingMigrationResponse, type SourceIndexMode, type SourceListResponse, type SourceResponse, type SsoCacheEntry, type SsoProfile, type StandaloneTestCompactionRequest, type StartSourceEmbeddingMigrationRequest, type TestCompactionRequest, type TestDraftEvaluationRequest, type TestDraftEvaluationResponse, type UnlinkResourcesRequest, type UpdateAgentDefinitionRequest, type UpdateAgentRequest, type UpdateAlertConfigRequest, type UpdateEvaluationCriteriaRequest, type UpdateKnowledgeBaseBody, type UpdateMemoryBankBody, type UpdateOrganizationAlertPreferenceRequest, type UpdateSolutionRequest, type UpdateSourceBody, type UploadAgentInputApiResponse, type ValidationError, type VariantCategoryResponse, type VariantOptionResponse, deleteSsoCache, isTokenValid, loadSsoProfile, readSsoCache, writeSsoCache };
6247
+ export { type AccessTokenProvider, type AddCommentRequest, type AddConversationTurnRequest, type AgentAttachmentRefsApiResponse, type AgentDefinitionImportErrorResponse, type AgentDefinitionResponse, type AgentEvaluationTier, type AgentExportResponse, type AgentImportPreviewRequest, type AgentImportPreviewResponse, type AgentListResponse, type AgentRunAttemptResponse, type AgentRunEvent, type AgentRunListResponse, type AgentRunRequest, type AgentRunResponse, type AgentRunStepResponse, type AgentRunStreamRequest, type AgentRunToolCallResponse, type AgentSummaryResponse, type AgentTraceMatchResponse, type AgentTraceSearchRequest, type AgentTraceSearchResponse, type AiAssistantAcceptRequest, type AiAssistantAcceptResponse, type AiAssistantFeedbackRequest, type AiAssistantFeedbackResponse, type AiAssistantGenerateRequest, type AiAssistantGenerateResponse, type AiConversationHistoryResponse, type AiConversationTurnResponse, type AttachmentRefsSourceApiSummary, type AuthState, type ChangeStatusRequest, type CompactionEvaluationModel, type CompactionTestResponse, type CompatibleRunListResponse, type CompatibleRunResponse, type ContentDetailResponse, type ContentEmbeddingResponse, type ContentEmbeddingsListResponse, type ContentFileUploadResponse, type CreateAgentRequest, type CreateAlertConfigRequest, type CreateEvaluationCriteriaRequest, type CreateEvaluationResultRequest, type CreateExperimentInput, type CreateExportRequest, type CreateKnowledgeBaseBody, type CreateMemoryBankBody, type CreateSolutionRequest, type CreateSourceBody, type CredentialChainOptions, DEFAULT_SSO_CLIENT_ID, DEFAULT_SSO_DOMAIN, DEFAULT_SSO_REGION, type EstimateExportRequest, type EstimateExportResponse, type EvaluationCriteriaResponse, type EvaluationResultListResponse, type EvaluationResultResponse, type EvaluationResultSummaryResponse, type EvaluationResultWithCriteriaListResponse, type EvaluationResultWithCriteriaResponse, type EvaluationRunSummaryListResponse, type EvaluationRunSummaryResponse, type EvaluationStatus, type ExamplePrompt, type ExecutedActionResponse, type ExportFormat, type ExportListResponse, type ExportResponse, type FetchLike, type FileUploadResponse, type GenerateAgentStepsRequest, type GenerateAgentStepsResponse, type GenerateStepConfigRequest, type GenerateStepConfigResponse, type GovernanceAiAcceptResponse, type GovernanceAiAssistantRequest, type GovernanceAiAssistantResponse, type GovernanceAppliedActionResponse, type GovernanceConversationResponse, type GovernancePolicyRefResponse, type GovernanceProposedPolicyActionResponse, type HTTPValidationError, type ImportFieldErrorModel, type ImportSkipResponse, type InlineTextReplaceRequest, type InlineTextUploadRequest, type InsufficientCreditsDetail, type InsufficientCreditsResponse, type JSONValue, type KnowledgeBaseListResponse, type KnowledgeBaseResponse, type LinkResourcesRequest, type ListOptions, type MarkAiSuggestionRequest, type MarkConversationTurnRequest, type MemoryBankAcceptRequest, type MemoryBankAiAssistantRequest, type MemoryBankAiAssistantResponse, type MemoryBankConfigResponse, type MemoryBankConversationTurnResponse, type MemoryBankLastConversationResponse, type MemoryBankListResponse, type MemoryBankResponse, type ModalityRateResponse, type NonManualEvaluationModeStatResponse, type NonManualEvaluationSummaryResponse, type OrganizationAlertPreferenceListResponse, type OrganizationAlertPreferenceResponse, type PaginationResponse, type PendingProcessingCompletedFailedStatus, type PlaygroundCreateRequest, type PromptModelAutoUpgradeStrategy, type PromptModelResponse, type PromptToolResponse, type ProposedActionResponse, type ProviderGroupResponse, SECLAI_API_URL, Seclai, SeclaiAPIStatusError, SeclaiAPIValidationError, SeclaiConfigurationError, SeclaiError, type SeclaiOptions, SeclaiStreamingError, type SolutionAgentResponse, type SolutionConversationResponse, type SolutionKnowledgeBaseResponse, type SolutionListResponse, type SolutionResponse, type SolutionSourceConnectionResponse, type SolutionSummaryResponse, type SortableListOptions, type SourceConnectionResponse, type SourceEmbeddingMigrationResponse, type SourceIndexMode, type SourceListResponse, type SourceResponse, type SsoCacheEntry, type SsoProfile, type StandaloneTestCompactionRequest, type StartSourceEmbeddingMigrationRequest, type TestCompactionRequest, type TestDraftEvaluationRequest, type TestDraftEvaluationResponse, type UnlinkResourcesRequest, type UpdateAgentDefinitionRequest, type UpdateAgentRequest, type UpdateAlertConfigRequest, type UpdateEvaluationCriteriaRequest, type UpdateKnowledgeBaseBody, type UpdateMemoryBankBody, type UpdateOrganizationAlertPreferenceRequest, type UpdateSolutionRequest, type UpdateSourceBody, type UploadAgentInputApiResponse, type ValidationError, type VariantCategoryResponse, type VariantOptionResponse, deleteSsoCache, isTokenValid, loadSsoProfile, readSsoCache, writeSsoCache };
package/dist/index.js CHANGED
@@ -1161,6 +1161,37 @@ var Seclai = class {
1161
1161
  async getAgentInputUploadStatus(agentId, uploadId) {
1162
1162
  return await this.request("GET", `/agents/${agentId}/input-uploads/${uploadId}`);
1163
1163
  }
1164
+ /**
1165
+ * Get the static attachment-reference contract for an agent — what files (if
1166
+ * any) its definition expects on a run.
1167
+ *
1168
+ * Call this before staging uploads to learn whether the agent accepts files
1169
+ * at all (`requires_uploads`) and which specific filenames, indexes, or glob
1170
+ * patterns its templates reference. A run-time upload batch that doesn't
1171
+ * satisfy every declared selector is rejected with HTTP 400.
1172
+ *
1173
+ * @param agentId - Agent identifier.
1174
+ * @returns The agent's attachment-reference contract.
1175
+ */
1176
+ async getAgentAttachmentReferences(agentId) {
1177
+ return await this.request("GET", `/agents/${agentId}/attachment-references`);
1178
+ }
1179
+ /**
1180
+ * Download a file attachment emitted by a step in an agent run.
1181
+ *
1182
+ * Returns the raw `Response` so you can stream or save the binary data.
1183
+ *
1184
+ * @param runId - Run identifier.
1185
+ * @param attachmentId - URL-safe-base64-encoded `storage_key` of the attachment
1186
+ * (as surfaced in run output manifests and webhook/email payloads).
1187
+ * @param opts - Optional `downloadName` filename hint for the download disposition.
1188
+ * @returns Raw response with the attachment bytes.
1189
+ */
1190
+ async downloadAgentRunAttachment(runId, attachmentId, opts = {}) {
1191
+ return await this.requestRaw("GET", `/v2/agent-runs/${runId}/attachments/${attachmentId}`, {
1192
+ query: { download_name: opts.downloadName }
1193
+ });
1194
+ }
1164
1195
  // ═══════════════════════════════════════════════════════════════════════════
1165
1196
  // Agent AI Assistant (Steps Generation)
1166
1197
  // ═══════════════════════════════════════════════════════════════════════════
@@ -2200,6 +2231,17 @@ var Seclai = class {
2200
2231
  async cancelExperiment(experimentId) {
2201
2232
  return await this.request("POST", `/models/playground/experiments/${experimentId}/cancel`);
2202
2233
  }
2234
+ /**
2235
+ * Soft-delete a model playground experiment.
2236
+ *
2237
+ * Removes the experiment from list/detail views while preserving audit
2238
+ * history. Returns HTTP 204 with no body.
2239
+ *
2240
+ * @param experimentId - Experiment identifier.
2241
+ */
2242
+ async deleteExperiment(experimentId) {
2243
+ await this.request("DELETE", `/models/playground/experiments/${experimentId}`);
2244
+ }
2203
2245
  // ═══════════════════════════════════════════════════════════════════════════
2204
2246
  // Search
2205
2247
  // ═══════════════════════════════════════════════════════════════════════════