@cognipeer/agent-sdk 0.10.6 → 0.12.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/README.md +28 -3
- package/dist/index.cjs +1069 -235
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +289 -18
- package/dist/index.d.ts +289 -18
- package/dist/index.mjs +1068 -236
- package/dist/index.mjs.map +1 -1
- package/package.json +39 -1
package/dist/index.d.cts
CHANGED
|
@@ -72,6 +72,7 @@ interface BaseChatMessage {
|
|
|
72
72
|
name: string;
|
|
73
73
|
arguments: string;
|
|
74
74
|
};
|
|
75
|
+
thoughtSignature?: string;
|
|
75
76
|
}>;
|
|
76
77
|
tool_call_id?: string;
|
|
77
78
|
usage?: any;
|
|
@@ -2402,6 +2403,11 @@ type StreamEvent = {
|
|
|
2402
2403
|
text: string;
|
|
2403
2404
|
isFinal?: boolean;
|
|
2404
2405
|
};
|
|
2406
|
+
/** Incremental model reasoning text (providers that expose it while streaming). */
|
|
2407
|
+
type ReasoningEvent = {
|
|
2408
|
+
type: "reasoning";
|
|
2409
|
+
text: string;
|
|
2410
|
+
};
|
|
2405
2411
|
type CancelledEvent = {
|
|
2406
2412
|
type: "cancelled";
|
|
2407
2413
|
stage?: string;
|
|
@@ -2580,7 +2586,7 @@ type DelegationEventStamp = {
|
|
|
2580
2586
|
/** Name of the `asTool` child agent this forwarded event came from. */
|
|
2581
2587
|
delegatedTo?: string;
|
|
2582
2588
|
};
|
|
2583
|
-
type SmartAgentEvent = (ToolCallEvent | ToolApprovalEvent | UserQuestionEvent | PlanEvent | SummarizationEvent | FinalAnswerEvent | MetadataEvent | HandoffEvent | GuardrailEvent | ProgressEvent | StreamEvent | CancelledEvent | SubagentEvent | ReflectionEvent | PluginEvent) & DelegationEventStamp;
|
|
2589
|
+
type SmartAgentEvent = (ToolCallEvent | ToolApprovalEvent | UserQuestionEvent | PlanEvent | SummarizationEvent | FinalAnswerEvent | MetadataEvent | HandoffEvent | GuardrailEvent | ProgressEvent | StreamEvent | ReasoningEvent | CancelledEvent | SubagentEvent | ReflectionEvent | PluginEvent) & DelegationEventStamp;
|
|
2584
2590
|
type ReflectionEvent = {
|
|
2585
2591
|
type: "reflection";
|
|
2586
2592
|
id: string;
|
|
@@ -3362,6 +3368,10 @@ type ToolCall = {
|
|
|
3362
3368
|
id: string;
|
|
3363
3369
|
name: string;
|
|
3364
3370
|
arguments: string;
|
|
3371
|
+
/** Gemini `thoughtSignature` attached to a functionCall part; must be echoed back on the next turn. */
|
|
3372
|
+
thoughtSignature?: string;
|
|
3373
|
+
/** Position of the call within the assistant turn. Set on streamed deltas so a consumer can frame them (OpenAI `tool_calls[].index`). */
|
|
3374
|
+
index?: number;
|
|
3365
3375
|
};
|
|
3366
3376
|
/**
|
|
3367
3377
|
* A provider-native reasoning/thinking block. Captured from the model response
|
|
@@ -3406,6 +3416,10 @@ type ChatCompletionRequest = {
|
|
|
3406
3416
|
maxTokens?: number;
|
|
3407
3417
|
topP?: number;
|
|
3408
3418
|
stop?: string[];
|
|
3419
|
+
/** OpenAI-family only; other providers ignore it. */
|
|
3420
|
+
presencePenalty?: number;
|
|
3421
|
+
/** OpenAI-family only; other providers ignore it. */
|
|
3422
|
+
frequencyPenalty?: number;
|
|
3409
3423
|
tools?: ToolDefinition[];
|
|
3410
3424
|
toolChoice?: "auto" | "required" | "none" | {
|
|
3411
3425
|
name: string;
|
|
@@ -3416,6 +3430,21 @@ type ChatCompletionRequest = {
|
|
|
3416
3430
|
name?: string;
|
|
3417
3431
|
};
|
|
3418
3432
|
stream?: boolean;
|
|
3433
|
+
/**
|
|
3434
|
+
* Streaming only. `false` opts out of `stream_options.include_usage` on
|
|
3435
|
+
* OpenAI-shaped endpoints (some servers reject the option). Default true.
|
|
3436
|
+
*/
|
|
3437
|
+
streamUsage?: boolean;
|
|
3438
|
+
/** OpenAI-family: deterministic sampling seed. Passed through. */
|
|
3439
|
+
seed?: number;
|
|
3440
|
+
/** OpenAI-family: number of choices. Pass-through only; only choice 0 is parsed. */
|
|
3441
|
+
n?: number;
|
|
3442
|
+
/** OpenAI-family: allow/forbid parallel tool calls. Passed through when set. */
|
|
3443
|
+
parallelToolCalls?: boolean;
|
|
3444
|
+
/** OpenAI-family: return token log probabilities. Passed through. */
|
|
3445
|
+
logprobs?: boolean;
|
|
3446
|
+
/** OpenAI-family: how many top log probabilities per token. Passed through. */
|
|
3447
|
+
topLogprobs?: number;
|
|
3419
3448
|
extra?: Record<string, any>;
|
|
3420
3449
|
/**
|
|
3421
3450
|
* Unified native-reasoning request config. Each provider maps this to its
|
|
@@ -3452,7 +3481,13 @@ type ReasoningRequestConfig = {
|
|
|
3452
3481
|
effort?: ReasoningEffort;
|
|
3453
3482
|
/** Explicit per-call token budget for reasoning/thinking. */
|
|
3454
3483
|
budgetTokens?: number;
|
|
3455
|
-
/**
|
|
3484
|
+
/**
|
|
3485
|
+
* Gemini 3 style discrete thinking level (e.g. "low" | "high"). Sent as
|
|
3486
|
+
* `thinkingConfig.thinkingLevel` and replaces the derived `thinkingBudget`
|
|
3487
|
+
* (the API rejects both together). Ignored by other providers.
|
|
3488
|
+
*/
|
|
3489
|
+
thinkingLevel?: string;
|
|
3490
|
+
/** Whether the provider should expose its reasoning/thought summary to the caller. Gemini: default false. Claude adaptive thinking (5.x): default summarized (`thinking.display = "summarized"`) unless this is `false`; never added when the caller passes an explicit `extra.thinking`. */
|
|
3456
3491
|
includeThoughts?: boolean;
|
|
3457
3492
|
/** Provider-specific passthrough merged on top of the mapped shape. */
|
|
3458
3493
|
providerExtras?: Record<string, any>;
|
|
@@ -3468,6 +3503,14 @@ type TokenUsage = {
|
|
|
3468
3503
|
};
|
|
3469
3504
|
declare function emptyUsage(): TokenUsage;
|
|
3470
3505
|
type FinishReason = "stop" | "tool_calls" | "length" | "content_filter" | "error";
|
|
3506
|
+
type ProviderResponseFields = {
|
|
3507
|
+
system_fingerprint?: string;
|
|
3508
|
+
service_tier?: string;
|
|
3509
|
+
annotations?: any[];
|
|
3510
|
+
refusal?: string | null;
|
|
3511
|
+
logprobs?: any;
|
|
3512
|
+
[key: string]: any;
|
|
3513
|
+
};
|
|
3471
3514
|
type ChatCompletionResponse = {
|
|
3472
3515
|
id: string;
|
|
3473
3516
|
model: string;
|
|
@@ -3475,6 +3518,13 @@ type ChatCompletionResponse = {
|
|
|
3475
3518
|
toolCalls: ToolCall[];
|
|
3476
3519
|
usage: TokenUsage;
|
|
3477
3520
|
finishReason: FinishReason;
|
|
3521
|
+
/** The provider's own finish/stop reason string, unnormalised (e.g. "end_turn", "function_call"). */
|
|
3522
|
+
rawFinishReason?: string;
|
|
3523
|
+
/**
|
|
3524
|
+
* Provider response fields the unified shape has no slot for, kept when present:
|
|
3525
|
+
* `system_fingerprint`, `service_tier`, `annotations`, `refusal`, `logprobs`.
|
|
3526
|
+
*/
|
|
3527
|
+
providerFields?: ProviderResponseFields;
|
|
3478
3528
|
/** Native reasoning blocks + summary captured from the response, if any. */
|
|
3479
3529
|
reasoning?: ReasoningPayload;
|
|
3480
3530
|
raw: any;
|
|
@@ -3490,6 +3540,41 @@ type ChatCompletionChunk = {
|
|
|
3490
3540
|
};
|
|
3491
3541
|
usage?: TokenUsage;
|
|
3492
3542
|
finishReason?: FinishReason;
|
|
3543
|
+
/** The provider's own finish reason string, unnormalised. Present on the chunk that carries it. */
|
|
3544
|
+
rawFinishReason?: string;
|
|
3545
|
+
/** See ChatCompletionResponse.providerFields; per-chunk (fingerprint, tier, delta refusal/annotations, logprobs). */
|
|
3546
|
+
providerFields?: ProviderResponseFields;
|
|
3547
|
+
};
|
|
3548
|
+
/** Why the text is being embedded; mapped to each provider's own task/input type. */
|
|
3549
|
+
type EmbeddingInputType = "search_document" | "search_query" | "classification" | "clustering" | "semantic_similarity" | "question_answering" | "fact_verification" | "code_retrieval_query" | (string & {});
|
|
3550
|
+
type EmbeddingRequest = {
|
|
3551
|
+
/** Model id (OpenAI/compatible), deployment name (Azure), model id (Bedrock), model name (Vertex). */
|
|
3552
|
+
model: string;
|
|
3553
|
+
/** Texts to embed. One vector per entry, in the same order. */
|
|
3554
|
+
input: string[];
|
|
3555
|
+
/** Requested output dimensions, for models that support shortening (OpenAI v3, Titan v2, Cohere v4, Gemini). */
|
|
3556
|
+
dimensions?: number;
|
|
3557
|
+
/** OpenAI-shaped endpoints: wire encoding. Vectors are always returned as number[] either way. */
|
|
3558
|
+
encodingFormat?: "float" | "base64";
|
|
3559
|
+
/** Task hint (Cohere on Bedrock, Gemini on Vertex). Ignored by providers without one. */
|
|
3560
|
+
inputType?: EmbeddingInputType;
|
|
3561
|
+
/** Max texts per HTTP request. Defaults per provider (OpenAI 2048, Vertex 100, Gemini-embedding 1, Titan 1). */
|
|
3562
|
+
batchSize?: number;
|
|
3563
|
+
/** Provider-specific fields merged into each request body (escape hatch). */
|
|
3564
|
+
extra?: Record<string, any>;
|
|
3565
|
+
signal?: AbortSignal;
|
|
3566
|
+
};
|
|
3567
|
+
type EmbeddingUsage = {
|
|
3568
|
+
inputTokens: number;
|
|
3569
|
+
totalTokens: number;
|
|
3570
|
+
};
|
|
3571
|
+
type EmbeddingResponse = {
|
|
3572
|
+
model: string;
|
|
3573
|
+
/** One vector per input, in input order. */
|
|
3574
|
+
vectors: number[][];
|
|
3575
|
+
usage: EmbeddingUsage;
|
|
3576
|
+
/** Raw provider responses, one per HTTP request made. */
|
|
3577
|
+
raw: any[];
|
|
3493
3578
|
};
|
|
3494
3579
|
type ProviderRetryConfig = {
|
|
3495
3580
|
/** Maximum retries on 429/5xx (default 3). */
|
|
@@ -3501,7 +3586,27 @@ type ProviderRetryConfig = {
|
|
|
3501
3586
|
/** Custom predicate to opt in/out of a specific retry. */
|
|
3502
3587
|
shouldRetry?: (error: any, attempt: number) => boolean;
|
|
3503
3588
|
};
|
|
3504
|
-
|
|
3589
|
+
/** Transport options shared by every provider config. */
|
|
3590
|
+
type ProviderTransportConfig = {
|
|
3591
|
+
/**
|
|
3592
|
+
* Custom `fetch` used at EVERY HTTP call site of the provider (chat, stream,
|
|
3593
|
+
* Responses, token exchange). Lets a host inject an SSRF-safe or proxied
|
|
3594
|
+
* fetch. Defaults to the global `fetch`.
|
|
3595
|
+
*/
|
|
3596
|
+
fetch?: typeof fetch;
|
|
3597
|
+
/**
|
|
3598
|
+
* Per-request timeout in ms, measured until the response headers arrive
|
|
3599
|
+
* (an established stream is not cut by it). Default: none.
|
|
3600
|
+
*/
|
|
3601
|
+
timeoutMs?: number;
|
|
3602
|
+
};
|
|
3603
|
+
type OpenAIProviderConfig = ProviderTransportConfig & {
|
|
3604
|
+
/**
|
|
3605
|
+
* Which token-limit field to send: `max_tokens` or `max_completion_tokens`.
|
|
3606
|
+
* `auto` (default) uses `max_completion_tokens` for o-series / gpt-5 models
|
|
3607
|
+
* and `max_tokens` otherwise.
|
|
3608
|
+
*/
|
|
3609
|
+
maxTokensParam?: "auto" | "max_tokens" | "max_completion_tokens";
|
|
3505
3610
|
provider: "openai";
|
|
3506
3611
|
apiKey: string;
|
|
3507
3612
|
baseURL?: string;
|
|
@@ -3510,9 +3615,13 @@ type OpenAIProviderConfig = {
|
|
|
3510
3615
|
defaultHeaders?: Record<string, string>;
|
|
3511
3616
|
retry?: ProviderRetryConfig;
|
|
3512
3617
|
/**
|
|
3618
|
+
* @deprecated Use `api: "chat" | "responses" | "auto"`. Kept as an alias:
|
|
3619
|
+
* `never` = chat, `always` = responses, `auto` = the name-based heuristic.
|
|
3620
|
+
* When `api` is also set, `api` wins.
|
|
3621
|
+
*
|
|
3513
3622
|
* WHICH API a reasoning-carrying request is addressed to.
|
|
3514
3623
|
*
|
|
3515
|
-
* auto (default
|
|
3624
|
+
* auto (the default for OpenAI and Azure) route to the Responses API when
|
|
3516
3625
|
* the request carries `reasoning` AND the model name looks like an
|
|
3517
3626
|
* o-series/gpt-5 reasoning model.
|
|
3518
3627
|
* never always Chat Completions. `reasoning` is still mapped, as
|
|
@@ -3531,9 +3640,25 @@ type OpenAIProviderConfig = {
|
|
|
3531
3640
|
* where it matters most: a self-hosted model is named by whoever served it.
|
|
3532
3641
|
*/
|
|
3533
3642
|
responsesApi?: "auto" | "never" | "always";
|
|
3643
|
+
/** @internal Set by OpenAICompatibleProvider: `auto` then means Chat Completions. */
|
|
3644
|
+
_autoMeansChat?: boolean;
|
|
3645
|
+
/**
|
|
3646
|
+
* Which upstream API requests are sent to. `"auto"` (default) keeps the
|
|
3647
|
+
* 0.11 behaviour of each class: OpenAI and Azure use Responses when the
|
|
3648
|
+
* request carries `reasoning` and the model name looks like an o-series /
|
|
3649
|
+
* gpt-5 model, otherwise Chat Completions; OpenAI-compatible always uses
|
|
3650
|
+
* Chat Completions (the model name is the server operator's). `"chat"` always
|
|
3651
|
+
* sends Chat Completions. `"responses"`
|
|
3652
|
+
* sends every request to the Responses API (`POST /responses`) and streams it
|
|
3653
|
+
* over real SSE (text, tool-call arguments and reasoning-summary deltas;
|
|
3654
|
+
* set `responsesStreaming: false` to get one non-streaming call instead).
|
|
3655
|
+
* Works on `OpenAIProvider`, `AzureProvider` and `OpenAICompatibleProvider`.
|
|
3656
|
+
* When set, it wins over the deprecated `responsesApi`.
|
|
3657
|
+
*/
|
|
3658
|
+
api?: "chat" | "responses" | "auto";
|
|
3534
3659
|
/**
|
|
3535
3660
|
* Models that go to the Responses API, named explicitly. Opt-in; unset by
|
|
3536
|
-
* default
|
|
3661
|
+
* default.
|
|
3537
3662
|
*
|
|
3538
3663
|
* A string matches the request's model (or `defaultModel`) exactly; a RegExp
|
|
3539
3664
|
* is tested against it. A match routes the request to Responses whether or
|
|
@@ -3551,19 +3676,20 @@ type OpenAIProviderConfig = {
|
|
|
3551
3676
|
* `stream_options.include_usage` dropped.
|
|
3552
3677
|
* - real SSE streaming, when `responsesStreaming` is also true.
|
|
3553
3678
|
*
|
|
3554
|
-
* Honoured by `OpenAIProvider
|
|
3555
|
-
* `OpenAICompatibleProvider`
|
|
3679
|
+
* Honoured by `OpenAIProvider`, `AzureProvider` and
|
|
3680
|
+
* `OpenAICompatibleProvider` alike.
|
|
3556
3681
|
*/
|
|
3557
3682
|
responsesApiModels?: Array<string | RegExp>;
|
|
3558
3683
|
/**
|
|
3559
|
-
* Stream Responses API output as it arrives (text
|
|
3560
|
-
* deltas) for
|
|
3561
|
-
*
|
|
3562
|
-
*
|
|
3684
|
+
* Stream Responses API output as it arrives (text, tool-call argument and
|
|
3685
|
+
* reasoning-summary deltas) for `api: "responses"` and for models in
|
|
3686
|
+
* `responsesApiModels`. Default true with `api: "responses"`, false
|
|
3687
|
+
* otherwise (one non-streaming Responses call emitted as a single chunk).
|
|
3688
|
+
* Has no effect on Chat Completions requests.
|
|
3563
3689
|
*/
|
|
3564
3690
|
responsesStreaming?: boolean;
|
|
3565
3691
|
};
|
|
3566
|
-
type AnthropicProviderConfig = {
|
|
3692
|
+
type AnthropicProviderConfig = ProviderTransportConfig & {
|
|
3567
3693
|
provider: "anthropic";
|
|
3568
3694
|
apiKey: string;
|
|
3569
3695
|
baseURL?: string;
|
|
@@ -3579,26 +3705,55 @@ type AnthropicProviderConfig = {
|
|
|
3579
3705
|
prompt_caching?: {
|
|
3580
3706
|
enabled: boolean;
|
|
3581
3707
|
};
|
|
3708
|
+
/**
|
|
3709
|
+
* Thinking request shape. `auto` (default) picks per model id: Claude 5.x
|
|
3710
|
+
* and newer use `thinking:{type:"adaptive"}` + `output_config.effort`, older
|
|
3711
|
+
* models use `thinking:{type:"enabled", budget_tokens}`. Force one with
|
|
3712
|
+
* `adaptive` / `budget`. On the specific 400 for the wrong shape the
|
|
3713
|
+
* provider retries once with the other form.
|
|
3714
|
+
*/
|
|
3715
|
+
thinkingMode?: "auto" | "adaptive" | "budget";
|
|
3582
3716
|
};
|
|
3583
|
-
type AzureProviderConfig = {
|
|
3717
|
+
type AzureProviderConfig = ProviderTransportConfig & {
|
|
3584
3718
|
provider: "azure";
|
|
3719
|
+
retry?: ProviderRetryConfig;
|
|
3720
|
+
/** See OpenAIProviderConfig.maxTokensParam. */
|
|
3721
|
+
maxTokensParam?: "auto" | "max_tokens" | "max_completion_tokens";
|
|
3585
3722
|
apiKey: string;
|
|
3586
3723
|
endpoint: string;
|
|
3587
3724
|
apiVersion?: string;
|
|
3588
3725
|
deploymentName?: string;
|
|
3589
3726
|
defaultModel?: string;
|
|
3590
3727
|
defaultHeaders?: Record<string, string>;
|
|
3728
|
+
/** See OpenAIProviderConfig.api. Default "auto". */
|
|
3729
|
+
api?: "chat" | "responses" | "auto";
|
|
3730
|
+
/** @deprecated Use `api`. */
|
|
3731
|
+
responsesApi?: "auto" | "never" | "always";
|
|
3732
|
+
responsesApiModels?: Array<string | RegExp>;
|
|
3733
|
+
responsesStreaming?: boolean;
|
|
3591
3734
|
};
|
|
3592
|
-
type OpenAICompatibleProviderConfig = {
|
|
3735
|
+
type OpenAICompatibleProviderConfig = ProviderTransportConfig & {
|
|
3593
3736
|
provider: "openai-compatible";
|
|
3737
|
+
organization?: string;
|
|
3738
|
+
retry?: ProviderRetryConfig;
|
|
3739
|
+
/** @deprecated Use `api`. Default: see `api`. */
|
|
3740
|
+
responsesApi?: "auto" | "never" | "always";
|
|
3741
|
+
/** See OpenAIProviderConfig.api. Default "auto". */
|
|
3742
|
+
api?: "chat" | "responses" | "auto";
|
|
3743
|
+
responsesApiModels?: Array<string | RegExp>;
|
|
3744
|
+
responsesStreaming?: boolean;
|
|
3745
|
+
/** See OpenAIProviderConfig.maxTokensParam. Compatible servers default to `auto`. */
|
|
3746
|
+
maxTokensParam?: "auto" | "max_tokens" | "max_completion_tokens";
|
|
3594
3747
|
apiKey: string;
|
|
3595
3748
|
baseURL: string;
|
|
3596
3749
|
defaultModel?: string;
|
|
3597
3750
|
defaultHeaders?: Record<string, string>;
|
|
3598
3751
|
};
|
|
3599
|
-
type BedrockProviderConfig = {
|
|
3752
|
+
type BedrockProviderConfig = ProviderTransportConfig & {
|
|
3600
3753
|
provider: "bedrock";
|
|
3601
3754
|
region: string;
|
|
3755
|
+
/** Thinking request shape for Claude models: `auto` (by model id), `adaptive` or `budget`. */
|
|
3756
|
+
thinkingMode?: "auto" | "adaptive" | "budget";
|
|
3602
3757
|
accessKeyId?: string;
|
|
3603
3758
|
secretAccessKey?: string;
|
|
3604
3759
|
sessionToken?: string;
|
|
@@ -3614,7 +3769,7 @@ type BedrockProviderConfig = {
|
|
|
3614
3769
|
enabled: boolean;
|
|
3615
3770
|
};
|
|
3616
3771
|
};
|
|
3617
|
-
type VertexProviderConfig = {
|
|
3772
|
+
type VertexProviderConfig = ProviderTransportConfig & {
|
|
3618
3773
|
provider: "vertex";
|
|
3619
3774
|
projectId: string;
|
|
3620
3775
|
location?: string;
|
|
@@ -3622,8 +3777,10 @@ type VertexProviderConfig = {
|
|
|
3622
3777
|
serviceAccountJson?: string | Record<string, any>;
|
|
3623
3778
|
defaultModel?: string;
|
|
3624
3779
|
defaultHeaders?: Record<string, string>;
|
|
3780
|
+
/** Retry policy for 429/5xx (default 3 retries, exponential backoff). */
|
|
3781
|
+
retry?: ProviderRetryConfig;
|
|
3625
3782
|
};
|
|
3626
|
-
type JevProviderConfig = {
|
|
3783
|
+
type JevProviderConfig = ProviderTransportConfig & {
|
|
3627
3784
|
provider: "jev";
|
|
3628
3785
|
apiKey: string;
|
|
3629
3786
|
/** Defaults to https://api.typesafe.ai. */
|
|
@@ -3657,6 +3814,30 @@ type ProviderRetryPolicy = {
|
|
|
3657
3814
|
declare abstract class BaseProvider {
|
|
3658
3815
|
abstract readonly providerName: ProviderType;
|
|
3659
3816
|
protected retryPolicy: ProviderRetryPolicy;
|
|
3817
|
+
/** Injected `fetch` (config.fetch); falls back to the global one at call time. */
|
|
3818
|
+
protected fetchImpl?: typeof fetch;
|
|
3819
|
+
/** Per-request timeout in ms (config.timeoutMs). Undefined = no timeout. */
|
|
3820
|
+
protected timeoutMs?: number;
|
|
3821
|
+
/** Applies the transport options shared by every provider config. */
|
|
3822
|
+
protected configureTransport(config: {
|
|
3823
|
+
fetch?: typeof fetch;
|
|
3824
|
+
timeoutMs?: number;
|
|
3825
|
+
}): void;
|
|
3826
|
+
/**
|
|
3827
|
+
* The single HTTP entry point for every provider call site. Uses the
|
|
3828
|
+
* configured `fetch` and applies `timeoutMs`: the timer covers the time until
|
|
3829
|
+
* the response HEADERS arrive and is cleared after that, so a long-running
|
|
3830
|
+
* stream is never cut by it (use the request `signal` to cancel a stream).
|
|
3831
|
+
* A timeout surfaces as a `ProviderError` with status 408. The caller's
|
|
3832
|
+
* `signal` still aborts the request as before.
|
|
3833
|
+
*/
|
|
3834
|
+
protected httpFetch(url: string, init?: RequestInit): Promise<Response>;
|
|
3835
|
+
/**
|
|
3836
|
+
* Embeds `request.input`. Implemented by the providers that have an
|
|
3837
|
+
* embeddings endpoint (OpenAI, Azure, openai-compatible, Bedrock, Vertex);
|
|
3838
|
+
* the others reject with a 400 ProviderError.
|
|
3839
|
+
*/
|
|
3840
|
+
embed(_request: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
3660
3841
|
/** Non-streaming completion */
|
|
3661
3842
|
abstract complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
3662
3843
|
/** Streaming completion – yields incremental chunks */
|
|
@@ -5674,6 +5855,9 @@ declare function buildResponseFormatSection(responseFormat: Record<string, any>
|
|
|
5674
5855
|
*/
|
|
5675
5856
|
declare function startStreamingSession(session: TraceSessionRuntime | undefined, agentRuntime?: AgentRuntimeConfig): Promise<void>;
|
|
5676
5857
|
|
|
5858
|
+
/** True for Claude model ids of major version 5+ (or the `fable` line). */
|
|
5859
|
+
declare function supportsAdaptiveThinking(model: unknown): boolean;
|
|
5860
|
+
|
|
5677
5861
|
declare class OpenAIProvider extends BaseProvider {
|
|
5678
5862
|
readonly providerName: ProviderType;
|
|
5679
5863
|
protected readonly apiKey: string;
|
|
@@ -5683,6 +5867,11 @@ declare class OpenAIProvider extends BaseProvider {
|
|
|
5683
5867
|
protected readonly responsesApi: "auto" | "never" | "always";
|
|
5684
5868
|
private readonly responsesApiModels;
|
|
5685
5869
|
private readonly responsesStreaming;
|
|
5870
|
+
private readonly apiExplicitChat;
|
|
5871
|
+
private readonly apiExplicitResponses;
|
|
5872
|
+
/** `api: "responses"` was passed (the legacy `responsesApi: "always"` keeps its old single-call behaviour). */
|
|
5873
|
+
private readonly apiResponsesNative;
|
|
5874
|
+
protected readonly maxTokensParam: "auto" | "max_tokens" | "max_completion_tokens";
|
|
5686
5875
|
constructor(config: OpenAIProviderConfig);
|
|
5687
5876
|
/** True when the caller listed this request's model in `responsesApiModels`. */
|
|
5688
5877
|
private isResponsesApiModel;
|
|
@@ -5701,6 +5890,9 @@ declare class OpenAIProvider extends BaseProvider {
|
|
|
5701
5890
|
protected useResponsesApi(request: ChatCompletionRequest): boolean;
|
|
5702
5891
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
5703
5892
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
5893
|
+
/** POST /embeddings, batched (default 2048 inputs per request, the OpenAI cap). */
|
|
5894
|
+
embed(request: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
5895
|
+
protected embeddingsFetch(body: Record<string, any>, signal?: AbortSignal): Promise<Response>;
|
|
5704
5896
|
protected buildRequestBody(request: ChatCompletionRequest, stream: boolean): Record<string, any>;
|
|
5705
5897
|
protected completeResponses(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
5706
5898
|
/** Real Responses SSE streaming, for models opted in through
|
|
@@ -5731,6 +5923,7 @@ declare class AnthropicProvider extends BaseProvider {
|
|
|
5731
5923
|
private readonly defaultHeaders;
|
|
5732
5924
|
private readonly anthropicVersion;
|
|
5733
5925
|
private readonly promptCachingEnabled;
|
|
5926
|
+
private readonly thinkingMode;
|
|
5734
5927
|
constructor(config: AnthropicProviderConfig);
|
|
5735
5928
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
5736
5929
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
@@ -5750,6 +5943,9 @@ declare class AnthropicProvider extends BaseProvider {
|
|
|
5750
5943
|
private toAnthropicToolResult;
|
|
5751
5944
|
private toAnthropicMessage;
|
|
5752
5945
|
private toAnthropicTool;
|
|
5946
|
+
/** Builds and sends the request; retries once with the other thinking form
|
|
5947
|
+
* when the upstream rejects the one we picked. */
|
|
5948
|
+
private send;
|
|
5753
5949
|
private doFetch;
|
|
5754
5950
|
private parseResponse;
|
|
5755
5951
|
}
|
|
@@ -5762,6 +5958,9 @@ declare class AzureProvider extends OpenAIProvider {
|
|
|
5762
5958
|
private readonly azureApiKey;
|
|
5763
5959
|
constructor(config: AzureProviderConfig);
|
|
5764
5960
|
protected doFetch(body: Record<string, any>, signal?: AbortSignal): Promise<Response>;
|
|
5961
|
+
/** Azure embeddings: the deployment named by the request's model (falling back
|
|
5962
|
+
* to the configured deployment) in the path, api-key auth. */
|
|
5963
|
+
protected embeddingsFetch(body: Record<string, any>, signal?: AbortSignal): Promise<Response>;
|
|
5765
5964
|
/** Azure exposes the Responses API at /openai/responses with api-key auth.
|
|
5766
5965
|
* Reasoning summaries require a preview api-version; callers can override via
|
|
5767
5966
|
* the `apiVersion` config. */
|
|
@@ -5780,9 +5979,28 @@ declare class BedrockProvider extends BaseProvider {
|
|
|
5780
5979
|
private readonly defaultModel;
|
|
5781
5980
|
private readonly defaultHeaders;
|
|
5782
5981
|
private readonly promptCachingEnabled;
|
|
5982
|
+
private readonly thinkingMode;
|
|
5783
5983
|
constructor(config: BedrockProviderConfig);
|
|
5784
5984
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
5985
|
+
/**
|
|
5986
|
+
* Real streaming over ConverseStream. The response is an AWS event-stream
|
|
5987
|
+
* (binary frames); each frame carries one JSON event: messageStart,
|
|
5988
|
+
* contentBlockStart/Delta/Stop (text, toolUse, reasoningContent),
|
|
5989
|
+
* messageStop and, last, metadata (usage). Text, tool-call argument and
|
|
5990
|
+
* reasoning deltas are yielded as they arrive; one closing chunk carries the
|
|
5991
|
+
* finish reason, usage and the signed reasoning blocks.
|
|
5992
|
+
*/
|
|
5785
5993
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
5994
|
+
/**
|
|
5995
|
+
* InvokeModel embeddings. Supported families (by model id, inference-profile
|
|
5996
|
+
* prefixes such as `us.` allowed):
|
|
5997
|
+
* - Amazon Titan Text Embeddings (v1, v2): one text per call, `dimensions`
|
|
5998
|
+
* (v2: 256/512/1024) and `normalize` via `extra`.
|
|
5999
|
+
* - Cohere Embed (v3, v4): a batch of texts per call (default 96), `inputType`
|
|
6000
|
+
* maps to `input_type`, `dimensions` to `output_dimension` (v4).
|
|
6001
|
+
*/
|
|
6002
|
+
embed(request: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
6003
|
+
private invokeModel;
|
|
5786
6004
|
private buildConverseBody;
|
|
5787
6005
|
private splitSystemMessages;
|
|
5788
6006
|
/**
|
|
@@ -5800,6 +6018,9 @@ declare class BedrockProvider extends BaseProvider {
|
|
|
5800
6018
|
private toBedrockToolResult;
|
|
5801
6019
|
private toBedrockMessage;
|
|
5802
6020
|
private toBedrockTool;
|
|
6021
|
+
/** Sends the Converse call; retries once with toolChoice auto when the
|
|
6022
|
+
* model rejects forced tool use. */
|
|
6023
|
+
private converseFetch;
|
|
5803
6024
|
private doFetch;
|
|
5804
6025
|
private parseResponse;
|
|
5805
6026
|
}
|
|
@@ -5816,6 +6037,13 @@ declare class VertexProvider extends BaseProvider {
|
|
|
5816
6037
|
constructor(config: VertexProviderConfig);
|
|
5817
6038
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
5818
6039
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
6040
|
+
/**
|
|
6041
|
+
* Vertex `:predict` embeddings (text-embedding-00x, text-multilingual-embedding,
|
|
6042
|
+
* gemini-embedding-001). `inputType` maps to the task type; `dimensions` to
|
|
6043
|
+
* `outputDimensionality`. gemini-embedding takes one instance per request, the
|
|
6044
|
+
* text-embedding models up to `batchSize` (default 100).
|
|
6045
|
+
*/
|
|
6046
|
+
embed(request: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
5819
6047
|
private buildUrl;
|
|
5820
6048
|
private buildGeminiBody;
|
|
5821
6049
|
private buildContents;
|
|
@@ -5840,7 +6068,50 @@ type NativeModelOptions = {
|
|
|
5840
6068
|
extra?: Record<string, any>;
|
|
5841
6069
|
/** Unified native reasoning config applied by default (per-call overrides supported). */
|
|
5842
6070
|
reasoning?: ReasoningRequestConfig;
|
|
6071
|
+
/** Default nucleus sampling. */
|
|
6072
|
+
topP?: number;
|
|
6073
|
+
/** Default stop sequences. */
|
|
6074
|
+
stop?: string[];
|
|
6075
|
+
/** Default presence penalty (OpenAI-family only). */
|
|
6076
|
+
presencePenalty?: number;
|
|
6077
|
+
/** Default frequency penalty (OpenAI-family only). */
|
|
6078
|
+
frequencyPenalty?: number;
|
|
6079
|
+
/**
|
|
6080
|
+
* Last-mile hook: receives the fully built request (tools, response format,
|
|
6081
|
+
* reasoning already applied) right before it goes to the provider. Mutate it
|
|
6082
|
+
* in place or return a replacement. Use it for model-specific rules the
|
|
6083
|
+
* unified request cannot express (e.g. force `reasoning` off when tools are bound).
|
|
6084
|
+
*/
|
|
6085
|
+
transformRequest?: (request: ChatCompletionRequest) => ChatCompletionRequest | void | Promise<ChatCompletionRequest | void>;
|
|
6086
|
+
};
|
|
6087
|
+
/**
|
|
6088
|
+
* The ONE usage shape carried on every assistant message produced by a native
|
|
6089
|
+
* provider (`message.usage`, and mirrored on `response_metadata.token_usage`):
|
|
6090
|
+
*
|
|
6091
|
+
* ```
|
|
6092
|
+
* {
|
|
6093
|
+
* prompt_tokens, completion_tokens, total_tokens,
|
|
6094
|
+
* prompt_tokens_details: { cached_tokens, cache_write_tokens },
|
|
6095
|
+
* completion_tokens_details: { reasoning_tokens },
|
|
6096
|
+
* }
|
|
6097
|
+
* ```
|
|
6098
|
+
* `completion_tokens` INCLUDES `reasoning_tokens`; `prompt_tokens` INCLUDES
|
|
6099
|
+
* `cached_tokens`. `response_metadata.token_usage` additionally keeps the flat
|
|
6100
|
+
* legacy `cached_tokens` / `cache_write_tokens` keys.
|
|
6101
|
+
*/
|
|
6102
|
+
type MessageUsage = {
|
|
6103
|
+
prompt_tokens: number;
|
|
6104
|
+
completion_tokens: number;
|
|
6105
|
+
total_tokens: number;
|
|
6106
|
+
prompt_tokens_details: {
|
|
6107
|
+
cached_tokens: number;
|
|
6108
|
+
cache_write_tokens: number;
|
|
6109
|
+
};
|
|
6110
|
+
completion_tokens_details: {
|
|
6111
|
+
reasoning_tokens: number;
|
|
6112
|
+
};
|
|
5843
6113
|
};
|
|
6114
|
+
declare function toMessageUsage(u: TokenUsage): MessageUsage;
|
|
5844
6115
|
/**
|
|
5845
6116
|
* Creates a BaseChatModel from a native provider.
|
|
5846
6117
|
*
|
|
@@ -5877,4 +6148,4 @@ declare function fromNativeProvider(provider: BaseProvider, options?: NativeMode
|
|
|
5877
6148
|
*/
|
|
5878
6149
|
declare function createProvider(config: ProviderConfig): BaseProvider;
|
|
5879
6150
|
|
|
5880
|
-
export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentPlugin, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, type ApprovalTransport, type AudioContent, type AuditEntry, type AuditLogConfig, type AzureContentSafetyConfig, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, type BedrockGuardrailConfig, BedrockProvider, type BedrockProviderConfig, type BudgetGuardConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONSOLE_HOOK_MAP, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type CapabilityStatus, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type CheckpointPluginConfig, type CheckpointStore, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CognipeerGuardrailConfig, type CompressToolOutputParams, type ContextBuilder, type ContextPilotCCRConfig, type ContextPilotCacheAlignmentConfig, type ContextPilotCompressionConfig, type ContextPilotCompressionStats, type ContextPilotCompressorKind, type ContextPilotConfig, type ContextPilotDedupConfig, type ContextPilotDiffCompressionConfig, type ContextPilotJsonCompressionConfig, type ContextPilotLogCompressionConfig, type ContextPilotResult, type ContextPilotRuntime, type ContextPilotSearchCompressionConfig, type ContextPilotTextCompressionConfig, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type ConversationPluginConfig, type ConversationStore, type CostEstimator, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_MAX_TOOL_INPUT_FIELD_CHARS, DEFAULT_PROFILE_CONFIGS, DEFAULT_SKILL_POLICY, DEFAULT_SUBAGENT_POLICY, DEFAULT_SUBAGENT_TOOL_NAMES, DEFAULT_TOOL_INPUT_DIGEST_HEAD_CHARS, DELEGATION_TOOL_NAMES, DedupTracker, type DelegationEventStamp, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FileContent, type FinalAnswerEvent, type FinishReason, type GateResult, type GuardrailCallContext, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailJudgeEngine, type GuardrailOutcome, GuardrailPhase, type GuardrailPhaseName, type GuardrailPluginOptions, type GuardrailRequest, type GuardrailRule, type GuardrailRuleResult, type GuardrailTransport, type GuardrailVerdict, type GuardrailViolation, HOOK_CONTRACT_VERSION, HOOK_NAMES, type HandoffDescriptor, type HandoffEvent, type HookContext, type HookDecision, type HookHandler, type HookMap, type HookName, type HookRegistrations, HookTimeoutError, type HttpGuardrailOptions, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, type ImageContent, InMemoryMemoryStore, type InjectionScan, type InvokeConfig, type JevClientLike, type JevEngineOptions, type JevNoulAnswer, JevProvider, type JevProviderConfig, type JevQuestion, type JevSystemOneRequest, type JevSystemOneResult, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type LangfuseBuildContext, type LangfuseEvent, type LangfuseEventKind, type LangfuseTracingConfig, type LanguageGuardConfig, type LoadSkillsOptions, type MaybePromise, type McpConfig, type McpConnection, type MediaAttachment, type MediaKind$1 as MediaKind, type MediaPolicyConfig, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MetadataEvent, type ModelCapabilities, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, type OpenAICompatibleProviderConfig, type OpenAIModerationConfig, OpenAIProvider, type OpenAIProviderConfig, type OtelTracingConfig, type OutputGuardConfig, PREOPEN_TOOL_CALL_PREFIX, type PendingToolApproval, type PendingUserQuestion, type PiiDetector, type PiiEntity, type PiiRedactionConfig, type PlanEvent, type PlanStepRecord, type PlanningMode, type PluginContributions, type PluginEvent, type PluginFailureMode, type PluginHost, type PluginHostOptions, type PluginLogger, type PluginProvides, type PluginRunHost, type PluginSetupContext, type PortkeyGatewayConfig, type PortkeyGuardrailConfig, type PreopenSkillsResult, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type PromptHooks, type PromptInjectionFamily, type PromptInjectionGuardConfig, type PromptSource, type ProviderConfig, ProviderError, type ToolCall as ProviderToolCall, type ToolDefinition as ProviderToolDefinition, type ProviderType, type RateLimitConfig, type ReasoningConfig, type ReasoningLevel, type RedactionResult, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionHookContext, type ReflectionRecord, type RegexGuardrailConfig, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type ResponseCacheConfig, type RestoreSnapshotOptions, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SdkCapabilities, type SerializableSmartState, type SessionMetrics, type SessionMetricsConfig, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillSource, type SkillToolDeps, type SkillToolHeader, type SlotName, type SmartAgentBudgetConfig, type SmartAgentContextConfig, type SmartAgentCustomProfileConfig, type SmartAgentDelegationConfig, type SmartAgentEvent, type SmartAgentInstance, type SmartAgentLimits, type SmartAgentMemoryConfig, type SmartAgentOptions, type SmartAgentPlanningConfig, type SmartAgentSummarizationConfig, type SmartAgentToolResponseConfig, type SmartAgentTracingConfig, type SmartModel, type SmartState, type SmartToolFn, type SnapshotOptions, type SnapshotRuntimeHint, type StreamChunk, type StreamEvent, type StrictRestorers, type StrictTransform, type StructuredOutputError, type StructuredOutputFieldError, StructuredOutputManager, type StructuredOutputManagerConfig, type StructuredOutputResult, type StructuredOutputStrategy, type StructuredSummary, type SubagentDef, type SubagentEvent, type SubagentMode, type SubagentPendingRecord, type SubagentPolicy, type SubagentRegistryRef, type SubagentResult, type SubagentToolDeps, type SubagentToolNames, type SummarizationEvent, type SummarizationMode, type SummarizerInput, type SummarizerResult, type SummarizerStrategy, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TextContent, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolPolicyConfig, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, type ToolRetryPolicy, type ToolRule, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessagePart, type TraceMessageSection, type TraceMetadataSection, type TraceSessionConfigSnapshot, type TraceSessionFile, type TraceSessionStatus, type TraceSessionSummary, type TraceSinkCognipeerConfig, type TraceSinkConfig, type TraceSinkCustomConfig, type TraceSinkFileConfig, type TraceSinkHttpConfig, type TraceSinkOtlpConfig, type TraceSinkSnapshot, type TraceSummarySection, type TraceToolCallSection, type TraceToolDefinition, type TraceToolDefinitionsSection, type TraceToolDetails, type TraceToolResponseSection, type TraceToolResultSection, type TracingConfig, type TracingMode, type UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, type VertexProviderConfig, type VolatileContentFinding, type VolatileContentPattern, type WebhookApprovalConfig, agentVerdictRule, appendBoundTools, auditLog, azureContentSafety, bedrockGuardrail, budgetGuard, buildHandoffTools, buildResponseFormatSection, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, buildToolDefinitionsSection, canOpenSkill, canSpawn, captureSnapshot, checkpointing, codePresenceRule, coerceToolArgs, cognipeerGuardrail, cognipeerSink, collectAttachments, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, contentPartToText, contentToString, conversationHistory, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createGuardrailPlugin, createJsonGuardrail, createManageTodoListAliasTool, createManageTodoTool, createOpenSkillTool, createParallelTool, createPluginHost, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customGuardrail, customSink, dedupeToolsByName, defaultTokenCounter, defineHook, definePlugin, describeContentPart, detectLanguage, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, emptyUsage, evaluateGuardrails, extractLatestUserQuery, extractMessageText, fileCheckpointStore, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasMediaPart, hasToolResponseRecoveryReference, httpGuardrail, httpSink, inMemoryCheckpointStore, inMemoryConversationStore, isHookImplemented, isOpenAIHostedEndpoint, isSmartModel, isValidIban, isValidLuhn, isValidTckn, jsonSchemaRule, defaultBuildPayload as langfuseDefaultPayload, langfuseTracing, languageGuard, loadSkillsFromDisk, mapConsoleHookVerdict, mapTextParts, mcp, mediaKindOf, mediaPolicy, normalizeSmartAgentOptions, normalizeVerdicts, openAIModeration, otelTracing, otlpSink, outputGuard, parseApprovalDecision, parseSkillFrontmatter, pathSandbox, piiRedaction, pluginCapabilities, portkeyGateway, portkeyGuardrail, preopenSkills, preopenToolCallId, prepareStrictToolMenu, promptInjectionGuard, rateLimit, readMemoryFacts, redactText, regexGuardrail, regexRule, replaceTextContent, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, responseCache, restoreSnapshot, restoreToolCalls, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, sessionMetrics, setTokenCounter, startStreamingSession, summarizeObject, textFromContent, toStrictCompatible, toStrictToolSchema, tokenize, toolPolicy, traceSessionToOtlp, validateReasoningConfig, validateToolArgs, webhookApproval, withTools, withinDepth, writeSummaryFactsToMemory };
|
|
6151
|
+
export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentPlugin, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, type ApprovalTransport, type AudioContent, type AuditEntry, type AuditLogConfig, type AzureContentSafetyConfig, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, type BedrockGuardrailConfig, BedrockProvider, type BedrockProviderConfig, type BudgetGuardConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONSOLE_HOOK_MAP, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type CapabilityStatus, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type CheckpointPluginConfig, type CheckpointStore, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CognipeerGuardrailConfig, type CompressToolOutputParams, type ContextBuilder, type ContextPilotCCRConfig, type ContextPilotCacheAlignmentConfig, type ContextPilotCompressionConfig, type ContextPilotCompressionStats, type ContextPilotCompressorKind, type ContextPilotConfig, type ContextPilotDedupConfig, type ContextPilotDiffCompressionConfig, type ContextPilotJsonCompressionConfig, type ContextPilotLogCompressionConfig, type ContextPilotResult, type ContextPilotRuntime, type ContextPilotSearchCompressionConfig, type ContextPilotTextCompressionConfig, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type ConversationPluginConfig, type ConversationStore, type CostEstimator, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_MAX_TOOL_INPUT_FIELD_CHARS, DEFAULT_PROFILE_CONFIGS, DEFAULT_SKILL_POLICY, DEFAULT_SUBAGENT_POLICY, DEFAULT_SUBAGENT_TOOL_NAMES, DEFAULT_TOOL_INPUT_DIGEST_HEAD_CHARS, DELEGATION_TOOL_NAMES, DedupTracker, type DelegationEventStamp, type DelegationMode, type EmbeddingInputType, type EmbeddingRequest, type EmbeddingResponse, type EmbeddingUsage, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FileContent, type FinalAnswerEvent, type FinishReason, type GateResult, type GuardrailCallContext, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailJudgeEngine, type GuardrailOutcome, GuardrailPhase, type GuardrailPhaseName, type GuardrailPluginOptions, type GuardrailRequest, type GuardrailRule, type GuardrailRuleResult, type GuardrailTransport, type GuardrailVerdict, type GuardrailViolation, HOOK_CONTRACT_VERSION, HOOK_NAMES, type HandoffDescriptor, type HandoffEvent, type HookContext, type HookDecision, type HookHandler, type HookMap, type HookName, type HookRegistrations, HookTimeoutError, type HttpGuardrailOptions, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, type ImageContent, InMemoryMemoryStore, type InjectionScan, type InvokeConfig, type JevClientLike, type JevEngineOptions, type JevNoulAnswer, JevProvider, type JevProviderConfig, type JevQuestion, type JevSystemOneRequest, type JevSystemOneResult, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type LangfuseBuildContext, type LangfuseEvent, type LangfuseEventKind, type LangfuseTracingConfig, type LanguageGuardConfig, type LoadSkillsOptions, type MaybePromise, type McpConfig, type McpConnection, type MediaAttachment, type MediaKind$1 as MediaKind, type MediaPolicyConfig, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MessageUsage, type MetadataEvent, type ModelCapabilities, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, type OpenAICompatibleProviderConfig, type OpenAIModerationConfig, OpenAIProvider, type OpenAIProviderConfig, type OtelTracingConfig, type OutputGuardConfig, PREOPEN_TOOL_CALL_PREFIX, type PendingToolApproval, type PendingUserQuestion, type PiiDetector, type PiiEntity, type PiiRedactionConfig, type PlanEvent, type PlanStepRecord, type PlanningMode, type PluginContributions, type PluginEvent, type PluginFailureMode, type PluginHost, type PluginHostOptions, type PluginLogger, type PluginProvides, type PluginRunHost, type PluginSetupContext, type PortkeyGatewayConfig, type PortkeyGuardrailConfig, type PreopenSkillsResult, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type PromptHooks, type PromptInjectionFamily, type PromptInjectionGuardConfig, type PromptSource, type ProviderConfig, ProviderError, type ProviderResponseFields, type ToolCall as ProviderToolCall, type ToolDefinition as ProviderToolDefinition, type ProviderTransportConfig, type ProviderType, type RateLimitConfig, type ReasoningConfig, type ReasoningLevel, type RedactionResult, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionHookContext, type ReflectionRecord, type RegexGuardrailConfig, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type ResponseCacheConfig, type RestoreSnapshotOptions, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SdkCapabilities, type SerializableSmartState, type SessionMetrics, type SessionMetricsConfig, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillSource, type SkillToolDeps, type SkillToolHeader, type SlotName, type SmartAgentBudgetConfig, type SmartAgentContextConfig, type SmartAgentCustomProfileConfig, type SmartAgentDelegationConfig, type SmartAgentEvent, type SmartAgentInstance, type SmartAgentLimits, type SmartAgentMemoryConfig, type SmartAgentOptions, type SmartAgentPlanningConfig, type SmartAgentSummarizationConfig, type SmartAgentToolResponseConfig, type SmartAgentTracingConfig, type SmartModel, type SmartState, type SmartToolFn, type SnapshotOptions, type SnapshotRuntimeHint, type StreamChunk, type StreamEvent, type StrictRestorers, type StrictTransform, type StructuredOutputError, type StructuredOutputFieldError, StructuredOutputManager, type StructuredOutputManagerConfig, type StructuredOutputResult, type StructuredOutputStrategy, type StructuredSummary, type SubagentDef, type SubagentEvent, type SubagentMode, type SubagentPendingRecord, type SubagentPolicy, type SubagentRegistryRef, type SubagentResult, type SubagentToolDeps, type SubagentToolNames, type SummarizationEvent, type SummarizationMode, type SummarizerInput, type SummarizerResult, type SummarizerStrategy, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TextContent, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolPolicyConfig, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, type ToolRetryPolicy, type ToolRule, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessagePart, type TraceMessageSection, type TraceMetadataSection, type TraceSessionConfigSnapshot, type TraceSessionFile, type TraceSessionStatus, type TraceSessionSummary, type TraceSinkCognipeerConfig, type TraceSinkConfig, type TraceSinkCustomConfig, type TraceSinkFileConfig, type TraceSinkHttpConfig, type TraceSinkOtlpConfig, type TraceSinkSnapshot, type TraceSummarySection, type TraceToolCallSection, type TraceToolDefinition, type TraceToolDefinitionsSection, type TraceToolDetails, type TraceToolResponseSection, type TraceToolResultSection, type TracingConfig, type TracingMode, type UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, type VertexProviderConfig, type VolatileContentFinding, type VolatileContentPattern, type WebhookApprovalConfig, agentVerdictRule, appendBoundTools, auditLog, azureContentSafety, bedrockGuardrail, budgetGuard, buildHandoffTools, buildResponseFormatSection, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, buildToolDefinitionsSection, canOpenSkill, canSpawn, captureSnapshot, checkpointing, codePresenceRule, coerceToolArgs, cognipeerGuardrail, cognipeerSink, collectAttachments, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, contentPartToText, contentToString, conversationHistory, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createGuardrailPlugin, createJsonGuardrail, createManageTodoListAliasTool, createManageTodoTool, createOpenSkillTool, createParallelTool, createPluginHost, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customGuardrail, customSink, dedupeToolsByName, defaultTokenCounter, defineHook, definePlugin, describeContentPart, detectLanguage, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, emptyUsage, evaluateGuardrails, extractLatestUserQuery, extractMessageText, fileCheckpointStore, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasMediaPart, hasToolResponseRecoveryReference, httpGuardrail, httpSink, inMemoryCheckpointStore, inMemoryConversationStore, isHookImplemented, isOpenAIHostedEndpoint, isSmartModel, isValidIban, isValidLuhn, isValidTckn, jsonSchemaRule, defaultBuildPayload as langfuseDefaultPayload, langfuseTracing, languageGuard, loadSkillsFromDisk, mapConsoleHookVerdict, mapTextParts, mcp, mediaKindOf, mediaPolicy, normalizeSmartAgentOptions, normalizeVerdicts, openAIModeration, otelTracing, otlpSink, outputGuard, parseApprovalDecision, parseSkillFrontmatter, pathSandbox, piiRedaction, pluginCapabilities, portkeyGateway, portkeyGuardrail, preopenSkills, preopenToolCallId, prepareStrictToolMenu, promptInjectionGuard, rateLimit, readMemoryFacts, redactText, regexGuardrail, regexRule, replaceTextContent, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, responseCache, restoreSnapshot, restoreToolCalls, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, sessionMetrics, setTokenCounter, startStreamingSession, summarizeObject, supportsAdaptiveThinking, textFromContent, toMessageUsage, toStrictCompatible, toStrictToolSchema, tokenize, toolPolicy, traceSessionToOtlp, validateReasoningConfig, validateToolArgs, webhookApproval, withTools, withinDepth, writeSummaryFactsToMemory };
|