@seclai/sdk 1.8.0 → 1.9.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/CHANGELOG.md +23 -0
- package/README.md +119 -7
- package/dist/index.cjs +184 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +404 -47
- package/dist/index.d.ts +404 -47
- package/dist/index.js +184 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,10 +23,12 @@ declare const SeclaiApiVersion: {
|
|
|
23
23
|
readonly V2026_10_19: "2026-10-19";
|
|
24
24
|
readonly V2026_10_21: "2026-10-21";
|
|
25
25
|
readonly V2026_10_28: "2026-10-28";
|
|
26
|
+
readonly V2026_11_02: "2026-11-02";
|
|
27
|
+
readonly V2026_11_04: "2026-11-04";
|
|
26
28
|
/** Baseline applied to an unpinned, header-less caller. */
|
|
27
29
|
readonly Default: "2026-07-01";
|
|
28
30
|
/** Newest version known to this SDK release. May lag the server. */
|
|
29
|
-
readonly Latest: "2026-
|
|
31
|
+
readonly Latest: "2026-11-04";
|
|
30
32
|
};
|
|
31
33
|
/**
|
|
32
34
|
* A dated API version. Known values autocomplete; any `YYYY-MM-DD` string still
|
|
@@ -190,7 +192,7 @@ interface components {
|
|
|
190
192
|
change_id: string;
|
|
191
193
|
/**
|
|
192
194
|
* Definition
|
|
193
|
-
* @description The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, regex_replace,
|
|
195
|
+
* @description The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, regex_replace, 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.
|
|
194
196
|
*/
|
|
195
197
|
definition: {
|
|
196
198
|
[key: string]: unknown;
|
|
@@ -293,7 +295,7 @@ interface components {
|
|
|
293
295
|
}[] | null;
|
|
294
296
|
/**
|
|
295
297
|
* Export Version
|
|
296
|
-
* @description Schema version of the export format (currently "
|
|
298
|
+
* @description Schema version of the export format (currently "6").
|
|
297
299
|
*/
|
|
298
300
|
export_version: string;
|
|
299
301
|
/**
|
|
@@ -401,7 +403,7 @@ interface components {
|
|
|
401
403
|
input_upload_ids?: string[] | null;
|
|
402
404
|
/**
|
|
403
405
|
* Metadata
|
|
404
|
-
* @description Metadata
|
|
406
|
+
* @description Metadata for string substitution in agent tasks. Each key must be one the agent's trigger declares (or sets); a run that sends another custom key, or lacks a required one, is refused with HTTP 400.
|
|
405
407
|
*/
|
|
406
408
|
metadata?: {
|
|
407
409
|
[key: string]: components["schemas"]["JsonValue"];
|
|
@@ -452,7 +454,7 @@ interface components {
|
|
|
452
454
|
flagged_policies?: components["schemas"]["routers__api__agents__GovernancePolicyRefResponse"][];
|
|
453
455
|
/**
|
|
454
456
|
* Governance Input Status
|
|
455
|
-
* @description Result of the governance input evaluation: safe, blocked, skipped, or
|
|
457
|
+
* @description Result of the governance input evaluation: pending, safe, blocked, skipped, timed_out, or error.
|
|
456
458
|
*/
|
|
457
459
|
governance_input_status?: string | null;
|
|
458
460
|
/**
|
|
@@ -462,7 +464,7 @@ interface components {
|
|
|
462
464
|
governance_input_wait_ms?: number | null;
|
|
463
465
|
/**
|
|
464
466
|
* Hitl Wait Ms
|
|
465
|
-
* @description
|
|
467
|
+
* @description Sum over the run's human_in_the_loop steps of each one's wait for a decision, in milliseconds. Waits that overlap are each counted in full, so the sum can exceed the run's duration.
|
|
466
468
|
*/
|
|
467
469
|
hitl_wait_ms?: number | null;
|
|
468
470
|
/**
|
|
@@ -490,6 +492,11 @@ interface components {
|
|
|
490
492
|
* @description Indicates if the run was treated as a priority execution.
|
|
491
493
|
*/
|
|
492
494
|
priority: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Result Reported At
|
|
497
|
+
* @description When the run reported success: for an agent whose `report_success` is `on_result`, once its result step published, or once its run started if it has no result step; else when the run completed. From then on `output` is the run's answer and never changes; stop polling here if you only need the answer. `status` still follows every step, so a run can report success and later fail. Null until the run reports, for a run that failed before reporting, and for runs that ended before this field existed.
|
|
498
|
+
*/
|
|
499
|
+
result_reported_at?: string | null;
|
|
493
500
|
/**
|
|
494
501
|
* Run Id
|
|
495
502
|
* @description Unique identifier for the agent run.
|
|
@@ -514,7 +521,7 @@ interface components {
|
|
|
514
521
|
trace_purged_at?: string | null;
|
|
515
522
|
/**
|
|
516
523
|
* Wait Ms
|
|
517
|
-
* @description
|
|
524
|
+
* @description Sum over the run's standard-mode wait steps of each one's wait, in milliseconds. Waits that overlap are each counted in full. Priority waits block inline and are not counted here.
|
|
518
525
|
*/
|
|
519
526
|
wait_ms?: number | null;
|
|
520
527
|
};
|
|
@@ -613,7 +620,7 @@ interface components {
|
|
|
613
620
|
input_upload_ids?: string[] | null;
|
|
614
621
|
/**
|
|
615
622
|
* Metadata
|
|
616
|
-
* @description Metadata
|
|
623
|
+
* @description Metadata for string substitution in agent tasks. Each key must be one the agent's trigger declares (or sets); a run that sends another custom key, or lacks a required one, is refused with HTTP 400.
|
|
617
624
|
*/
|
|
618
625
|
metadata?: {
|
|
619
626
|
[key: string]: components["schemas"]["JsonValue"];
|
|
@@ -736,8 +743,8 @@ interface components {
|
|
|
736
743
|
disabled_reason?: string | null;
|
|
737
744
|
/**
|
|
738
745
|
* Evaluation Mode
|
|
739
|
-
* @description Evaluation mode: output_expectation
|
|
740
|
-
* @default
|
|
746
|
+
* @description Evaluation mode: output_expectation or sample_and_flag.
|
|
747
|
+
* @default sample_and_flag
|
|
741
748
|
*/
|
|
742
749
|
evaluation_mode: string;
|
|
743
750
|
/**
|
|
@@ -762,7 +769,7 @@ interface components {
|
|
|
762
769
|
max_credits_per_run?: number | null;
|
|
763
770
|
/**
|
|
764
771
|
* Max Retries
|
|
765
|
-
* @description
|
|
772
|
+
* @description Deprecated: has no effect.
|
|
766
773
|
* @default 3
|
|
767
774
|
*/
|
|
768
775
|
max_retries: number;
|
|
@@ -794,7 +801,7 @@ interface components {
|
|
|
794
801
|
prompt_model_auto_rollback_enabled: boolean;
|
|
795
802
|
/**
|
|
796
803
|
* Prompt Model Auto Rollback Triggers
|
|
797
|
-
* @description Failure signals that trigger rollback. Defaults to
|
|
804
|
+
* @description Failure signals that trigger rollback. Defaults to governance_block, agent_run_failed when null.
|
|
798
805
|
*/
|
|
799
806
|
prompt_model_auto_rollback_triggers?: string[] | null;
|
|
800
807
|
/**
|
|
@@ -805,7 +812,7 @@ interface components {
|
|
|
805
812
|
prompt_model_auto_upgrade_strategy: string;
|
|
806
813
|
/**
|
|
807
814
|
* Retry On Failure
|
|
808
|
-
* @description
|
|
815
|
+
* @description Deprecated: has no effect.
|
|
809
816
|
* @default true
|
|
810
817
|
*/
|
|
811
818
|
retry_on_failure: boolean;
|
|
@@ -1755,7 +1762,8 @@ interface components {
|
|
|
1755
1762
|
* CreateEvaluationCriteriaRequest
|
|
1756
1763
|
* @description Request body for creating an evaluation criteria.
|
|
1757
1764
|
*
|
|
1758
|
-
*
|
|
1765
|
+
* step_id names the display_result or streaming_result step to score. The
|
|
1766
|
+
* evaluation mode and sample frequency are set at the
|
|
1759
1767
|
* agent level, not per-criteria.
|
|
1760
1768
|
*/
|
|
1761
1769
|
CreateEvaluationCriteriaRequest: {
|
|
@@ -1804,11 +1812,13 @@ interface components {
|
|
|
1804
1812
|
flagged: boolean;
|
|
1805
1813
|
/**
|
|
1806
1814
|
* Retry Count
|
|
1815
|
+
* @description Deprecated: has no effect on any count.
|
|
1807
1816
|
* @default 0
|
|
1808
1817
|
*/
|
|
1809
1818
|
retry_count: number;
|
|
1810
1819
|
/**
|
|
1811
1820
|
* Retry Triggered
|
|
1821
|
+
* @description Retired; true returns 400 from Seclai-Version 2026-11-04.
|
|
1812
1822
|
* @default false
|
|
1813
1823
|
*/
|
|
1814
1824
|
retry_triggered: boolean;
|
|
@@ -2073,6 +2083,17 @@ interface components {
|
|
|
2073
2083
|
*/
|
|
2074
2084
|
url_id?: string | null;
|
|
2075
2085
|
};
|
|
2086
|
+
/** DeclarableMetadataKey */
|
|
2087
|
+
DeclarableMetadataKey: {
|
|
2088
|
+
/**
|
|
2089
|
+
* Always Present
|
|
2090
|
+
* @description Whether every run carries this key.
|
|
2091
|
+
*/
|
|
2092
|
+
always_present: boolean;
|
|
2093
|
+
/** Key */
|
|
2094
|
+
key: string;
|
|
2095
|
+
origin: components["schemas"]["MetadataOrigin"];
|
|
2096
|
+
};
|
|
2076
2097
|
/** DmarcFailingSourceResponse */
|
|
2077
2098
|
DmarcFailingSourceResponse: {
|
|
2078
2099
|
/** Failed Count */
|
|
@@ -2547,7 +2568,7 @@ interface components {
|
|
|
2547
2568
|
enabled: boolean;
|
|
2548
2569
|
/**
|
|
2549
2570
|
* Evaluation Mode
|
|
2550
|
-
* @description Runtime behavior mode. output_expectation (manual validation),
|
|
2571
|
+
* @description Runtime behavior mode. output_expectation (manual validation), sample_and_flag (sampled monitoring).
|
|
2551
2572
|
*/
|
|
2552
2573
|
evaluation_mode: string;
|
|
2553
2574
|
/** Evaluation Prompt */
|
|
@@ -2563,7 +2584,10 @@ interface components {
|
|
|
2563
2584
|
* Format: uuid
|
|
2564
2585
|
*/
|
|
2565
2586
|
id: string;
|
|
2566
|
-
/**
|
|
2587
|
+
/**
|
|
2588
|
+
* Max Retries
|
|
2589
|
+
* @description Deprecated: has no effect.
|
|
2590
|
+
*/
|
|
2567
2591
|
max_retries: number;
|
|
2568
2592
|
/**
|
|
2569
2593
|
* Pass Threshold
|
|
@@ -2574,7 +2598,10 @@ interface components {
|
|
|
2574
2598
|
result_summary: {
|
|
2575
2599
|
[key: string]: number;
|
|
2576
2600
|
};
|
|
2577
|
-
/**
|
|
2601
|
+
/**
|
|
2602
|
+
* Retry On Failure
|
|
2603
|
+
* @description Deprecated: has no effect.
|
|
2604
|
+
*/
|
|
2578
2605
|
retry_on_failure: boolean;
|
|
2579
2606
|
/** Step Id */
|
|
2580
2607
|
step_id: string | null;
|
|
@@ -2633,9 +2660,15 @@ interface components {
|
|
|
2633
2660
|
* Format: uuid
|
|
2634
2661
|
*/
|
|
2635
2662
|
id: string;
|
|
2636
|
-
/**
|
|
2663
|
+
/**
|
|
2664
|
+
* Retry Count
|
|
2665
|
+
* @description Deprecated.
|
|
2666
|
+
*/
|
|
2637
2667
|
retry_count: number;
|
|
2638
|
-
/**
|
|
2668
|
+
/**
|
|
2669
|
+
* Retry Triggered
|
|
2670
|
+
* @description Deprecated.
|
|
2671
|
+
*/
|
|
2639
2672
|
retry_triggered: boolean;
|
|
2640
2673
|
/**
|
|
2641
2674
|
* Score
|
|
@@ -2723,9 +2756,15 @@ interface components {
|
|
|
2723
2756
|
* Format: uuid
|
|
2724
2757
|
*/
|
|
2725
2758
|
id: string;
|
|
2726
|
-
/**
|
|
2759
|
+
/**
|
|
2760
|
+
* Retry Count
|
|
2761
|
+
* @description Deprecated.
|
|
2762
|
+
*/
|
|
2727
2763
|
retry_count: number;
|
|
2728
|
-
/**
|
|
2764
|
+
/**
|
|
2765
|
+
* Retry Triggered
|
|
2766
|
+
* @description Deprecated.
|
|
2767
|
+
*/
|
|
2729
2768
|
retry_triggered: boolean;
|
|
2730
2769
|
/**
|
|
2731
2770
|
* Score
|
|
@@ -3023,7 +3062,7 @@ interface components {
|
|
|
3023
3062
|
step_id?: string | null;
|
|
3024
3063
|
/**
|
|
3025
3064
|
* Step Type
|
|
3026
|
-
* @description The step type to generate config for (e.g. 'regex_replace', '
|
|
3065
|
+
* @description The step type to generate config for (e.g. 'regex_replace', 'if_else', 'text', 'prompt_call', 'retrieval').
|
|
3027
3066
|
*/
|
|
3028
3067
|
step_type: string;
|
|
3029
3068
|
/**
|
|
@@ -3368,6 +3407,13 @@ interface components {
|
|
|
3368
3407
|
*/
|
|
3369
3408
|
total: number;
|
|
3370
3409
|
};
|
|
3410
|
+
/** KnowledgeBaseMetadataKeyStats */
|
|
3411
|
+
KnowledgeBaseMetadataKeyStatsResponse: {
|
|
3412
|
+
/** Knowledge Base Id */
|
|
3413
|
+
knowledge_base_id: string;
|
|
3414
|
+
/** Windows */
|
|
3415
|
+
windows: components["schemas"]["MetadataKeyWindowResponse"][];
|
|
3416
|
+
};
|
|
3371
3417
|
/**
|
|
3372
3418
|
* KnowledgeBase
|
|
3373
3419
|
* @description Response model for a single knowledge base.
|
|
@@ -3672,6 +3718,120 @@ interface components {
|
|
|
3672
3718
|
*/
|
|
3673
3719
|
updated_at: string;
|
|
3674
3720
|
};
|
|
3721
|
+
/** MetadataKeyCountResponse */
|
|
3722
|
+
MetadataKeyCountResponse: {
|
|
3723
|
+
/**
|
|
3724
|
+
* Distinct Values
|
|
3725
|
+
* @description How many different values it takes.
|
|
3726
|
+
*/
|
|
3727
|
+
distinct_values: number;
|
|
3728
|
+
/**
|
|
3729
|
+
* Items
|
|
3730
|
+
* @description Items in the window carrying the key.
|
|
3731
|
+
*/
|
|
3732
|
+
items: number;
|
|
3733
|
+
/**
|
|
3734
|
+
* Key
|
|
3735
|
+
* @description The item-metadata key.
|
|
3736
|
+
*/
|
|
3737
|
+
key: string;
|
|
3738
|
+
/**
|
|
3739
|
+
* Top Values
|
|
3740
|
+
* @description Its 5 most frequent values, most frequent first.
|
|
3741
|
+
*/
|
|
3742
|
+
top_values: components["schemas"]["MetadataValueCountResponse"][];
|
|
3743
|
+
};
|
|
3744
|
+
/** MetadataKeyDeclaration */
|
|
3745
|
+
MetadataKeyDeclaration: {
|
|
3746
|
+
/**
|
|
3747
|
+
* Key
|
|
3748
|
+
* @description Steps reference the key as ``{{metadata.<key>}}``.
|
|
3749
|
+
*/
|
|
3750
|
+
key: string;
|
|
3751
|
+
/** @description ``system`` and ``source`` keys are written by the platform; ``custom`` keys are sent by the caller or set on the trigger. */
|
|
3752
|
+
origin: components["schemas"]["MetadataOrigin"];
|
|
3753
|
+
/**
|
|
3754
|
+
* Required
|
|
3755
|
+
* @description A caller-started run without this key is refused. Only a ``custom`` key can be required.
|
|
3756
|
+
* @default false
|
|
3757
|
+
*/
|
|
3758
|
+
required: boolean;
|
|
3759
|
+
};
|
|
3760
|
+
/** MetadataKeyWindowResponse */
|
|
3761
|
+
MetadataKeyWindowResponse: {
|
|
3762
|
+
/**
|
|
3763
|
+
* Keys
|
|
3764
|
+
* @description Keys seen in the window, most frequent first.
|
|
3765
|
+
*/
|
|
3766
|
+
keys: components["schemas"]["MetadataKeyCountResponse"][];
|
|
3767
|
+
/**
|
|
3768
|
+
* Since
|
|
3769
|
+
* @description The window's start; null for all time.
|
|
3770
|
+
*/
|
|
3771
|
+
since: string | null;
|
|
3772
|
+
/**
|
|
3773
|
+
* Total Items
|
|
3774
|
+
* @description Items in the window.
|
|
3775
|
+
*/
|
|
3776
|
+
total_items: number;
|
|
3777
|
+
/**
|
|
3778
|
+
* Window
|
|
3779
|
+
* @enum {string}
|
|
3780
|
+
*/
|
|
3781
|
+
window: "all_time" | "last_30_days" | "last_7_days";
|
|
3782
|
+
};
|
|
3783
|
+
/** MetadataKeysResponse */
|
|
3784
|
+
MetadataKeysResponse: {
|
|
3785
|
+
/**
|
|
3786
|
+
* Accepts Any Source Key
|
|
3787
|
+
* @description True for content triggers, which may declare any item-metadata key.
|
|
3788
|
+
*/
|
|
3789
|
+
accepts_any_source_key: boolean;
|
|
3790
|
+
/**
|
|
3791
|
+
* Agent Id
|
|
3792
|
+
* Format: uuid
|
|
3793
|
+
*/
|
|
3794
|
+
agent_id: string;
|
|
3795
|
+
/**
|
|
3796
|
+
* Declarable Keys
|
|
3797
|
+
* @description The system and source keys this trigger's type can declare.
|
|
3798
|
+
*/
|
|
3799
|
+
declarable_keys: components["schemas"]["DeclarableMetadataKey"][];
|
|
3800
|
+
/**
|
|
3801
|
+
* Metadata Keys
|
|
3802
|
+
* @description The keys the agent's steps may reference. Static trigger metadata and Slack form fields are declared custom keys too, and are not repeated here.
|
|
3803
|
+
*/
|
|
3804
|
+
metadata_keys: components["schemas"]["MetadataKeyDeclaration"][];
|
|
3805
|
+
/**
|
|
3806
|
+
* Trigger Id
|
|
3807
|
+
* Format: uuid
|
|
3808
|
+
*/
|
|
3809
|
+
trigger_id: string;
|
|
3810
|
+
/**
|
|
3811
|
+
* Warnings
|
|
3812
|
+
* @description Set by a PUT that changes the declaration: agents whose `call_agent` mapping no longer fits it. Always empty on GET.
|
|
3813
|
+
*/
|
|
3814
|
+
warnings?: string[];
|
|
3815
|
+
};
|
|
3816
|
+
/**
|
|
3817
|
+
* MetadataOrigin
|
|
3818
|
+
* @description Who writes a run metadata key (docs/architecture/run-metadata.md, Q2).
|
|
3819
|
+
* @enum {string}
|
|
3820
|
+
*/
|
|
3821
|
+
MetadataOrigin: "system" | "source" | "custom";
|
|
3822
|
+
/** MetadataValueCountResponse */
|
|
3823
|
+
MetadataValueCountResponse: {
|
|
3824
|
+
/**
|
|
3825
|
+
* Items
|
|
3826
|
+
* @description Items carrying this value.
|
|
3827
|
+
*/
|
|
3828
|
+
items: number;
|
|
3829
|
+
/**
|
|
3830
|
+
* Value
|
|
3831
|
+
* @description The value as text, cut to 100 characters; an object is shown as {…} and a list as […].
|
|
3832
|
+
*/
|
|
3833
|
+
value: string;
|
|
3834
|
+
};
|
|
3675
3835
|
/**
|
|
3676
3836
|
* ModalityRateResponse
|
|
3677
3837
|
* @description Per-modality rate for an LLM that prices image/audio/video output
|
|
@@ -4025,6 +4185,14 @@ interface components {
|
|
|
4025
4185
|
/** Mode */
|
|
4026
4186
|
mode: string;
|
|
4027
4187
|
};
|
|
4188
|
+
/** SetMetadataKeysRequest */
|
|
4189
|
+
SetMetadataKeysRequest: {
|
|
4190
|
+
/**
|
|
4191
|
+
* Metadata Keys
|
|
4192
|
+
* @description The whole declaration; replaces the trigger's current one.
|
|
4193
|
+
*/
|
|
4194
|
+
metadata_keys: components["schemas"]["MetadataKeyDeclaration"][];
|
|
4195
|
+
};
|
|
4028
4196
|
/**
|
|
4029
4197
|
* SetSlackTriggerConfigApiRequest
|
|
4030
4198
|
* @description Omitted fields are left unchanged.
|
|
@@ -4032,6 +4200,11 @@ interface components {
|
|
|
4032
4200
|
SetSlackTriggerConfigApiRequest: {
|
|
4033
4201
|
/** @description `everywhere` in scope, or `channel_opt_in`. */
|
|
4034
4202
|
activation?: components["schemas"]["SlackTriggerActivation"] | null;
|
|
4203
|
+
/**
|
|
4204
|
+
* Alias
|
|
4205
|
+
* @description The name people type after `/seclai` to run this agent: lowercase letters, digits and hyphens, starting with a letter, unique in the Slack workspace. Generated from the agent's name when not set or empty.
|
|
4206
|
+
*/
|
|
4207
|
+
alias?: string | null;
|
|
4035
4208
|
/**
|
|
4036
4209
|
* Allow Dms
|
|
4037
4210
|
* @description Runnable in the app's own DMs.
|
|
@@ -4041,18 +4214,13 @@ interface components {
|
|
|
4041
4214
|
channel_ids?: string[] | null;
|
|
4042
4215
|
/**
|
|
4043
4216
|
* Form
|
|
4044
|
-
* @description Form fields `{key, label, type, required, hint, choices, max_length}`. `type`: short_text, long_text, number, single_choice, multi_choice, yes_no, date, slack_user or slack_channel. Each value reaches the run as `{{metadata.<key>}}
|
|
4217
|
+
* @description Form fields `{key, label, type, required, hint, choices, max_length}`. `type`: short_text, long_text, number, single_choice, multi_choice, yes_no, date, slack_user or slack_channel. Each value reaches the run as `{{metadata.<key>}}`, not in the run's input, which is the text after `/seclai <alias>` or the message the shortcut was used on, and its files.
|
|
4045
4218
|
*/
|
|
4046
4219
|
form?: {
|
|
4047
4220
|
[key: string]: unknown;
|
|
4048
4221
|
}[] | null;
|
|
4049
4222
|
/** Include Invoker Email */
|
|
4050
4223
|
include_invoker_email?: boolean | null;
|
|
4051
|
-
/**
|
|
4052
|
-
* Input
|
|
4053
|
-
* @description The trigger's input template. Each `{{metadata.<key>}}` in it must be a form field key or a platform key; it is checked together with `form`.
|
|
4054
|
-
*/
|
|
4055
|
-
input?: string | null;
|
|
4056
4224
|
/** Max Turns */
|
|
4057
4225
|
max_turns?: number | null;
|
|
4058
4226
|
/**
|
|
@@ -4120,6 +4288,11 @@ interface components {
|
|
|
4120
4288
|
* Format: uuid
|
|
4121
4289
|
*/
|
|
4122
4290
|
agent_id: string;
|
|
4291
|
+
/**
|
|
4292
|
+
* Alias
|
|
4293
|
+
* @description The name people type after `/seclai` to run this agent.
|
|
4294
|
+
*/
|
|
4295
|
+
alias?: string | null;
|
|
4123
4296
|
/** Allow Dms */
|
|
4124
4297
|
allow_dms: boolean;
|
|
4125
4298
|
/** Channel Ids */
|
|
@@ -4916,7 +5089,7 @@ interface components {
|
|
|
4916
5089
|
* UpdateEvaluationCriteriaRequest
|
|
4917
5090
|
* @description Request body for updating an evaluation criteria.
|
|
4918
5091
|
*
|
|
4919
|
-
*
|
|
5092
|
+
* The evaluation mode and sample frequency are set at the agent level.
|
|
4920
5093
|
*/
|
|
4921
5094
|
UpdateEvaluationCriteriaRequest: {
|
|
4922
5095
|
/** Description */
|
|
@@ -5497,7 +5670,7 @@ interface components {
|
|
|
5497
5670
|
} | null;
|
|
5498
5671
|
/**
|
|
5499
5672
|
* Evaluation Mode
|
|
5500
|
-
* @description Evaluation mode: 'output_expectation'
|
|
5673
|
+
* @description Evaluation mode: 'output_expectation' or 'sample_and_flag'. From Seclai-Version 2026-11-04 'eval_and_retry' returns 400; earlier versions store it as 'sample_and_flag'.
|
|
5501
5674
|
*/
|
|
5502
5675
|
evaluation_mode?: string | null;
|
|
5503
5676
|
/**
|
|
@@ -5512,7 +5685,7 @@ interface components {
|
|
|
5512
5685
|
max_credits_per_run?: number | null;
|
|
5513
5686
|
/**
|
|
5514
5687
|
* Max Retries
|
|
5515
|
-
* @description
|
|
5688
|
+
* @description Deprecated: accepted and has no effect.
|
|
5516
5689
|
*/
|
|
5517
5690
|
max_retries?: number | null;
|
|
5518
5691
|
/**
|
|
@@ -5542,14 +5715,14 @@ interface components {
|
|
|
5542
5715
|
prompt_model_auto_rollback_enabled?: boolean | null;
|
|
5543
5716
|
/**
|
|
5544
5717
|
* Prompt Model Auto Rollback Triggers
|
|
5545
|
-
* @description Failure signals that trigger rollback:
|
|
5718
|
+
* @description Failure signals that trigger rollback: governance_flag, governance_block, agent_run_failed. agent_eval_fail is accepted and never fires; in the list, a run with a failed evaluation is never picked as the rollback target.
|
|
5546
5719
|
*/
|
|
5547
5720
|
prompt_model_auto_rollback_triggers?: string[] | null;
|
|
5548
5721
|
/** @description Auto-upgrade strategy: none, early_adopter, middle_of_road, cautious_adopter. */
|
|
5549
5722
|
prompt_model_auto_upgrade_strategy?: components["schemas"]["PromptModelAutoUpgradeStrategy"] | null;
|
|
5550
5723
|
/**
|
|
5551
5724
|
* Retry On Failure
|
|
5552
|
-
* @description
|
|
5725
|
+
* @description Deprecated: accepted and has no effect.
|
|
5553
5726
|
*/
|
|
5554
5727
|
retry_on_failure?: boolean | null;
|
|
5555
5728
|
/**
|
|
@@ -7078,7 +7251,12 @@ type CreateAgentRequest = Omit<WithServerDefaults<components["schemas"]["routers
|
|
|
7078
7251
|
* default to `false` on the server; the generated schema marks them required
|
|
7079
7252
|
* only because they declare a default.
|
|
7080
7253
|
*/
|
|
7081
|
-
type UpdateAgentRequest = Partial<components["schemas"]["routers__api__agents__UpdateAgentRequest"]
|
|
7254
|
+
type UpdateAgentRequest = Omit<Partial<components["schemas"]["routers__api__agents__UpdateAgentRequest"]>, "max_retries" | "retry_on_failure"> & {
|
|
7255
|
+
/** @deprecated Has no effect: the API accepts it and ignores it. Evaluations never retry a step. */
|
|
7256
|
+
max_retries?: number | null;
|
|
7257
|
+
/** @deprecated Has no effect: the API accepts it and ignores it. Evaluations never retry a step. */
|
|
7258
|
+
retry_on_failure?: boolean | null;
|
|
7259
|
+
};
|
|
7082
7260
|
/**
|
|
7083
7261
|
* Request body for updating an agent definition (steps, model, etc.).
|
|
7084
7262
|
*
|
|
@@ -7144,11 +7322,43 @@ type EmailTriggerConfigResponse = components["schemas"]["EmailTriggerConfigRespo
|
|
|
7144
7322
|
/**
|
|
7145
7323
|
* Request body for configuring a `SLACK_COMMAND` trigger.
|
|
7146
7324
|
*
|
|
7147
|
-
* Every field is optional, and an omitted field is left unchanged.
|
|
7325
|
+
* Every field is optional, and an omitted field is left unchanged. `alias` is
|
|
7326
|
+
* the name people type after `/seclai` to run the agent.
|
|
7148
7327
|
*/
|
|
7149
|
-
type SetSlackTriggerConfigRequest = components["schemas"]["SetSlackTriggerConfigApiRequest"]
|
|
7328
|
+
type SetSlackTriggerConfigRequest = components["schemas"]["SetSlackTriggerConfigApiRequest"] & {
|
|
7329
|
+
/**
|
|
7330
|
+
* @deprecated The API ignores `input`; use `alias` to choose the name people
|
|
7331
|
+
* type after `/seclai`. A run's input is the text after `/seclai <alias>`, or
|
|
7332
|
+
* the message the shortcut was used on.
|
|
7333
|
+
*/
|
|
7334
|
+
input?: string | null;
|
|
7335
|
+
};
|
|
7150
7336
|
/** A `SLACK_COMMAND` trigger's Slack connection, form, channels and conversation settings. */
|
|
7151
7337
|
type SlackTriggerConfigResponse = components["schemas"]["SlackTriggerConfigApiResponse"];
|
|
7338
|
+
/** Who writes a run metadata key: `system`, `source` (both written by the platform) or `custom`. */
|
|
7339
|
+
type MetadataOrigin = components["schemas"]["MetadataOrigin"];
|
|
7340
|
+
/**
|
|
7341
|
+
* One run metadata key a trigger declares, which steps reference as
|
|
7342
|
+
* `{{metadata.<key>}}`.
|
|
7343
|
+
*/
|
|
7344
|
+
type MetadataKeyDeclaration = components["schemas"]["MetadataKeyDeclaration"];
|
|
7345
|
+
/**
|
|
7346
|
+
* A {@link MetadataKeyDeclaration} as sent to {@link Seclai.setMetadataKeys}:
|
|
7347
|
+
* `required` defaults to `false` and can be omitted — the generated type marks
|
|
7348
|
+
* it required only because the schema declares a default.
|
|
7349
|
+
*/
|
|
7350
|
+
type MetadataKeyDeclarationInput = WithServerDefaults<MetadataKeyDeclaration, "required">;
|
|
7351
|
+
/**
|
|
7352
|
+
* Request body for {@link Seclai.setMetadataKeys}: the whole declaration, which
|
|
7353
|
+
* replaces the trigger's current one.
|
|
7354
|
+
*/
|
|
7355
|
+
type SetMetadataKeysRequest = Omit<components["schemas"]["SetMetadataKeysRequest"], "metadata_keys"> & {
|
|
7356
|
+
metadata_keys: MetadataKeyDeclarationInput[];
|
|
7357
|
+
};
|
|
7358
|
+
/** A system or source metadata key a trigger's type can declare. */
|
|
7359
|
+
type DeclarableMetadataKey = components["schemas"]["DeclarableMetadataKey"];
|
|
7360
|
+
/** The run metadata keys a trigger declares, and the ones its type could declare. */
|
|
7361
|
+
type MetadataKeysResponse = components["schemas"]["MetadataKeysResponse"];
|
|
7152
7362
|
/** Where a Slack trigger runs within its scope: `everywhere` or `channel_opt_in`. */
|
|
7153
7363
|
type SlackTriggerActivation = components["schemas"]["SlackTriggerActivation"];
|
|
7154
7364
|
/** Which channels a Slack trigger covers: `selected_channels` or `bot_channels`. */
|
|
@@ -7313,7 +7523,15 @@ type EvaluationResultResponse = components["schemas"]["EvaluationResultResponse"
|
|
|
7313
7523
|
/** Paginated list of evaluation results. */
|
|
7314
7524
|
type EvaluationResultListResponse = VersionedList<components["schemas"]["EvaluationResultListResponse"], "data">;
|
|
7315
7525
|
/** Request body for creating a manual evaluation result. */
|
|
7316
|
-
type CreateEvaluationResultRequest = WithServerDefaults<components["schemas"]["CreateEvaluationResultRequest"], "flagged"
|
|
7526
|
+
type CreateEvaluationResultRequest = Omit<WithServerDefaults<components["schemas"]["CreateEvaluationResultRequest"], "flagged">, "retry_count" | "retry_triggered"> & {
|
|
7527
|
+
/** @deprecated Has no effect on any count. */
|
|
7528
|
+
retry_count?: number;
|
|
7529
|
+
/**
|
|
7530
|
+
* @deprecated Retired: evaluations never retry a step. `true` returns HTTP 400
|
|
7531
|
+
* from `Seclai-Version` `2026-11-04`.
|
|
7532
|
+
*/
|
|
7533
|
+
retry_triggered?: boolean;
|
|
7534
|
+
};
|
|
7317
7535
|
/** Summary of evaluation results for a criteria. */
|
|
7318
7536
|
type EvaluationResultSummaryResponse = components["schemas"]["EvaluationResultSummaryResponse"];
|
|
7319
7537
|
/** Evaluation result with its associated criteria. */
|
|
@@ -7376,6 +7594,14 @@ type KnowledgeBaseResponse = components["schemas"]["KnowledgeBaseResponseModel"]
|
|
|
7376
7594
|
type CreateKnowledgeBaseBody = components["schemas"]["CreateKnowledgeBaseBody"];
|
|
7377
7595
|
/** Request body for updating a knowledge base. */
|
|
7378
7596
|
type UpdateKnowledgeBaseBody = components["schemas"]["UpdateKnowledgeBaseBody"];
|
|
7597
|
+
/** Item-metadata keys seen in a knowledge base's content, per time window. */
|
|
7598
|
+
type KnowledgeBaseMetadataKeyStatsResponse = components["schemas"]["KnowledgeBaseMetadataKeyStatsResponse"];
|
|
7599
|
+
/** The item-metadata keys seen in one window (`all_time`, `last_30_days` or `last_7_days`). */
|
|
7600
|
+
type MetadataKeyWindowResponse = components["schemas"]["MetadataKeyWindowResponse"];
|
|
7601
|
+
/** One item-metadata key: how many items carry it, how many values it takes, and its top values. */
|
|
7602
|
+
type MetadataKeyCountResponse = components["schemas"]["MetadataKeyCountResponse"];
|
|
7603
|
+
/** One value of an item-metadata key and how many items carry it. */
|
|
7604
|
+
type MetadataValueCountResponse = components["schemas"]["MetadataValueCountResponse"];
|
|
7379
7605
|
/** Paginated list of memory banks. */
|
|
7380
7606
|
type MemoryBankListResponse = VersionedList<components["schemas"]["MemoryBankListResponseModel"], "memory_banks">;
|
|
7381
7607
|
/** Full memory bank configuration and metadata. */
|
|
@@ -8167,15 +8393,63 @@ declare class Seclai {
|
|
|
8167
8393
|
* takes no `include_reasoning`, and one passed anyway is not sent: this method
|
|
8168
8394
|
* returns no `stream_reasoning` events.
|
|
8169
8395
|
*
|
|
8396
|
+
* A `result` event carries the run's answer in `output` once
|
|
8397
|
+
* `result_reported_at` is set, and can arrive while later steps still run.
|
|
8398
|
+
* Pass `returnOnResult: true` to return that `result` snapshot as soon as it
|
|
8399
|
+
* arrives, without waiting for `done`. Such a run may still be in progress:
|
|
8400
|
+
* its `status` is not terminal and the run can still fail, so check
|
|
8401
|
+
* `result_reported_at`, not `status`.
|
|
8402
|
+
*
|
|
8403
|
+
* If `timeoutMs` elapses, this throws {@link SeclaiStreamingError} with the
|
|
8404
|
+
* latest snapshot in `run`: the `result` snapshot if one arrived, else the
|
|
8405
|
+
* `init` snapshot. An abort from `signal` rethrows the abort error.
|
|
8406
|
+
*
|
|
8407
|
+
* By default, a stream that ends before `done` returns the latest snapshot
|
|
8408
|
+
* when its status is not `pending`, so the run returned may not have
|
|
8409
|
+
* finished: check `status` and `result_reported_at`. A stream that breaks
|
|
8410
|
+
* throws the fetch error. Pass `throwOnIncomplete: true` to throw
|
|
8411
|
+
* {@link SeclaiStreamingError} with the snapshot in `run` in both cases
|
|
8412
|
+
* instead; it is recommended, and becomes the default in the next major
|
|
8413
|
+
* version.
|
|
8414
|
+
*
|
|
8170
8415
|
* @param agentId - Agent identifier.
|
|
8171
8416
|
* @param body - Streaming run request payload, without `include_reasoning`.
|
|
8172
|
-
* @param opts - Timeout
|
|
8173
|
-
* @returns
|
|
8174
|
-
*
|
|
8417
|
+
* @param opts - Timeout, abort signal and `returnOnResult` options.
|
|
8418
|
+
* @returns The run from the `done` event; with `returnOnResult`, the
|
|
8419
|
+
* `result` snapshot; without `throwOnIncomplete`, possibly an unfinished
|
|
8420
|
+
* snapshot (see above).
|
|
8421
|
+
* @throws {@link SeclaiStreamingError} If `timeoutMs` elapses, or, with
|
|
8422
|
+
* `throwOnIncomplete`, the stream ends or breaks, before the run finished.
|
|
8423
|
+
* Its `run` holds the latest snapshot.
|
|
8424
|
+
*
|
|
8425
|
+
* @example
|
|
8426
|
+
* ```ts
|
|
8427
|
+
* try {
|
|
8428
|
+
* const run = await client.runStreamingAgentAndWait("agent-id", { input: "Hello" }, { throwOnIncomplete: true });
|
|
8429
|
+
* console.log(run.output);
|
|
8430
|
+
* } catch (err) {
|
|
8431
|
+
* if (err instanceof SeclaiStreamingError && err.run?.result_reported_at) {
|
|
8432
|
+
* console.log("Answer (run not finished):", err.run.output);
|
|
8433
|
+
* } else throw err;
|
|
8434
|
+
* }
|
|
8435
|
+
* ```
|
|
8175
8436
|
*/
|
|
8176
8437
|
runStreamingAgentAndWait(agentId: string, body: Omit<AgentRunStreamRequest, "include_reasoning">, opts?: {
|
|
8177
8438
|
timeoutMs?: number;
|
|
8178
8439
|
signal?: AbortSignal;
|
|
8440
|
+
/**
|
|
8441
|
+
* Return the `result` snapshot as soon as a `result` event arrives (its
|
|
8442
|
+
* answer is in `output`), without waiting for `done` (default: false).
|
|
8443
|
+
*/
|
|
8444
|
+
returnOnResult?: boolean;
|
|
8445
|
+
/**
|
|
8446
|
+
* Throw {@link SeclaiStreamingError}, with the latest snapshot in `run`,
|
|
8447
|
+
* whenever the stream ends or breaks before `done`, or the server answers
|
|
8448
|
+
* with plain JSON for a run that has not finished, instead of returning
|
|
8449
|
+
* an unfinished run or throwing the fetch error (default: false). This
|
|
8450
|
+
* becomes the default in the next major version.
|
|
8451
|
+
*/
|
|
8452
|
+
throwOnIncomplete?: boolean;
|
|
8179
8453
|
}): Promise<AgentRunResponse>;
|
|
8180
8454
|
/**
|
|
8181
8455
|
* Run an agent in streaming mode and yield each SSE event as it arrives.
|
|
@@ -8191,6 +8465,10 @@ declare class Seclai {
|
|
|
8191
8465
|
* @example
|
|
8192
8466
|
* ```ts
|
|
8193
8467
|
* for await (const event of client.runStreamingAgent("agent-id", { input: "Hello!" })) {
|
|
8468
|
+
* // `result` carries the answer in `output`, possibly before later steps finish.
|
|
8469
|
+
* if (event.event === "result") {
|
|
8470
|
+
* console.log("Answer:", (event.data as AgentRunResponse).output);
|
|
8471
|
+
* }
|
|
8194
8472
|
* if (event.event === "done") {
|
|
8195
8473
|
* console.log("Final:", event.data);
|
|
8196
8474
|
* }
|
|
@@ -8206,11 +8484,38 @@ declare class Seclai {
|
|
|
8206
8484
|
*
|
|
8207
8485
|
* This is useful in environments where SSE streaming is unavailable.
|
|
8208
8486
|
*
|
|
8487
|
+
* A run's answer can be ready before its last step finishes: once
|
|
8488
|
+
* `result_reported_at` is set, `output` holds the answer. Pass
|
|
8489
|
+
* `returnOnResult: true` to return as soon as a run has it set, the run
|
|
8490
|
+
* `runAgent()` returns included. With `includeStepOutputs`, when that run
|
|
8491
|
+
* would end the poll and `signal` is not aborted, it is fetched again at
|
|
8492
|
+
* once for its step outputs.
|
|
8493
|
+
* Such a run may still be in progress: its `status` is not terminal and the
|
|
8494
|
+
* run can still fail, so check `result_reported_at`, not `status`.
|
|
8495
|
+
*
|
|
8496
|
+
* When `timeoutMs` elapses first, this throws {@link SeclaiStreamingError}
|
|
8497
|
+
* with the latest run it has (the `runAgent()` response if no poll ran) in
|
|
8498
|
+
* `run`. If that run has `result_reported_at`
|
|
8499
|
+
* set, its `output` is the answer.
|
|
8500
|
+
*
|
|
8501
|
+
* `signal` is checked at the top of each poll, after the check for a run
|
|
8502
|
+
* that ends the poll. A run that has ended the poll by then, whether the
|
|
8503
|
+
* start run or a polled one, is returned even after an abort; the start run
|
|
8504
|
+
* then comes back without step outputs, even when `includeStepOutputs` is
|
|
8505
|
+
* set. Otherwise an abort throws `SeclaiError("Polling aborted.")`, which is
|
|
8506
|
+
* not an `AbortError` and does not carry `signal.reason`.
|
|
8507
|
+
*
|
|
8209
8508
|
* @param agentId - Agent identifier.
|
|
8210
8509
|
* @param body - Run request payload.
|
|
8211
8510
|
* @param opts - Polling configuration and abort signal.
|
|
8212
|
-
* @returns The terminal agent run
|
|
8213
|
-
*
|
|
8511
|
+
* @returns The terminal agent run, or, with `returnOnResult`, the first run
|
|
8512
|
+
* with `result_reported_at` set.
|
|
8513
|
+
* @throws {@link SeclaiStreamingError} If `timeoutMs` elapses before the run
|
|
8514
|
+
* finished. Its `run` holds the latest run it has (the `runAgent()`
|
|
8515
|
+
* response if no poll ran).
|
|
8516
|
+
* @throws {@link SeclaiError} `"Polling aborted."` If `signal` is aborted and,
|
|
8517
|
+
* at the next poll's check, the run has not ended the poll. It is not an
|
|
8518
|
+
* `AbortError` and does not carry `signal.reason`.
|
|
8214
8519
|
*/
|
|
8215
8520
|
runAgentAndPoll(agentId: string, body: AgentRunRequest, opts?: {
|
|
8216
8521
|
/** Polling interval in ms (default: 2000). */
|
|
@@ -8219,6 +8524,12 @@ declare class Seclai {
|
|
|
8219
8524
|
timeoutMs?: number;
|
|
8220
8525
|
/** Include per-step outputs in the final result. */
|
|
8221
8526
|
includeStepOutputs?: boolean;
|
|
8527
|
+
/**
|
|
8528
|
+
* Return as soon as a run, the `runAgent()` response included, has
|
|
8529
|
+
* `result_reported_at` set (its answer is in `output`), without waiting
|
|
8530
|
+
* for later steps to finish (default: false).
|
|
8531
|
+
*/
|
|
8532
|
+
returnOnResult?: boolean;
|
|
8222
8533
|
signal?: AbortSignal;
|
|
8223
8534
|
}): Promise<AgentRunResponse>;
|
|
8224
8535
|
/**
|
|
@@ -8450,8 +8761,9 @@ declare class Seclai {
|
|
|
8450
8761
|
* Configure an agent's `SLACK_COMMAND` trigger, which people run from Slack
|
|
8451
8762
|
* with `/seclai` or the message shortcut.
|
|
8452
8763
|
*
|
|
8453
|
-
* Sets the Slack connection,
|
|
8454
|
-
* settings. Omitted fields
|
|
8764
|
+
* Sets the Slack connection, `alias` (the name people type after `/seclai`),
|
|
8765
|
+
* form, channels, reply visibility and conversation settings. Omitted fields
|
|
8766
|
+
* are left unchanged. `input` is deprecated and ignored by the API.
|
|
8455
8767
|
*
|
|
8456
8768
|
* @param agentId - Agent identifier.
|
|
8457
8769
|
* @param triggerId - Trigger identifier.
|
|
@@ -8473,6 +8785,31 @@ declare class Seclai {
|
|
|
8473
8785
|
* @returns The trigger's accepted attachments.
|
|
8474
8786
|
*/
|
|
8475
8787
|
setAcceptedAttachments(agentId: string, triggerId: string, body: SetAcceptedAttachmentsInput): Promise<AcceptedAttachmentsResponse>;
|
|
8788
|
+
/**
|
|
8789
|
+
* Get the run metadata keys a trigger declares.
|
|
8790
|
+
*
|
|
8791
|
+
* Steps may reference a declared key as `{{metadata.<key>}}`. The response
|
|
8792
|
+
* also lists the system and source keys the trigger's type can declare.
|
|
8793
|
+
*
|
|
8794
|
+
* @param agentId - Agent identifier.
|
|
8795
|
+
* @param triggerId - Trigger identifier, as `getAgent()` returns it.
|
|
8796
|
+
* @returns The trigger's declared and declarable metadata keys.
|
|
8797
|
+
*/
|
|
8798
|
+
getMetadataKeys(agentId: string, triggerId: string): Promise<MetadataKeysResponse>;
|
|
8799
|
+
/**
|
|
8800
|
+
* Replace the run metadata keys a trigger declares.
|
|
8801
|
+
*
|
|
8802
|
+
* The body is the whole declaration and replaces the current one. The API
|
|
8803
|
+
* answers 400 when the agent references a key that no trigger of its branch
|
|
8804
|
+
* declares.
|
|
8805
|
+
*
|
|
8806
|
+
* @param agentId - Agent identifier.
|
|
8807
|
+
* @param triggerId - Trigger identifier, as `getAgent()` returns it.
|
|
8808
|
+
* @param body - The full declaration; each key's `required` defaults to `false`.
|
|
8809
|
+
* @returns The trigger's metadata keys, with `warnings` naming agents whose
|
|
8810
|
+
* `call_agent` mapping no longer fits.
|
|
8811
|
+
*/
|
|
8812
|
+
setMetadataKeys(agentId: string, triggerId: string, body: SetMetadataKeysRequest): Promise<MetadataKeysResponse>;
|
|
8476
8813
|
/**
|
|
8477
8814
|
* List recipients who have opted out of this account's agent emails.
|
|
8478
8815
|
*
|
|
@@ -8586,6 +8923,16 @@ declare class Seclai {
|
|
|
8586
8923
|
* @returns Knowledge base details.
|
|
8587
8924
|
*/
|
|
8588
8925
|
getKnowledgeBase(knowledgeBaseId: string): Promise<KnowledgeBaseResponse>;
|
|
8926
|
+
/**
|
|
8927
|
+
* Get the item-metadata keys seen in a knowledge base's content.
|
|
8928
|
+
*
|
|
8929
|
+
* Reports, for all time and the last 30 and 7 days, each key's item count,
|
|
8930
|
+
* number of distinct values and five most frequent values.
|
|
8931
|
+
*
|
|
8932
|
+
* @param knowledgeBaseId - Knowledge base identifier.
|
|
8933
|
+
* @returns The key statistics per window.
|
|
8934
|
+
*/
|
|
8935
|
+
getKnowledgeBaseMetadataKeyStats(knowledgeBaseId: string): Promise<KnowledgeBaseMetadataKeyStatsResponse>;
|
|
8589
8936
|
/**
|
|
8590
8937
|
* Update a knowledge base.
|
|
8591
8938
|
*
|
|
@@ -9764,6 +10111,7 @@ interface AuthState {
|
|
|
9764
10111
|
* All errors extend {@link SeclaiError}, so a single `catch (err instanceof SeclaiError)`
|
|
9765
10112
|
* handles every SDK error. Narrow to more specific subclasses for finer handling.
|
|
9766
10113
|
*/
|
|
10114
|
+
|
|
9767
10115
|
/** Base error class for the Seclai SDK. */
|
|
9768
10116
|
declare class SeclaiError extends Error {
|
|
9769
10117
|
constructor(message: string);
|
|
@@ -9813,11 +10161,20 @@ declare class SeclaiAPIValidationError extends SeclaiAPIStatusError {
|
|
|
9813
10161
|
validationError: unknown;
|
|
9814
10162
|
});
|
|
9815
10163
|
}
|
|
9816
|
-
/**
|
|
10164
|
+
/**
|
|
10165
|
+
* Thrown when a streaming operation fails (e.g. stream ends unexpectedly), or
|
|
10166
|
+
* when a run helper stops waiting before the run finished.
|
|
10167
|
+
*/
|
|
9817
10168
|
declare class SeclaiStreamingError extends SeclaiError {
|
|
9818
10169
|
/** The run ID associated with the failed stream, when available. */
|
|
9819
10170
|
readonly runId: string | undefined;
|
|
9820
|
-
|
|
10171
|
+
/**
|
|
10172
|
+
* Set by `runStreamingAgentAndWait()` and `runAgentAndPoll()` to the latest
|
|
10173
|
+
* run they had, if any (when it has `result_reported_at` set, its `output`
|
|
10174
|
+
* is the answer). The run may still be in progress, and can still fail.
|
|
10175
|
+
*/
|
|
10176
|
+
readonly run: AgentRunResponse | undefined;
|
|
10177
|
+
constructor(message: string, runId?: string, run?: AgentRunResponse);
|
|
9821
10178
|
}
|
|
9822
10179
|
|
|
9823
|
-
export { type AcceptedAttachmentSlot, type AcceptedAttachmentSlotInput, type AcceptedAttachmentsResponse, type AccessTokenProvider, type AddCommentRequest, type AddConversationTurnRequest, type AddEmailDomainInput, type AddEmailDomainRequest, type AgentAttachmentRefsApiResponse, type AgentCallerApiResponse, type AgentDefinitionImportErrorResponse, type AgentDefinitionResponse, type AgentEmailOptOutListResponse, type AgentEmailOptOutResponse, type AgentEvaluationTier, type AgentExample, type AgentExampleListResponse, type AgentExampleResource, type AgentExportResponse, type AgentImportPreviewRequest, type AgentImportPreviewResponse, type AgentListResponse, type AgentRunAttemptResponse, type AgentRunEvent, type AgentRunFileResponse, type AgentRunListResponse, type AgentRunRequest, type AgentRunResponse, type AgentRunStepResponse, type AgentRunStreamRequest, type AgentRunToolCallResponse, type AgentSummaryResponse, type AgentTraceMatchResponse, type AgentTraceSearchRequest, type AgentTraceSearchResponse, type AgentUsingCloudDriveResponse, type AiAssistantAcceptRequest, type AiAssistantAcceptResponse, type AiAssistantFeedbackRequest, type AiAssistantFeedbackResponse, type AiAssistantGenerateRequest, type AiAssistantGenerateResponse, type AiConversationHistoryResponse, type AiConversationTurnResponse, type AlertCommentResponse, type AlertConfigListResponse, type AlertConfigResponse, type AlertDetailResponse, type AlertListResponse, type AlertResponse, type AlertSubscriberResponse, type ApiVersion, type ApiVersionResponse, type AttachmentRefsSourceApiSummary, type AuthState, type BlockEmailSenderRequest, type BlockedEmailSenderListResponse, type BlockedEmailSenderResponse, type CancelExperimentResponse, type CancelQueuedRunsResponse, type ChangeStatusRequest, type CloudDriveAccessLevelResponse, type CloudDriveProviderResponse, type CloudDriveRejectionResponse, type CloudDriveResponse, type CloudDriveScopeResponse, type CloudDriveUpdateRequest, type CompactionEvaluationModel, type CompactionTestResponse, type CompatibleRunListResponse, type CompatibleRunResponse, type ContentAttachmentDetailResponse, type ContentAttachmentResponse, type ContentAttachmentsListResponse, type ContentDetailResponse, type ContentEmbeddingResponse, type ContentEmbeddingsListResponse, type ContentFileUploadResponse, type CreateAgentRequest, type CreateAlertConfigRequest, type CreateEvaluationCriteriaRequest, type CreateEvaluationResultRequest, type CreateExperimentInput, type CreateExperimentResponse, type CreateExportRequest, type CreateKnowledgeBaseBody, type CreateMemoryBankBody, type CreateSolutionRequest, type CreateSourceBody, type CredentialChainOptions, DEFAULT_SSO_CLIENT_ID, DEFAULT_SSO_DOMAIN, DEFAULT_SSO_REGION, type DateRangeOptions, type DmarcFailingSourceResponse, type DmarcSummaryResponse, type DnsProviderResponse, type DnsRecordResponse, type EffortOptionsResponse, type EmailDomainResponse, type EmailDomainsListResponse, type EmailSourceRejectionListResponse, type EmailSourceRejectionResponse, type EmailTriggerConfigResponse, type EmbeddingModalityRateResponse, type EmbeddingModelListResponse, type EmbeddingModelResponse, type EmbeddingStorageCreditsResponse, type EstimateExportRequest, type EstimateExportResponse, type EvaluationCriteriaListResponse, type EvaluationCriteriaResponse, type EvaluationResultListResponse, type EvaluationResultResponse, type EvaluationResultSummaryResponse, type EvaluationResultWithCriteriaListResponse, type EvaluationResultWithCriteriaResponse, type EvaluationRunSummaryListResponse, type EvaluationRunSummaryResponse, type EvaluationStatus, type ExamplePrompt, type ExecutedActionResponse, type ExperimentDetailResponse, type ExperimentListResponse, type ExperimentSummaryResponse, 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 InboundEmailRejectionResponse, type InboundEmailStatusResponse, type InlineTextReplaceRequest, type InlineTextUploadRequest, type InsufficientCreditsDetail, type InsufficientCreditsResponse, type JSONValue, type KnowledgeBaseListResponse, type KnowledgeBaseResponse, type LinkResourcesRequest, type ListAgentEvaluationResultsOptions, type ListAgentExamplesOptions, type ListAlertConfigsOptions, type ListAlertsOptions, type ListCompatibleRunsOptions, type ListEvaluationResultsOptions, type ListEvaluationRunsOptions, type ListMemoryBanksOptions, type ListModelAlertsOptions, type ListOptions, type ListOrganizationAlertPreferencesOptions, type ListSolutionsOptions, type ListSourceContentsOptions, type MarkAiSuggestionRequest, type MarkConversationTurnRequest, type MeResponse, type MemoryBankAcceptRequest, type MemoryBankAiAssistantRequest, type MemoryBankAiAssistantResponse, type MemoryBankConfigResponse, type MemoryBankConversationTurnResponse, type MemoryBankLastConversationResponse, type MemoryBankListResponse, type MemoryBankResponse, type ModalityRateResponse, type ModelAlertListResponse, type ModelAlertResponse, type ModelRecommendationResponse, type ModelRecommendationsOptions, type ModelRecommendationsResponse, type NonManualEvaluationModeStatResponse, type NonManualEvaluationSummaryResponse, type OffsetPageOptions, type OkResponse, type OrganizationAlertPreferenceListResponse, type OrganizationAlertPreferenceResponse, type OrganizationInfoResponse, type PaginatedPage, type PaginationResponse, type PendingProcessingCompletedFailedStatus, type PlaygroundCreateRequest, type PromptModelAutoUpgradeStrategy, type PromptModelResponse, type PromptToolResponse, type ProposedActionResponse, type ProviderGroupResponse, type RemoveEmailDomainResponse, type RerankerModelListResponse, type RerankerModelResponse, type ResumeInboundResponse, SECLAI_API_URL, type SearchResponse, type SearchResultResponse, Seclai, SeclaiAPIStatusError, SeclaiAPIValidationError, SeclaiApiVersion, SeclaiConfigurationError, SeclaiError, type SeclaiOptions, SeclaiStreamingError, type SendTestEmailResponse, type SetAcceptedAttachmentsInput, type SetAcceptedAttachmentsRequest, type SetAutoBlockModeRequest, type SetEmailTriggerConfigRequest, type SetSlackTriggerConfigRequest, type SkippedAttachmentReason, type SkippedAttachmentResponse, type SlackReplyVisibility, type SlackTriggerActivation, type SlackTriggerConfigResponse, type SlackTriggerScope, type SolutionAgentResponse, type SolutionConversationResponse, type SolutionKnowledgeBaseResponse, type SolutionListResponse, type SolutionResponse, type SolutionSourceConnectionResponse, type SolutionSummaryResponse, type SortableListOptions, type SourceConnectionResponse, type SourceContentStatusListResponse, type SourceContentStatusResponse, type SourceEmbeddingMigrationResponse, type SourceIndexMode, type SourceListResponse, type SourceResponse, type SpendCapAction, type SpendCapDeleteOrder, type SsoCacheEntry, type SsoProfile, type StandaloneTestCompactionRequest, type StartSourceEmbeddingMigrationRequest, type TestCompactionRequest, type TestDraftEvaluationRequest, type TestDraftEvaluationResponse, type UnlinkResourcesRequest, type UnreadCountResponse, 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 };
|
|
10180
|
+
export { type AcceptedAttachmentSlot, type AcceptedAttachmentSlotInput, type AcceptedAttachmentsResponse, type AccessTokenProvider, type AddCommentRequest, type AddConversationTurnRequest, type AddEmailDomainInput, type AddEmailDomainRequest, type AgentAttachmentRefsApiResponse, type AgentCallerApiResponse, type AgentDefinitionImportErrorResponse, type AgentDefinitionResponse, type AgentEmailOptOutListResponse, type AgentEmailOptOutResponse, type AgentEvaluationTier, type AgentExample, type AgentExampleListResponse, type AgentExampleResource, type AgentExportResponse, type AgentImportPreviewRequest, type AgentImportPreviewResponse, type AgentListResponse, type AgentRunAttemptResponse, type AgentRunEvent, type AgentRunFileResponse, type AgentRunListResponse, type AgentRunRequest, type AgentRunResponse, type AgentRunStepResponse, type AgentRunStreamRequest, type AgentRunToolCallResponse, type AgentSummaryResponse, type AgentTraceMatchResponse, type AgentTraceSearchRequest, type AgentTraceSearchResponse, type AgentUsingCloudDriveResponse, type AiAssistantAcceptRequest, type AiAssistantAcceptResponse, type AiAssistantFeedbackRequest, type AiAssistantFeedbackResponse, type AiAssistantGenerateRequest, type AiAssistantGenerateResponse, type AiConversationHistoryResponse, type AiConversationTurnResponse, type AlertCommentResponse, type AlertConfigListResponse, type AlertConfigResponse, type AlertDetailResponse, type AlertListResponse, type AlertResponse, type AlertSubscriberResponse, type ApiVersion, type ApiVersionResponse, type AttachmentRefsSourceApiSummary, type AuthState, type BlockEmailSenderRequest, type BlockedEmailSenderListResponse, type BlockedEmailSenderResponse, type CancelExperimentResponse, type CancelQueuedRunsResponse, type ChangeStatusRequest, type CloudDriveAccessLevelResponse, type CloudDriveProviderResponse, type CloudDriveRejectionResponse, type CloudDriveResponse, type CloudDriveScopeResponse, type CloudDriveUpdateRequest, type CompactionEvaluationModel, type CompactionTestResponse, type CompatibleRunListResponse, type CompatibleRunResponse, type ContentAttachmentDetailResponse, type ContentAttachmentResponse, type ContentAttachmentsListResponse, type ContentDetailResponse, type ContentEmbeddingResponse, type ContentEmbeddingsListResponse, type ContentFileUploadResponse, type CreateAgentRequest, type CreateAlertConfigRequest, type CreateEvaluationCriteriaRequest, type CreateEvaluationResultRequest, type CreateExperimentInput, type CreateExperimentResponse, type CreateExportRequest, type CreateKnowledgeBaseBody, type CreateMemoryBankBody, type CreateSolutionRequest, type CreateSourceBody, type CredentialChainOptions, DEFAULT_SSO_CLIENT_ID, DEFAULT_SSO_DOMAIN, DEFAULT_SSO_REGION, type DateRangeOptions, type DeclarableMetadataKey, type DmarcFailingSourceResponse, type DmarcSummaryResponse, type DnsProviderResponse, type DnsRecordResponse, type EffortOptionsResponse, type EmailDomainResponse, type EmailDomainsListResponse, type EmailSourceRejectionListResponse, type EmailSourceRejectionResponse, type EmailTriggerConfigResponse, type EmbeddingModalityRateResponse, type EmbeddingModelListResponse, type EmbeddingModelResponse, type EmbeddingStorageCreditsResponse, type EstimateExportRequest, type EstimateExportResponse, type EvaluationCriteriaListResponse, type EvaluationCriteriaResponse, type EvaluationResultListResponse, type EvaluationResultResponse, type EvaluationResultSummaryResponse, type EvaluationResultWithCriteriaListResponse, type EvaluationResultWithCriteriaResponse, type EvaluationRunSummaryListResponse, type EvaluationRunSummaryResponse, type EvaluationStatus, type ExamplePrompt, type ExecutedActionResponse, type ExperimentDetailResponse, type ExperimentListResponse, type ExperimentSummaryResponse, 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 InboundEmailRejectionResponse, type InboundEmailStatusResponse, type InlineTextReplaceRequest, type InlineTextUploadRequest, type InsufficientCreditsDetail, type InsufficientCreditsResponse, type JSONValue, type KnowledgeBaseListResponse, type KnowledgeBaseMetadataKeyStatsResponse, type KnowledgeBaseResponse, type LinkResourcesRequest, type ListAgentEvaluationResultsOptions, type ListAgentExamplesOptions, type ListAlertConfigsOptions, type ListAlertsOptions, type ListCompatibleRunsOptions, type ListEvaluationResultsOptions, type ListEvaluationRunsOptions, type ListMemoryBanksOptions, type ListModelAlertsOptions, type ListOptions, type ListOrganizationAlertPreferencesOptions, type ListSolutionsOptions, type ListSourceContentsOptions, type MarkAiSuggestionRequest, type MarkConversationTurnRequest, type MeResponse, type MemoryBankAcceptRequest, type MemoryBankAiAssistantRequest, type MemoryBankAiAssistantResponse, type MemoryBankConfigResponse, type MemoryBankConversationTurnResponse, type MemoryBankLastConversationResponse, type MemoryBankListResponse, type MemoryBankResponse, type MetadataKeyCountResponse, type MetadataKeyDeclaration, type MetadataKeyDeclarationInput, type MetadataKeyWindowResponse, type MetadataKeysResponse, type MetadataOrigin, type MetadataValueCountResponse, type ModalityRateResponse, type ModelAlertListResponse, type ModelAlertResponse, type ModelRecommendationResponse, type ModelRecommendationsOptions, type ModelRecommendationsResponse, type NonManualEvaluationModeStatResponse, type NonManualEvaluationSummaryResponse, type OffsetPageOptions, type OkResponse, type OrganizationAlertPreferenceListResponse, type OrganizationAlertPreferenceResponse, type OrganizationInfoResponse, type PaginatedPage, type PaginationResponse, type PendingProcessingCompletedFailedStatus, type PlaygroundCreateRequest, type PromptModelAutoUpgradeStrategy, type PromptModelResponse, type PromptToolResponse, type ProposedActionResponse, type ProviderGroupResponse, type RemoveEmailDomainResponse, type RerankerModelListResponse, type RerankerModelResponse, type ResumeInboundResponse, SECLAI_API_URL, type SearchResponse, type SearchResultResponse, Seclai, SeclaiAPIStatusError, SeclaiAPIValidationError, SeclaiApiVersion, SeclaiConfigurationError, SeclaiError, type SeclaiOptions, SeclaiStreamingError, type SendTestEmailResponse, type SetAcceptedAttachmentsInput, type SetAcceptedAttachmentsRequest, type SetAutoBlockModeRequest, type SetEmailTriggerConfigRequest, type SetMetadataKeysRequest, type SetSlackTriggerConfigRequest, type SkippedAttachmentReason, type SkippedAttachmentResponse, type SlackReplyVisibility, type SlackTriggerActivation, type SlackTriggerConfigResponse, type SlackTriggerScope, type SolutionAgentResponse, type SolutionConversationResponse, type SolutionKnowledgeBaseResponse, type SolutionListResponse, type SolutionResponse, type SolutionSourceConnectionResponse, type SolutionSummaryResponse, type SortableListOptions, type SourceConnectionResponse, type SourceContentStatusListResponse, type SourceContentStatusResponse, type SourceEmbeddingMigrationResponse, type SourceIndexMode, type SourceListResponse, type SourceResponse, type SpendCapAction, type SpendCapDeleteOrder, type SsoCacheEntry, type SsoProfile, type StandaloneTestCompactionRequest, type StartSourceEmbeddingMigrationRequest, type TestCompactionRequest, type TestDraftEvaluationRequest, type TestDraftEvaluationResponse, type UnlinkResourcesRequest, type UnreadCountResponse, 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 };
|