@bysages/solid 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ai-response-D2uINBIi.mjs → ai-response-CJ-uEAgj.mjs} +1 -1
- package/dist/components/accordion/index.mjs +1 -1
- package/dist/components/affix/index.mjs +3 -3
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +2 -2
- package/dist/components/ai-action/index.mjs +1 -1
- package/dist/components/ai-attachments/index.mjs +1 -1
- package/dist/components/ai-message/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.mjs +38 -36
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +1 -1
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/alert/index.mjs +1 -1
- package/dist/components/angle-slider/index.d.mts +15 -1
- package/dist/components/angle-slider/index.mjs +58 -3
- package/dist/components/aspect-ratio/index.mjs +1 -1
- package/dist/components/autocomplete/index.mjs +9 -3
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/avatar-group/index.mjs +1 -1
- package/dist/components/back-top/index.mjs +1 -1
- package/dist/components/badge/index.mjs +1 -1
- package/dist/components/banner/index.mjs +1 -1
- package/dist/components/bento/index.mjs +1 -1
- package/dist/components/block-ui/index.mjs +1 -1
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.mjs +1 -1
- package/dist/components/button/index.mjs +1 -1
- package/dist/components/button-group/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +19 -7
- package/dist/components/calendar/index.mjs +213 -139
- package/dist/components/card/index.mjs +1 -1
- package/dist/components/carousel/index.d.mts +15 -1
- package/dist/components/carousel/index.mjs +69 -5
- package/dist/components/cascade-select/index.mjs +2 -2
- package/dist/components/checkbox/index.d.mts +16 -1
- package/dist/components/checkbox/index.mjs +54 -3
- package/dist/components/checkbox-group/index.d.mts +10 -3
- package/dist/components/checkbox-group/index.mjs +3 -3
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/chip/index.mjs +1 -1
- package/dist/components/clipboard/index.d.mts +14 -1
- package/dist/components/clipboard/index.mjs +58 -3
- package/dist/components/collapsible/index.mjs +1 -1
- package/dist/components/color-picker/index.mjs +1 -1
- package/dist/components/combobox/index.mjs +1 -1
- package/dist/components/command/index.mjs +1 -1
- package/dist/components/comment/index.mjs +1 -1
- package/dist/components/container/index.mjs +1 -1
- package/dist/components/data-view/index.mjs +1 -1
- package/dist/components/date-input/index.d.mts +16 -2
- package/dist/components/date-input/index.mjs +52 -3
- package/dist/components/date-picker/index.d.mts +27 -2
- package/dist/components/date-picker/index.mjs +153 -4
- package/dist/components/deferred-content/index.mjs +1 -1
- package/dist/components/descriptions/index.mjs +1 -1
- package/dist/components/dialog/index.mjs +1 -1
- package/dist/components/dock/index.mjs +1 -1
- package/dist/components/drawer/index.mjs +1 -1
- package/dist/components/dynamic-input/index.mjs +2 -2
- package/dist/components/editable/index.d.mts +17 -1
- package/dist/components/editable/index.mjs +81 -3
- package/dist/components/ellipsis/index.mjs +1 -1
- package/dist/components/empty/index.mjs +1 -1
- package/dist/components/field/index.d.mts +16 -1
- package/dist/components/field/index.mjs +53 -5
- package/dist/components/fieldset/index.d.mts +15 -3
- package/dist/components/fieldset/index.mjs +47 -5
- package/dist/components/file-upload/index.d.mts +21 -1
- package/dist/components/file-upload/index.mjs +66 -3
- package/dist/components/float-button/index.mjs +1 -1
- package/dist/components/floating-panel/index.d.mts +15 -3
- package/dist/components/floating-panel/index.mjs +113 -5
- package/dist/components/form/index.d.mts +44 -2
- package/dist/components/form/index.mjs +1 -1
- package/dist/components/grid/index.mjs +1 -1
- package/dist/components/highlight/index.mjs +1 -1
- package/dist/components/hover-card/index.mjs +1 -1
- package/dist/components/icon/index.mjs +1 -1
- package/dist/components/image/index.mjs +1 -1
- package/dist/components/image-cropper/index.d.mts +8 -1
- package/dist/components/image-cropper/index.mjs +43 -5
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input-group/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +11 -2
- package/dist/components/json-tree-view/index.mjs +17 -2
- package/dist/components/kbd/index.mjs +1 -1
- package/dist/components/layout/index.mjs +1 -1
- package/dist/components/link/index.mjs +1 -1
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/listbox/index.d.mts +21 -1
- package/dist/components/listbox/index.mjs +59 -4
- package/dist/components/marquee/index.d.mts +12 -1
- package/dist/components/marquee/index.mjs +46 -5
- package/dist/components/masonry/index.mjs +1 -1
- package/dist/components/media-player/index.mjs +1 -1
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +1 -1
- package/dist/components/menubar/index.mjs +1 -1
- package/dist/components/meter/index.mjs +1 -1
- package/dist/components/navigation-menu/index.d.mts +17 -1
- package/dist/components/navigation-menu/index.mjs +66 -6
- package/dist/components/number-input/index.d.mts +20 -1
- package/dist/components/number-input/index.mjs +72 -3
- package/dist/components/order-list/index.mjs +1 -1
- package/dist/components/page-header/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +22 -2
- package/dist/components/pagination/index.mjs +105 -6
- package/dist/components/password-input/index.d.mts +18 -1
- package/dist/components/password-input/index.mjs +57 -3
- package/dist/components/pin-input/index.d.mts +18 -1
- package/dist/components/pin-input/index.mjs +55 -3
- package/dist/components/popconfirm/index.mjs +1 -1
- package/dist/components/popover/index.mjs +1 -1
- package/dist/components/progress/index.d.mts +19 -1
- package/dist/components/progress/index.mjs +106 -7
- package/dist/components/progress-group/index.mjs +1 -1
- package/dist/components/qr-code/index.d.mts +8 -1
- package/dist/components/qr-code/index.mjs +22 -5
- package/dist/components/radio-group/index.d.mts +23 -1
- package/dist/components/radio-group/index.mjs +66 -3
- package/dist/components/rating-group/index.d.mts +15 -1
- package/dist/components/rating-group/index.mjs +52 -3
- package/dist/components/result/index.mjs +1 -1
- package/dist/components/scroll-area/index.d.mts +11 -3
- package/dist/components/scroll-area/index.mjs +37 -5
- package/dist/components/segment-group/index.d.mts +27 -4
- package/dist/components/segment-group/index.mjs +66 -7
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.mjs +1 -1
- package/dist/components/signature-pad/index.d.mts +16 -1
- package/dist/components/signature-pad/index.mjs +64 -5
- package/dist/components/skeleton/index.mjs +1 -1
- package/dist/components/slider/index.d.mts +20 -1
- package/dist/components/slider/index.mjs +67 -3
- package/dist/components/spinner/index.mjs +1 -1
- package/dist/components/split-button/index.mjs +1 -1
- package/dist/components/splitter/index.d.mts +15 -1
- package/dist/components/splitter/index.mjs +58 -5
- package/dist/components/spotlight/index.mjs +1 -1
- package/dist/components/stack/index.mjs +1 -1
- package/dist/components/stat/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +5 -1
- package/dist/components/steps/index.mjs +10 -3
- package/dist/components/swap/index.d.mts +11 -3
- package/dist/components/swap/index.mjs +35 -5
- package/dist/components/switch/index.d.mts +16 -1
- package/dist/components/switch/index.mjs +48 -3
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.mjs +36 -14
- package/dist/components/tabs/index.mjs +1 -1
- package/dist/components/tag/index.d.mts +29 -0
- package/dist/components/tag/index.mjs +108 -0
- package/dist/components/tags-input/index.d.mts +18 -1
- package/dist/components/tags-input/index.mjs +83 -3
- package/dist/components/terminal/index.mjs +1 -1
- package/dist/components/textarea/index.mjs +1 -1
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/timer/index.d.mts +12 -1
- package/dist/components/timer/index.mjs +57 -5
- package/dist/components/toast/index.d.mts +10 -5
- package/dist/components/toast/index.mjs +38 -6
- package/dist/components/toc/index.d.mts +2 -11
- package/dist/components/toc/index.mjs +1 -1
- package/dist/components/toggle/index.d.mts +8 -1
- package/dist/components/toggle/index.mjs +27 -5
- package/dist/components/toggle-group/index.d.mts +23 -1
- package/dist/components/toggle-group/index.mjs +58 -4
- package/dist/components/toolbar/index.mjs +1 -1
- package/dist/components/tooltip/index.mjs +1 -1
- package/dist/components/tour/index.mjs +1 -1
- package/dist/components/transfer/index.mjs +2 -2
- package/dist/components/tree-select/index.mjs +2 -2
- package/dist/components/tree-view/index.d.mts +32 -2
- package/dist/components/tree-view/index.mjs +94 -5
- package/dist/components/typography/index.mjs +1 -1
- package/dist/components/user/index.mjs +1 -1
- package/dist/components/virtual-list/index.mjs +1 -1
- package/dist/components/watermark/index.mjs +1 -1
- package/dist/{image-viewer-B9A5lXsk.mjs → image-viewer-19s75Hz_.mjs} +1 -1
- package/dist/index-BU5U5w04.d.mts +35 -0
- package/dist/{index-nFXK_8hJ.d.mts → index-DVc1L_zt.d.mts} +138 -89
- package/dist/index.d.mts +44 -43
- package/dist/index.mjs +9 -8
- package/dist/{input-CPAJdwDb.mjs → input-BL3N3L8g.mjs} +1 -1
- package/dist/{media-player-BC8D_d29.mjs → media-player-yF7KVUxM.mjs} +2 -2
- package/dist/{mentions-CeG5u8Qm.mjs → mentions-DKUG7eHt.mjs} +1 -1
- package/dist/{select-7YjMSBGx.mjs → select-DI7pFspF.mjs} +1 -1
- package/dist/toc-DRHr8_eD.mjs +88 -0
- package/package.json +10 -82
- package/dist/index-B1-quIrl.d.mts +0 -1815
- package/dist/toc-DYKaKQ_X.mjs +0 -31
|
@@ -11,7 +11,7 @@ import { JSONSchema7, JSONSchema7 as JSONSchema7$1 } from "json-schema";
|
|
|
11
11
|
import { $ZodType } from "zod/v4/core";
|
|
12
12
|
import * as z3 from "zod/v3";
|
|
13
13
|
import "zod/v4";
|
|
14
|
-
//#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.
|
|
14
|
+
//#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.26/node_modules/@ai-sdk/provider/dist/index.d.ts
|
|
15
15
|
//#region src/shared/v4/shared-v4-audio-format.d.ts
|
|
16
16
|
/**
|
|
17
17
|
* Audio format configuration shared by provider V4 model specifications.
|
|
@@ -1525,7 +1525,7 @@ type LanguageModelV4CallOptions = {
|
|
|
1525
1525
|
* Reasoning effort level for the model. Controls how much reasoning
|
|
1526
1526
|
* the model performs before generating a response. Defaults to 'provider-default'.
|
|
1527
1527
|
*/
|
|
1528
|
-
reasoning?: 'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1528
|
+
reasoning?: 'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
1529
1529
|
/**
|
|
1530
1530
|
* Additional provider-specific options. They are passed through
|
|
1531
1531
|
* to the provider from the AI SDK and enable provider-specific
|
|
@@ -1540,6 +1540,12 @@ type EmbeddingModelV4CallOptions = {
|
|
|
1540
1540
|
* List of text values to generate embeddings for.
|
|
1541
1541
|
*/
|
|
1542
1542
|
values: Array<string>;
|
|
1543
|
+
/**
|
|
1544
|
+
* The requested number of dimensions for the output embeddings.
|
|
1545
|
+
* Must be a positive integer. Support and allowed values depend on the model
|
|
1546
|
+
* and provider implementation.
|
|
1547
|
+
*/
|
|
1548
|
+
dimensions?: number;
|
|
1543
1549
|
/**
|
|
1544
1550
|
* Abort signal for cancelling the operation.
|
|
1545
1551
|
*/
|
|
@@ -1862,41 +1868,47 @@ type EmbeddingModelV2<VALUE> = {
|
|
|
1862
1868
|
}>;
|
|
1863
1869
|
};
|
|
1864
1870
|
//#endregion
|
|
1865
|
-
//#region src/
|
|
1866
|
-
/**
|
|
1867
|
-
type
|
|
1871
|
+
//#region src/decision-model/v4/decision-model-v4-question.d.ts
|
|
1872
|
+
/** Content for decision instructions and criteria descriptions. */
|
|
1873
|
+
type DecisionModelV4Input = string | Readonly<JSONObject> | readonly JSONValue[];
|
|
1868
1874
|
/** A judgment to make about the shared state. */
|
|
1869
|
-
type
|
|
1875
|
+
type DecisionModelV4Question = {
|
|
1870
1876
|
readonly type: 'choice';
|
|
1871
|
-
readonly instructions:
|
|
1877
|
+
readonly instructions: DecisionModelV4Input;
|
|
1872
1878
|
/** Nonempty map of option names to descriptions. Null means no description. */
|
|
1873
|
-
readonly criteria: Readonly<Record<string,
|
|
1879
|
+
readonly criteria: Readonly<Record<string, DecisionModelV4Input | null>>;
|
|
1874
1880
|
} | {
|
|
1875
1881
|
readonly type: 'score';
|
|
1876
|
-
readonly instructions:
|
|
1882
|
+
readonly instructions: DecisionModelV4Input;
|
|
1877
1883
|
/** At least two ordered levels, indexed from zero. */
|
|
1878
|
-
readonly criteria: readonly (
|
|
1884
|
+
readonly criteria: readonly (DecisionModelV4Input | null)[];
|
|
1879
1885
|
} | {
|
|
1880
1886
|
readonly type: 'boolean';
|
|
1881
|
-
readonly instructions:
|
|
1887
|
+
readonly instructions: DecisionModelV4Input;
|
|
1882
1888
|
readonly criteria?: {
|
|
1883
|
-
readonly true?:
|
|
1884
|
-
readonly false?:
|
|
1889
|
+
readonly true?: DecisionModelV4Input | null;
|
|
1890
|
+
readonly false?: DecisionModelV4Input | null;
|
|
1885
1891
|
};
|
|
1886
1892
|
};
|
|
1887
1893
|
//#endregion
|
|
1888
|
-
//#region src/
|
|
1889
|
-
type
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1894
|
+
//#region src/decision-model/v4/decision-model-v4-state.d.ts
|
|
1895
|
+
type DecisionModelV4State = readonly DecisionModelV4StatePart[];
|
|
1896
|
+
type DecisionModelV4StatePart = LanguageModelV4TextPart | LanguageModelV4FilePart | {
|
|
1897
|
+
type: 'json';
|
|
1898
|
+
value: JSONValue;
|
|
1899
|
+
};
|
|
1900
|
+
//#endregion
|
|
1901
|
+
//#region src/decision-model/v4/decision-model-v4-call-options.d.ts
|
|
1902
|
+
type DecisionModelV4CallOptions = {
|
|
1903
|
+
state: DecisionModelV4State;
|
|
1904
|
+
questions: Readonly<Record<string, DecisionModelV4Question>>;
|
|
1893
1905
|
abortSignal?: AbortSignal;
|
|
1894
1906
|
headers?: SharedV4Headers;
|
|
1895
1907
|
providerOptions?: SharedV4ProviderOptions;
|
|
1896
1908
|
};
|
|
1897
1909
|
//#endregion
|
|
1898
|
-
//#region src/
|
|
1899
|
-
type
|
|
1910
|
+
//#region src/decision-model/v4/decision-model-v4-result.d.ts
|
|
1911
|
+
type DecisionModelV4Answer = {
|
|
1900
1912
|
type: 'choice';
|
|
1901
1913
|
/** The selected option, with maximal probability when a distribution exists. */
|
|
1902
1914
|
choice: string;
|
|
@@ -1915,10 +1927,13 @@ type EvaluationModelV4Answer = {
|
|
|
1915
1927
|
type: 'boolean';
|
|
1916
1928
|
/** Model-estimated P(true), in [0, 1]. Not confidence in either outcome. */
|
|
1917
1929
|
probability: number;
|
|
1930
|
+
} | {
|
|
1931
|
+
/** The model declined to answer this question. Valid for any question type. */
|
|
1932
|
+
type: 'refusal';
|
|
1918
1933
|
};
|
|
1919
|
-
type
|
|
1934
|
+
type DecisionModelV4Result = {
|
|
1920
1935
|
/** Exactly one answer per question, under the original question IDs. */
|
|
1921
|
-
answers: Record<string,
|
|
1936
|
+
answers: Record<string, DecisionModelV4Answer>;
|
|
1922
1937
|
/**
|
|
1923
1938
|
* Decimal places used when the provider rounds its output. Omit for full
|
|
1924
1939
|
* precision. Core allows half a unit in the last place per rounded value
|
|
@@ -6231,7 +6246,7 @@ declare namespace StandardJSONSchemaV1 {
|
|
|
6231
6246
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
6232
6247
|
}
|
|
6233
6248
|
//#endregion
|
|
6234
|
-
//#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@5.0.
|
|
6249
|
+
//#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@5.0.58_zod@4.6.5/node_modules/@ai-sdk/provider-utils/dist/index.d.ts
|
|
6235
6250
|
//#region src/as-array.d.ts
|
|
6236
6251
|
/**
|
|
6237
6252
|
* A value that can be provided either as a single item, an array of items,
|
|
@@ -7511,7 +7526,7 @@ type Normalize<OBJECT> = { [KEY in keyof OBJECT]: OBJECT[KEY]; };
|
|
|
7511
7526
|
*/
|
|
7512
7527
|
type InferToolSetContext<TOOLS extends ToolSet> = Normalize<RequiredToolSetContext<TOOLS> & OptionalToolSetContext<TOOLS>>;
|
|
7513
7528
|
//#endregion
|
|
7514
|
-
//#region ../../node_modules/.pnpm/ai@7.0.
|
|
7529
|
+
//#region ../../node_modules/.pnpm/ai@7.0.137_zod@4.6.5/node_modules/ai/dist/index.d.ts
|
|
7515
7530
|
/**
|
|
7516
7531
|
* Embedding.
|
|
7517
7532
|
*/
|
|
@@ -7562,11 +7577,18 @@ declare global {
|
|
|
7562
7577
|
* - `other`: model stopped for other reasons
|
|
7563
7578
|
*/
|
|
7564
7579
|
type FinishReason = 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other';
|
|
7580
|
+
/**
|
|
7581
|
+
* Registry for call warning variants. Packages that expose additional warning
|
|
7582
|
+
* protocols can augment this interface.
|
|
7583
|
+
*/
|
|
7584
|
+
interface CallWarningRegistry {
|
|
7585
|
+
sharedV4: SharedV4Warning;
|
|
7586
|
+
}
|
|
7565
7587
|
/**
|
|
7566
7588
|
* Warning from the model provider for this call. The call will proceed, but e.g.
|
|
7567
7589
|
* some settings might not be supported, which can lead to suboptimal results.
|
|
7568
7590
|
*/
|
|
7569
|
-
type CallWarning =
|
|
7591
|
+
type CallWarning = CallWarningRegistry[keyof CallWarningRegistry];
|
|
7570
7592
|
/**
|
|
7571
7593
|
* A source that has been used as input to generate the response.
|
|
7572
7594
|
*/
|
|
@@ -7806,6 +7828,8 @@ type EmbedStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
|
7806
7828
|
readonly modelId: string;
|
|
7807
7829
|
/** The value(s) being embedded. A string for embed, an array for embedMany. */
|
|
7808
7830
|
readonly value: string | Array<string>;
|
|
7831
|
+
/** Requested output dimensions, when specified. */
|
|
7832
|
+
readonly dimensions?: number;
|
|
7809
7833
|
/** Maximum number of retries for failed requests. */
|
|
7810
7834
|
readonly maxRetries: number;
|
|
7811
7835
|
/** Additional HTTP headers sent with the request. */
|
|
@@ -7867,6 +7891,8 @@ type EmbeddingModelCallStartEvent = {
|
|
|
7867
7891
|
readonly modelId: string;
|
|
7868
7892
|
/** The values being embedded in this particular model call. */
|
|
7869
7893
|
readonly values: Array<string>;
|
|
7894
|
+
/** Requested output dimensions, when specified. */
|
|
7895
|
+
readonly dimensions?: number;
|
|
7870
7896
|
};
|
|
7871
7897
|
/**
|
|
7872
7898
|
* Event fired when an individual embedding model call (doEmbed) completes.
|
|
@@ -7891,8 +7917,15 @@ type EmbeddingModelCallEndEvent = {
|
|
|
7891
7917
|
/** Token usage for this model call. */
|
|
7892
7918
|
readonly usage: EmbeddingModelUsage;
|
|
7893
7919
|
};
|
|
7894
|
-
|
|
7895
|
-
|
|
7920
|
+
//#endregion
|
|
7921
|
+
//#region src/decide/decision-state.d.ts
|
|
7922
|
+
/** Shared text, JSON data, or ordered multimodal parts for a decision. */
|
|
7923
|
+
type DecisionState = string | Readonly<JSONObject> | readonly DecisionStatePart[];
|
|
7924
|
+
type DecisionStatePart = TextPart | FilePart | {
|
|
7925
|
+
type: 'json';
|
|
7926
|
+
value: JSONValue;
|
|
7927
|
+
};
|
|
7928
|
+
type DecisionAnswer<QUESTION extends DecisionModelV4Question> = QUESTION extends {
|
|
7896
7929
|
type: 'choice';
|
|
7897
7930
|
criteria: infer CRITERIA;
|
|
7898
7931
|
} ? {
|
|
@@ -7909,44 +7942,44 @@ type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
|
|
|
7909
7942
|
type: 'boolean';
|
|
7910
7943
|
probability: number;
|
|
7911
7944
|
};
|
|
7912
|
-
type
|
|
7913
|
-
readonly answers: { [ID in keyof QUESTIONS]:
|
|
7945
|
+
type DecisionResult<QUESTIONS extends Record<string, DecisionModelV4Question>> = {
|
|
7946
|
+
readonly answers: { [ID in keyof QUESTIONS]: DecisionAnswer<QUESTIONS[ID]>; };
|
|
7914
7947
|
readonly usage: {
|
|
7915
7948
|
inputTokens: number | undefined;
|
|
7916
7949
|
outputTokens: number | undefined;
|
|
7917
7950
|
totalTokens: number | undefined;
|
|
7918
7951
|
};
|
|
7919
|
-
readonly warnings:
|
|
7920
|
-
readonly rounding:
|
|
7921
|
-
readonly providerMetadata:
|
|
7922
|
-
readonly response: NonNullable<
|
|
7952
|
+
readonly warnings: DecisionModelV4Result['warnings'];
|
|
7953
|
+
readonly rounding: DecisionModelV4Result['rounding'];
|
|
7954
|
+
readonly providerMetadata: DecisionModelV4Result['providerMetadata'];
|
|
7955
|
+
readonly response: NonNullable<DecisionModelV4Result['response']> & {
|
|
7923
7956
|
timestamp: Date;
|
|
7924
7957
|
modelId: string;
|
|
7925
7958
|
};
|
|
7926
7959
|
};
|
|
7927
7960
|
//#endregion
|
|
7928
|
-
//#region src/
|
|
7961
|
+
//#region src/decide/decide-events.d.ts
|
|
7929
7962
|
/**
|
|
7930
|
-
* Event passed to the `onStart` callback for
|
|
7963
|
+
* Event passed to the `onStart` callback for decision operations.
|
|
7931
7964
|
*
|
|
7932
|
-
* Called when the operation begins, before the
|
|
7965
|
+
* Called when the operation begins, before the decision model is called.
|
|
7933
7966
|
*/
|
|
7934
|
-
type
|
|
7967
|
+
type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
7935
7968
|
/** User-defined runtime context. */
|
|
7936
7969
|
readonly runtimeContext: RUNTIME_CONTEXT;
|
|
7937
|
-
/** Unique identifier for this
|
|
7970
|
+
/** Unique identifier for this decision call, used to correlate events. */
|
|
7938
7971
|
readonly callId: string;
|
|
7939
|
-
/** Identifies the operation type (`ai.
|
|
7940
|
-
readonly operationId: 'ai.
|
|
7972
|
+
/** Identifies the operation type (`ai.decide`). */
|
|
7973
|
+
readonly operationId: 'ai.decide';
|
|
7941
7974
|
/** The provider identifier. */
|
|
7942
7975
|
readonly provider: string;
|
|
7943
|
-
/** The
|
|
7976
|
+
/** The decision model identifier. */
|
|
7944
7977
|
readonly modelId: string;
|
|
7945
|
-
/** The shared state
|
|
7946
|
-
readonly state:
|
|
7947
|
-
/** The questions
|
|
7948
|
-
readonly questions: Readonly<Record<string,
|
|
7949
|
-
/** Maximum number of retries for the
|
|
7978
|
+
/** The shared state used to make decisions. */
|
|
7979
|
+
readonly state: DecisionState;
|
|
7980
|
+
/** The questions to decide against the shared state. */
|
|
7981
|
+
readonly questions: Readonly<Record<string, DecisionModelV4Question>>;
|
|
7982
|
+
/** Maximum number of retries for the decision model call. */
|
|
7950
7983
|
readonly maxRetries: number;
|
|
7951
7984
|
/** Additional HTTP headers sent with the request. */
|
|
7952
7985
|
readonly headers: Record<string, string> | undefined;
|
|
@@ -7954,61 +7987,61 @@ type EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
|
7954
7987
|
readonly providerOptions: ProviderOptions;
|
|
7955
7988
|
};
|
|
7956
7989
|
/**
|
|
7957
|
-
* Event passed to the `onEnd` callback for
|
|
7990
|
+
* Event passed to the `onEnd` callback for decision operations.
|
|
7958
7991
|
*
|
|
7959
7992
|
* Called when the operation completes successfully.
|
|
7960
7993
|
*/
|
|
7961
|
-
type
|
|
7994
|
+
type DecideEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT> & {
|
|
7962
7995
|
/** Exactly one typed answer per question ID. */
|
|
7963
|
-
readonly answers:
|
|
7964
|
-
/** Token usage for the
|
|
7965
|
-
readonly usage:
|
|
7966
|
-
/** Warnings from the
|
|
7967
|
-
readonly warnings:
|
|
7996
|
+
readonly answers: DecisionResult<Record<string, DecisionModelV4Question>>['answers'];
|
|
7997
|
+
/** Token usage for the decision operation. */
|
|
7998
|
+
readonly usage: DecisionResult<Record<string, DecisionModelV4Question>>['usage'];
|
|
7999
|
+
/** Warnings from the decision model. */
|
|
8000
|
+
readonly warnings: DecisionResult<Record<string, DecisionModelV4Question>>['warnings'];
|
|
7968
8001
|
/** Provider-declared decimal precision for probabilities and scores. */
|
|
7969
|
-
readonly rounding:
|
|
8002
|
+
readonly rounding: DecisionResult<Record<string, DecisionModelV4Question>>['rounding'];
|
|
7970
8003
|
/** Optional provider-specific metadata. */
|
|
7971
|
-
readonly providerMetadata:
|
|
8004
|
+
readonly providerMetadata: DecisionResult<Record<string, DecisionModelV4Question>>['providerMetadata'];
|
|
7972
8005
|
/** Response metadata, including the resolved model ID and timestamp. */
|
|
7973
|
-
readonly response:
|
|
8006
|
+
readonly response: DecisionResult<Record<string, DecisionModelV4Question>>['response'];
|
|
7974
8007
|
};
|
|
7975
8008
|
/**
|
|
7976
|
-
* Event fired when the
|
|
8009
|
+
* Event fired when the decision model call begins.
|
|
7977
8010
|
*
|
|
7978
8011
|
* The logical model call includes any provider retries.
|
|
7979
8012
|
*/
|
|
7980
|
-
type
|
|
7981
|
-
/** Unique identifier for the outer
|
|
8013
|
+
type DecisionModelCallStartEvent = {
|
|
8014
|
+
/** Unique identifier for the outer decision call. */
|
|
7982
8015
|
readonly callId: string;
|
|
7983
|
-
/** Identifies the inner operation (`ai.
|
|
7984
|
-
readonly operationId: 'ai.
|
|
8016
|
+
/** Identifies the inner operation (`ai.decide.doDecide`). */
|
|
8017
|
+
readonly operationId: 'ai.decide.doDecide';
|
|
7985
8018
|
/** The provider identifier. */
|
|
7986
8019
|
readonly provider: string;
|
|
7987
|
-
/** The
|
|
8020
|
+
/** The decision model identifier. */
|
|
7988
8021
|
readonly modelId: string;
|
|
7989
|
-
/** The shared state
|
|
7990
|
-
readonly state:
|
|
7991
|
-
/** The questions
|
|
7992
|
-
readonly questions:
|
|
8022
|
+
/** The shared state used to make decisions. */
|
|
8023
|
+
readonly state: DecisionModelV4CallOptions['state'];
|
|
8024
|
+
/** The questions to decide against the shared state. */
|
|
8025
|
+
readonly questions: DecisionModelV4CallOptions['questions'];
|
|
7993
8026
|
};
|
|
7994
8027
|
/**
|
|
7995
|
-
* Event fired after the
|
|
8028
|
+
* Event fired after the decision model response has been validated.
|
|
7996
8029
|
*
|
|
7997
8030
|
* Contains the result of the logical model call, including any retries.
|
|
7998
8031
|
*/
|
|
7999
|
-
type
|
|
8032
|
+
type DecisionModelCallEndEvent = DecisionModelCallStartEvent & {
|
|
8000
8033
|
/** Exactly one answer per question ID. */
|
|
8001
|
-
readonly answers:
|
|
8002
|
-
/** Token usage reported by the
|
|
8003
|
-
readonly usage?:
|
|
8004
|
-
/** Warnings from the
|
|
8005
|
-
readonly warnings:
|
|
8034
|
+
readonly answers: DecisionModelV4Result['answers'];
|
|
8035
|
+
/** Token usage reported by the decision model. */
|
|
8036
|
+
readonly usage?: DecisionModelV4Result['usage'];
|
|
8037
|
+
/** Warnings from the decision model. */
|
|
8038
|
+
readonly warnings: DecisionModelV4Result['warnings'];
|
|
8006
8039
|
/** Provider-declared decimal precision for probabilities and scores. */
|
|
8007
|
-
readonly rounding?:
|
|
8040
|
+
readonly rounding?: DecisionModelV4Result['rounding'];
|
|
8008
8041
|
/** Optional provider-specific metadata. */
|
|
8009
|
-
readonly providerMetadata?:
|
|
8042
|
+
readonly providerMetadata?: DecisionModelV4Result['providerMetadata'];
|
|
8010
8043
|
/** Optional raw response metadata from the provider. */
|
|
8011
|
-
readonly response?:
|
|
8044
|
+
readonly response?: DecisionModelV4Result['response'];
|
|
8012
8045
|
};
|
|
8013
8046
|
//#endregion
|
|
8014
8047
|
//#region src/prompt/language-model-call-options.d.ts
|
|
@@ -8086,9 +8119,9 @@ type LanguageModelCallOptions = {
|
|
|
8086
8119
|
* Timeout configuration for API calls. Can be specified as:
|
|
8087
8120
|
* - A number representing milliseconds
|
|
8088
8121
|
* - An object with `totalMs` property for the total timeout in milliseconds
|
|
8089
|
-
* - An object with `stepMs` property for the timeout of each step in milliseconds
|
|
8122
|
+
* - An object with `stepMs` property for the timeout of each complete step, including model generation, retries, and local tool execution, in milliseconds
|
|
8090
8123
|
* - An object with `firstChunkMs` property for the timeout until the first content chunk of each step (streaming only)
|
|
8091
|
-
* - An object with `chunkMs` property for the timeout between
|
|
8124
|
+
* - An object with `chunkMs` property for the timeout between meaningful model output chunks, starting with the first output and ending when the model response ends (streaming only)
|
|
8092
8125
|
* - An object with `toolMs` property for the default timeout for all tool executions
|
|
8093
8126
|
* - An object with `tools` property for per-tool timeout overrides using `{toolName}Ms` keys
|
|
8094
8127
|
*/
|
|
@@ -9270,6 +9303,13 @@ type ToolUIPart<TOOLS extends UITools = UITools> = ValueOf<{ [NAME in keyof TOOL
|
|
|
9270
9303
|
} & UIToolInvocation<TOOLS[NAME]>; }>;
|
|
9271
9304
|
type DynamicToolUIPart = {
|
|
9272
9305
|
type: 'dynamic-tool';
|
|
9306
|
+
/**
|
|
9307
|
+
* `false` when a static tool part was normalized to a dynamic tool part
|
|
9308
|
+
* because its current tool schema was unavailable or incompatible.
|
|
9309
|
+
*
|
|
9310
|
+
* This preserves its static origin across persistence boundaries.
|
|
9311
|
+
*/
|
|
9312
|
+
dynamic?: false;
|
|
9273
9313
|
/**
|
|
9274
9314
|
* Name of the tool that is being called.
|
|
9275
9315
|
*/
|
|
@@ -10223,20 +10263,28 @@ interface Telemetry {
|
|
|
10223
10263
|
* Contains the ranking results from the model response.
|
|
10224
10264
|
*/
|
|
10225
10265
|
onRerankEnd?: Callback<InferTelemetryEvent<RerankingModelCallEndEvent>>;
|
|
10226
|
-
/**
|
|
10227
|
-
experimental_onEvaluateStart?: Callback<InferTelemetryEvent<
|
|
10228
|
-
/**
|
|
10229
|
-
|
|
10266
|
+
/** @deprecated Use `experimental_onDecideStart` instead. */
|
|
10267
|
+
experimental_onEvaluateStart?: Callback<InferTelemetryEvent<DecideStartEvent>>;
|
|
10268
|
+
/** @deprecated Use `experimental_onDecisionModelCallStart` instead. */
|
|
10269
|
+
experimental_onEvaluationModelCallStart?: Callback<InferTelemetryEvent<DecisionModelCallStartEvent>>;
|
|
10270
|
+
/** @deprecated Use `experimental_onDecisionModelCallEnd` instead. */
|
|
10271
|
+
experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<DecisionModelCallEndEvent>>;
|
|
10272
|
+
/** @deprecated Use `experimental_onDecideEnd` instead. */
|
|
10273
|
+
experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<DecideEndEvent>>;
|
|
10274
|
+
/** Called when an experimental decision operation begins. */
|
|
10275
|
+
experimental_onDecideStart?: Callback<InferTelemetryEvent<DecideStartEvent>>;
|
|
10276
|
+
/**
|
|
10277
|
+
* Called immediately before an experimental decision model call begins.
|
|
10230
10278
|
* The logical model call includes any provider retries.
|
|
10231
10279
|
*/
|
|
10232
|
-
|
|
10280
|
+
experimental_onDecisionModelCallStart?: Callback<InferTelemetryEvent<DecisionModelCallStartEvent>>;
|
|
10233
10281
|
/**
|
|
10234
|
-
* Called after an experimental
|
|
10282
|
+
* Called after an experimental decision model response has been validated.
|
|
10235
10283
|
* The logical model call includes any provider retries.
|
|
10236
10284
|
*/
|
|
10237
|
-
|
|
10238
|
-
/** Called when an experimental
|
|
10239
|
-
|
|
10285
|
+
experimental_onDecisionModelCallEnd?: Callback<InferTelemetryEvent<DecisionModelCallEndEvent>>;
|
|
10286
|
+
/** Called when an experimental decision operation completes. */
|
|
10287
|
+
experimental_onDecideEnd?: Callback<InferTelemetryEvent<DecideEndEvent>>;
|
|
10240
10288
|
/** Called when an experimental streaming transcription operation begins. */
|
|
10241
10289
|
experimental_onStreamTranscriptionStart?: Callback<InferTelemetryEvent<StreamTranscriptionStartEvent>>;
|
|
10242
10290
|
/** Called when an experimental streaming transcription operation completes. */
|
|
@@ -10299,7 +10347,7 @@ declare global {
|
|
|
10299
10347
|
* String model ids are resolved to the default provider and model id.
|
|
10300
10348
|
*
|
|
10301
10349
|
* If not set, the default provider is the Vercel AI gateway provider.
|
|
10302
|
-
*
|
|
10350
|
+
* An explicitly configured provider must support decision models to use experimental_decide.
|
|
10303
10351
|
*
|
|
10304
10352
|
* @see https://ai-sdk.dev/docs/ai-sdk-core/provider-management#global-provider-configuration
|
|
10305
10353
|
*/
|
|
@@ -10307,7 +10355,8 @@ declare global {
|
|
|
10307
10355
|
/**
|
|
10308
10356
|
* The warning logger to use for the AI SDK.
|
|
10309
10357
|
*
|
|
10310
|
-
* If not set,
|
|
10358
|
+
* If not set, warnings use process.emitWarning when available, otherwise
|
|
10359
|
+
* console.warn. Deprecations are emitted once per code by the default logger.
|
|
10311
10360
|
*
|
|
10312
10361
|
* If set to false, no warnings are logged.
|
|
10313
10362
|
*/
|