From 36c37e62ddb7068d2a764165f6a7ed65f688e12f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Apr 2026 14:34:21 +0000 Subject: [PATCH] docs: regenerate API documentation --- docs/reference/classes/BatchStrategy.md | 8 +- docs/reference/classes/CompositeStrategy.md | 8 +- docs/reference/classes/ImmediateStrategy.md | 4 +- docs/reference/classes/PartialJSONParser.md | 4 +- docs/reference/classes/PunctuationStrategy.md | 4 +- docs/reference/classes/StreamProcessor.md | 46 ++++----- docs/reference/classes/ToolCallManager.md | 18 ++-- .../reference/classes/WordBoundaryStrategy.md | 4 +- docs/reference/functions/chat.md | 2 +- docs/reference/functions/combineStrategies.md | 2 +- .../convertMessagesToModelMessages.md | 2 +- .../functions/convertSchemaToJsonSchema.md | 2 +- docs/reference/functions/createChatOptions.md | 2 +- .../functions/createFrozenRegistry.md | 2 +- .../reference/functions/createImageOptions.md | 2 +- docs/reference/functions/createModel.md | 2 +- .../reference/functions/createReplayStream.md | 2 +- .../functions/createSpeechOptions.md | 2 +- .../functions/createSummarizeOptions.md | 2 +- .../reference/functions/createToolRegistry.md | 2 +- .../functions/createTranscriptionOptions.md | 2 +- .../reference/functions/createVideoOptions.md | 2 +- .../functions/detectImageMimeType.md | 2 +- docs/reference/functions/extendAdapter.md | 2 +- docs/reference/functions/generateImage.md | 2 +- docs/reference/functions/generateMessageId.md | 2 +- docs/reference/functions/generateSpeech.md | 2 +- .../functions/generateTranscription.md | 2 +- docs/reference/functions/generateVideo.md | 2 +- docs/reference/functions/getVideoJobStatus.md | 2 +- docs/reference/functions/maxIterations.md | 2 +- .../functions/modelMessageToUIMessage.md | 2 +- .../functions/modelMessagesToUIMessages.md | 2 +- .../functions/normalizeToUIMessage.md | 2 +- docs/reference/functions/parsePartialJSON.md | 2 +- docs/reference/functions/realtimeToken.md | 2 +- docs/reference/functions/streamToText.md | 2 +- docs/reference/functions/summarize.md | 2 +- docs/reference/functions/toHttpResponse.md | 2 +- docs/reference/functions/toHttpStream.md | 2 +- .../functions/toServerSentEventsResponse.md | 4 +- .../functions/toServerSentEventsStream.md | 4 +- docs/reference/functions/toolDefinition.md | 2 +- .../functions/uiMessageToModelMessages.md | 2 +- docs/reference/functions/untilFinishReason.md | 2 +- docs/reference/index.md | 11 ++- docs/reference/interfaces/AbortInfo.md | 6 +- .../reference/interfaces/AfterToolCallInfo.md | 18 ++-- docs/reference/interfaces/AgentLoopState.md | 8 +- docs/reference/interfaces/AudioPart.md | 8 +- .../interfaces/AudioVisualization.md | 22 ++--- docs/reference/interfaces/BaseAGUIEvent.md | 63 +++--------- docs/reference/interfaces/ChatMiddleware.md | 26 ++--- .../interfaces/ChatMiddlewareConfig.md | 18 ++-- .../interfaces/ChatMiddlewareContext.md | 50 +++++----- docs/reference/interfaces/ChunkRecording.md | 14 +-- docs/reference/interfaces/ChunkStrategy.md | 6 +- docs/reference/interfaces/ClientTool.md | 20 ++-- .../interfaces/ContentPartDataSource.md | 8 +- .../interfaces/ContentPartUrlSource.md | 8 +- docs/reference/interfaces/CustomEvent.md | 87 +++------------- .../DefaultMessageMetadataByModality.md | 12 +-- docs/reference/interfaces/DocumentPart.md | 8 +- docs/reference/interfaces/ErrorInfo.md | 6 +- docs/reference/interfaces/ExtendedModelDef.md | 8 +- docs/reference/interfaces/FinishInfo.md | 10 +- docs/reference/interfaces/GeneratedImage.md | 8 +- docs/reference/interfaces/ImageAdapter.md | 12 +-- .../interfaces/ImageGenerationOptions.md | 12 +-- .../interfaces/ImageGenerationResult.md | 10 +- docs/reference/interfaces/ImagePart.md | 8 +- .../interfaces/InternalToolCallState.md | 14 +-- docs/reference/interfaces/IterationInfo.md | 6 +- docs/reference/interfaces/JSONParser.md | 4 +- docs/reference/interfaces/JSONSchema.md | 76 +++++++------- .../interfaces/MessagesSnapshotEvent.md | 73 +++----------- docs/reference/interfaces/ModelMessage.md | 12 +-- docs/reference/interfaces/ProcessorResult.md | 10 +- docs/reference/interfaces/ProcessorState.md | 14 +-- .../reference/interfaces/RealtimeAudioPart.md | 10 +- docs/reference/interfaces/RealtimeError.md | 8 +- .../interfaces/RealtimeEventPayloads.md | 18 ++-- .../reference/interfaces/RealtimeImagePart.md | 8 +- docs/reference/interfaces/RealtimeMessage.md | 16 +-- .../interfaces/RealtimeSessionConfig.md | 24 ++--- docs/reference/interfaces/RealtimeTextPart.md | 6 +- docs/reference/interfaces/RealtimeToken.md | 10 +- .../interfaces/RealtimeTokenAdapter.md | 6 +- .../interfaces/RealtimeTokenOptions.md | 4 +- .../interfaces/RealtimeToolCallPart.md | 14 +-- .../interfaces/RealtimeToolResultPart.md | 8 +- .../ReasoningEncryptedValueEvent.md | 35 +++++++ .../reference/interfaces/ReasoningEndEvent.md | 35 +++++++ .../ReasoningMessageContentEvent.md | 35 +++++++ .../interfaces/ReasoningMessageEndEvent.md | 35 +++++++ .../interfaces/ReasoningMessageStartEvent.md | 35 +++++++ .../interfaces/ReasoningStartEvent.md | 35 +++++++ docs/reference/interfaces/ResponseFormat.md | 8 +- docs/reference/interfaces/RunErrorEvent.md | 92 +++++------------ docs/reference/interfaces/RunFinishedEvent.md | 83 +++------------- docs/reference/interfaces/RunStartedEvent.md | 87 +++------------- docs/reference/interfaces/ServerTool.md | 20 ++-- docs/reference/interfaces/StateDeltaEvent.md | 69 ++----------- .../interfaces/StateSnapshotEvent.md | 72 ++++---------- .../reference/interfaces/StepFinishedEvent.md | 84 +++++----------- docs/reference/interfaces/StepStartedEvent.md | 74 ++++---------- .../interfaces/StreamProcessorEvents.md | 22 ++--- .../interfaces/StreamProcessorOptions.md | 12 +-- .../interfaces/SummarizationOptions.md | 12 +-- .../interfaces/SummarizationResult.md | 10 +- docs/reference/interfaces/SummarizeAdapter.md | 14 +-- docs/reference/interfaces/TTSAdapter.md | 12 +-- docs/reference/interfaces/TTSOptions.md | 14 +-- docs/reference/interfaces/TTSResult.md | 14 +-- docs/reference/interfaces/TextAdapter.md | 14 +-- .../interfaces/TextCompletionChunk.md | 14 +-- .../interfaces/TextMessageContentEvent.md | 89 +++-------------- .../interfaces/TextMessageEndEvent.md | 69 ++----------- .../interfaces/TextMessageStartEvent.md | 81 ++------------- docs/reference/interfaces/TextOptions.md | 57 ++++++++--- docs/reference/interfaces/TextPart.md | 8 +- docs/reference/interfaces/ThinkingPart.md | 6 +- docs/reference/interfaces/Tool.md | 18 ++-- docs/reference/interfaces/ToolCall.md | 10 +- .../reference/interfaces/ToolCallArgsEvent.md | 89 +++-------------- docs/reference/interfaces/ToolCallEndEvent.md | 88 +++++------------ .../interfaces/ToolCallHookContext.md | 12 +-- docs/reference/interfaces/ToolCallPart.md | 16 +-- .../interfaces/ToolCallResultEvent.md | 35 +++++++ .../interfaces/ToolCallStartEvent.md | 98 ++++--------------- docs/reference/interfaces/ToolConfig.md | 2 +- docs/reference/interfaces/ToolDefinition.md | 24 ++--- .../interfaces/ToolDefinitionConfig.md | 16 +-- .../interfaces/ToolDefinitionInstance.md | 20 ++-- .../interfaces/ToolExecutionContext.md | 6 +- .../interfaces/ToolPhaseCompleteInfo.md | 10 +- docs/reference/interfaces/ToolRegistry.md | 14 +-- docs/reference/interfaces/ToolResultPart.md | 12 +-- .../interfaces/TranscriptionAdapter.md | 12 +-- .../interfaces/TranscriptionOptions.md | 14 +-- .../interfaces/TranscriptionResult.md | 16 +-- .../interfaces/TranscriptionSegment.md | 14 +-- .../reference/interfaces/TranscriptionWord.md | 8 +- docs/reference/interfaces/UIMessage.md | 10 +- docs/reference/interfaces/UsageInfo.md | 8 +- docs/reference/interfaces/VADConfig.md | 8 +- docs/reference/interfaces/VideoAdapter.md | 16 +-- .../interfaces/VideoGenerationOptions.md | 12 +-- docs/reference/interfaces/VideoJobResult.md | 6 +- docs/reference/interfaces/VideoPart.md | 8 +- .../reference/interfaces/VideoStatusResult.md | 10 +- docs/reference/interfaces/VideoUrlResult.md | 8 +- docs/reference/type-aliases/AGUIEvent.md | 11 ++- docs/reference/type-aliases/AGUIEventType.md | 27 ++--- docs/reference/type-aliases/AIAdapter.md | 2 +- .../type-aliases/AgentLoopStrategy.md | 2 +- docs/reference/type-aliases/AnyClientTool.md | 2 +- .../reference/type-aliases/AnyImageAdapter.md | 2 +- .../type-aliases/AnySummarizeAdapter.md | 2 +- docs/reference/type-aliases/AnyTTSAdapter.md | 2 +- docs/reference/type-aliases/AnyTextAdapter.md | 2 +- .../type-aliases/AnyTranscriptionAdapter.md | 2 +- .../reference/type-aliases/AnyVideoAdapter.md | 2 +- .../type-aliases/BeforeToolCallDecision.md | 2 +- .../type-aliases/ChatMiddlewarePhase.md | 2 +- .../type-aliases/ConstrainedContent.md | 2 +- .../type-aliases/ConstrainedModelMessage.md | 2 +- docs/reference/type-aliases/ContentPart.md | 2 +- .../ContentPartForInputModalitiesTypes.md | 2 +- .../type-aliases/ContentPartSource.md | 2 +- .../reference/type-aliases/InferSchemaType.md | 2 +- docs/reference/type-aliases/InferToolInput.md | 2 +- docs/reference/type-aliases/InferToolName.md | 2 +- .../reference/type-aliases/InferToolOutput.md | 2 +- .../type-aliases/InputModalitiesTypes.md | 6 +- docs/reference/type-aliases/MessagePart.md | 2 +- .../type-aliases/ModalitiesArrayToUnion.md | 2 +- docs/reference/type-aliases/Modality.md | 2 +- .../type-aliases/RealtimeErrorCode.md | 2 +- docs/reference/type-aliases/RealtimeEvent.md | 2 +- .../type-aliases/RealtimeEventHandler.md | 2 +- .../type-aliases/RealtimeMessagePart.md | 2 +- docs/reference/type-aliases/RealtimeMode.md | 2 +- docs/reference/type-aliases/RealtimeStatus.md | 2 +- docs/reference/type-aliases/SchemaInput.md | 2 +- docs/reference/type-aliases/StreamChunk.md | 2 +- .../reference/type-aliases/StreamChunkType.md | 8 +- docs/reference/type-aliases/ToolCallState.md | 2 +- .../reference/type-aliases/ToolResultState.md | 2 +- docs/reference/variables/defaultJSONParser.md | 2 +- 190 files changed, 1221 insertions(+), 1748 deletions(-) create mode 100644 docs/reference/interfaces/ReasoningEncryptedValueEvent.md create mode 100644 docs/reference/interfaces/ReasoningEndEvent.md create mode 100644 docs/reference/interfaces/ReasoningMessageContentEvent.md create mode 100644 docs/reference/interfaces/ReasoningMessageEndEvent.md create mode 100644 docs/reference/interfaces/ReasoningMessageStartEvent.md create mode 100644 docs/reference/interfaces/ReasoningStartEvent.md create mode 100644 docs/reference/interfaces/ToolCallResultEvent.md diff --git a/docs/reference/classes/BatchStrategy.md b/docs/reference/classes/BatchStrategy.md index 555db34f03..3038659a8d 100644 --- a/docs/reference/classes/BatchStrategy.md +++ b/docs/reference/classes/BatchStrategy.md @@ -5,7 +5,7 @@ title: BatchStrategy # Class: BatchStrategy -Defined in: [activities/chat/stream/strategies.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L34) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L34) Batch Strategy - emit every N chunks Useful for reducing UI update frequency @@ -22,7 +22,7 @@ Useful for reducing UI update frequency new BatchStrategy(batchSize): BatchStrategy; ``` -Defined in: [activities/chat/stream/strategies.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L37) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L37) #### Parameters @@ -42,7 +42,7 @@ Defined in: [activities/chat/stream/strategies.ts:37](https://github.com/TanStac reset(): void; ``` -Defined in: [activities/chat/stream/strategies.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L48) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L48) Optional: Reset strategy state (called when streaming starts) @@ -62,7 +62,7 @@ Optional: Reset strategy state (called when streaming starts) shouldEmit(_chunk, _accumulated): boolean; ``` -Defined in: [activities/chat/stream/strategies.ts:39](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L39) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:39](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L39) Called for each text chunk received diff --git a/docs/reference/classes/CompositeStrategy.md b/docs/reference/classes/CompositeStrategy.md index 2b4e0347ef..584f00d57f 100644 --- a/docs/reference/classes/CompositeStrategy.md +++ b/docs/reference/classes/CompositeStrategy.md @@ -5,7 +5,7 @@ title: CompositeStrategy # Class: CompositeStrategy -Defined in: [activities/chat/stream/strategies.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L68) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L68) Composite Strategy - combine multiple strategies (OR logic) Emits if ANY strategy says to emit @@ -22,7 +22,7 @@ Emits if ANY strategy says to emit new CompositeStrategy(strategies): CompositeStrategy; ``` -Defined in: [activities/chat/stream/strategies.ts:69](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L69) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:69](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L69) #### Parameters @@ -42,7 +42,7 @@ Defined in: [activities/chat/stream/strategies.ts:69](https://github.com/TanStac reset(): void; ``` -Defined in: [activities/chat/stream/strategies.ts:75](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L75) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:75](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L75) Optional: Reset strategy state (called when streaming starts) @@ -62,7 +62,7 @@ Optional: Reset strategy state (called when streaming starts) shouldEmit(chunk, accumulated): boolean; ``` -Defined in: [activities/chat/stream/strategies.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L71) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L71) Called for each text chunk received diff --git a/docs/reference/classes/ImmediateStrategy.md b/docs/reference/classes/ImmediateStrategy.md index 7d3504e0ae..50c0c2bd79 100644 --- a/docs/reference/classes/ImmediateStrategy.md +++ b/docs/reference/classes/ImmediateStrategy.md @@ -5,7 +5,7 @@ title: ImmediateStrategy # Class: ImmediateStrategy -Defined in: [activities/chat/stream/strategies.ts:12](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L12) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:12](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L12) Immediate Strategy - emit on every chunk (default behavior) @@ -33,7 +33,7 @@ new ImmediateStrategy(): ImmediateStrategy; shouldEmit(_chunk, _accumulated): boolean; ``` -Defined in: [activities/chat/stream/strategies.ts:13](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L13) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:13](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L13) Called for each text chunk received diff --git a/docs/reference/classes/PartialJSONParser.md b/docs/reference/classes/PartialJSONParser.md index d60510d446..6842d87492 100644 --- a/docs/reference/classes/PartialJSONParser.md +++ b/docs/reference/classes/PartialJSONParser.md @@ -5,7 +5,7 @@ title: PartialJSONParser # Class: PartialJSONParser -Defined in: [activities/chat/stream/json-parser.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L25) +Defined in: [packages/typescript/ai/src/activities/chat/stream/json-parser.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L25) Partial JSON Parser implementation using the partial-json library This parser can handle incomplete JSON strings during streaming @@ -34,7 +34,7 @@ new PartialJSONParser(): PartialJSONParser; parse(jsonString): any; ``` -Defined in: [activities/chat/stream/json-parser.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L31) +Defined in: [packages/typescript/ai/src/activities/chat/stream/json-parser.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L31) Parse a potentially incomplete JSON string diff --git a/docs/reference/classes/PunctuationStrategy.md b/docs/reference/classes/PunctuationStrategy.md index cdc403dbbd..8e899c8f60 100644 --- a/docs/reference/classes/PunctuationStrategy.md +++ b/docs/reference/classes/PunctuationStrategy.md @@ -5,7 +5,7 @@ title: PunctuationStrategy # Class: PunctuationStrategy -Defined in: [activities/chat/stream/strategies.ts:22](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L22) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:22](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L22) Punctuation Strategy - emit when chunk contains punctuation Useful for natural text flow in UI @@ -34,7 +34,7 @@ new PunctuationStrategy(): PunctuationStrategy; shouldEmit(chunk, _accumulated): boolean; ``` -Defined in: [activities/chat/stream/strategies.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L25) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L25) Called for each text chunk received diff --git a/docs/reference/classes/StreamProcessor.md b/docs/reference/classes/StreamProcessor.md index a9d18e793b..83bc01e50c 100644 --- a/docs/reference/classes/StreamProcessor.md +++ b/docs/reference/classes/StreamProcessor.md @@ -5,7 +5,7 @@ title: StreamProcessor # Class: StreamProcessor -Defined in: [activities/chat/stream/processor.ts:128](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L128) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:128](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L128) StreamProcessor - State machine for processing AI response streams @@ -32,7 +32,7 @@ State tracking: new StreamProcessor(options): StreamProcessor; ``` -Defined in: [activities/chat/stream/processor.ts:155](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L155) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:155](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L155) #### Parameters @@ -52,7 +52,7 @@ Defined in: [activities/chat/stream/processor.ts:155](https://github.com/TanStac addToolApprovalResponse(approvalId, approved): void; ``` -Defined in: [activities/chat/stream/processor.ts:313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L313) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L313) Add an approval response (called by client after handling onApprovalRequest) @@ -81,7 +81,7 @@ addToolResult( error?): void; ``` -Defined in: [activities/chat/stream/processor.ts:269](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L269) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:269](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L269) Add a tool result (called by client after handling onToolCall) @@ -111,7 +111,7 @@ Add a tool result (called by client after handling onToolCall) addUserMessage(content, id?): UIMessage; ``` -Defined in: [activities/chat/stream/processor.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L202) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L202) Add a user message to the conversation. Supports both simple string content and multimodal content arrays. @@ -160,7 +160,7 @@ processor.addUserMessage('Hello!', 'custom-id-123') areAllToolsComplete(): boolean; ``` -Defined in: [activities/chat/stream/processor.ts:344](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L344) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:344](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L344) Check if all tool calls in the last assistant message are complete Useful for auto-continue logic @@ -177,7 +177,7 @@ Useful for auto-continue logic clearMessages(): void; ``` -Defined in: [activities/chat/stream/processor.ts:388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L388) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L388) Clear all messages @@ -193,7 +193,7 @@ Clear all messages finalizeStream(): void; ``` -Defined in: [activities/chat/stream/processor.ts:1317](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1317) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1444](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1444) Finalize the stream — complete all pending operations. @@ -217,7 +217,7 @@ docs/chat-architecture.md#single-shot-text-response — Finalization step getCurrentAssistantMessageId(): string | null; ``` -Defined in: [activities/chat/stream/processor.ts:253](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L253) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:253](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L253) Get the current assistant message ID (if one has been created). Returns null if prepareAssistantMessage() was called but no content @@ -235,7 +235,7 @@ has arrived yet. getMessages(): UIMessage[]; ``` -Defined in: [activities/chat/stream/processor.ts:336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L336) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L336) Get current messages @@ -251,7 +251,7 @@ Get current messages getRecording(): ChunkRecording | null; ``` -Defined in: [activities/chat/stream/processor.ts:1449](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1449) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1576](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1576) Get the current recording @@ -267,7 +267,7 @@ Get the current recording getState(): ProcessorState; ``` -Defined in: [activities/chat/stream/processor.ts:1408](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1408) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1535](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1535) Get current processor state (aggregated across all messages) @@ -283,7 +283,7 @@ Get current processor state (aggregated across all messages) prepareAssistantMessage(): void; ``` -Defined in: [activities/chat/stream/processor.ts:232](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L232) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:232](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L232) Prepare for a new assistant message stream. Does NOT create the message immediately -- the message is created lazily @@ -303,7 +303,7 @@ auto-continuation produces no content. process(stream): Promise; ``` -Defined in: [activities/chat/stream/processor.ts:404](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L404) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:404](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L404) Process a stream and emit events through handlers @@ -325,13 +325,13 @@ Process a stream and emit events through handlers processChunk(chunk): void; ``` -Defined in: [activities/chat/stream/processor.ts:438](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L438) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:438](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L438) Process a single chunk from the stream. Central dispatch for all AG-UI events. Each event type maps to a specific handler. Events not listed in the switch are intentionally ignored -(RUN_STARTED, STEP_STARTED, STATE_DELTA). +(STEP_STARTED, STATE_SNAPSHOT, STATE_DELTA). #### Parameters @@ -355,7 +355,7 @@ docs/chat-architecture.md#adapter-contract — Expected event types and ordering removeMessagesAfter(index): void; ``` -Defined in: [activities/chat/stream/processor.ts:380](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L380) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:380](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L380) Remove messages after a certain index (for reload/retry) @@ -377,7 +377,7 @@ Remove messages after a certain index (for reload/retry) reset(): void; ``` -Defined in: [activities/chat/stream/processor.ts:1471](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1471) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1598) Full reset (including messages) @@ -393,7 +393,7 @@ Full reset (including messages) setMessages(messages): void; ``` -Defined in: [activities/chat/stream/processor.ts:174](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L174) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:174](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L174) Set the messages array (e.g., from persisted state) @@ -415,7 +415,7 @@ Set the messages array (e.g., from persisted state) startAssistantMessage(messageId?): string; ``` -Defined in: [activities/chat/stream/processor.ts:241](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L241) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:241](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L241) #### Parameters @@ -440,7 +440,7 @@ an assistant message which can cause empty message flicker. startRecording(): void; ``` -Defined in: [activities/chat/stream/processor.ts:1436](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1436) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1563](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1563) Start recording chunks @@ -459,7 +459,7 @@ toModelMessages(): ModelMessage< | null>[]; ``` -Defined in: [activities/chat/stream/processor.ts:325](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L325) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:325](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L325) Get the conversation as ModelMessages (for sending to LLM) @@ -478,7 +478,7 @@ Get the conversation as ModelMessages (for sending to LLM) static replay(recording, options?): Promise; ``` -Defined in: [activities/chat/stream/processor.ts:1490](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1490) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1617](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1617) Replay a recording through the processor diff --git a/docs/reference/classes/ToolCallManager.md b/docs/reference/classes/ToolCallManager.md index c2a28a8e38..8b8d9f1f98 100644 --- a/docs/reference/classes/ToolCallManager.md +++ b/docs/reference/classes/ToolCallManager.md @@ -5,7 +5,7 @@ title: ToolCallManager # Class: ToolCallManager -Defined in: [activities/chat/tools/tool-calls.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L83) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L83) Manages tool call accumulation and execution for the chat() method's automatic tool execution loop. @@ -49,7 +49,7 @@ if (manager.hasToolCalls()) { new ToolCallManager(tools): ToolCallManager; ``` -Defined in: [activities/chat/tools/tool-calls.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L87) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L87) #### Parameters @@ -69,7 +69,7 @@ readonly [`Tool`](../interfaces/Tool.md)\<[`SchemaInput`](../type-aliases/Schema addToolCallArgsEvent(event): void; ``` -Defined in: [activities/chat/tools/tool-calls.ts:112](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L112) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:113](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L113) Add a TOOL_CALL_ARGS event to accumulate arguments (AG-UI) @@ -91,7 +91,7 @@ Add a TOOL_CALL_ARGS event to accumulate arguments (AG-UI) addToolCallStartEvent(event): void; ``` -Defined in: [activities/chat/tools/tool-calls.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L94) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L94) Add a TOOL_CALL_START event to begin tracking a tool call (AG-UI) @@ -113,7 +113,7 @@ Add a TOOL_CALL_START event to begin tracking a tool call (AG-UI) clear(): void; ``` -Defined in: [activities/chat/tools/tool-calls.ts:260](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L260) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:262](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L262) Clear the tool calls map for the next iteration @@ -129,7 +129,7 @@ Clear the tool calls map for the next iteration completeToolCall(event): void; ``` -Defined in: [activities/chat/tools/tool-calls.ts:126](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L126) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:127](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L127) Complete a tool call with its final input Called when TOOL_CALL_END is received @@ -155,7 +155,7 @@ executeTools(finishEvent): AsyncGenerator[], void>; ``` -Defined in: [activities/chat/tools/tool-calls.ts:161](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L161) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:162](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L162) Execute all tool calls and return tool result messages Yields TOOL_CALL_END events for streaming @@ -183,7 +183,7 @@ RUN_FINISHED event from the stream getToolCalls(): ToolCall[]; ``` -Defined in: [activities/chat/tools/tool-calls.ts:150](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L150) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:151](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L151) Get all complete tool calls (filtered for valid ID and name) @@ -199,7 +199,7 @@ Get all complete tool calls (filtered for valid ID and name) hasToolCalls(): boolean; ``` -Defined in: [activities/chat/tools/tool-calls.ts:143](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L143) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-calls.ts:144](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-calls.ts#L144) Check if there are any complete tool calls to execute diff --git a/docs/reference/classes/WordBoundaryStrategy.md b/docs/reference/classes/WordBoundaryStrategy.md index 3f54ff3dea..91390d65ef 100644 --- a/docs/reference/classes/WordBoundaryStrategy.md +++ b/docs/reference/classes/WordBoundaryStrategy.md @@ -5,7 +5,7 @@ title: WordBoundaryStrategy # Class: WordBoundaryStrategy -Defined in: [activities/chat/stream/strategies.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L57) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L57) Word Boundary Strategy - emit at word boundaries Prevents cutting words in half @@ -34,7 +34,7 @@ new WordBoundaryStrategy(): WordBoundaryStrategy; shouldEmit(chunk, _accumulated): boolean; ``` -Defined in: [activities/chat/stream/strategies.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L58) +Defined in: [packages/typescript/ai/src/activities/chat/stream/strategies.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/strategies.ts#L58) Called for each text chunk received diff --git a/docs/reference/functions/chat.md b/docs/reference/functions/chat.md index 9e5bdb1f5c..7ce8f76fe6 100644 --- a/docs/reference/functions/chat.md +++ b/docs/reference/functions/chat.md @@ -9,7 +9,7 @@ title: chat function chat(options): TextActivityResult; ``` -Defined in: [activities/chat/index.ts:1373](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/index.ts#L1373) +Defined in: [packages/typescript/ai/src/activities/chat/index.ts:1438](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/index.ts#L1438) Text activity - handles agentic text generation, one-shot text generation, and agentic structured output. diff --git a/docs/reference/functions/combineStrategies.md b/docs/reference/functions/combineStrategies.md index 618f93a929..f6feb2be31 100644 --- a/docs/reference/functions/combineStrategies.md +++ b/docs/reference/functions/combineStrategies.md @@ -9,7 +9,7 @@ title: combineStrategies function combineStrategies(strategies): AgentLoopStrategy; ``` -Defined in: [activities/chat/agent-loop-strategies.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts#L79) +Defined in: [packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts#L79) Creates a strategy that combines multiple strategies with AND logic All strategies must return true to continue diff --git a/docs/reference/functions/convertMessagesToModelMessages.md b/docs/reference/functions/convertMessagesToModelMessages.md index 7ffe1ccb59..fd04e1120b 100644 --- a/docs/reference/functions/convertMessagesToModelMessages.md +++ b/docs/reference/functions/convertMessagesToModelMessages.md @@ -12,7 +12,7 @@ function convertMessagesToModelMessages(messages): ModelMessage< | null>[]; ``` -Defined in: [activities/chat/messages.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L63) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L63) Convert UIMessages or ModelMessages to ModelMessages diff --git a/docs/reference/functions/convertSchemaToJsonSchema.md b/docs/reference/functions/convertSchemaToJsonSchema.md index 2e0d7cdfd6..5613559fed 100644 --- a/docs/reference/functions/convertSchemaToJsonSchema.md +++ b/docs/reference/functions/convertSchemaToJsonSchema.md @@ -9,7 +9,7 @@ title: convertSchemaToJsonSchema function convertSchemaToJsonSchema(schema, options): JSONSchema | undefined; ``` -Defined in: [activities/chat/tools/schema-converter.ts:199](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/schema-converter.ts#L199) +Defined in: [packages/typescript/ai/src/activities/chat/tools/schema-converter.ts:199](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/schema-converter.ts#L199) Converts a Standard JSON Schema compliant schema or plain JSONSchema to JSON Schema format compatible with LLM providers. diff --git a/docs/reference/functions/createChatOptions.md b/docs/reference/functions/createChatOptions.md index 2da693d2b2..6179a50924 100644 --- a/docs/reference/functions/createChatOptions.md +++ b/docs/reference/functions/createChatOptions.md @@ -9,7 +9,7 @@ title: createChatOptions function createChatOptions(options): TextActivityOptions; ``` -Defined in: [activities/chat/index.ts:185](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/index.ts#L185) +Defined in: [packages/typescript/ai/src/activities/chat/index.ts:190](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/index.ts#L190) Create typed options for the chat() function without executing. This is useful for pre-defining configurations with full type inference. diff --git a/docs/reference/functions/createFrozenRegistry.md b/docs/reference/functions/createFrozenRegistry.md index 9682a8fedd..03be7bef43 100644 --- a/docs/reference/functions/createFrozenRegistry.md +++ b/docs/reference/functions/createFrozenRegistry.md @@ -9,7 +9,7 @@ title: createFrozenRegistry function createFrozenRegistry(tools): ToolRegistry; ``` -Defined in: [tool-registry.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L119) +Defined in: [packages/typescript/ai/src/tool-registry.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L119) Create a frozen (immutable) tool registry from a tools array. diff --git a/docs/reference/functions/createImageOptions.md b/docs/reference/functions/createImageOptions.md index 93ae325d5b..041ad8dd59 100644 --- a/docs/reference/functions/createImageOptions.md +++ b/docs/reference/functions/createImageOptions.md @@ -9,7 +9,7 @@ title: createImageOptions function createImageOptions(options): ImageActivityOptions; ``` -Defined in: [activities/generateImage/index.ts:244](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/index.ts#L244) +Defined in: [packages/typescript/ai/src/activities/generateImage/index.ts:244](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/index.ts#L244) Create typed options for the generateImage() function without executing. diff --git a/docs/reference/functions/createModel.md b/docs/reference/functions/createModel.md index 7670dfbe82..a644e10413 100644 --- a/docs/reference/functions/createModel.md +++ b/docs/reference/functions/createModel.md @@ -9,7 +9,7 @@ title: createModel function createModel(name, input): ExtendedModelDef; ``` -Defined in: [extend-adapter.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L61) +Defined in: [packages/typescript/ai/src/extend-adapter.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L61) Creates a custom model definition for use with `extendAdapter`. diff --git a/docs/reference/functions/createReplayStream.md b/docs/reference/functions/createReplayStream.md index 56f9e15f1f..8823b2c81e 100644 --- a/docs/reference/functions/createReplayStream.md +++ b/docs/reference/functions/createReplayStream.md @@ -9,7 +9,7 @@ title: createReplayStream function createReplayStream(recording): AsyncIterable; ``` -Defined in: [activities/chat/stream/processor.ts:1502](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1502) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1629](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1629) Create an async iterable from a recording diff --git a/docs/reference/functions/createSpeechOptions.md b/docs/reference/functions/createSpeechOptions.md index 990fb5400a..e6df25ebb1 100644 --- a/docs/reference/functions/createSpeechOptions.md +++ b/docs/reference/functions/createSpeechOptions.md @@ -9,7 +9,7 @@ title: createSpeechOptions function createSpeechOptions(options): TTSActivityOptions; ``` -Defined in: [activities/generateSpeech/index.ts:181](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/index.ts#L181) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/index.ts:181](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/index.ts#L181) Create typed options for the generateSpeech() function without executing. diff --git a/docs/reference/functions/createSummarizeOptions.md b/docs/reference/functions/createSummarizeOptions.md index f612b7129d..89ef07c991 100644 --- a/docs/reference/functions/createSummarizeOptions.md +++ b/docs/reference/functions/createSummarizeOptions.md @@ -9,7 +9,7 @@ title: createSummarizeOptions function createSummarizeOptions(options): SummarizeActivityOptions; ``` -Defined in: [activities/summarize/index.ts:254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/index.ts#L254) +Defined in: [packages/typescript/ai/src/activities/summarize/index.ts:254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/index.ts#L254) Create typed options for the summarize() function without executing. diff --git a/docs/reference/functions/createToolRegistry.md b/docs/reference/functions/createToolRegistry.md index d104341933..3f713c9858 100644 --- a/docs/reference/functions/createToolRegistry.md +++ b/docs/reference/functions/createToolRegistry.md @@ -9,7 +9,7 @@ title: createToolRegistry function createToolRegistry(initialTools): ToolRegistry; ``` -Defined in: [tool-registry.ts:78](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L78) +Defined in: [packages/typescript/ai/src/tool-registry.ts:78](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L78) Create a mutable tool registry for dynamic tool scenarios. diff --git a/docs/reference/functions/createTranscriptionOptions.md b/docs/reference/functions/createTranscriptionOptions.md index d539de99ac..1013de2711 100644 --- a/docs/reference/functions/createTranscriptionOptions.md +++ b/docs/reference/functions/createTranscriptionOptions.md @@ -9,7 +9,7 @@ title: createTranscriptionOptions function createTranscriptionOptions(options): TranscriptionActivityOptions; ``` -Defined in: [activities/generateTranscription/index.ts:199](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/index.ts#L199) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/index.ts:199](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/index.ts#L199) Create typed options for the generateTranscription() function without executing. diff --git a/docs/reference/functions/createVideoOptions.md b/docs/reference/functions/createVideoOptions.md index 0cda333dad..5a022e1895 100644 --- a/docs/reference/functions/createVideoOptions.md +++ b/docs/reference/functions/createVideoOptions.md @@ -9,7 +9,7 @@ title: createVideoOptions function createVideoOptions(options): VideoCreateOptions; ``` -Defined in: [activities/generateVideo/index.ts:481](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/index.ts#L481) +Defined in: [packages/typescript/ai/src/activities/generateVideo/index.ts:488](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/index.ts#L488) Create typed options for the generateVideo() function without executing. diff --git a/docs/reference/functions/detectImageMimeType.md b/docs/reference/functions/detectImageMimeType.md index 1a1f09925c..88a04a4add 100644 --- a/docs/reference/functions/detectImageMimeType.md +++ b/docs/reference/functions/detectImageMimeType.md @@ -9,7 +9,7 @@ title: detectImageMimeType function detectImageMimeType(base64Data): "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; ``` -Defined in: [utils.ts:17](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/utils.ts#L17) +Defined in: [packages/typescript/ai/src/utils.ts:17](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/utils.ts#L17) Detect image mime type from base64 data using magic bytes. Returns undefined if the format cannot be detected. diff --git a/docs/reference/functions/extendAdapter.md b/docs/reference/functions/extendAdapter.md index ac3f2b18e3..e76df1d714 100644 --- a/docs/reference/functions/extendAdapter.md +++ b/docs/reference/functions/extendAdapter.md @@ -9,7 +9,7 @@ title: extendAdapter function extendAdapter(factory, _customModels): (model, ...args) => InferAdapterReturn; ``` -Defined in: [extend-adapter.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L166) +Defined in: [packages/typescript/ai/src/extend-adapter.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L166) Extends an existing adapter factory with additional custom models. diff --git a/docs/reference/functions/generateImage.md b/docs/reference/functions/generateImage.md index cc430263b0..b83ede64cd 100644 --- a/docs/reference/functions/generateImage.md +++ b/docs/reference/functions/generateImage.md @@ -9,7 +9,7 @@ title: generateImage function generateImage(options): ImageActivityResult; ``` -Defined in: [activities/generateImage/index.ts:167](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/index.ts#L167) +Defined in: [packages/typescript/ai/src/activities/generateImage/index.ts:167](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/index.ts#L167) Image activity - generates images from text prompts. diff --git a/docs/reference/functions/generateMessageId.md b/docs/reference/functions/generateMessageId.md index 07c1d2b52e..4d95ea5413 100644 --- a/docs/reference/functions/generateMessageId.md +++ b/docs/reference/functions/generateMessageId.md @@ -9,7 +9,7 @@ title: generateMessageId function generateMessageId(): string; ``` -Defined in: [activities/chat/messages.ts:434](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L434) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:434](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L434) Generate a unique message ID diff --git a/docs/reference/functions/generateSpeech.md b/docs/reference/functions/generateSpeech.md index 61f49a287d..ccc909cfc3 100644 --- a/docs/reference/functions/generateSpeech.md +++ b/docs/reference/functions/generateSpeech.md @@ -9,7 +9,7 @@ title: generateSpeech function generateSpeech(options): TTSActivityResult; ``` -Defined in: [activities/generateSpeech/index.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/index.ts#L119) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/index.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/index.ts#L119) TTS activity - generates speech from text. diff --git a/docs/reference/functions/generateTranscription.md b/docs/reference/functions/generateTranscription.md index c935da92ea..3bf6ec8c7a 100644 --- a/docs/reference/functions/generateTranscription.md +++ b/docs/reference/functions/generateTranscription.md @@ -9,7 +9,7 @@ title: generateTranscription function generateTranscription(options): TranscriptionActivityResult; ``` -Defined in: [activities/generateTranscription/index.ts:134](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/index.ts#L134) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/index.ts:134](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/index.ts#L134) Transcription activity - converts audio to text. diff --git a/docs/reference/functions/generateVideo.md b/docs/reference/functions/generateVideo.md index 2f2a915e8b..22cc2693ea 100644 --- a/docs/reference/functions/generateVideo.md +++ b/docs/reference/functions/generateVideo.md @@ -9,7 +9,7 @@ title: generateVideo function generateVideo(options): TStream extends true ? AsyncIterable : Promise; ``` -Defined in: [activities/generateVideo/index.ts:221](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/index.ts#L221) +Defined in: [packages/typescript/ai/src/activities/generateVideo/index.ts:221](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/index.ts#L221) **`Experimental`** diff --git a/docs/reference/functions/getVideoJobStatus.md b/docs/reference/functions/getVideoJobStatus.md index 38fecc3d5a..3e057d7594 100644 --- a/docs/reference/functions/getVideoJobStatus.md +++ b/docs/reference/functions/getVideoJobStatus.md @@ -14,7 +14,7 @@ function getVideoJobStatus(options): Promise<{ }>; ``` -Defined in: [activities/generateVideo/index.ts:381](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/index.ts#L381) +Defined in: [packages/typescript/ai/src/activities/generateVideo/index.ts:388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/index.ts#L388) **`Experimental`** diff --git a/docs/reference/functions/maxIterations.md b/docs/reference/functions/maxIterations.md index bdcab002a3..f8a50c1acb 100644 --- a/docs/reference/functions/maxIterations.md +++ b/docs/reference/functions/maxIterations.md @@ -9,7 +9,7 @@ title: maxIterations function maxIterations(max): AgentLoopStrategy; ``` -Defined in: [activities/chat/agent-loop-strategies.ts:20](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts#L20) +Defined in: [packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts:20](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts#L20) Creates a strategy that continues for a maximum number of iterations diff --git a/docs/reference/functions/modelMessageToUIMessage.md b/docs/reference/functions/modelMessageToUIMessage.md index b7f1b30d28..ed3bafd0c0 100644 --- a/docs/reference/functions/modelMessageToUIMessage.md +++ b/docs/reference/functions/modelMessageToUIMessage.md @@ -9,7 +9,7 @@ title: modelMessageToUIMessage function modelMessageToUIMessage(modelMessage, id?): UIMessage; ``` -Defined in: [activities/chat/messages.ts:303](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L303) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:303](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L303) Convert a ModelMessage to UIMessage diff --git a/docs/reference/functions/modelMessagesToUIMessages.md b/docs/reference/functions/modelMessagesToUIMessages.md index a867e1ec29..55bdf67000 100644 --- a/docs/reference/functions/modelMessagesToUIMessages.md +++ b/docs/reference/functions/modelMessagesToUIMessages.md @@ -9,7 +9,7 @@ title: modelMessagesToUIMessages function modelMessagesToUIMessages(modelMessages): UIMessage[]; ``` -Defined in: [activities/chat/messages.ts:362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L362) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L362) Convert an array of ModelMessages to UIMessages diff --git a/docs/reference/functions/normalizeToUIMessage.md b/docs/reference/functions/normalizeToUIMessage.md index e3bd724f60..be16a29e4b 100644 --- a/docs/reference/functions/normalizeToUIMessage.md +++ b/docs/reference/functions/normalizeToUIMessage.md @@ -9,7 +9,7 @@ title: normalizeToUIMessage function normalizeToUIMessage(message, generateId): UIMessage; ``` -Defined in: [activities/chat/messages.ts:411](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L411) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:411](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L411) Normalize a message (UIMessage or ModelMessage) to a UIMessage Ensures the message has an ID and createdAt timestamp diff --git a/docs/reference/functions/parsePartialJSON.md b/docs/reference/functions/parsePartialJSON.md index 0afc507501..22211a927b 100644 --- a/docs/reference/functions/parsePartialJSON.md +++ b/docs/reference/functions/parsePartialJSON.md @@ -9,7 +9,7 @@ title: parsePartialJSON function parsePartialJSON(jsonString): any; ``` -Defined in: [activities/chat/stream/json-parser.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L56) +Defined in: [packages/typescript/ai/src/activities/chat/stream/json-parser.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L56) Parse partial JSON string (convenience function) diff --git a/docs/reference/functions/realtimeToken.md b/docs/reference/functions/realtimeToken.md index caa4865d41..522fcab6b8 100644 --- a/docs/reference/functions/realtimeToken.md +++ b/docs/reference/functions/realtimeToken.md @@ -9,7 +9,7 @@ title: realtimeToken function realtimeToken(options): Promise; ``` -Defined in: [realtime/index.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/index.ts#L33) +Defined in: [packages/typescript/ai/src/realtime/index.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/index.ts#L33) Generate a realtime token using the provided adapter. diff --git a/docs/reference/functions/streamToText.md b/docs/reference/functions/streamToText.md index b13f038c4f..1d86b84dfa 100644 --- a/docs/reference/functions/streamToText.md +++ b/docs/reference/functions/streamToText.md @@ -9,7 +9,7 @@ title: streamToText function streamToText(stream): Promise; ``` -Defined in: [stream-to-response.ts:23](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L23) +Defined in: [packages/typescript/ai/src/stream-to-response.ts:23](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L23) Collect all text content from a StreamChunk async iterable and return as a string. diff --git a/docs/reference/functions/summarize.md b/docs/reference/functions/summarize.md index 1581360934..dfa9201fce 100644 --- a/docs/reference/functions/summarize.md +++ b/docs/reference/functions/summarize.md @@ -9,7 +9,7 @@ title: summarize function summarize(options): SummarizeActivityResult; ``` -Defined in: [activities/summarize/index.ts:147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/index.ts#L147) +Defined in: [packages/typescript/ai/src/activities/summarize/index.ts:147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/index.ts#L147) Summarize activity - generates summaries from text. diff --git a/docs/reference/functions/toHttpResponse.md b/docs/reference/functions/toHttpResponse.md index ec96973b5b..1a4e19df05 100644 --- a/docs/reference/functions/toHttpResponse.md +++ b/docs/reference/functions/toHttpResponse.md @@ -9,7 +9,7 @@ title: toHttpResponse function toHttpResponse(stream, init?): Response; ``` -Defined in: [stream-to-response.ts:247](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L247) +Defined in: [packages/typescript/ai/src/stream-to-response.ts:245](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L245) Convert a StreamChunk async iterable to a Response in HTTP stream format (newline-delimited JSON) diff --git a/docs/reference/functions/toHttpStream.md b/docs/reference/functions/toHttpStream.md index 8c4361a8dd..4249e1dadf 100644 --- a/docs/reference/functions/toHttpStream.md +++ b/docs/reference/functions/toHttpStream.md @@ -9,7 +9,7 @@ title: toHttpStream function toHttpStream(stream, abortController?): ReadableStream>; ``` -Defined in: [stream-to-response.ts:175](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L175) +Defined in: [packages/typescript/ai/src/stream-to-response.ts:173](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L173) Convert a StreamChunk async iterable to a ReadableStream in HTTP stream format (newline-delimited JSON) diff --git a/docs/reference/functions/toServerSentEventsResponse.md b/docs/reference/functions/toServerSentEventsResponse.md index 8886b3c71c..01dfe850ea 100644 --- a/docs/reference/functions/toServerSentEventsResponse.md +++ b/docs/reference/functions/toServerSentEventsResponse.md @@ -9,14 +9,14 @@ title: toServerSentEventsResponse function toServerSentEventsResponse(stream, init?): Response; ``` -Defined in: [stream-to-response.ts:124](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L124) +Defined in: [packages/typescript/ai/src/stream-to-response.ts:122](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L122) Convert a StreamChunk async iterable to a Response in Server-Sent Events format This creates a Response that emits chunks in SSE format: - Each chunk is prefixed with "data: " - Each chunk is followed by "\n\n" -- Stream ends with "data: [DONE]\n\n" +- Stream ends when the underlying iterable is exhausted (RUN_FINISHED is the terminal event) ## Parameters diff --git a/docs/reference/functions/toServerSentEventsStream.md b/docs/reference/functions/toServerSentEventsStream.md index e172f8da29..18a83564cd 100644 --- a/docs/reference/functions/toServerSentEventsStream.md +++ b/docs/reference/functions/toServerSentEventsStream.md @@ -9,14 +9,14 @@ title: toServerSentEventsStream function toServerSentEventsStream(stream, abortController?): ReadableStream>; ``` -Defined in: [stream-to-response.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L49) +Defined in: [packages/typescript/ai/src/stream-to-response.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/stream-to-response.ts#L49) Convert a StreamChunk async iterable to a ReadableStream in Server-Sent Events format This creates a ReadableStream that emits chunks in SSE format: - Each chunk is prefixed with "data: " - Each chunk is followed by "\n\n" -- Stream ends with "data: [DONE]\n\n" +- Stream ends when the underlying iterable is exhausted (RUN_FINISHED is the terminal event) ## Parameters diff --git a/docs/reference/functions/toolDefinition.md b/docs/reference/functions/toolDefinition.md index 5e2fe21934..e6dea7fa03 100644 --- a/docs/reference/functions/toolDefinition.md +++ b/docs/reference/functions/toolDefinition.md @@ -9,7 +9,7 @@ title: toolDefinition function toolDefinition(config): ToolDefinition; ``` -Defined in: [activities/chat/tools/tool-definition.ts:187](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L187) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:187](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L187) Create an isomorphic tool definition that can be used directly or instantiated for server/client diff --git a/docs/reference/functions/uiMessageToModelMessages.md b/docs/reference/functions/uiMessageToModelMessages.md index 52107288b8..109cfcdd59 100644 --- a/docs/reference/functions/uiMessageToModelMessages.md +++ b/docs/reference/functions/uiMessageToModelMessages.md @@ -12,7 +12,7 @@ function uiMessageToModelMessages(uiMessage): ModelMessage< | null>[]; ``` -Defined in: [activities/chat/messages.ts:98](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L98) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:98](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L98) Convert a UIMessage to ModelMessage(s) diff --git a/docs/reference/functions/untilFinishReason.md b/docs/reference/functions/untilFinishReason.md index 0ad4c70db7..55a6f8e705 100644 --- a/docs/reference/functions/untilFinishReason.md +++ b/docs/reference/functions/untilFinishReason.md @@ -9,7 +9,7 @@ title: untilFinishReason function untilFinishReason(stopReasons): AgentLoopStrategy; ``` -Defined in: [activities/chat/agent-loop-strategies.ts:41](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts#L41) +Defined in: [packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts:41](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/agent-loop-strategies.ts#L41) Creates a strategy that continues until a specific finish reason is encountered diff --git a/docs/reference/index.md b/docs/reference/index.md index d7c63aa135..fcab3a15ca 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -63,6 +63,12 @@ title: "@tanstack/ai" - [RealtimeTokenOptions](interfaces/RealtimeTokenOptions.md) - [RealtimeToolCallPart](interfaces/RealtimeToolCallPart.md) - [RealtimeToolResultPart](interfaces/RealtimeToolResultPart.md) +- [ReasoningEncryptedValueEvent](interfaces/ReasoningEncryptedValueEvent.md) +- [ReasoningEndEvent](interfaces/ReasoningEndEvent.md) +- [ReasoningMessageContentEvent](interfaces/ReasoningMessageContentEvent.md) +- [ReasoningMessageEndEvent](interfaces/ReasoningMessageEndEvent.md) +- [ReasoningMessageStartEvent](interfaces/ReasoningMessageStartEvent.md) +- [ReasoningStartEvent](interfaces/ReasoningStartEvent.md) - [ResponseFormat](interfaces/ResponseFormat.md) - [RunErrorEvent](interfaces/RunErrorEvent.md) - [RunFinishedEvent](interfaces/RunFinishedEvent.md) @@ -91,6 +97,7 @@ title: "@tanstack/ai" - [ToolCallEndEvent](interfaces/ToolCallEndEvent.md) - [ToolCallHookContext](interfaces/ToolCallHookContext.md) - [ToolCallPart](interfaces/ToolCallPart.md) +- [ToolCallResultEvent](interfaces/ToolCallResultEvent.md) - [ToolCallStartEvent](interfaces/ToolCallStartEvent.md) - [ToolConfig](interfaces/ToolConfig.md) - [ToolDefinition](interfaces/ToolDefinition.md) @@ -122,7 +129,7 @@ title: "@tanstack/ai" - [AgentLoopStrategy](type-aliases/AgentLoopStrategy.md) - [AGUIEvent](type-aliases/AGUIEvent.md) -- [AGUIEventType](type-aliases/AGUIEventType.md) +- [~~AGUIEventType~~](type-aliases/AGUIEventType.md) - [AIAdapter](type-aliases/AIAdapter.md) - [AnyClientTool](type-aliases/AnyClientTool.md) - [AnyImageAdapter](type-aliases/AnyImageAdapter.md) @@ -154,7 +161,7 @@ title: "@tanstack/ai" - [RealtimeStatus](type-aliases/RealtimeStatus.md) - [SchemaInput](type-aliases/SchemaInput.md) - [StreamChunk](type-aliases/StreamChunk.md) -- [StreamChunkType](type-aliases/StreamChunkType.md) +- [~~StreamChunkType~~](type-aliases/StreamChunkType.md) - [ToolCallState](type-aliases/ToolCallState.md) - [ToolResultState](type-aliases/ToolResultState.md) diff --git a/docs/reference/interfaces/AbortInfo.md b/docs/reference/interfaces/AbortInfo.md index 5797487e94..b146708c4f 100644 --- a/docs/reference/interfaces/AbortInfo.md +++ b/docs/reference/interfaces/AbortInfo.md @@ -5,7 +5,7 @@ title: AbortInfo # Interface: AbortInfo -Defined in: [activities/chat/middleware/types.ts:258](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L258) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:258](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L258) Information passed to onAbort. @@ -17,7 +17,7 @@ Information passed to onAbort. duration: number; ``` -Defined in: [activities/chat/middleware/types.ts:262](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L262) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:262](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L262) Duration until abort in milliseconds @@ -29,6 +29,6 @@ Duration until abort in milliseconds optional reason: string; ``` -Defined in: [activities/chat/middleware/types.ts:260](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L260) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:260](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L260) The reason for the abort, if provided diff --git a/docs/reference/interfaces/AfterToolCallInfo.md b/docs/reference/interfaces/AfterToolCallInfo.md index 68e1d75253..de50854b08 100644 --- a/docs/reference/interfaces/AfterToolCallInfo.md +++ b/docs/reference/interfaces/AfterToolCallInfo.md @@ -5,7 +5,7 @@ title: AfterToolCallInfo # Interface: AfterToolCallInfo -Defined in: [activities/chat/middleware/types.ts:154](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L154) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:154](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L154) Outcome information provided to onAfterToolCall. @@ -17,7 +17,7 @@ Outcome information provided to onAfterToolCall. duration: number; ``` -Defined in: [activities/chat/middleware/types.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L166) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L166) Duration of tool execution in milliseconds @@ -29,7 +29,7 @@ Duration of tool execution in milliseconds optional error: unknown; ``` -Defined in: [activities/chat/middleware/types.ts:169](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L169) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:169](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L169) *** @@ -39,7 +39,7 @@ Defined in: [activities/chat/middleware/types.ts:169](https://github.com/TanStac ok: boolean; ``` -Defined in: [activities/chat/middleware/types.ts:164](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L164) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:164](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L164) Whether the execution succeeded @@ -51,7 +51,7 @@ Whether the execution succeeded optional result: unknown; ``` -Defined in: [activities/chat/middleware/types.ts:168](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L168) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:168](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L168) The result (if ok) or error (if not ok) @@ -65,7 +65,7 @@ tool: | undefined; ``` -Defined in: [activities/chat/middleware/types.ts:158](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L158) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:158](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L158) The resolved tool definition @@ -77,7 +77,7 @@ The resolved tool definition toolCall: ToolCall; ``` -Defined in: [activities/chat/middleware/types.ts:156](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L156) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:156](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L156) The tool call that was executed @@ -89,7 +89,7 @@ The tool call that was executed toolCallId: string; ``` -Defined in: [activities/chat/middleware/types.ts:162](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L162) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:162](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L162) ID of the tool call @@ -101,6 +101,6 @@ ID of the tool call toolName: string; ``` -Defined in: [activities/chat/middleware/types.ts:160](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L160) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:160](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L160) Name of the tool diff --git a/docs/reference/interfaces/AgentLoopState.md b/docs/reference/interfaces/AgentLoopState.md index 359e961810..534d0a7143 100644 --- a/docs/reference/interfaces/AgentLoopState.md +++ b/docs/reference/interfaces/AgentLoopState.md @@ -5,7 +5,7 @@ title: AgentLoopState # Interface: AgentLoopState -Defined in: [types.ts:604](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L604) +Defined in: [packages/typescript/ai/src/types.ts:630](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L630) State passed to agent loop strategy for determining whether to continue @@ -17,7 +17,7 @@ State passed to agent loop strategy for determining whether to continue finishReason: string | null; ``` -Defined in: [types.ts:610](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L610) +Defined in: [packages/typescript/ai/src/types.ts:636](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L636) Finish reason from the last response @@ -29,7 +29,7 @@ Finish reason from the last response iterationCount: number; ``` -Defined in: [types.ts:606](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L606) +Defined in: [packages/typescript/ai/src/types.ts:632](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L632) Current iteration count (0-indexed) @@ -44,6 +44,6 @@ messages: ModelMessage< | null>[]; ``` -Defined in: [types.ts:608](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L608) +Defined in: [packages/typescript/ai/src/types.ts:634](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L634) Current messages array diff --git a/docs/reference/interfaces/AudioPart.md b/docs/reference/interfaces/AudioPart.md index 7b9f47a03f..e968a1ccc1 100644 --- a/docs/reference/interfaces/AudioPart.md +++ b/docs/reference/interfaces/AudioPart.md @@ -5,7 +5,7 @@ title: AudioPart # Interface: AudioPart\ -Defined in: [types.ts:175](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L175) +Defined in: [packages/typescript/ai/src/types.ts:201](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L201) Audio content part for multimodal messages. @@ -25,7 +25,7 @@ Provider-specific metadata type optional metadata: TMetadata; ``` -Defined in: [types.ts:180](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L180) +Defined in: [packages/typescript/ai/src/types.ts:206](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L206) Provider-specific metadata (e.g., format, sample rate) @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., format, sample rate) source: ContentPartSource; ``` -Defined in: [types.ts:178](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L178) +Defined in: [packages/typescript/ai/src/types.ts:204](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L204) Source of the audio content @@ -49,4 +49,4 @@ Source of the audio content type: "audio"; ``` -Defined in: [types.ts:176](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L176) +Defined in: [packages/typescript/ai/src/types.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L202) diff --git a/docs/reference/interfaces/AudioVisualization.md b/docs/reference/interfaces/AudioVisualization.md index f7de7a28e7..382ad128ca 100644 --- a/docs/reference/interfaces/AudioVisualization.md +++ b/docs/reference/interfaces/AudioVisualization.md @@ -5,7 +5,7 @@ title: AudioVisualization # Interface: AudioVisualization -Defined in: [realtime/types.ts:200](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L200) +Defined in: [packages/typescript/ai/src/realtime/types.ts:200](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L200) Interface for accessing audio visualization data @@ -17,7 +17,7 @@ Interface for accessing audio visualization data getInputFrequencyData: () => Uint8Array; ``` -Defined in: [realtime/types.ts:207](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L207) +Defined in: [packages/typescript/ai/src/realtime/types.ts:207](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L207) Get frequency data for input audio visualization @@ -33,7 +33,7 @@ Get frequency data for input audio visualization getInputTimeDomainData: () => Uint8Array; ``` -Defined in: [realtime/types.ts:212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L212) +Defined in: [packages/typescript/ai/src/realtime/types.ts:212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L212) Get time domain data for input waveform @@ -49,7 +49,7 @@ Get time domain data for input waveform getOutputFrequencyData: () => Uint8Array; ``` -Defined in: [realtime/types.ts:209](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L209) +Defined in: [packages/typescript/ai/src/realtime/types.ts:209](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L209) Get frequency data for output audio visualization @@ -65,7 +65,7 @@ Get frequency data for output audio visualization getOutputTimeDomainData: () => Uint8Array; ``` -Defined in: [realtime/types.ts:214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L214) +Defined in: [packages/typescript/ai/src/realtime/types.ts:214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L214) Get time domain data for output waveform @@ -81,7 +81,7 @@ Get time domain data for output waveform readonly inputLevel: number; ``` -Defined in: [realtime/types.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L202) +Defined in: [packages/typescript/ai/src/realtime/types.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L202) Input volume level (0-1 normalized) @@ -93,7 +93,7 @@ Input volume level (0-1 normalized) readonly inputSampleRate: number; ``` -Defined in: [realtime/types.ts:217](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L217) +Defined in: [packages/typescript/ai/src/realtime/types.ts:217](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L217) Input sample rate @@ -105,7 +105,7 @@ Input sample rate optional onInputAudio: (callback) => () => void; ``` -Defined in: [realtime/types.ts:222](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L222) +Defined in: [packages/typescript/ai/src/realtime/types.ts:222](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L222) Subscribe to raw input audio samples @@ -133,7 +133,7 @@ Subscribe to raw input audio samples optional onOutputAudio: (callback) => () => void; ``` -Defined in: [realtime/types.ts:226](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L226) +Defined in: [packages/typescript/ai/src/realtime/types.ts:226](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L226) Subscribe to raw output audio samples @@ -161,7 +161,7 @@ Subscribe to raw output audio samples readonly outputLevel: number; ``` -Defined in: [realtime/types.ts:204](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L204) +Defined in: [packages/typescript/ai/src/realtime/types.ts:204](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L204) Output volume level (0-1 normalized) @@ -173,6 +173,6 @@ Output volume level (0-1 normalized) readonly outputSampleRate: number; ``` -Defined in: [realtime/types.ts:219](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L219) +Defined in: [packages/typescript/ai/src/realtime/types.ts:219](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L219) Output sample rate diff --git a/docs/reference/interfaces/BaseAGUIEvent.md b/docs/reference/interfaces/BaseAGUIEvent.md index a0d263941c..64cec42722 100644 --- a/docs/reference/interfaces/BaseAGUIEvent.md +++ b/docs/reference/interfaces/BaseAGUIEvent.md @@ -5,69 +5,32 @@ title: BaseAGUIEvent # Interface: BaseAGUIEvent -Defined in: [types.ts:752](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L752) +Defined in: [packages/typescript/ai/src/types.ts:785](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L785) Base structure for AG-UI events. -Extends AG-UI spec with TanStack AI additions (model field). +Extends @ag-ui/core BaseEvent with TanStack AI additions. -## Extended by +@ag-ui/core provides: `type`, `timestamp?`, `rawEvent?` +TanStack AI adds: `model?` -- [`RunStartedEvent`](RunStartedEvent.md) -- [`RunFinishedEvent`](RunFinishedEvent.md) -- [`RunErrorEvent`](RunErrorEvent.md) -- [`TextMessageStartEvent`](TextMessageStartEvent.md) -- [`TextMessageContentEvent`](TextMessageContentEvent.md) -- [`TextMessageEndEvent`](TextMessageEndEvent.md) -- [`ToolCallStartEvent`](ToolCallStartEvent.md) -- [`ToolCallArgsEvent`](ToolCallArgsEvent.md) -- [`ToolCallEndEvent`](ToolCallEndEvent.md) -- [`StepStartedEvent`](StepStartedEvent.md) -- [`StepFinishedEvent`](StepFinishedEvent.md) -- [`MessagesSnapshotEvent`](MessagesSnapshotEvent.md) -- [`StateSnapshotEvent`](StateSnapshotEvent.md) -- [`StateDeltaEvent`](StateDeltaEvent.md) -- [`CustomEvent`](CustomEvent.md) +## Extends -## Properties - -### model? - -```ts -optional model: string; -``` - -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) - -Model identifier for multi-model support - -*** +- `BaseEvent` -### rawEvent? +## Indexable ```ts -optional rawEvent: unknown; +[k: string]: unknown ``` -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -*** +## Properties -### timestamp +### model? ```ts -timestamp: number; +optional model: string; ``` -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -*** +Defined in: [packages/typescript/ai/src/types.ts:787](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L787) -### type - -```ts -type: AGUIEventType; -``` - -Defined in: [types.ts:753](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L753) +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ChatMiddleware.md b/docs/reference/interfaces/ChatMiddleware.md index 1a06b9e1e4..263bca3fc8 100644 --- a/docs/reference/interfaces/ChatMiddleware.md +++ b/docs/reference/interfaces/ChatMiddleware.md @@ -5,7 +5,7 @@ title: ChatMiddleware # Interface: ChatMiddleware -Defined in: [activities/chat/middleware/types.ts:308](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L308) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:308](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L308) Chat middleware interface. @@ -43,7 +43,7 @@ const redactionMiddleware: ChatMiddleware = { optional name: string; ``` -Defined in: [activities/chat/middleware/types.ts:310](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L310) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:310](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L310) Optional name for debugging and identification @@ -55,7 +55,7 @@ Optional name for debugging and identification optional onAbort: (ctx, info) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:406](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L406) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:406](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L406) Called when the chat run is aborted. Exactly one of onFinish/onAbort/onError will be called per run. @@ -82,7 +82,7 @@ Exactly one of onFinish/onAbort/onError will be called per run. optional onAfterToolCall: (ctx, info) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:370](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L370) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:370](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L370) Called after a tool execution completes (success or failure). @@ -110,7 +110,7 @@ optional onBeforeToolCall: (ctx, hookCtx) => | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L362) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L362) Called before a tool is executed. Can observe, transform args, skip execution, or abort the run. @@ -143,7 +143,7 @@ optional onChunk: (ctx, chunk) => | null; ``` -Defined in: [activities/chat/middleware/types.ts:348](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L348) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:348](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L348) Called for every chunk yielded by chat(). Can observe, transform, expand, or drop chunks. @@ -180,7 +180,7 @@ optional onConfig: (ctx, config) => | null; ``` -Defined in: [activities/chat/middleware/types.ts:319](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L319) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:319](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L319) Called to observe or transform the chat configuration. Called at init and at the beginning of each agent iteration. @@ -213,7 +213,7 @@ Only the fields you return are overwritten — everything else is preserved. optional onError: (ctx, info) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:415](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L415) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:415](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L415) Called when the chat run encounters an unhandled error. Exactly one of onFinish/onAbort/onError will be called per run. @@ -240,7 +240,7 @@ Exactly one of onFinish/onAbort/onError will be called per run. optional onFinish: (ctx, info) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:397](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L397) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:397](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L397) Called when the chat run completes normally. Exactly one of onFinish/onAbort/onError will be called per run. @@ -267,7 +267,7 @@ Exactly one of onFinish/onAbort/onError will be called per run. optional onIteration: (ctx, info) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:337](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L337) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:337](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L337) Called at the start of each agent loop iteration, after a new assistant message ID is created. Use this to observe iteration boundaries. @@ -294,7 +294,7 @@ is created. Use this to observe iteration boundaries. optional onStart: (ctx) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L331) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L331) Called when the chat run starts (after initial onConfig). @@ -316,7 +316,7 @@ Called when the chat run starts (after initial onConfig). optional onToolPhaseComplete: (ctx, info) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:379](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L379) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:379](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L379) Called after all tool calls in an iteration have been processed. Provides aggregate data about tool execution results, approvals, and client tools. @@ -343,7 +343,7 @@ Provides aggregate data about tool execution results, approvals, and client tool optional onUsage: (ctx, usage) => void | Promise; ``` -Defined in: [activities/chat/middleware/types.ts:388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L388) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L388) Called when usage data is available from a RUN_FINISHED chunk. Called once per model iteration that reports usage. diff --git a/docs/reference/interfaces/ChatMiddlewareConfig.md b/docs/reference/interfaces/ChatMiddlewareConfig.md index 94e674da67..bbacf98b8e 100644 --- a/docs/reference/interfaces/ChatMiddlewareConfig.md +++ b/docs/reference/interfaces/ChatMiddlewareConfig.md @@ -5,7 +5,7 @@ title: ChatMiddlewareConfig # Interface: ChatMiddlewareConfig -Defined in: [activities/chat/middleware/types.ts:105](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L105) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:105](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L105) Chat configuration that middleware can observe or transform. This is a subset of the chat engine's effective configuration @@ -19,7 +19,7 @@ that middleware is allowed to modify. optional maxTokens: number; ``` -Defined in: [activities/chat/middleware/types.ts:111](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L111) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:111](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L111) *** @@ -32,7 +32,7 @@ messages: ModelMessage< | null>[]; ``` -Defined in: [activities/chat/middleware/types.ts:106](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L106) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:106](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L106) *** @@ -42,7 +42,7 @@ Defined in: [activities/chat/middleware/types.ts:106](https://github.com/TanStac optional metadata: Record; ``` -Defined in: [activities/chat/middleware/types.ts:112](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L112) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:112](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L112) *** @@ -52,7 +52,7 @@ Defined in: [activities/chat/middleware/types.ts:112](https://github.com/TanStac optional modelOptions: Record; ``` -Defined in: [activities/chat/middleware/types.ts:113](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L113) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:113](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L113) *** @@ -62,7 +62,7 @@ Defined in: [activities/chat/middleware/types.ts:113](https://github.com/TanStac systemPrompts: string[]; ``` -Defined in: [activities/chat/middleware/types.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L107) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L107) *** @@ -72,7 +72,7 @@ Defined in: [activities/chat/middleware/types.ts:107](https://github.com/TanStac optional temperature: number; ``` -Defined in: [activities/chat/middleware/types.ts:109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L109) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L109) *** @@ -82,7 +82,7 @@ Defined in: [activities/chat/middleware/types.ts:109](https://github.com/TanStac tools: Tool[]; ``` -Defined in: [activities/chat/middleware/types.ts:108](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L108) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:108](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L108) *** @@ -92,4 +92,4 @@ Defined in: [activities/chat/middleware/types.ts:108](https://github.com/TanStac optional topP: number; ``` -Defined in: [activities/chat/middleware/types.ts:110](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L110) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:110](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L110) diff --git a/docs/reference/interfaces/ChatMiddlewareContext.md b/docs/reference/interfaces/ChatMiddlewareContext.md index 82c5125eed..d5151ad768 100644 --- a/docs/reference/interfaces/ChatMiddlewareContext.md +++ b/docs/reference/interfaces/ChatMiddlewareContext.md @@ -5,7 +5,7 @@ title: ChatMiddlewareContext # Interface: ChatMiddlewareContext -Defined in: [activities/chat/middleware/types.ts:26](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L26) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:26](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L26) Stable context object passed to all middleware hooks. Created once per chat() invocation and shared across all hooks. @@ -18,7 +18,7 @@ Created once per chat() invocation and shared across all hooks. abort: (reason?) => void; ``` -Defined in: [activities/chat/middleware/types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L42) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L42) Abort the chat run with a reason @@ -40,7 +40,7 @@ Abort the chat run with a reason accumulatedContent: string; ``` -Defined in: [activities/chat/middleware/types.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L86) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L86) Accumulated text content for the current iteration @@ -52,7 +52,7 @@ Accumulated text content for the current iteration chunkIndex: number; ``` -Defined in: [activities/chat/middleware/types.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L38) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L38) Running count of chunks yielded so far @@ -64,7 +64,7 @@ Running count of chunks yielded so far context: unknown; ``` -Defined in: [activities/chat/middleware/types.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L44) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L44) Opaque user-provided value from chat() options @@ -76,7 +76,7 @@ Opaque user-provided value from chat() options optional conversationId: string; ``` -Defined in: [activities/chat/middleware/types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L32) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L32) Conversation identifier, if provided by the caller @@ -88,7 +88,7 @@ Conversation identifier, if provided by the caller createId: (prefix) => string; ``` -Defined in: [activities/chat/middleware/types.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L93) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L93) Generate a unique ID with the given prefix @@ -110,7 +110,7 @@ Generate a unique ID with the given prefix currentMessageId: string | null; ``` -Defined in: [activities/chat/middleware/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L84) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L84) Current assistant message ID (changes per iteration) @@ -122,7 +122,7 @@ Current assistant message ID (changes per iteration) defer: (promise) => void; ``` -Defined in: [activities/chat/middleware/types.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L50) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L50) Defer a non-blocking side-effect promise. Deferred promises do not block streaming and are awaited @@ -146,7 +146,7 @@ after the terminal hook (onFinish/onAbort/onError). hasTools: boolean; ``` -Defined in: [activities/chat/middleware/types.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L79) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L79) Whether tools are configured @@ -158,7 +158,7 @@ Whether tools are configured iteration: number; ``` -Defined in: [activities/chat/middleware/types.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L36) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L36) Current agent loop iteration (0-indexed) @@ -170,7 +170,7 @@ Current agent loop iteration (0-indexed) messageCount: number; ``` -Defined in: [activities/chat/middleware/types.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L77) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L77) Number of messages at the start of the request @@ -185,7 +185,7 @@ messages: readonly ModelMessage< | null>[]; ``` -Defined in: [activities/chat/middleware/types.ts:91](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L91) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:91](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L91) Current messages array (read-only view) @@ -197,7 +197,7 @@ Current messages array (read-only view) model: string; ``` -Defined in: [activities/chat/middleware/types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L57) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L57) Model identifier (e.g., 'gpt-4o') @@ -209,7 +209,7 @@ Model identifier (e.g., 'gpt-4o') optional modelOptions: Record; ``` -Defined in: [activities/chat/middleware/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L72) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L72) Provider-specific model options @@ -221,7 +221,7 @@ Provider-specific model options optional options: Record; ``` -Defined in: [activities/chat/middleware/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L70) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L70) Flattened generation options (temperature, topP, maxTokens, metadata) @@ -233,7 +233,7 @@ Flattened generation options (temperature, topP, maxTokens, metadata) phase: ChatMiddlewarePhase; ``` -Defined in: [activities/chat/middleware/types.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L34) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L34) Current lifecycle phase @@ -245,7 +245,7 @@ Current lifecycle phase provider: string; ``` -Defined in: [activities/chat/middleware/types.ts:55](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L55) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:55](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L55) Provider name (e.g., 'openai', 'anthropic') @@ -257,7 +257,7 @@ Provider name (e.g., 'openai', 'anthropic') requestId: string; ``` -Defined in: [activities/chat/middleware/types.ts:28](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L28) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:28](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L28) Unique identifier for this chat request @@ -269,7 +269,7 @@ Unique identifier for this chat request optional signal: AbortSignal; ``` -Defined in: [activities/chat/middleware/types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L40) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L40) Abort signal from the chat request @@ -281,7 +281,7 @@ Abort signal from the chat request source: "client" | "server"; ``` -Defined in: [activities/chat/middleware/types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L59) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L59) Source of the chat invocation — always 'server' for server-side chat @@ -293,7 +293,7 @@ Source of the chat invocation — always 'server' for server-side chat streamId: string; ``` -Defined in: [activities/chat/middleware/types.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L30) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L30) Unique identifier for this stream @@ -305,7 +305,7 @@ Unique identifier for this stream streaming: boolean; ``` -Defined in: [activities/chat/middleware/types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L61) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L61) Whether the chat is streaming @@ -317,7 +317,7 @@ Whether the chat is streaming systemPrompts: string[]; ``` -Defined in: [activities/chat/middleware/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L66) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L66) System prompts configured for this chat @@ -329,6 +329,6 @@ System prompts configured for this chat optional toolNames: string[]; ``` -Defined in: [activities/chat/middleware/types.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L68) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L68) Names of configured tools, if any diff --git a/docs/reference/interfaces/ChunkRecording.md b/docs/reference/interfaces/ChunkRecording.md index 198d174dc5..3deb313102 100644 --- a/docs/reference/interfaces/ChunkRecording.md +++ b/docs/reference/interfaces/ChunkRecording.md @@ -5,7 +5,7 @@ title: ChunkRecording # Interface: ChunkRecording -Defined in: [activities/chat/stream/types.ts:91](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L91) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:92](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L92) Recording format for replay testing @@ -17,7 +17,7 @@ Recording format for replay testing chunks: object[]; ``` -Defined in: [activities/chat/stream/types.ts:96](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L96) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:97](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L97) #### chunk @@ -45,7 +45,7 @@ timestamp: number; optional model: string; ``` -Defined in: [activities/chat/stream/types.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L94) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L95) *** @@ -55,7 +55,7 @@ Defined in: [activities/chat/stream/types.ts:94](https://github.com/TanStack/ai/ optional provider: string; ``` -Defined in: [activities/chat/stream/types.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L95) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:96](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L96) *** @@ -65,7 +65,7 @@ Defined in: [activities/chat/stream/types.ts:95](https://github.com/TanStack/ai/ optional result: ProcessorResult; ``` -Defined in: [activities/chat/stream/types.ts:101](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L101) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:102](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L102) *** @@ -75,7 +75,7 @@ Defined in: [activities/chat/stream/types.ts:101](https://github.com/TanStack/ai timestamp: number; ``` -Defined in: [activities/chat/stream/types.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L93) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L94) *** @@ -85,4 +85,4 @@ Defined in: [activities/chat/stream/types.ts:93](https://github.com/TanStack/ai/ version: "1.0"; ``` -Defined in: [activities/chat/stream/types.ts:92](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L92) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L93) diff --git a/docs/reference/interfaces/ChunkStrategy.md b/docs/reference/interfaces/ChunkStrategy.md index a6652233d7..f06570ec76 100644 --- a/docs/reference/interfaces/ChunkStrategy.md +++ b/docs/reference/interfaces/ChunkStrategy.md @@ -5,7 +5,7 @@ title: ChunkStrategy # Interface: ChunkStrategy -Defined in: [activities/chat/stream/types.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L33) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L33) Strategy for determining when to emit text updates @@ -17,7 +17,7 @@ Strategy for determining when to emit text updates optional reset: () => void; ``` -Defined in: [activities/chat/stream/types.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L45) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L45) Optional: Reset strategy state (called when streaming starts) @@ -33,7 +33,7 @@ Optional: Reset strategy state (called when streaming starts) shouldEmit: (chunk, accumulated) => boolean; ``` -Defined in: [activities/chat/stream/types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L40) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L40) Called for each text chunk received diff --git a/docs/reference/interfaces/ClientTool.md b/docs/reference/interfaces/ClientTool.md index 6f5839d209..404b5850b5 100644 --- a/docs/reference/interfaces/ClientTool.md +++ b/docs/reference/interfaces/ClientTool.md @@ -5,7 +5,7 @@ title: ClientTool # Interface: ClientTool\ -Defined in: [activities/chat/tools/tool-definition.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L24) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L24) Marker type for client-side tools @@ -31,7 +31,7 @@ Marker type for client-side tools __toolSide: "client"; ``` -Defined in: [activities/chat/tools/tool-definition.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L29) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L29) *** @@ -41,7 +41,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:29](https://github.com/Tan description: string; ``` -Defined in: [activities/chat/tools/tool-definition.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L31) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L31) *** @@ -53,7 +53,7 @@ optional execute: (args) => | Promise>; ``` -Defined in: [activities/chat/tools/tool-definition.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L37) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L37) #### Parameters @@ -74,7 +74,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:37](https://github.com/Tan optional inputSchema: TInput; ``` -Defined in: [activities/chat/tools/tool-definition.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L32) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L32) *** @@ -84,7 +84,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:32](https://github.com/Tan optional lazy: boolean; ``` -Defined in: [activities/chat/tools/tool-definition.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L35) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L35) *** @@ -94,7 +94,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:35](https://github.com/Tan optional metadata: Record; ``` -Defined in: [activities/chat/tools/tool-definition.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L36) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L36) *** @@ -104,7 +104,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:36](https://github.com/Tan name: TName; ``` -Defined in: [activities/chat/tools/tool-definition.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L30) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L30) *** @@ -114,7 +114,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:30](https://github.com/Tan optional needsApproval: boolean; ``` -Defined in: [activities/chat/tools/tool-definition.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L34) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L34) *** @@ -124,4 +124,4 @@ Defined in: [activities/chat/tools/tool-definition.ts:34](https://github.com/Tan optional outputSchema: TOutput; ``` -Defined in: [activities/chat/tools/tool-definition.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L33) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L33) diff --git a/docs/reference/interfaces/ContentPartDataSource.md b/docs/reference/interfaces/ContentPartDataSource.md index bb275cef28..f97479f13a 100644 --- a/docs/reference/interfaces/ContentPartDataSource.md +++ b/docs/reference/interfaces/ContentPartDataSource.md @@ -5,7 +5,7 @@ title: ContentPartDataSource # Interface: ContentPartDataSource -Defined in: [types.ts:116](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L116) +Defined in: [packages/typescript/ai/src/types.ts:142](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L142) Source specification for inline data content (base64). Requires a mimeType to ensure providers receive proper content type information. @@ -18,7 +18,7 @@ Requires a mimeType to ensure providers receive proper content type information. mimeType: string; ``` -Defined in: [types.ts:129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L129) +Defined in: [packages/typescript/ai/src/types.ts:155](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L155) The MIME type of the content (e.g., 'image/png', 'audio/wav'). Required for data sources to ensure proper handling by providers. @@ -31,7 +31,7 @@ Required for data sources to ensure proper handling by providers. type: "data"; ``` -Defined in: [types.ts:120](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L120) +Defined in: [packages/typescript/ai/src/types.ts:146](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L146) Indicates this is inline data content. @@ -43,6 +43,6 @@ Indicates this is inline data content. value: string; ``` -Defined in: [types.ts:124](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L124) +Defined in: [packages/typescript/ai/src/types.ts:150](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L150) The base64-encoded content value. diff --git a/docs/reference/interfaces/ContentPartUrlSource.md b/docs/reference/interfaces/ContentPartUrlSource.md index 1f8dc4e8ff..a14d570ac5 100644 --- a/docs/reference/interfaces/ContentPartUrlSource.md +++ b/docs/reference/interfaces/ContentPartUrlSource.md @@ -5,7 +5,7 @@ title: ContentPartUrlSource # Interface: ContentPartUrlSource -Defined in: [types.ts:136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L136) +Defined in: [packages/typescript/ai/src/types.ts:162](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L162) Source specification for URL-based content. mimeType is optional as it can often be inferred from the URL or response headers. @@ -18,7 +18,7 @@ mimeType is optional as it can often be inferred from the URL or response header optional mimeType: string; ``` -Defined in: [types.ts:148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L148) +Defined in: [packages/typescript/ai/src/types.ts:174](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L174) Optional MIME type hint for cases where providers can't infer it from the URL. @@ -30,7 +30,7 @@ Optional MIME type hint for cases where providers can't infer it from the URL. type: "url"; ``` -Defined in: [types.ts:140](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L140) +Defined in: [packages/typescript/ai/src/types.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L166) Indicates this is URL-referenced content. @@ -42,6 +42,6 @@ Indicates this is URL-referenced content. value: string; ``` -Defined in: [types.ts:144](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L144) +Defined in: [packages/typescript/ai/src/types.ts:170](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L170) HTTP(S) URL or data URI pointing to the content. diff --git a/docs/reference/interfaces/CustomEvent.md b/docs/reference/interfaces/CustomEvent.md index 799044a376..789f6cedf9 100644 --- a/docs/reference/interfaces/CustomEvent.md +++ b/docs/reference/interfaces/CustomEvent.md @@ -5,94 +5,31 @@ title: CustomEvent # Interface: CustomEvent -Defined in: [types.ts:944](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L944) +Defined in: [packages/typescript/ai/src/types.ts:1033](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1033) Custom event for extensibility. -## Extends - -- [`BaseAGUIEvent`](BaseAGUIEvent.md) - -## Properties - -### model? - -```ts -optional model: string; -``` - -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) - -Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### name - -```ts -name: string; -``` - -Defined in: [types.ts:947](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L947) - -Custom event name - -*** +@ag-ui/core provides: `name`, `value` +TanStack AI adds: `model?` -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) +## Extends -*** +- `CustomEvent` -### type +## Indexable ```ts -type: "CUSTOM"; +[k: string]: unknown ``` -Defined in: [types.ts:945](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L945) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) - -*** +## Properties -### value? +### model? ```ts -optional value: unknown; +optional model: string; ``` -Defined in: [types.ts:949](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L949) +Defined in: [packages/typescript/ai/src/types.ts:1035](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1035) -Custom event value +Model identifier for multi-model support diff --git a/docs/reference/interfaces/DefaultMessageMetadataByModality.md b/docs/reference/interfaces/DefaultMessageMetadataByModality.md index 3463c74902..508ed7020f 100644 --- a/docs/reference/interfaces/DefaultMessageMetadataByModality.md +++ b/docs/reference/interfaces/DefaultMessageMetadataByModality.md @@ -5,7 +5,7 @@ title: DefaultMessageMetadataByModality # Interface: DefaultMessageMetadataByModality -Defined in: [types.ts:1254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1254) +Defined in: [packages/typescript/ai/src/types.ts:1421](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1421) Default metadata type for adapters that don't define custom metadata. Uses unknown for all modalities. @@ -18,7 +18,7 @@ Uses unknown for all modalities. audio: unknown; ``` -Defined in: [types.ts:1257](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1257) +Defined in: [packages/typescript/ai/src/types.ts:1424](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1424) *** @@ -28,7 +28,7 @@ Defined in: [types.ts:1257](https://github.com/TanStack/ai/blob/main/packages/ty document: unknown; ``` -Defined in: [types.ts:1259](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1259) +Defined in: [packages/typescript/ai/src/types.ts:1426](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1426) *** @@ -38,7 +38,7 @@ Defined in: [types.ts:1259](https://github.com/TanStack/ai/blob/main/packages/ty image: unknown; ``` -Defined in: [types.ts:1256](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1256) +Defined in: [packages/typescript/ai/src/types.ts:1423](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1423) *** @@ -48,7 +48,7 @@ Defined in: [types.ts:1256](https://github.com/TanStack/ai/blob/main/packages/ty text: unknown; ``` -Defined in: [types.ts:1255](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1255) +Defined in: [packages/typescript/ai/src/types.ts:1422](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1422) *** @@ -58,4 +58,4 @@ Defined in: [types.ts:1255](https://github.com/TanStack/ai/blob/main/packages/ty video: unknown; ``` -Defined in: [types.ts:1258](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1258) +Defined in: [packages/typescript/ai/src/types.ts:1425](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1425) diff --git a/docs/reference/interfaces/DocumentPart.md b/docs/reference/interfaces/DocumentPart.md index 82bccade98..8f452df631 100644 --- a/docs/reference/interfaces/DocumentPart.md +++ b/docs/reference/interfaces/DocumentPart.md @@ -5,7 +5,7 @@ title: DocumentPart # Interface: DocumentPart\ -Defined in: [types.ts:199](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L199) +Defined in: [packages/typescript/ai/src/types.ts:225](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L225) Document content part for multimodal messages (e.g., PDFs). @@ -25,7 +25,7 @@ Provider-specific metadata type (e.g., Anthropic's media_type) optional metadata: TMetadata; ``` -Defined in: [types.ts:204](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L204) +Defined in: [packages/typescript/ai/src/types.ts:230](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L230) Provider-specific metadata (e.g., media_type for PDFs) @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., media_type for PDFs) source: ContentPartSource; ``` -Defined in: [types.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L202) +Defined in: [packages/typescript/ai/src/types.ts:228](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L228) Source of the document content @@ -49,4 +49,4 @@ Source of the document content type: "document"; ``` -Defined in: [types.ts:200](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L200) +Defined in: [packages/typescript/ai/src/types.ts:226](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L226) diff --git a/docs/reference/interfaces/ErrorInfo.md b/docs/reference/interfaces/ErrorInfo.md index b497142f97..73cd2fc8f1 100644 --- a/docs/reference/interfaces/ErrorInfo.md +++ b/docs/reference/interfaces/ErrorInfo.md @@ -5,7 +5,7 @@ title: ErrorInfo # Interface: ErrorInfo -Defined in: [activities/chat/middleware/types.ts:268](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L268) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:268](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L268) Information passed to onError. @@ -17,7 +17,7 @@ Information passed to onError. duration: number; ``` -Defined in: [activities/chat/middleware/types.ts:272](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L272) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:272](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L272) Duration until error in milliseconds @@ -29,6 +29,6 @@ Duration until error in milliseconds error: unknown; ``` -Defined in: [activities/chat/middleware/types.ts:270](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L270) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:270](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L270) The error that caused the failure diff --git a/docs/reference/interfaces/ExtendedModelDef.md b/docs/reference/interfaces/ExtendedModelDef.md index 2c837ef36f..2d197faa51 100644 --- a/docs/reference/interfaces/ExtendedModelDef.md +++ b/docs/reference/interfaces/ExtendedModelDef.md @@ -5,7 +5,7 @@ title: ExtendedModelDef # Interface: ExtendedModelDef\ -Defined in: [extend-adapter.ts:21](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L21) +Defined in: [packages/typescript/ai/src/extend-adapter.ts:21](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L21) Definition for a custom model to add to an adapter. @@ -45,7 +45,7 @@ Provider options type for this model input: TInput; ``` -Defined in: [extend-adapter.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L29) +Defined in: [packages/typescript/ai/src/extend-adapter.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L29) Supported input modalities for this model @@ -57,7 +57,7 @@ Supported input modalities for this model modelOptions: TOptions; ``` -Defined in: [extend-adapter.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L31) +Defined in: [packages/typescript/ai/src/extend-adapter.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L31) Type brand for provider options - use `{} as YourOptionsType` @@ -69,6 +69,6 @@ Type brand for provider options - use `{} as YourOptionsType` name: TName; ``` -Defined in: [extend-adapter.ts:27](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L27) +Defined in: [packages/typescript/ai/src/extend-adapter.ts:27](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/extend-adapter.ts#L27) The model name identifier diff --git a/docs/reference/interfaces/FinishInfo.md b/docs/reference/interfaces/FinishInfo.md index a4bd76a60a..cd000f75c3 100644 --- a/docs/reference/interfaces/FinishInfo.md +++ b/docs/reference/interfaces/FinishInfo.md @@ -5,7 +5,7 @@ title: FinishInfo # Interface: FinishInfo -Defined in: [activities/chat/middleware/types.ts:240](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L240) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:240](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L240) Information passed to onFinish. @@ -17,7 +17,7 @@ Information passed to onFinish. content: string; ``` -Defined in: [activities/chat/middleware/types.ts:246](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L246) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:246](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L246) Final accumulated text content @@ -29,7 +29,7 @@ Final accumulated text content duration: number; ``` -Defined in: [activities/chat/middleware/types.ts:244](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L244) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:244](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L244) Total duration of the chat run in milliseconds @@ -41,7 +41,7 @@ Total duration of the chat run in milliseconds finishReason: string | null; ``` -Defined in: [activities/chat/middleware/types.ts:242](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L242) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:242](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L242) The finish reason from the last model response @@ -53,7 +53,7 @@ The finish reason from the last model response optional usage: object; ``` -Defined in: [activities/chat/middleware/types.ts:248](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L248) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:248](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L248) Final usage totals, if available diff --git a/docs/reference/interfaces/GeneratedImage.md b/docs/reference/interfaces/GeneratedImage.md index fc85fdcc03..71e2eaf665 100644 --- a/docs/reference/interfaces/GeneratedImage.md +++ b/docs/reference/interfaces/GeneratedImage.md @@ -5,7 +5,7 @@ title: GeneratedImage # Interface: GeneratedImage -Defined in: [types.ts:1039](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1039) +Defined in: [packages/typescript/ai/src/types.ts:1206](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1206) A single generated image @@ -17,7 +17,7 @@ A single generated image optional b64Json: string; ``` -Defined in: [types.ts:1041](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1041) +Defined in: [packages/typescript/ai/src/types.ts:1208](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1208) Base64-encoded image data @@ -29,7 +29,7 @@ Base64-encoded image data optional revisedPrompt: string; ``` -Defined in: [types.ts:1045](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1045) +Defined in: [packages/typescript/ai/src/types.ts:1212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1212) Revised prompt used by the model (if applicable) @@ -41,6 +41,6 @@ Revised prompt used by the model (if applicable) optional url: string; ``` -Defined in: [types.ts:1043](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1043) +Defined in: [packages/typescript/ai/src/types.ts:1210](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1210) URL to the generated image (may be temporary) diff --git a/docs/reference/interfaces/ImageAdapter.md b/docs/reference/interfaces/ImageAdapter.md index 762fa78986..c2e49e1f80 100644 --- a/docs/reference/interfaces/ImageAdapter.md +++ b/docs/reference/interfaces/ImageAdapter.md @@ -5,7 +5,7 @@ title: ImageAdapter # Interface: ImageAdapter\ -Defined in: [activities/generateImage/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L33) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L33) Image adapter interface with pre-resolved generics. @@ -44,7 +44,7 @@ Generic parameters: ~types: object; ``` -Defined in: [activities/generateImage/adapter.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L49) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L49) **`Internal`** @@ -76,7 +76,7 @@ providerOptions: TProviderOptions; generateImages: (options) => Promise; ``` -Defined in: [activities/generateImage/adapter.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L58) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L58) Generate images from a prompt @@ -98,7 +98,7 @@ Generate images from a prompt readonly kind: "image"; ``` -Defined in: [activities/generateImage/adapter.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L40) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L40) Discriminator for adapter kind - used by generate() to determine API shape @@ -110,7 +110,7 @@ Discriminator for adapter kind - used by generate() to determine API shape readonly model: TModel; ``` -Defined in: [activities/generateImage/adapter.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L44) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L44) The model this adapter is configured for @@ -122,6 +122,6 @@ The model this adapter is configured for readonly name: string; ``` -Defined in: [activities/generateImage/adapter.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L42) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L42) Adapter name identifier diff --git a/docs/reference/interfaces/ImageGenerationOptions.md b/docs/reference/interfaces/ImageGenerationOptions.md index d532ccc4bb..532cbfb904 100644 --- a/docs/reference/interfaces/ImageGenerationOptions.md +++ b/docs/reference/interfaces/ImageGenerationOptions.md @@ -5,7 +5,7 @@ title: ImageGenerationOptions # Interface: ImageGenerationOptions\ -Defined in: [types.ts:1020](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1020) +Defined in: [packages/typescript/ai/src/types.ts:1187](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1187) Options for image generation. These are the common options supported across providers. @@ -28,7 +28,7 @@ These are the common options supported across providers. model: string; ``` -Defined in: [types.ts:1025](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1025) +Defined in: [packages/typescript/ai/src/types.ts:1192](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1192) The model to use for image generation @@ -40,7 +40,7 @@ The model to use for image generation optional modelOptions: TProviderOptions; ``` -Defined in: [types.ts:1033](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1033) +Defined in: [packages/typescript/ai/src/types.ts:1200](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1200) Model-specific options for image generation @@ -52,7 +52,7 @@ Model-specific options for image generation optional numberOfImages: number; ``` -Defined in: [types.ts:1029](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1029) +Defined in: [packages/typescript/ai/src/types.ts:1196](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1196) Number of images to generate (default: 1) @@ -64,7 +64,7 @@ Number of images to generate (default: 1) prompt: string; ``` -Defined in: [types.ts:1027](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1027) +Defined in: [packages/typescript/ai/src/types.ts:1194](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1194) Text description of the desired image(s) @@ -76,6 +76,6 @@ Text description of the desired image(s) optional size: TSize; ``` -Defined in: [types.ts:1031](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1031) +Defined in: [packages/typescript/ai/src/types.ts:1198](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1198) Image size in WIDTHxHEIGHT format (e.g., "1024x1024") diff --git a/docs/reference/interfaces/ImageGenerationResult.md b/docs/reference/interfaces/ImageGenerationResult.md index 3866823dde..d40aefa1e5 100644 --- a/docs/reference/interfaces/ImageGenerationResult.md +++ b/docs/reference/interfaces/ImageGenerationResult.md @@ -5,7 +5,7 @@ title: ImageGenerationResult # Interface: ImageGenerationResult -Defined in: [types.ts:1051](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1051) +Defined in: [packages/typescript/ai/src/types.ts:1218](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1218) Result of image generation @@ -17,7 +17,7 @@ Result of image generation id: string; ``` -Defined in: [types.ts:1053](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1053) +Defined in: [packages/typescript/ai/src/types.ts:1220](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1220) Unique identifier for the generation @@ -29,7 +29,7 @@ Unique identifier for the generation images: GeneratedImage[]; ``` -Defined in: [types.ts:1057](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1057) +Defined in: [packages/typescript/ai/src/types.ts:1224](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1224) Array of generated images @@ -41,7 +41,7 @@ Array of generated images model: string; ``` -Defined in: [types.ts:1055](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1055) +Defined in: [packages/typescript/ai/src/types.ts:1222](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1222) Model used for generation @@ -53,7 +53,7 @@ Model used for generation optional usage: object; ``` -Defined in: [types.ts:1059](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1059) +Defined in: [packages/typescript/ai/src/types.ts:1226](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1226) Token usage information (if available) diff --git a/docs/reference/interfaces/ImagePart.md b/docs/reference/interfaces/ImagePart.md index 6ac2413103..ddb7a60124 100644 --- a/docs/reference/interfaces/ImagePart.md +++ b/docs/reference/interfaces/ImagePart.md @@ -5,7 +5,7 @@ title: ImagePart # Interface: ImagePart\ -Defined in: [types.ts:163](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L163) +Defined in: [packages/typescript/ai/src/types.ts:189](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L189) Image content part for multimodal messages. @@ -25,7 +25,7 @@ Provider-specific metadata type (e.g., OpenAI's detail level) optional metadata: TMetadata; ``` -Defined in: [types.ts:168](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L168) +Defined in: [packages/typescript/ai/src/types.ts:194](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L194) Provider-specific metadata (e.g., OpenAI's detail: 'auto' | 'low' | 'high') @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., OpenAI's detail: 'auto' | 'low' | 'high') source: ContentPartSource; ``` -Defined in: [types.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L166) +Defined in: [packages/typescript/ai/src/types.ts:192](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L192) Source of the image content @@ -49,4 +49,4 @@ Source of the image content type: "image"; ``` -Defined in: [types.ts:164](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L164) +Defined in: [packages/typescript/ai/src/types.ts:190](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L190) diff --git a/docs/reference/interfaces/InternalToolCallState.md b/docs/reference/interfaces/InternalToolCallState.md index 2f8e501485..909e64b32b 100644 --- a/docs/reference/interfaces/InternalToolCallState.md +++ b/docs/reference/interfaces/InternalToolCallState.md @@ -5,7 +5,7 @@ title: InternalToolCallState # Interface: InternalToolCallState -Defined in: [activities/chat/stream/types.ts:21](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L21) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:21](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L21) Internal state for a tool call being tracked @@ -17,7 +17,7 @@ Internal state for a tool call being tracked arguments: string; ``` -Defined in: [activities/chat/stream/types.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L24) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L24) *** @@ -27,7 +27,7 @@ Defined in: [activities/chat/stream/types.ts:24](https://github.com/TanStack/ai/ id: string; ``` -Defined in: [activities/chat/stream/types.ts:22](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L22) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:22](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L22) *** @@ -37,7 +37,7 @@ Defined in: [activities/chat/stream/types.ts:22](https://github.com/TanStack/ai/ index: number; ``` -Defined in: [activities/chat/stream/types.ts:27](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L27) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:27](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L27) *** @@ -47,7 +47,7 @@ Defined in: [activities/chat/stream/types.ts:27](https://github.com/TanStack/ai/ name: string; ``` -Defined in: [activities/chat/stream/types.ts:23](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L23) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:23](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L23) *** @@ -57,7 +57,7 @@ Defined in: [activities/chat/stream/types.ts:23](https://github.com/TanStack/ai/ optional parsedArguments: any; ``` -Defined in: [activities/chat/stream/types.ts:26](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L26) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:26](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L26) *** @@ -67,4 +67,4 @@ Defined in: [activities/chat/stream/types.ts:26](https://github.com/TanStack/ai/ state: ToolCallState; ``` -Defined in: [activities/chat/stream/types.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L25) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L25) diff --git a/docs/reference/interfaces/IterationInfo.md b/docs/reference/interfaces/IterationInfo.md index 589b9da7b0..dee9ebb80a 100644 --- a/docs/reference/interfaces/IterationInfo.md +++ b/docs/reference/interfaces/IterationInfo.md @@ -5,7 +5,7 @@ title: IterationInfo # Interface: IterationInfo -Defined in: [activities/chat/middleware/types.ts:179](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L179) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:179](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L179) Information passed to onIteration at the start of each agent loop iteration. @@ -17,7 +17,7 @@ Information passed to onIteration at the start of each agent loop iteration. iteration: number; ``` -Defined in: [activities/chat/middleware/types.ts:181](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L181) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:181](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L181) 0-based iteration index @@ -29,6 +29,6 @@ Defined in: [activities/chat/middleware/types.ts:181](https://github.com/TanStac messageId: string; ``` -Defined in: [activities/chat/middleware/types.ts:183](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L183) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:183](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L183) The assistant message ID created for this iteration diff --git a/docs/reference/interfaces/JSONParser.md b/docs/reference/interfaces/JSONParser.md index b0b665af9b..1cb7a7f902 100644 --- a/docs/reference/interfaces/JSONParser.md +++ b/docs/reference/interfaces/JSONParser.md @@ -5,7 +5,7 @@ title: JSONParser # Interface: JSONParser -Defined in: [activities/chat/stream/json-parser.ts:12](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L12) +Defined in: [packages/typescript/ai/src/activities/chat/stream/json-parser.ts:12](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L12) JSON Parser interface - allows for custom parser implementations @@ -17,7 +17,7 @@ JSON Parser interface - allows for custom parser implementations parse: (jsonString) => any; ``` -Defined in: [activities/chat/stream/json-parser.ts:18](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L18) +Defined in: [packages/typescript/ai/src/activities/chat/stream/json-parser.ts:18](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L18) Parse a JSON string (may be incomplete/partial) diff --git a/docs/reference/interfaces/JSONSchema.md b/docs/reference/interfaces/JSONSchema.md index 096b771788..20d4df6c9f 100644 --- a/docs/reference/interfaces/JSONSchema.md +++ b/docs/reference/interfaces/JSONSchema.md @@ -5,7 +5,7 @@ title: JSONSchema # Interface: JSONSchema -Defined in: [types.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L25) +Defined in: [packages/typescript/ai/src/types.ts:51](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L51) JSON Schema type for defining tool input/output schemas as raw JSON Schema objects. This allows tools to be defined without schema libraries when you have JSON Schema definitions available. @@ -24,7 +24,7 @@ This allows tools to be defined without schema libraries when you have JSON Sche optional $defs: Record; ``` -Defined in: [types.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L35) +Defined in: [packages/typescript/ai/src/types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L61) *** @@ -34,7 +34,7 @@ Defined in: [types.ts:35](https://github.com/TanStack/ai/blob/main/packages/type optional $ref: string; ``` -Defined in: [types.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L34) +Defined in: [packages/typescript/ai/src/types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L60) *** @@ -44,7 +44,7 @@ Defined in: [types.ts:34](https://github.com/TanStack/ai/blob/main/packages/type optional additionalItems: boolean | JSONSchema; ``` -Defined in: [types.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L56) +Defined in: [packages/typescript/ai/src/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L82) *** @@ -54,7 +54,7 @@ Defined in: [types.ts:56](https://github.com/TanStack/ai/blob/main/packages/type optional additionalProperties: boolean | JSONSchema; ``` -Defined in: [types.ts:55](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L55) +Defined in: [packages/typescript/ai/src/types.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L81) *** @@ -64,7 +64,7 @@ Defined in: [types.ts:55](https://github.com/TanStack/ai/blob/main/packages/type optional allOf: JSONSchema[]; ``` -Defined in: [types.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L37) +Defined in: [packages/typescript/ai/src/types.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L63) *** @@ -74,7 +74,7 @@ Defined in: [types.ts:37](https://github.com/TanStack/ai/blob/main/packages/type optional anyOf: JSONSchema[]; ``` -Defined in: [types.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L38) +Defined in: [packages/typescript/ai/src/types.ts:64](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L64) *** @@ -84,7 +84,7 @@ Defined in: [types.ts:38](https://github.com/TanStack/ai/blob/main/packages/type optional const: unknown; ``` -Defined in: [types.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L31) +Defined in: [packages/typescript/ai/src/types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L57) *** @@ -94,7 +94,7 @@ Defined in: [types.ts:31](https://github.com/TanStack/ai/blob/main/packages/type optional default: unknown; ``` -Defined in: [types.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L33) +Defined in: [packages/typescript/ai/src/types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L59) *** @@ -104,7 +104,7 @@ Defined in: [types.ts:33](https://github.com/TanStack/ai/blob/main/packages/type optional definitions: Record; ``` -Defined in: [types.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L36) +Defined in: [packages/typescript/ai/src/types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L62) *** @@ -114,7 +114,7 @@ Defined in: [types.ts:36](https://github.com/TanStack/ai/blob/main/packages/type optional description: string; ``` -Defined in: [types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L32) +Defined in: [packages/typescript/ai/src/types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L58) *** @@ -124,7 +124,7 @@ Defined in: [types.ts:32](https://github.com/TanStack/ai/blob/main/packages/type optional else: JSONSchema; ``` -Defined in: [types.ts:43](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L43) +Defined in: [packages/typescript/ai/src/types.ts:69](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L69) *** @@ -134,7 +134,7 @@ Defined in: [types.ts:43](https://github.com/TanStack/ai/blob/main/packages/type optional enum: unknown[]; ``` -Defined in: [types.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L30) +Defined in: [packages/typescript/ai/src/types.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L56) *** @@ -144,7 +144,7 @@ Defined in: [types.ts:30](https://github.com/TanStack/ai/blob/main/packages/type optional examples: unknown[]; ``` -Defined in: [types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L62) +Defined in: [packages/typescript/ai/src/types.ts:88](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L88) *** @@ -154,7 +154,7 @@ Defined in: [types.ts:62](https://github.com/TanStack/ai/blob/main/packages/type optional exclusiveMaximum: number; ``` -Defined in: [types.ts:47](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L47) +Defined in: [packages/typescript/ai/src/types.ts:73](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L73) *** @@ -164,7 +164,7 @@ Defined in: [types.ts:47](https://github.com/TanStack/ai/blob/main/packages/type optional exclusiveMinimum: number; ``` -Defined in: [types.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L46) +Defined in: [packages/typescript/ai/src/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L72) *** @@ -174,7 +174,7 @@ Defined in: [types.ts:46](https://github.com/TanStack/ai/blob/main/packages/type optional format: string; ``` -Defined in: [types.ts:51](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L51) +Defined in: [packages/typescript/ai/src/types.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L77) *** @@ -184,7 +184,7 @@ Defined in: [types.ts:51](https://github.com/TanStack/ai/blob/main/packages/type optional if: JSONSchema; ``` -Defined in: [types.ts:41](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L41) +Defined in: [packages/typescript/ai/src/types.ts:67](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L67) *** @@ -194,7 +194,7 @@ Defined in: [types.ts:41](https://github.com/TanStack/ai/blob/main/packages/type optional items: JSONSchema | JSONSchema[]; ``` -Defined in: [types.ts:28](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L28) +Defined in: [packages/typescript/ai/src/types.ts:54](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L54) *** @@ -204,7 +204,7 @@ Defined in: [types.ts:28](https://github.com/TanStack/ai/blob/main/packages/type optional maximum: number; ``` -Defined in: [types.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L45) +Defined in: [packages/typescript/ai/src/types.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L71) *** @@ -214,7 +214,7 @@ Defined in: [types.ts:45](https://github.com/TanStack/ai/blob/main/packages/type optional maxItems: number; ``` -Defined in: [types.ts:53](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L53) +Defined in: [packages/typescript/ai/src/types.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L79) *** @@ -224,7 +224,7 @@ Defined in: [types.ts:53](https://github.com/TanStack/ai/blob/main/packages/type optional maxLength: number; ``` -Defined in: [types.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L49) +Defined in: [packages/typescript/ai/src/types.ts:75](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L75) *** @@ -234,7 +234,7 @@ Defined in: [types.ts:49](https://github.com/TanStack/ai/blob/main/packages/type optional maxProperties: number; ``` -Defined in: [types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L60) +Defined in: [packages/typescript/ai/src/types.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L86) *** @@ -244,7 +244,7 @@ Defined in: [types.ts:60](https://github.com/TanStack/ai/blob/main/packages/type optional minimum: number; ``` -Defined in: [types.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L44) +Defined in: [packages/typescript/ai/src/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L70) *** @@ -254,7 +254,7 @@ Defined in: [types.ts:44](https://github.com/TanStack/ai/blob/main/packages/type optional minItems: number; ``` -Defined in: [types.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L52) +Defined in: [packages/typescript/ai/src/types.ts:78](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L78) *** @@ -264,7 +264,7 @@ Defined in: [types.ts:52](https://github.com/TanStack/ai/blob/main/packages/type optional minLength: number; ``` -Defined in: [types.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L48) +Defined in: [packages/typescript/ai/src/types.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L74) *** @@ -274,7 +274,7 @@ Defined in: [types.ts:48](https://github.com/TanStack/ai/blob/main/packages/type optional minProperties: number; ``` -Defined in: [types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L59) +Defined in: [packages/typescript/ai/src/types.ts:85](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L85) *** @@ -284,7 +284,7 @@ Defined in: [types.ts:59](https://github.com/TanStack/ai/blob/main/packages/type optional not: JSONSchema; ``` -Defined in: [types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L40) +Defined in: [packages/typescript/ai/src/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L66) *** @@ -294,7 +294,7 @@ Defined in: [types.ts:40](https://github.com/TanStack/ai/blob/main/packages/type optional oneOf: JSONSchema[]; ``` -Defined in: [types.ts:39](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L39) +Defined in: [packages/typescript/ai/src/types.ts:65](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L65) *** @@ -304,7 +304,7 @@ Defined in: [types.ts:39](https://github.com/TanStack/ai/blob/main/packages/type optional pattern: string; ``` -Defined in: [types.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L50) +Defined in: [packages/typescript/ai/src/types.ts:76](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L76) *** @@ -314,7 +314,7 @@ Defined in: [types.ts:50](https://github.com/TanStack/ai/blob/main/packages/type optional patternProperties: Record; ``` -Defined in: [types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L57) +Defined in: [packages/typescript/ai/src/types.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L83) *** @@ -324,7 +324,7 @@ Defined in: [types.ts:57](https://github.com/TanStack/ai/blob/main/packages/type optional properties: Record; ``` -Defined in: [types.ts:27](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L27) +Defined in: [packages/typescript/ai/src/types.ts:53](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L53) *** @@ -334,7 +334,7 @@ Defined in: [types.ts:27](https://github.com/TanStack/ai/blob/main/packages/type optional propertyNames: JSONSchema; ``` -Defined in: [types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L58) +Defined in: [packages/typescript/ai/src/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L84) *** @@ -344,7 +344,7 @@ Defined in: [types.ts:58](https://github.com/TanStack/ai/blob/main/packages/type optional required: string[]; ``` -Defined in: [types.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L29) +Defined in: [packages/typescript/ai/src/types.ts:55](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L55) *** @@ -354,7 +354,7 @@ Defined in: [types.ts:29](https://github.com/TanStack/ai/blob/main/packages/type optional then: JSONSchema; ``` -Defined in: [types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L42) +Defined in: [packages/typescript/ai/src/types.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L68) *** @@ -364,7 +364,7 @@ Defined in: [types.ts:42](https://github.com/TanStack/ai/blob/main/packages/type optional title: string; ``` -Defined in: [types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L61) +Defined in: [packages/typescript/ai/src/types.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L87) *** @@ -374,7 +374,7 @@ Defined in: [types.ts:61](https://github.com/TanStack/ai/blob/main/packages/type optional type: string | string[]; ``` -Defined in: [types.ts:26](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L26) +Defined in: [packages/typescript/ai/src/types.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L52) *** @@ -384,4 +384,4 @@ Defined in: [types.ts:26](https://github.com/TanStack/ai/blob/main/packages/type optional uniqueItems: boolean; ``` -Defined in: [types.ts:54](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L54) +Defined in: [packages/typescript/ai/src/types.ts:80](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L80) diff --git a/docs/reference/interfaces/MessagesSnapshotEvent.md b/docs/reference/interfaces/MessagesSnapshotEvent.md index 37c42584fb..a97713b081 100644 --- a/docs/reference/interfaces/MessagesSnapshotEvent.md +++ b/docs/reference/interfaces/MessagesSnapshotEvent.md @@ -5,31 +5,30 @@ title: MessagesSnapshotEvent # Interface: MessagesSnapshotEvent -Defined in: [types.ts:917](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L917) +Defined in: [packages/typescript/ai/src/types.ts:995](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L995) Emitted to provide a snapshot of all messages in a conversation. Unlike StateSnapshot (which carries arbitrary application state), MessagesSnapshot specifically delivers the conversation transcript. -This is a first-class AG-UI event type. -## Extends +@ag-ui/core provides: `messages` (as @ag-ui/core Message[]) +TanStack AI adds: `model?` -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +Note: The `messages` field uses the @ag-ui/core Message type. +Use converters to transform to/from TanStack UIMessage format. -## Properties +## Extends -### messages +- `MessagesSnapshotEvent` + +## Indexable ```ts -messages: UIMessage[]; +[k: string]: unknown ``` -Defined in: [types.ts:920](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L920) - -Complete array of messages in the conversation - -*** +## Properties ### model? @@ -37,54 +36,6 @@ Complete array of messages in the conversation optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:997](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L997) Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "MESSAGES_SNAPSHOT"; -``` - -Defined in: [types.ts:918](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L918) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/ModelMessage.md b/docs/reference/interfaces/ModelMessage.md index 1cbc74cf5c..a1842db184 100644 --- a/docs/reference/interfaces/ModelMessage.md +++ b/docs/reference/interfaces/ModelMessage.md @@ -5,7 +5,7 @@ title: ModelMessage # Interface: ModelMessage\ -Defined in: [types.ts:262](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L262) +Defined in: [packages/typescript/ai/src/types.ts:288](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L288) ## Type Parameters @@ -21,7 +21,7 @@ Defined in: [types.ts:262](https://github.com/TanStack/ai/blob/main/packages/typ content: TContent; ``` -Defined in: [types.ts:269](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L269) +Defined in: [packages/typescript/ai/src/types.ts:295](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L295) *** @@ -31,7 +31,7 @@ Defined in: [types.ts:269](https://github.com/TanStack/ai/blob/main/packages/typ optional name: string; ``` -Defined in: [types.ts:270](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L270) +Defined in: [packages/typescript/ai/src/types.ts:296](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L296) *** @@ -41,7 +41,7 @@ Defined in: [types.ts:270](https://github.com/TanStack/ai/blob/main/packages/typ role: "user" | "assistant" | "tool"; ``` -Defined in: [types.ts:268](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L268) +Defined in: [packages/typescript/ai/src/types.ts:294](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L294) *** @@ -51,7 +51,7 @@ Defined in: [types.ts:268](https://github.com/TanStack/ai/blob/main/packages/typ optional toolCallId: string; ``` -Defined in: [types.ts:272](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L272) +Defined in: [packages/typescript/ai/src/types.ts:298](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L298) *** @@ -61,4 +61,4 @@ Defined in: [types.ts:272](https://github.com/TanStack/ai/blob/main/packages/typ optional toolCalls: ToolCall[]; ``` -Defined in: [types.ts:271](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L271) +Defined in: [packages/typescript/ai/src/types.ts:297](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L297) diff --git a/docs/reference/interfaces/ProcessorResult.md b/docs/reference/interfaces/ProcessorResult.md index 6cf48f12ea..b9de1f31cb 100644 --- a/docs/reference/interfaces/ProcessorResult.md +++ b/docs/reference/interfaces/ProcessorResult.md @@ -5,7 +5,7 @@ title: ProcessorResult # Interface: ProcessorResult -Defined in: [activities/chat/stream/types.ts:69](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L69) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L70) Result from processing a stream @@ -17,7 +17,7 @@ Result from processing a stream content: string; ``` -Defined in: [activities/chat/stream/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L70) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L71) *** @@ -27,7 +27,7 @@ Defined in: [activities/chat/stream/types.ts:70](https://github.com/TanStack/ai/ optional finishReason: string | null; ``` -Defined in: [activities/chat/stream/types.ts:73](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L73) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L74) *** @@ -37,7 +37,7 @@ Defined in: [activities/chat/stream/types.ts:73](https://github.com/TanStack/ai/ optional thinking: string; ``` -Defined in: [activities/chat/stream/types.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L71) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L72) *** @@ -47,4 +47,4 @@ Defined in: [activities/chat/stream/types.ts:71](https://github.com/TanStack/ai/ optional toolCalls: ToolCall[]; ``` -Defined in: [activities/chat/stream/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L72) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:73](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L73) diff --git a/docs/reference/interfaces/ProcessorState.md b/docs/reference/interfaces/ProcessorState.md index 0acd15e754..164fb79968 100644 --- a/docs/reference/interfaces/ProcessorState.md +++ b/docs/reference/interfaces/ProcessorState.md @@ -5,7 +5,7 @@ title: ProcessorState # Interface: ProcessorState -Defined in: [activities/chat/stream/types.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L79) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:80](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L80) Current state of the processor @@ -17,7 +17,7 @@ Current state of the processor content: string; ``` -Defined in: [activities/chat/stream/types.ts:80](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L80) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L81) *** @@ -27,7 +27,7 @@ Defined in: [activities/chat/stream/types.ts:80](https://github.com/TanStack/ai/ done: boolean; ``` -Defined in: [activities/chat/stream/types.ts:85](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L85) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L86) *** @@ -37,7 +37,7 @@ Defined in: [activities/chat/stream/types.ts:85](https://github.com/TanStack/ai/ finishReason: string | null; ``` -Defined in: [activities/chat/stream/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L84) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:85](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L85) *** @@ -47,7 +47,7 @@ Defined in: [activities/chat/stream/types.ts:84](https://github.com/TanStack/ai/ thinking: string; ``` -Defined in: [activities/chat/stream/types.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L81) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L82) *** @@ -57,7 +57,7 @@ Defined in: [activities/chat/stream/types.ts:81](https://github.com/TanStack/ai/ toolCallOrder: string[]; ``` -Defined in: [activities/chat/stream/types.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L83) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L84) *** @@ -67,4 +67,4 @@ Defined in: [activities/chat/stream/types.ts:83](https://github.com/TanStack/ai/ toolCalls: Map; ``` -Defined in: [activities/chat/stream/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L82) +Defined in: [packages/typescript/ai/src/activities/chat/stream/types.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/types.ts#L83) diff --git a/docs/reference/interfaces/RealtimeAudioPart.md b/docs/reference/interfaces/RealtimeAudioPart.md index 79ac1c2b55..90554e120c 100644 --- a/docs/reference/interfaces/RealtimeAudioPart.md +++ b/docs/reference/interfaces/RealtimeAudioPart.md @@ -5,7 +5,7 @@ title: RealtimeAudioPart # Interface: RealtimeAudioPart -Defined in: [realtime/types.ts:102](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L102) +Defined in: [packages/typescript/ai/src/realtime/types.ts:102](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L102) Audio content part in a realtime message @@ -17,7 +17,7 @@ Audio content part in a realtime message optional audioData: ArrayBuffer; ``` -Defined in: [realtime/types.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L107) +Defined in: [packages/typescript/ai/src/realtime/types.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L107) Raw audio data (optional, if stored) @@ -29,7 +29,7 @@ Raw audio data (optional, if stored) optional durationMs: number; ``` -Defined in: [realtime/types.ts:109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L109) +Defined in: [packages/typescript/ai/src/realtime/types.ts:109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L109) Duration of the audio in milliseconds @@ -41,7 +41,7 @@ Duration of the audio in milliseconds transcript: string; ``` -Defined in: [realtime/types.ts:105](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L105) +Defined in: [packages/typescript/ai/src/realtime/types.ts:105](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L105) Transcription of the audio @@ -53,4 +53,4 @@ Transcription of the audio type: "audio"; ``` -Defined in: [realtime/types.ts:103](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L103) +Defined in: [packages/typescript/ai/src/realtime/types.ts:103](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L103) diff --git a/docs/reference/interfaces/RealtimeError.md b/docs/reference/interfaces/RealtimeError.md index 064290613f..7af0baa712 100644 --- a/docs/reference/interfaces/RealtimeError.md +++ b/docs/reference/interfaces/RealtimeError.md @@ -5,7 +5,7 @@ title: RealtimeError # Interface: RealtimeError -Defined in: [realtime/types.ts:290](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L290) +Defined in: [packages/typescript/ai/src/realtime/types.ts:290](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L290) Extended error with realtime-specific information @@ -21,7 +21,7 @@ Extended error with realtime-specific information code: RealtimeErrorCode; ``` -Defined in: [realtime/types.ts:291](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L291) +Defined in: [packages/typescript/ai/src/realtime/types.ts:291](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L291) *** @@ -31,7 +31,7 @@ Defined in: [realtime/types.ts:291](https://github.com/TanStack/ai/blob/main/pac optional details: unknown; ``` -Defined in: [realtime/types.ts:293](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L293) +Defined in: [packages/typescript/ai/src/realtime/types.ts:293](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L293) *** @@ -41,4 +41,4 @@ Defined in: [realtime/types.ts:293](https://github.com/TanStack/ai/blob/main/pac optional provider: string; ``` -Defined in: [realtime/types.ts:292](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L292) +Defined in: [packages/typescript/ai/src/realtime/types.ts:292](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L292) diff --git a/docs/reference/interfaces/RealtimeEventPayloads.md b/docs/reference/interfaces/RealtimeEventPayloads.md index dfc37b3b10..62d1cf199a 100644 --- a/docs/reference/interfaces/RealtimeEventPayloads.md +++ b/docs/reference/interfaces/RealtimeEventPayloads.md @@ -5,7 +5,7 @@ title: RealtimeEventPayloads # Interface: RealtimeEventPayloads -Defined in: [realtime/types.ts:251](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L251) +Defined in: [packages/typescript/ai/src/realtime/types.ts:251](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L251) Event payloads for realtime events @@ -17,7 +17,7 @@ Event payloads for realtime events audio_chunk: object; ``` -Defined in: [realtime/types.ts:259](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L259) +Defined in: [packages/typescript/ai/src/realtime/types.ts:259](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L259) #### data @@ -39,7 +39,7 @@ sampleRate: number; error: object; ``` -Defined in: [realtime/types.ts:263](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L263) +Defined in: [packages/typescript/ai/src/realtime/types.ts:263](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L263) #### error @@ -55,7 +55,7 @@ error: Error; interrupted: object; ``` -Defined in: [realtime/types.ts:262](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L262) +Defined in: [packages/typescript/ai/src/realtime/types.ts:262](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L262) #### messageId? @@ -71,7 +71,7 @@ optional messageId: string; message_complete: object; ``` -Defined in: [realtime/types.ts:261](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L261) +Defined in: [packages/typescript/ai/src/realtime/types.ts:261](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L261) #### message @@ -87,7 +87,7 @@ message: RealtimeMessage; mode_change: object; ``` -Defined in: [realtime/types.ts:253](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L253) +Defined in: [packages/typescript/ai/src/realtime/types.ts:253](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L253) #### mode @@ -103,7 +103,7 @@ mode: RealtimeMode; status_change: object; ``` -Defined in: [realtime/types.ts:252](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L252) +Defined in: [packages/typescript/ai/src/realtime/types.ts:252](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L252) #### status @@ -119,7 +119,7 @@ status: RealtimeStatus; tool_call: object; ``` -Defined in: [realtime/types.ts:260](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L260) +Defined in: [packages/typescript/ai/src/realtime/types.ts:260](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L260) #### input @@ -147,7 +147,7 @@ toolName: string; transcript: object; ``` -Defined in: [realtime/types.ts:254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L254) +Defined in: [packages/typescript/ai/src/realtime/types.ts:254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L254) #### isFinal diff --git a/docs/reference/interfaces/RealtimeImagePart.md b/docs/reference/interfaces/RealtimeImagePart.md index ee69eab28e..e223d080b3 100644 --- a/docs/reference/interfaces/RealtimeImagePart.md +++ b/docs/reference/interfaces/RealtimeImagePart.md @@ -5,7 +5,7 @@ title: RealtimeImagePart # Interface: RealtimeImagePart -Defined in: [realtime/types.ts:136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L136) +Defined in: [packages/typescript/ai/src/realtime/types.ts:136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L136) Image content part in a realtime message @@ -17,7 +17,7 @@ Image content part in a realtime message data: string; ``` -Defined in: [realtime/types.ts:139](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L139) +Defined in: [packages/typescript/ai/src/realtime/types.ts:139](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L139) Base64-encoded image data or a URL @@ -29,7 +29,7 @@ Base64-encoded image data or a URL mimeType: string; ``` -Defined in: [realtime/types.ts:141](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L141) +Defined in: [packages/typescript/ai/src/realtime/types.ts:141](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L141) MIME type of the image (e.g., 'image/png', 'image/jpeg') @@ -41,4 +41,4 @@ MIME type of the image (e.g., 'image/png', 'image/jpeg') type: "image"; ``` -Defined in: [realtime/types.ts:137](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L137) +Defined in: [packages/typescript/ai/src/realtime/types.ts:137](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L137) diff --git a/docs/reference/interfaces/RealtimeMessage.md b/docs/reference/interfaces/RealtimeMessage.md index 794f43e8b4..8ade323b34 100644 --- a/docs/reference/interfaces/RealtimeMessage.md +++ b/docs/reference/interfaces/RealtimeMessage.md @@ -5,7 +5,7 @@ title: RealtimeMessage # Interface: RealtimeMessage -Defined in: [realtime/types.ts:157](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L157) +Defined in: [packages/typescript/ai/src/realtime/types.ts:157](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L157) A message in a realtime conversation @@ -17,7 +17,7 @@ A message in a realtime conversation optional audioId: string; ``` -Defined in: [realtime/types.ts:169](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L169) +Defined in: [packages/typescript/ai/src/realtime/types.ts:169](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L169) Reference to audio buffer if stored @@ -29,7 +29,7 @@ Reference to audio buffer if stored optional durationMs: number; ``` -Defined in: [realtime/types.ts:171](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L171) +Defined in: [packages/typescript/ai/src/realtime/types.ts:171](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L171) Duration of the audio in milliseconds @@ -41,7 +41,7 @@ Duration of the audio in milliseconds id: string; ``` -Defined in: [realtime/types.ts:159](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L159) +Defined in: [packages/typescript/ai/src/realtime/types.ts:159](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L159) Unique message identifier @@ -53,7 +53,7 @@ Unique message identifier optional interrupted: boolean; ``` -Defined in: [realtime/types.ts:167](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L167) +Defined in: [packages/typescript/ai/src/realtime/types.ts:167](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L167) Whether this message was interrupted @@ -65,7 +65,7 @@ Whether this message was interrupted parts: RealtimeMessagePart[]; ``` -Defined in: [realtime/types.ts:165](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L165) +Defined in: [packages/typescript/ai/src/realtime/types.ts:165](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L165) Content parts of the message @@ -77,7 +77,7 @@ Content parts of the message role: "user" | "assistant"; ``` -Defined in: [realtime/types.ts:161](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L161) +Defined in: [packages/typescript/ai/src/realtime/types.ts:161](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L161) Message role @@ -89,6 +89,6 @@ Message role timestamp: number; ``` -Defined in: [realtime/types.ts:163](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L163) +Defined in: [packages/typescript/ai/src/realtime/types.ts:163](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L163) Timestamp when the message was created diff --git a/docs/reference/interfaces/RealtimeSessionConfig.md b/docs/reference/interfaces/RealtimeSessionConfig.md index 6e41a38c51..faa111957d 100644 --- a/docs/reference/interfaces/RealtimeSessionConfig.md +++ b/docs/reference/interfaces/RealtimeSessionConfig.md @@ -5,7 +5,7 @@ title: RealtimeSessionConfig # Interface: RealtimeSessionConfig -Defined in: [realtime/types.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L30) +Defined in: [packages/typescript/ai/src/realtime/types.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L30) Configuration for a realtime session @@ -17,7 +17,7 @@ Configuration for a realtime session optional instructions: string; ``` -Defined in: [realtime/types.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L36) +Defined in: [packages/typescript/ai/src/realtime/types.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L36) System instructions for the assistant @@ -29,7 +29,7 @@ System instructions for the assistant optional maxOutputTokens: number | "inf"; ``` -Defined in: [realtime/types.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L48) +Defined in: [packages/typescript/ai/src/realtime/types.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L48) Maximum number of tokens in a response @@ -41,7 +41,7 @@ Maximum number of tokens in a response optional model: string; ``` -Defined in: [realtime/types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L32) +Defined in: [packages/typescript/ai/src/realtime/types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L32) Model to use for the session @@ -53,7 +53,7 @@ Model to use for the session optional outputModalities: ("text" | "audio")[]; ``` -Defined in: [realtime/types.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L44) +Defined in: [packages/typescript/ai/src/realtime/types.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L44) Output modalities for responses (e.g., ['audio', 'text'], ['text']) @@ -65,7 +65,7 @@ Output modalities for responses (e.g., ['audio', 'text'], ['text']) optional providerOptions: Record; ``` -Defined in: [realtime/types.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L52) +Defined in: [packages/typescript/ai/src/realtime/types.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L52) Provider-specific options @@ -77,7 +77,7 @@ Provider-specific options optional semanticEagerness: "low" | "high" | "medium"; ``` -Defined in: [realtime/types.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L50) +Defined in: [packages/typescript/ai/src/realtime/types.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L50) Eagerness level for semantic VAD ('low', 'medium', 'high') @@ -89,7 +89,7 @@ Eagerness level for semantic VAD ('low', 'medium', 'high') optional temperature: number; ``` -Defined in: [realtime/types.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L46) +Defined in: [packages/typescript/ai/src/realtime/types.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L46) Temperature for generation (provider-specific range, e.g., 0.6-1.2 for OpenAI) @@ -101,7 +101,7 @@ Temperature for generation (provider-specific range, e.g., 0.6-1.2 for OpenAI) optional tools: RealtimeToolConfig[]; ``` -Defined in: [realtime/types.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L38) +Defined in: [packages/typescript/ai/src/realtime/types.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L38) Tools available in the session @@ -113,7 +113,7 @@ Tools available in the session optional vadConfig: VADConfig; ``` -Defined in: [realtime/types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L42) +Defined in: [packages/typescript/ai/src/realtime/types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L42) VAD configuration @@ -125,7 +125,7 @@ VAD configuration optional vadMode: "server" | "manual" | "semantic"; ``` -Defined in: [realtime/types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L40) +Defined in: [packages/typescript/ai/src/realtime/types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L40) VAD mode @@ -137,6 +137,6 @@ VAD mode optional voice: string; ``` -Defined in: [realtime/types.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L34) +Defined in: [packages/typescript/ai/src/realtime/types.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L34) Voice to use for audio output diff --git a/docs/reference/interfaces/RealtimeTextPart.md b/docs/reference/interfaces/RealtimeTextPart.md index aa5ef561a2..6577624188 100644 --- a/docs/reference/interfaces/RealtimeTextPart.md +++ b/docs/reference/interfaces/RealtimeTextPart.md @@ -5,7 +5,7 @@ title: RealtimeTextPart # Interface: RealtimeTextPart -Defined in: [realtime/types.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L94) +Defined in: [packages/typescript/ai/src/realtime/types.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L94) Text content part in a realtime message @@ -17,7 +17,7 @@ Text content part in a realtime message content: string; ``` -Defined in: [realtime/types.ts:96](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L96) +Defined in: [packages/typescript/ai/src/realtime/types.ts:96](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L96) *** @@ -27,4 +27,4 @@ Defined in: [realtime/types.ts:96](https://github.com/TanStack/ai/blob/main/pack type: "text"; ``` -Defined in: [realtime/types.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L95) +Defined in: [packages/typescript/ai/src/realtime/types.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L95) diff --git a/docs/reference/interfaces/RealtimeToken.md b/docs/reference/interfaces/RealtimeToken.md index 7577eb271e..34648c85f8 100644 --- a/docs/reference/interfaces/RealtimeToken.md +++ b/docs/reference/interfaces/RealtimeToken.md @@ -5,7 +5,7 @@ title: RealtimeToken # Interface: RealtimeToken -Defined in: [realtime/types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L58) +Defined in: [packages/typescript/ai/src/realtime/types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L58) Token returned by the server for client authentication @@ -17,7 +17,7 @@ Token returned by the server for client authentication config: RealtimeSessionConfig; ``` -Defined in: [realtime/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L66) +Defined in: [packages/typescript/ai/src/realtime/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L66) Session configuration embedded in the token @@ -29,7 +29,7 @@ Session configuration embedded in the token expiresAt: number; ``` -Defined in: [realtime/types.ts:64](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L64) +Defined in: [packages/typescript/ai/src/realtime/types.ts:64](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L64) Token expiration timestamp (ms since epoch) @@ -41,7 +41,7 @@ Token expiration timestamp (ms since epoch) provider: string; ``` -Defined in: [realtime/types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L60) +Defined in: [packages/typescript/ai/src/realtime/types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L60) Provider identifier @@ -53,6 +53,6 @@ Provider identifier token: string; ``` -Defined in: [realtime/types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L62) +Defined in: [packages/typescript/ai/src/realtime/types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L62) The ephemeral token value diff --git a/docs/reference/interfaces/RealtimeTokenAdapter.md b/docs/reference/interfaces/RealtimeTokenAdapter.md index 3840c53088..07501dfbfa 100644 --- a/docs/reference/interfaces/RealtimeTokenAdapter.md +++ b/docs/reference/interfaces/RealtimeTokenAdapter.md @@ -5,7 +5,7 @@ title: RealtimeTokenAdapter # Interface: RealtimeTokenAdapter -Defined in: [realtime/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L72) +Defined in: [packages/typescript/ai/src/realtime/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L72) Adapter interface for generating provider-specific tokens @@ -17,7 +17,7 @@ Adapter interface for generating provider-specific tokens generateToken: () => Promise; ``` -Defined in: [realtime/types.ts:76](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L76) +Defined in: [packages/typescript/ai/src/realtime/types.ts:76](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L76) Generate an ephemeral token for client use @@ -33,6 +33,6 @@ Generate an ephemeral token for client use provider: string; ``` -Defined in: [realtime/types.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L74) +Defined in: [packages/typescript/ai/src/realtime/types.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L74) Provider identifier diff --git a/docs/reference/interfaces/RealtimeTokenOptions.md b/docs/reference/interfaces/RealtimeTokenOptions.md index 060b6d4d9f..b035a57f79 100644 --- a/docs/reference/interfaces/RealtimeTokenOptions.md +++ b/docs/reference/interfaces/RealtimeTokenOptions.md @@ -5,7 +5,7 @@ title: RealtimeTokenOptions # Interface: RealtimeTokenOptions -Defined in: [realtime/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L82) +Defined in: [packages/typescript/ai/src/realtime/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L82) Options for the realtimeToken function @@ -17,6 +17,6 @@ Options for the realtimeToken function adapter: RealtimeTokenAdapter; ``` -Defined in: [realtime/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L84) +Defined in: [packages/typescript/ai/src/realtime/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L84) The token adapter to use diff --git a/docs/reference/interfaces/RealtimeToolCallPart.md b/docs/reference/interfaces/RealtimeToolCallPart.md index 999fbd27e6..82bf36b431 100644 --- a/docs/reference/interfaces/RealtimeToolCallPart.md +++ b/docs/reference/interfaces/RealtimeToolCallPart.md @@ -5,7 +5,7 @@ title: RealtimeToolCallPart # Interface: RealtimeToolCallPart -Defined in: [realtime/types.ts:115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L115) +Defined in: [packages/typescript/ai/src/realtime/types.ts:115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L115) Tool call part in a realtime message @@ -17,7 +17,7 @@ Tool call part in a realtime message arguments: string; ``` -Defined in: [realtime/types.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L119) +Defined in: [packages/typescript/ai/src/realtime/types.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L119) *** @@ -27,7 +27,7 @@ Defined in: [realtime/types.ts:119](https://github.com/TanStack/ai/blob/main/pac id: string; ``` -Defined in: [realtime/types.ts:117](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L117) +Defined in: [packages/typescript/ai/src/realtime/types.ts:117](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L117) *** @@ -37,7 +37,7 @@ Defined in: [realtime/types.ts:117](https://github.com/TanStack/ai/blob/main/pac optional input: unknown; ``` -Defined in: [realtime/types.ts:120](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L120) +Defined in: [packages/typescript/ai/src/realtime/types.ts:120](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L120) *** @@ -47,7 +47,7 @@ Defined in: [realtime/types.ts:120](https://github.com/TanStack/ai/blob/main/pac name: string; ``` -Defined in: [realtime/types.ts:118](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L118) +Defined in: [packages/typescript/ai/src/realtime/types.ts:118](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L118) *** @@ -57,7 +57,7 @@ Defined in: [realtime/types.ts:118](https://github.com/TanStack/ai/blob/main/pac optional output: unknown; ``` -Defined in: [realtime/types.ts:121](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L121) +Defined in: [packages/typescript/ai/src/realtime/types.ts:121](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L121) *** @@ -67,4 +67,4 @@ Defined in: [realtime/types.ts:121](https://github.com/TanStack/ai/blob/main/pac type: "tool-call"; ``` -Defined in: [realtime/types.ts:116](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L116) +Defined in: [packages/typescript/ai/src/realtime/types.ts:116](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L116) diff --git a/docs/reference/interfaces/RealtimeToolResultPart.md b/docs/reference/interfaces/RealtimeToolResultPart.md index 711a8a708c..c979d1566b 100644 --- a/docs/reference/interfaces/RealtimeToolResultPart.md +++ b/docs/reference/interfaces/RealtimeToolResultPart.md @@ -5,7 +5,7 @@ title: RealtimeToolResultPart # Interface: RealtimeToolResultPart -Defined in: [realtime/types.ts:127](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L127) +Defined in: [packages/typescript/ai/src/realtime/types.ts:127](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L127) Tool result part in a realtime message @@ -17,7 +17,7 @@ Tool result part in a realtime message content: string; ``` -Defined in: [realtime/types.ts:130](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L130) +Defined in: [packages/typescript/ai/src/realtime/types.ts:130](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L130) *** @@ -27,7 +27,7 @@ Defined in: [realtime/types.ts:130](https://github.com/TanStack/ai/blob/main/pac toolCallId: string; ``` -Defined in: [realtime/types.ts:129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L129) +Defined in: [packages/typescript/ai/src/realtime/types.ts:129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L129) *** @@ -37,4 +37,4 @@ Defined in: [realtime/types.ts:129](https://github.com/TanStack/ai/blob/main/pac type: "tool-result"; ``` -Defined in: [realtime/types.ts:128](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L128) +Defined in: [packages/typescript/ai/src/realtime/types.ts:128](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L128) diff --git a/docs/reference/interfaces/ReasoningEncryptedValueEvent.md b/docs/reference/interfaces/ReasoningEncryptedValueEvent.md new file mode 100644 index 0000000000..2b67422710 --- /dev/null +++ b/docs/reference/interfaces/ReasoningEncryptedValueEvent.md @@ -0,0 +1,35 @@ +--- +id: ReasoningEncryptedValueEvent +title: ReasoningEncryptedValueEvent +--- + +# Interface: ReasoningEncryptedValueEvent + +Defined in: [packages/typescript/ai/src/types.ts:1103](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1103) + +Emitted for encrypted reasoning values. + +@ag-ui/core provides: `subtype`, `entityId`, `encryptedValue` +TanStack AI adds: `model?` + +## Extends + +- `ReasoningEncryptedValueEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:1105](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1105) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningEndEvent.md b/docs/reference/interfaces/ReasoningEndEvent.md new file mode 100644 index 0000000000..dba9ca353a --- /dev/null +++ b/docs/reference/interfaces/ReasoningEndEvent.md @@ -0,0 +1,35 @@ +--- +id: ReasoningEndEvent +title: ReasoningEndEvent +--- + +# Interface: ReasoningEndEvent + +Defined in: [packages/typescript/ai/src/types.ts:1092](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1092) + +Emitted when reasoning ends for a message. + +@ag-ui/core provides: `messageId` +TanStack AI adds: `model?` + +## Extends + +- `ReasoningEndEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:1094](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1094) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningMessageContentEvent.md b/docs/reference/interfaces/ReasoningMessageContentEvent.md new file mode 100644 index 0000000000..a4fa35d315 --- /dev/null +++ b/docs/reference/interfaces/ReasoningMessageContentEvent.md @@ -0,0 +1,35 @@ +--- +id: ReasoningMessageContentEvent +title: ReasoningMessageContentEvent +--- + +# Interface: ReasoningMessageContentEvent + +Defined in: [packages/typescript/ai/src/types.ts:1070](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1070) + +Emitted when reasoning message content is generated. + +@ag-ui/core provides: `messageId`, `delta` +TanStack AI adds: `model?` + +## Extends + +- `ReasoningMessageContentEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:1072](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1072) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningMessageEndEvent.md b/docs/reference/interfaces/ReasoningMessageEndEvent.md new file mode 100644 index 0000000000..f01ce57d4e --- /dev/null +++ b/docs/reference/interfaces/ReasoningMessageEndEvent.md @@ -0,0 +1,35 @@ +--- +id: ReasoningMessageEndEvent +title: ReasoningMessageEndEvent +--- + +# Interface: ReasoningMessageEndEvent + +Defined in: [packages/typescript/ai/src/types.ts:1081](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1081) + +Emitted when a reasoning message ends. + +@ag-ui/core provides: `messageId` +TanStack AI adds: `model?` + +## Extends + +- `ReasoningMessageEndEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:1083](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1083) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningMessageStartEvent.md b/docs/reference/interfaces/ReasoningMessageStartEvent.md new file mode 100644 index 0000000000..94e730e083 --- /dev/null +++ b/docs/reference/interfaces/ReasoningMessageStartEvent.md @@ -0,0 +1,35 @@ +--- +id: ReasoningMessageStartEvent +title: ReasoningMessageStartEvent +--- + +# Interface: ReasoningMessageStartEvent + +Defined in: [packages/typescript/ai/src/types.ts:1059](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1059) + +Emitted when a reasoning message starts. + +@ag-ui/core provides: `messageId`, `role` ("reasoning") +TanStack AI adds: `model?` + +## Extends + +- `ReasoningMessageStartEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:1061](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1061) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningStartEvent.md b/docs/reference/interfaces/ReasoningStartEvent.md new file mode 100644 index 0000000000..1c6d5b90db --- /dev/null +++ b/docs/reference/interfaces/ReasoningStartEvent.md @@ -0,0 +1,35 @@ +--- +id: ReasoningStartEvent +title: ReasoningStartEvent +--- + +# Interface: ReasoningStartEvent + +Defined in: [packages/typescript/ai/src/types.ts:1048](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1048) + +Emitted when reasoning starts for a message. + +@ag-ui/core provides: `messageId` +TanStack AI adds: `model?` + +## Extends + +- `ReasoningStartEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:1050](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1050) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ResponseFormat.md b/docs/reference/interfaces/ResponseFormat.md index 5b4becc2a2..a2806c9832 100644 --- a/docs/reference/interfaces/ResponseFormat.md +++ b/docs/reference/interfaces/ResponseFormat.md @@ -5,7 +5,7 @@ title: ResponseFormat # Interface: ResponseFormat\ -Defined in: [types.ts:520](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L520) +Defined in: [packages/typescript/ai/src/types.ts:546](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L546) Structured output format specification. @@ -33,7 +33,7 @@ TypeScript type of the expected data structure (for type safety) optional __data: TData; ``` -Defined in: [types.ts:598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L598) +Defined in: [packages/typescript/ai/src/types.ts:624](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L624) **`Internal`** @@ -50,7 +50,7 @@ Allows the SDK to know what type to expect when parsing the response. optional json_schema: object; ``` -Defined in: [types.ts:537](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L537) +Defined in: [packages/typescript/ai/src/types.ts:563](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L563) JSON schema specification (required when type is "json_schema"). @@ -139,7 +139,7 @@ https://platform.openai.com/docs/guides/structured-outputs#strict-mode type: "json_object" | "json_schema"; ``` -Defined in: [types.ts:529](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L529) +Defined in: [packages/typescript/ai/src/types.ts:555](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L555) Type of structured output. diff --git a/docs/reference/interfaces/RunErrorEvent.md b/docs/reference/interfaces/RunErrorEvent.md index de839bcfde..eb9f5f1f74 100644 --- a/docs/reference/interfaces/RunErrorEvent.md +++ b/docs/reference/interfaces/RunErrorEvent.md @@ -5,106 +5,58 @@ title: RunErrorEvent # Interface: RunErrorEvent -Defined in: [types.ts:797](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L797) +Defined in: [packages/typescript/ai/src/types.ts:831](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L831) Emitted when an error occurs during a run. -## Extends - -- [`BaseAGUIEvent`](BaseAGUIEvent.md) - -## Properties - -### error - -```ts -error: object; -``` - -Defined in: [types.ts:802](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L802) +@ag-ui/core provides: `message`, `code?` +TanStack AI adds: `model?`, `error?` (deprecated nested form) -Error details - -#### code? - -```ts -optional code: string; -``` - -#### message - -```ts -message: string; -``` +## Extends -*** +- `RunErrorEvent` -### model? +## Indexable ```ts -optional model: string; +[k: string]: unknown ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) - -Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** +## Properties -### rawEvent? +### ~~error?~~ ```ts -optional rawEvent: unknown; +optional error: object; ``` -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** +Defined in: [packages/typescript/ai/src/types.ts:838](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L838) -### runId? +#### ~~code?~~ ```ts -optional runId: string; +optional code: string; ``` -Defined in: [types.ts:800](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L800) - -Run identifier (if available) - -*** - -### timestamp +#### ~~message~~ ```ts -timestamp: number; +message: string; ``` -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) +#### Deprecated -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) +Use top-level `message` and `code` fields instead. +Kept for backward compatibility. *** -### type +### model? ```ts -type: "RUN_ERROR"; +optional model: string; ``` -Defined in: [types.ts:798](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L798) +Defined in: [packages/typescript/ai/src/types.ts:833](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L833) -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) +Model identifier for multi-model support diff --git a/docs/reference/interfaces/RunFinishedEvent.md b/docs/reference/interfaces/RunFinishedEvent.md index 8a87e57cbe..8fd6bc3555 100644 --- a/docs/reference/interfaces/RunFinishedEvent.md +++ b/docs/reference/interfaces/RunFinishedEvent.md @@ -5,23 +5,32 @@ title: RunFinishedEvent # Interface: RunFinishedEvent -Defined in: [types.ts:780](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L780) +Defined in: [packages/typescript/ai/src/types.ts:812](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L812) Emitted when a run completes successfully. +@ag-ui/core provides: `threadId`, `runId`, `result?` +TanStack AI adds: `model?`, `finishReason?`, `usage?` + ## Extends -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +- `RunFinishedEvent` + +## Indexable + +```ts +[k: string]: unknown +``` ## Properties -### finishReason +### finishReason? ```ts -finishReason: "length" | "stop" | "content_filter" | "tool_calls" | null; +optional finishReason: "length" | "stop" | "content_filter" | "tool_calls" | null; ``` -Defined in: [types.ts:785](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L785) +Defined in: [packages/typescript/ai/src/types.ts:816](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L816) Why the generation stopped @@ -33,70 +42,10 @@ Why the generation stopped optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:814](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L814) Model identifier for multi-model support -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### runId - -```ts -runId: string; -``` - -Defined in: [types.ts:783](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L783) - -Run identifier - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "RUN_FINISHED"; -``` - -Defined in: [types.ts:781](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L781) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) - *** ### usage? @@ -105,7 +54,7 @@ Defined in: [types.ts:781](https://github.com/TanStack/ai/blob/main/packages/typ optional usage: object; ``` -Defined in: [types.ts:787](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L787) +Defined in: [packages/typescript/ai/src/types.ts:818](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L818) Token usage statistics diff --git a/docs/reference/interfaces/RunStartedEvent.md b/docs/reference/interfaces/RunStartedEvent.md index 490fd0fa79..68de5024c8 100644 --- a/docs/reference/interfaces/RunStartedEvent.md +++ b/docs/reference/interfaces/RunStartedEvent.md @@ -5,95 +5,32 @@ title: RunStartedEvent # Interface: RunStartedEvent -Defined in: [types.ts:769](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L769) +Defined in: [packages/typescript/ai/src/types.ts:801](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L801) Emitted when a run starts. This is the first event in any streaming response. -## Extends - -- [`BaseAGUIEvent`](BaseAGUIEvent.md) - -## Properties - -### model? - -```ts -optional model: string; -``` - -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) - -Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from +@ag-ui/core provides: `threadId`, `runId`, `parentRunId?`, `input?` +TanStack AI adds: `model?` -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### runId - -```ts -runId: string; -``` - -Defined in: [types.ts:772](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L772) - -Unique identifier for this run - -*** - -### threadId? - -```ts -optional threadId: string; -``` - -Defined in: [types.ts:774](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L774) - -Optional thread/conversation ID +## Extends -*** +- `RunStartedEvent` -### timestamp +## Indexable ```ts -timestamp: number; +[k: string]: unknown ``` -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** +## Properties -### type +### model? ```ts -type: "RUN_STARTED"; +optional model: string; ``` -Defined in: [types.ts:770](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L770) +Defined in: [packages/typescript/ai/src/types.ts:803](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L803) -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ServerTool.md b/docs/reference/interfaces/ServerTool.md index ddf5692017..b9febb14e2 100644 --- a/docs/reference/interfaces/ServerTool.md +++ b/docs/reference/interfaces/ServerTool.md @@ -5,7 +5,7 @@ title: ServerTool # Interface: ServerTool\ -Defined in: [activities/chat/tools/tool-definition.ts:13](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L13) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:13](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L13) Marker type for server-side tools @@ -35,7 +35,7 @@ Marker type for server-side tools __toolSide: "server"; ``` -Defined in: [activities/chat/tools/tool-definition.ts:18](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L18) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:18](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L18) *** @@ -45,7 +45,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:18](https://github.com/Tan description: string; ``` -Defined in: [types.ts:413](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L413) +Defined in: [packages/typescript/ai/src/types.ts:439](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L439) Clear description of what the tool does. @@ -70,7 +70,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [types.ts:493](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L493) +Defined in: [packages/typescript/ai/src/types.ts:519](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L519) Optional function to execute when the model calls this tool. @@ -118,7 +118,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [types.ts:453](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L453) +Defined in: [packages/typescript/ai/src/types.ts:479](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L479) Schema describing the tool's input parameters. @@ -176,7 +176,7 @@ type({ optional lazy: boolean; ``` -Defined in: [types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:525](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L525) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -192,7 +192,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [types.ts:502](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L502) +Defined in: [packages/typescript/ai/src/types.ts:528](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L528) Additional metadata for adapters or custom extensions @@ -208,7 +208,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [types.ts:403](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L403) +Defined in: [packages/typescript/ai/src/types.ts:429](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L429) Unique name of the tool (used by the model to call it). @@ -233,7 +233,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [types.ts:496](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L496) +Defined in: [packages/typescript/ai/src/types.ts:522](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L522) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -249,7 +249,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [types.ts:474](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L474) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/StateDeltaEvent.md b/docs/reference/interfaces/StateDeltaEvent.md index b64dd40bd6..eb563726b9 100644 --- a/docs/reference/interfaces/StateDeltaEvent.md +++ b/docs/reference/interfaces/StateDeltaEvent.md @@ -5,27 +5,24 @@ title: StateDeltaEvent # Interface: StateDeltaEvent -Defined in: [types.ts:935](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L935) +Defined in: [packages/typescript/ai/src/types.ts:1022](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1022) Emitted to provide an incremental state update. -## Extends +@ag-ui/core provides: `delta` (any[] - JSON Patch RFC 6902) +TanStack AI adds: `model?` -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +## Extends -## Properties +- `StateDeltaEvent` -### delta +## Indexable ```ts -delta: Record; +[k: string]: unknown ``` -Defined in: [types.ts:938](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L938) - -The state changes to apply - -*** +## Properties ### model? @@ -33,54 +30,6 @@ The state changes to apply optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:1024](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1024) Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "STATE_DELTA"; -``` - -Defined in: [types.ts:936](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L936) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/StateSnapshotEvent.md b/docs/reference/interfaces/StateSnapshotEvent.md index 822d66f40d..2e63e7238c 100644 --- a/docs/reference/interfaces/StateSnapshotEvent.md +++ b/docs/reference/interfaces/StateSnapshotEvent.md @@ -5,82 +5,46 @@ title: StateSnapshotEvent # Interface: StateSnapshotEvent -Defined in: [types.ts:926](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L926) +Defined in: [packages/typescript/ai/src/types.ts:1006](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1006) Emitted to provide a full state snapshot. -## Extends - -- [`BaseAGUIEvent`](BaseAGUIEvent.md) - -## Properties - -### model? - -```ts -optional model: string; -``` - -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) - -Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** +@ag-ui/core provides: `snapshot` (any) +TanStack AI adds: `model?`, `state?` (deprecated alias for snapshot) -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) +## Extends -*** +- `StateSnapshotEvent` -### state +## Indexable ```ts -state: Record; +[k: string]: unknown ``` -Defined in: [types.ts:929](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L929) - -The complete state object - -*** +## Properties -### timestamp +### model? ```ts -timestamp: number; +optional model: string; ``` -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) +Defined in: [packages/typescript/ai/src/types.ts:1008](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1008) -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) +Model identifier for multi-model support *** -### type +### ~~state?~~ ```ts -type: "STATE_SNAPSHOT"; +optional state: Record; ``` -Defined in: [types.ts:927](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L927) +Defined in: [packages/typescript/ai/src/types.ts:1013](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1013) -#### Overrides +#### Deprecated -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) +Use `snapshot` instead (from @ag-ui/core spec). +Kept for backward compatibility. diff --git a/docs/reference/interfaces/StepFinishedEvent.md b/docs/reference/interfaces/StepFinishedEvent.md index 4e9479c73a..b2e6e15923 100644 --- a/docs/reference/interfaces/StepFinishedEvent.md +++ b/docs/reference/interfaces/StepFinishedEvent.md @@ -5,13 +5,22 @@ title: StepFinishedEvent # Interface: StepFinishedEvent -Defined in: [types.ts:900](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L900) +Defined in: [packages/typescript/ai/src/types.ts:969](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L969) Emitted when a thinking/reasoning step finishes. +@ag-ui/core provides: `stepName` +TanStack AI adds: `model?`, `stepId?` (deprecated alias), `delta?`, `content?` + ## Extends -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +- `StepFinishedEvent` + +## Indexable + +```ts +[k: string]: unknown +``` ## Properties @@ -21,21 +30,21 @@ Emitted when a thinking/reasoning step finishes. optional content: string; ``` -Defined in: [types.ts:907](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L907) +Defined in: [packages/typescript/ai/src/types.ts:980](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L980) -Full accumulated thinking content (optional, for debugging) +Full accumulated thinking content (TanStack AI internal) *** -### delta +### delta? ```ts -delta: string; +optional delta: string; ``` -Defined in: [types.ts:905](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L905) +Defined in: [packages/typescript/ai/src/types.ts:978](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L978) -Incremental thinking content +Incremental thinking content (TanStack AI internal) *** @@ -45,66 +54,21 @@ Incremental thinking content optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:971](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L971) Model identifier for multi-model support -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### stepId - -```ts -stepId: string; -``` - -Defined in: [types.ts:903](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L903) - -Step identifier - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - *** -### type +### ~~stepId?~~ ```ts -type: "STEP_FINISHED"; +optional stepId: string; ``` -Defined in: [types.ts:901](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L901) +Defined in: [packages/typescript/ai/src/types.ts:976](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L976) -#### Overrides +#### Deprecated -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) +Use `stepName` instead (from @ag-ui/core spec). +Kept for backward compatibility. diff --git a/docs/reference/interfaces/StepStartedEvent.md b/docs/reference/interfaces/StepStartedEvent.md index b8b8753ec3..6c2b202c19 100644 --- a/docs/reference/interfaces/StepStartedEvent.md +++ b/docs/reference/interfaces/StepStartedEvent.md @@ -5,13 +5,22 @@ title: StepStartedEvent # Interface: StepStartedEvent -Defined in: [types.ts:889](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L889) +Defined in: [packages/typescript/ai/src/types.ts:951](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L951) Emitted when a thinking/reasoning step starts. +@ag-ui/core provides: `stepName` +TanStack AI adds: `model?`, `stepId?` (deprecated alias), `stepType?` + ## Extends -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +- `StepStartedEvent` + +## Indexable + +```ts +[k: string]: unknown +``` ## Properties @@ -21,41 +30,24 @@ Emitted when a thinking/reasoning step starts. optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:953](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L953) Model identifier for multi-model support -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - *** -### rawEvent? +### ~~stepId?~~ ```ts -optional rawEvent: unknown; +optional stepId: string; ``` -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) +Defined in: [packages/typescript/ai/src/types.ts:958](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L958) -Original provider event for debugging/advanced use cases +#### Deprecated -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### stepId - -```ts -stepId: string; -``` - -Defined in: [types.ts:892](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L892) - -Unique identifier for this step +Use `stepName` instead (from @ag-ui/core spec). +Kept for backward compatibility. *** @@ -65,34 +57,6 @@ Unique identifier for this step optional stepType: string; ``` -Defined in: [types.ts:894](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L894) +Defined in: [packages/typescript/ai/src/types.ts:960](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L960) Type of step (e.g., 'thinking', 'planning') - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "STEP_STARTED"; -``` - -Defined in: [types.ts:890](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L890) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/StreamProcessorEvents.md b/docs/reference/interfaces/StreamProcessorEvents.md index db6632e6e6..b476a13bbd 100644 --- a/docs/reference/interfaces/StreamProcessorEvents.md +++ b/docs/reference/interfaces/StreamProcessorEvents.md @@ -5,7 +5,7 @@ title: StreamProcessorEvents # Interface: StreamProcessorEvents -Defined in: [activities/chat/stream/processor.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L56) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L56) Events emitted by the StreamProcessor @@ -17,7 +17,7 @@ Events emitted by the StreamProcessor optional onApprovalRequest: (args) => void; ``` -Defined in: [activities/chat/stream/processor.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L71) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L71) #### Parameters @@ -51,7 +51,7 @@ Defined in: [activities/chat/stream/processor.ts:71](https://github.com/TanStack optional onCustomEvent: (eventType, data, context) => void; ``` -Defined in: [activities/chat/stream/processor.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L79) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L79) #### Parameters @@ -81,7 +81,7 @@ Defined in: [activities/chat/stream/processor.ts:79](https://github.com/TanStack optional onError: (error) => void; ``` -Defined in: [activities/chat/stream/processor.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L63) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L63) #### Parameters @@ -101,7 +101,7 @@ Defined in: [activities/chat/stream/processor.ts:63](https://github.com/TanStack optional onMessagesChange: (messages) => void; ``` -Defined in: [activities/chat/stream/processor.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L58) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L58) #### Parameters @@ -121,7 +121,7 @@ Defined in: [activities/chat/stream/processor.ts:58](https://github.com/TanStack optional onStreamEnd: (message) => void; ``` -Defined in: [activities/chat/stream/processor.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L62) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L62) #### Parameters @@ -141,7 +141,7 @@ Defined in: [activities/chat/stream/processor.ts:62](https://github.com/TanStack optional onStreamStart: () => void; ``` -Defined in: [activities/chat/stream/processor.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L61) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L61) #### Returns @@ -155,7 +155,7 @@ Defined in: [activities/chat/stream/processor.ts:61](https://github.com/TanStack optional onTextUpdate: (messageId, content) => void; ``` -Defined in: [activities/chat/stream/processor.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L86) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L86) #### Parameters @@ -179,7 +179,7 @@ Defined in: [activities/chat/stream/processor.ts:86](https://github.com/TanStack optional onThinkingUpdate: (messageId, content) => void; ``` -Defined in: [activities/chat/stream/processor.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L93) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L93) #### Parameters @@ -203,7 +203,7 @@ Defined in: [activities/chat/stream/processor.ts:93](https://github.com/TanStack optional onToolCall: (args) => void; ``` -Defined in: [activities/chat/stream/processor.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L66) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L66) #### Parameters @@ -233,7 +233,7 @@ Defined in: [activities/chat/stream/processor.ts:66](https://github.com/TanStack optional onToolCallStateChange: (messageId, toolCallId, state, args) => void; ``` -Defined in: [activities/chat/stream/processor.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L87) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L87) #### Parameters diff --git a/docs/reference/interfaces/StreamProcessorOptions.md b/docs/reference/interfaces/StreamProcessorOptions.md index c1f60c0d2b..315c408997 100644 --- a/docs/reference/interfaces/StreamProcessorOptions.md +++ b/docs/reference/interfaces/StreamProcessorOptions.md @@ -5,7 +5,7 @@ title: StreamProcessorOptions # Interface: StreamProcessorOptions -Defined in: [activities/chat/stream/processor.ts:99](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L99) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:99](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L99) Options for StreamProcessor @@ -17,7 +17,7 @@ Options for StreamProcessor optional chunkStrategy: ChunkStrategy; ``` -Defined in: [activities/chat/stream/processor.ts:100](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L100) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:100](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L100) *** @@ -27,7 +27,7 @@ Defined in: [activities/chat/stream/processor.ts:100](https://github.com/TanStac optional events: StreamProcessorEvents; ``` -Defined in: [activities/chat/stream/processor.ts:102](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L102) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:102](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L102) Event-driven handlers @@ -39,7 +39,7 @@ Event-driven handlers optional initialMessages: UIMessage[]; ``` -Defined in: [activities/chat/stream/processor.ts:109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L109) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L109) Initial messages to populate the processor @@ -51,7 +51,7 @@ Initial messages to populate the processor optional jsonParser: object; ``` -Defined in: [activities/chat/stream/processor.ts:103](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L103) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:103](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L103) #### parse() @@ -77,6 +77,6 @@ parse: (jsonString) => any; optional recording: boolean; ``` -Defined in: [activities/chat/stream/processor.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L107) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L107) Enable recording for replay testing diff --git a/docs/reference/interfaces/SummarizationOptions.md b/docs/reference/interfaces/SummarizationOptions.md index 7bd31c17e2..505f92adb3 100644 --- a/docs/reference/interfaces/SummarizationOptions.md +++ b/docs/reference/interfaces/SummarizationOptions.md @@ -5,7 +5,7 @@ title: SummarizationOptions # Interface: SummarizationOptions -Defined in: [types.ts:993](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L993) +Defined in: [packages/typescript/ai/src/types.ts:1160](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1160) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:993](https://github.com/TanStack/ai/blob/main/packages/typ optional focus: string[]; ``` -Defined in: [types.ts:998](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L998) +Defined in: [packages/typescript/ai/src/types.ts:1165](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1165) *** @@ -25,7 +25,7 @@ Defined in: [types.ts:998](https://github.com/TanStack/ai/blob/main/packages/typ optional maxLength: number; ``` -Defined in: [types.ts:996](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L996) +Defined in: [packages/typescript/ai/src/types.ts:1163](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1163) *** @@ -35,7 +35,7 @@ Defined in: [types.ts:996](https://github.com/TanStack/ai/blob/main/packages/typ model: string; ``` -Defined in: [types.ts:994](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L994) +Defined in: [packages/typescript/ai/src/types.ts:1161](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1161) *** @@ -45,7 +45,7 @@ Defined in: [types.ts:994](https://github.com/TanStack/ai/blob/main/packages/typ optional style: "bullet-points" | "paragraph" | "concise"; ``` -Defined in: [types.ts:997](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L997) +Defined in: [packages/typescript/ai/src/types.ts:1164](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1164) *** @@ -55,4 +55,4 @@ Defined in: [types.ts:997](https://github.com/TanStack/ai/blob/main/packages/typ text: string; ``` -Defined in: [types.ts:995](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L995) +Defined in: [packages/typescript/ai/src/types.ts:1162](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1162) diff --git a/docs/reference/interfaces/SummarizationResult.md b/docs/reference/interfaces/SummarizationResult.md index eaaf93537c..21380920f9 100644 --- a/docs/reference/interfaces/SummarizationResult.md +++ b/docs/reference/interfaces/SummarizationResult.md @@ -5,7 +5,7 @@ title: SummarizationResult # Interface: SummarizationResult -Defined in: [types.ts:1001](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1001) +Defined in: [packages/typescript/ai/src/types.ts:1168](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1168) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:1001](https://github.com/TanStack/ai/blob/main/packages/ty id: string; ``` -Defined in: [types.ts:1002](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1002) +Defined in: [packages/typescript/ai/src/types.ts:1169](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1169) *** @@ -25,7 +25,7 @@ Defined in: [types.ts:1002](https://github.com/TanStack/ai/blob/main/packages/ty model: string; ``` -Defined in: [types.ts:1003](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1003) +Defined in: [packages/typescript/ai/src/types.ts:1170](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1170) *** @@ -35,7 +35,7 @@ Defined in: [types.ts:1003](https://github.com/TanStack/ai/blob/main/packages/ty summary: string; ``` -Defined in: [types.ts:1004](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1004) +Defined in: [packages/typescript/ai/src/types.ts:1171](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1171) *** @@ -45,7 +45,7 @@ Defined in: [types.ts:1004](https://github.com/TanStack/ai/blob/main/packages/ty usage: object; ``` -Defined in: [types.ts:1005](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1005) +Defined in: [packages/typescript/ai/src/types.ts:1172](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1172) #### completionTokens diff --git a/docs/reference/interfaces/SummarizeAdapter.md b/docs/reference/interfaces/SummarizeAdapter.md index f12aa4f663..2f0eb78b81 100644 --- a/docs/reference/interfaces/SummarizeAdapter.md +++ b/docs/reference/interfaces/SummarizeAdapter.md @@ -5,7 +5,7 @@ title: SummarizeAdapter # Interface: SummarizeAdapter\ -Defined in: [activities/summarize/adapter.ts:28](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L28) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:28](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L28) Summarize adapter interface with pre-resolved generics. @@ -34,7 +34,7 @@ Generic parameters: ~types: object; ``` -Defined in: [activities/summarize/adapter.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L42) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L42) **`Internal`** @@ -54,7 +54,7 @@ providerOptions: TProviderOptions; readonly kind: "summarize"; ``` -Defined in: [activities/summarize/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L33) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L33) Discriminator for adapter kind - used by generate() to determine API shape @@ -66,7 +66,7 @@ Discriminator for adapter kind - used by generate() to determine API shape readonly model: TModel; ``` -Defined in: [activities/summarize/adapter.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L37) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L37) The model this adapter is configured for @@ -78,7 +78,7 @@ The model this adapter is configured for readonly name: string; ``` -Defined in: [activities/summarize/adapter.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L35) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L35) Adapter name identifier @@ -90,7 +90,7 @@ Adapter name identifier summarize: (options) => Promise; ``` -Defined in: [activities/summarize/adapter.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L49) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L49) Summarize the given text @@ -112,7 +112,7 @@ Summarize the given text optional summarizeStream: (options) => AsyncIterable; ``` -Defined in: [activities/summarize/adapter.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L56) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L56) Stream summarization of the given text. Optional - if not implemented, the activity layer will fall back to diff --git a/docs/reference/interfaces/TTSAdapter.md b/docs/reference/interfaces/TTSAdapter.md index 83a539128b..c87865cb39 100644 --- a/docs/reference/interfaces/TTSAdapter.md +++ b/docs/reference/interfaces/TTSAdapter.md @@ -5,7 +5,7 @@ title: TTSAdapter # Interface: TTSAdapter\ -Defined in: [activities/generateSpeech/adapter.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L24) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L24) TTS adapter interface with pre-resolved generics. @@ -34,7 +34,7 @@ Generic parameters: ~types: object; ``` -Defined in: [activities/generateSpeech/adapter.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L38) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L38) **`Internal`** @@ -54,7 +54,7 @@ providerOptions: TProviderOptions; generateSpeech: (options) => Promise; ``` -Defined in: [activities/generateSpeech/adapter.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L45) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L45) Generate speech from text @@ -76,7 +76,7 @@ Generate speech from text readonly kind: "tts"; ``` -Defined in: [activities/generateSpeech/adapter.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L29) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L29) Discriminator for adapter kind - used to determine API shape @@ -88,7 +88,7 @@ Discriminator for adapter kind - used to determine API shape readonly model: TModel; ``` -Defined in: [activities/generateSpeech/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L33) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L33) The model this adapter is configured for @@ -100,6 +100,6 @@ The model this adapter is configured for readonly name: string; ``` -Defined in: [activities/generateSpeech/adapter.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L31) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L31) Adapter name identifier diff --git a/docs/reference/interfaces/TTSOptions.md b/docs/reference/interfaces/TTSOptions.md index 15693df9ac..0585150f1b 100644 --- a/docs/reference/interfaces/TTSOptions.md +++ b/docs/reference/interfaces/TTSOptions.md @@ -5,7 +5,7 @@ title: TTSOptions # Interface: TTSOptions\ -Defined in: [types.ts:1142](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1142) +Defined in: [packages/typescript/ai/src/types.ts:1309](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1309) Options for text-to-speech generation. These are the common options supported across providers. @@ -24,7 +24,7 @@ These are the common options supported across providers. optional format: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"; ``` -Defined in: [types.ts:1150](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1150) +Defined in: [packages/typescript/ai/src/types.ts:1317](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1317) The output audio format @@ -36,7 +36,7 @@ The output audio format model: string; ``` -Defined in: [types.ts:1144](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1144) +Defined in: [packages/typescript/ai/src/types.ts:1311](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1311) The model to use for TTS generation @@ -48,7 +48,7 @@ The model to use for TTS generation optional modelOptions: TProviderOptions; ``` -Defined in: [types.ts:1154](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1154) +Defined in: [packages/typescript/ai/src/types.ts:1321](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1321) Model-specific options for TTS generation @@ -60,7 +60,7 @@ Model-specific options for TTS generation optional speed: number; ``` -Defined in: [types.ts:1152](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1152) +Defined in: [packages/typescript/ai/src/types.ts:1319](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1319) The speed of the generated audio (0.25 to 4.0) @@ -72,7 +72,7 @@ The speed of the generated audio (0.25 to 4.0) text: string; ``` -Defined in: [types.ts:1146](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1146) +Defined in: [packages/typescript/ai/src/types.ts:1313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1313) The text to convert to speech @@ -84,6 +84,6 @@ The text to convert to speech optional voice: string; ``` -Defined in: [types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) +Defined in: [packages/typescript/ai/src/types.ts:1315](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1315) The voice to use for generation diff --git a/docs/reference/interfaces/TTSResult.md b/docs/reference/interfaces/TTSResult.md index 5bb5b53681..09eecd4185 100644 --- a/docs/reference/interfaces/TTSResult.md +++ b/docs/reference/interfaces/TTSResult.md @@ -5,7 +5,7 @@ title: TTSResult # Interface: TTSResult -Defined in: [types.ts:1160](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1160) +Defined in: [packages/typescript/ai/src/types.ts:1327](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1327) Result of text-to-speech generation. @@ -17,7 +17,7 @@ Result of text-to-speech generation. audio: string; ``` -Defined in: [types.ts:1166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1166) +Defined in: [packages/typescript/ai/src/types.ts:1333](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1333) Base64-encoded audio data @@ -29,7 +29,7 @@ Base64-encoded audio data optional contentType: string; ``` -Defined in: [types.ts:1172](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1172) +Defined in: [packages/typescript/ai/src/types.ts:1339](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1339) Content type of the audio (e.g., 'audio/mp3') @@ -41,7 +41,7 @@ Content type of the audio (e.g., 'audio/mp3') optional duration: number; ``` -Defined in: [types.ts:1170](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1170) +Defined in: [packages/typescript/ai/src/types.ts:1337](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1337) Duration of the audio in seconds, if available @@ -53,7 +53,7 @@ Duration of the audio in seconds, if available format: string; ``` -Defined in: [types.ts:1168](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1168) +Defined in: [packages/typescript/ai/src/types.ts:1335](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1335) Audio format of the generated audio @@ -65,7 +65,7 @@ Audio format of the generated audio id: string; ``` -Defined in: [types.ts:1162](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1162) +Defined in: [packages/typescript/ai/src/types.ts:1329](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1329) Unique identifier for the generation @@ -77,6 +77,6 @@ Unique identifier for the generation model: string; ``` -Defined in: [types.ts:1164](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1164) +Defined in: [packages/typescript/ai/src/types.ts:1331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1331) Model used for generation diff --git a/docs/reference/interfaces/TextAdapter.md b/docs/reference/interfaces/TextAdapter.md index 36757ee208..133c7a5ec1 100644 --- a/docs/reference/interfaces/TextAdapter.md +++ b/docs/reference/interfaces/TextAdapter.md @@ -5,7 +5,7 @@ title: TextAdapter # Interface: TextAdapter\ -Defined in: [activities/chat/adapter.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L52) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L52) Text adapter interface with pre-resolved generics. @@ -44,7 +44,7 @@ Generic parameters: ~types: object; ``` -Defined in: [activities/chat/adapter.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L68) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L68) **`Internal`** @@ -76,7 +76,7 @@ providerOptions: TProviderOptions; chatStream: (options) => AsyncIterable; ``` -Defined in: [activities/chat/adapter.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L77) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L77) Stream text completions from the model @@ -98,7 +98,7 @@ Stream text completions from the model readonly kind: "text"; ``` -Defined in: [activities/chat/adapter.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L59) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L59) Discriminator for adapter kind @@ -110,7 +110,7 @@ Discriminator for adapter kind readonly model: TModel; ``` -Defined in: [activities/chat/adapter.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L63) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L63) The model this adapter is configured for @@ -122,7 +122,7 @@ The model this adapter is configured for readonly name: string; ``` -Defined in: [activities/chat/adapter.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L61) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L61) Provider name identifier (e.g., 'openai', 'anthropic') @@ -134,7 +134,7 @@ Provider name identifier (e.g., 'openai', 'anthropic') structuredOutput: (options) => Promise>; ``` -Defined in: [activities/chat/adapter.ts:89](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L89) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:89](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L89) Generate structured output using the provider's native structured output API. This method uses stream: false and sends the JSON schema to the provider diff --git a/docs/reference/interfaces/TextCompletionChunk.md b/docs/reference/interfaces/TextCompletionChunk.md index b6db0ff39a..94dee85673 100644 --- a/docs/reference/interfaces/TextCompletionChunk.md +++ b/docs/reference/interfaces/TextCompletionChunk.md @@ -5,7 +5,7 @@ title: TextCompletionChunk # Interface: TextCompletionChunk -Defined in: [types.ts:980](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L980) +Defined in: [packages/typescript/ai/src/types.ts:1147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1147) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:980](https://github.com/TanStack/ai/blob/main/packages/typ content: string; ``` -Defined in: [types.ts:983](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L983) +Defined in: [packages/typescript/ai/src/types.ts:1150](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1150) *** @@ -25,7 +25,7 @@ Defined in: [types.ts:983](https://github.com/TanStack/ai/blob/main/packages/typ optional finishReason: "length" | "stop" | "content_filter" | null; ``` -Defined in: [types.ts:985](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L985) +Defined in: [packages/typescript/ai/src/types.ts:1152](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1152) *** @@ -35,7 +35,7 @@ Defined in: [types.ts:985](https://github.com/TanStack/ai/blob/main/packages/typ id: string; ``` -Defined in: [types.ts:981](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L981) +Defined in: [packages/typescript/ai/src/types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) *** @@ -45,7 +45,7 @@ Defined in: [types.ts:981](https://github.com/TanStack/ai/blob/main/packages/typ model: string; ``` -Defined in: [types.ts:982](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L982) +Defined in: [packages/typescript/ai/src/types.ts:1149](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1149) *** @@ -55,7 +55,7 @@ Defined in: [types.ts:982](https://github.com/TanStack/ai/blob/main/packages/typ optional role: "assistant"; ``` -Defined in: [types.ts:984](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L984) +Defined in: [packages/typescript/ai/src/types.ts:1151](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1151) *** @@ -65,7 +65,7 @@ Defined in: [types.ts:984](https://github.com/TanStack/ai/blob/main/packages/typ optional usage: object; ``` -Defined in: [types.ts:986](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L986) +Defined in: [packages/typescript/ai/src/types.ts:1153](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1153) #### completionTokens diff --git a/docs/reference/interfaces/TextMessageContentEvent.md b/docs/reference/interfaces/TextMessageContentEvent.md index d09dc5573f..cfd78a93fb 100644 --- a/docs/reference/interfaces/TextMessageContentEvent.md +++ b/docs/reference/interfaces/TextMessageContentEvent.md @@ -5,49 +5,34 @@ title: TextMessageContentEvent # Interface: TextMessageContentEvent -Defined in: [types.ts:822](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L822) +Defined in: [packages/typescript/ai/src/types.ts:861](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L861) Emitted when text content is generated (streaming tokens). -## Extends - -- [`BaseAGUIEvent`](BaseAGUIEvent.md) - -## Properties +@ag-ui/core provides: `messageId`, `delta` +TanStack AI adds: `model?`, `content?` (accumulated) -### content? - -```ts -optional content: string; -``` - -Defined in: [types.ts:829](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L829) - -Full accumulated content so far (optional, for debugging) +## Extends -*** +- `TextMessageContentEvent` -### delta +## Indexable ```ts -delta: string; +[k: string]: unknown ``` -Defined in: [types.ts:827](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L827) - -The incremental content token - -*** +## Properties -### messageId +### content? ```ts -messageId: string; +optional content: string; ``` -Defined in: [types.ts:825](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L825) +Defined in: [packages/typescript/ai/src/types.ts:865](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L865) -Message identifier +Full accumulated content so far (TanStack AI internal, for debugging) *** @@ -57,54 +42,6 @@ Message identifier optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:863](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L863) Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "TEXT_MESSAGE_CONTENT"; -``` - -Defined in: [types.ts:823](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L823) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/TextMessageEndEvent.md b/docs/reference/interfaces/TextMessageEndEvent.md index 66e6c64c9f..1a276b9628 100644 --- a/docs/reference/interfaces/TextMessageEndEvent.md +++ b/docs/reference/interfaces/TextMessageEndEvent.md @@ -5,27 +5,24 @@ title: TextMessageEndEvent # Interface: TextMessageEndEvent -Defined in: [types.ts:835](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L835) +Defined in: [packages/typescript/ai/src/types.ts:874](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L874) Emitted when a text message completes. -## Extends +@ag-ui/core provides: `messageId` +TanStack AI adds: `model?` -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +## Extends -## Properties +- `TextMessageEndEvent` -### messageId +## Indexable ```ts -messageId: string; +[k: string]: unknown ``` -Defined in: [types.ts:838](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L838) - -Message identifier - -*** +## Properties ### model? @@ -33,54 +30,6 @@ Message identifier optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:876](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L876) Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "TEXT_MESSAGE_END"; -``` - -Defined in: [types.ts:836](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L836) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/TextMessageStartEvent.md b/docs/reference/interfaces/TextMessageStartEvent.md index ea46f73a4e..e8f4dd5fa4 100644 --- a/docs/reference/interfaces/TextMessageStartEvent.md +++ b/docs/reference/interfaces/TextMessageStartEvent.md @@ -5,27 +5,24 @@ title: TextMessageStartEvent # Interface: TextMessageStartEvent -Defined in: [types.ts:811](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L811) +Defined in: [packages/typescript/ai/src/types.ts:850](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L850) Emitted when a text message starts. -## Extends +@ag-ui/core provides: `messageId`, `role?`, `name?` +TanStack AI adds: `model?` -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +## Extends -## Properties +- `TextMessageStartEvent` -### messageId +## Indexable ```ts -messageId: string; +[k: string]: unknown ``` -Defined in: [types.ts:814](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L814) - -Unique identifier for this message - -*** +## Properties ### model? @@ -33,66 +30,6 @@ Unique identifier for this message optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:852](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L852) Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### role - -```ts -role: "user" | "assistant" | "tool" | "system"; -``` - -Defined in: [types.ts:816](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L816) - -Role of the message sender - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### type - -```ts -type: "TEXT_MESSAGE_START"; -``` - -Defined in: [types.ts:812](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L812) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/TextOptions.md b/docs/reference/interfaces/TextOptions.md index 77c882f7b1..a8984e59ac 100644 --- a/docs/reference/interfaces/TextOptions.md +++ b/docs/reference/interfaces/TextOptions.md @@ -5,7 +5,7 @@ title: TextOptions # Interface: TextOptions\ -Defined in: [types.ts:630](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L630) +Defined in: [packages/typescript/ai/src/types.ts:656](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L656) Options passed into the SDK and further piped to the AI provider. @@ -27,7 +27,7 @@ Options passed into the SDK and further piped to the AI provider. optional abortController: AbortController; ``` -Defined in: [types.ts:714](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L714) +Defined in: [packages/typescript/ai/src/types.ts:740](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L740) AbortController for request cancellation. @@ -54,7 +54,7 @@ https://developer.mozilla.org/en-US/docs/Web/API/AbortController optional agentLoopStrategy: AgentLoopStrategy; ``` -Defined in: [types.ts:638](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L638) +Defined in: [packages/typescript/ai/src/types.ts:664](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L664) *** @@ -64,7 +64,7 @@ Defined in: [types.ts:638](https://github.com/TanStack/ai/blob/main/packages/typ optional conversationId: string; ``` -Defined in: [types.ts:700](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L700) +Defined in: [packages/typescript/ai/src/types.ts:726](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L726) Conversation ID for correlating client and server-side devtools events. When provided, server-side events will be linked to the client conversation in devtools. @@ -77,7 +77,7 @@ When provided, server-side events will be linked to the client conversation in d optional maxTokens: number; ``` -Defined in: [types.ts:673](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L673) +Defined in: [packages/typescript/ai/src/types.ts:699](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L699) The maximum number of tokens to generate in the response. @@ -97,7 +97,7 @@ messages: ModelMessage< | null>[]; ``` -Defined in: [types.ts:635](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L635) +Defined in: [packages/typescript/ai/src/types.ts:661](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L661) *** @@ -107,7 +107,7 @@ Defined in: [types.ts:635](https://github.com/TanStack/ai/blob/main/packages/typ optional metadata: Record; ``` -Defined in: [types.ts:684](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L684) +Defined in: [packages/typescript/ai/src/types.ts:710](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L710) Additional metadata to attach to the request. Can be used for tracking, debugging, or passing custom information. @@ -126,7 +126,7 @@ Provider usage: model: string; ``` -Defined in: [types.ts:634](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L634) +Defined in: [packages/typescript/ai/src/types.ts:660](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L660) *** @@ -136,7 +136,7 @@ Defined in: [types.ts:634](https://github.com/TanStack/ai/blob/main/packages/typ optional modelOptions: TProviderOptionsForModel; ``` -Defined in: [types.ts:685](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L685) +Defined in: [packages/typescript/ai/src/types.ts:711](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L711) *** @@ -146,7 +146,7 @@ Defined in: [types.ts:685](https://github.com/TanStack/ai/blob/main/packages/typ optional outputSchema: SchemaInput; ``` -Defined in: [types.ts:695](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L695) +Defined in: [packages/typescript/ai/src/types.ts:721](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L721) Schema for structured output. When provided, the adapter should use the provider's native structured output API @@ -162,7 +162,21 @@ Supports any Standard JSON Schema compliant library (Zod, ArkType, Valibot, etc. optional request: Request | RequestInit; ``` -Defined in: [types.ts:686](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L686) +Defined in: [packages/typescript/ai/src/types.ts:712](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L712) + +*** + +### runId? + +```ts +optional runId: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:751](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L751) + +Run ID for AG-UI protocol run correlation. +When provided, this will be used in RunStartedEvent and RunFinishedEvent. +If not provided, a unique ID will be generated. *** @@ -172,7 +186,7 @@ Defined in: [types.ts:686](https://github.com/TanStack/ai/blob/main/packages/typ optional systemPrompts: string[]; ``` -Defined in: [types.ts:637](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L637) +Defined in: [packages/typescript/ai/src/types.ts:663](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L663) *** @@ -182,7 +196,7 @@ Defined in: [types.ts:637](https://github.com/TanStack/ai/blob/main/packages/typ optional temperature: number; ``` -Defined in: [types.ts:651](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L651) +Defined in: [packages/typescript/ai/src/types.ts:677](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L677) Controls the randomness of the output. Higher values (e.g., 0.8) make output more random, lower values (e.g., 0.2) make it more focused and deterministic. @@ -197,13 +211,26 @@ Provider usage: *** +### threadId? + +```ts +optional threadId: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:745](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L745) + +Thread ID for AG-UI protocol run correlation. +When provided, this will be used in RunStartedEvent and RunFinishedEvent. + +*** + ### tools? ```ts optional tools: Tool[]; ``` -Defined in: [types.ts:636](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L636) +Defined in: [packages/typescript/ai/src/types.ts:662](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L662) *** @@ -213,7 +240,7 @@ Defined in: [types.ts:636](https://github.com/TanStack/ai/blob/main/packages/typ optional topP: number; ``` -Defined in: [types.ts:664](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L664) +Defined in: [packages/typescript/ai/src/types.ts:690](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L690) Nucleus sampling parameter. An alternative to temperature sampling. The model considers the results of tokens with topP probability mass. diff --git a/docs/reference/interfaces/TextPart.md b/docs/reference/interfaces/TextPart.md index ca069c0fdb..08b251aec3 100644 --- a/docs/reference/interfaces/TextPart.md +++ b/docs/reference/interfaces/TextPart.md @@ -5,7 +5,7 @@ title: TextPart # Interface: TextPart\ -Defined in: [types.ts:278](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L278) +Defined in: [packages/typescript/ai/src/types.ts:304](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L304) Message parts - building blocks of UIMessage @@ -23,7 +23,7 @@ Message parts - building blocks of UIMessage content: string; ``` -Defined in: [types.ts:280](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L280) +Defined in: [packages/typescript/ai/src/types.ts:306](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L306) *** @@ -33,7 +33,7 @@ Defined in: [types.ts:280](https://github.com/TanStack/ai/blob/main/packages/typ optional metadata: TMetadata; ``` -Defined in: [types.ts:281](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L281) +Defined in: [packages/typescript/ai/src/types.ts:307](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L307) *** @@ -43,4 +43,4 @@ Defined in: [types.ts:281](https://github.com/TanStack/ai/blob/main/packages/typ type: "text"; ``` -Defined in: [types.ts:279](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L279) +Defined in: [packages/typescript/ai/src/types.ts:305](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L305) diff --git a/docs/reference/interfaces/ThinkingPart.md b/docs/reference/interfaces/ThinkingPart.md index 3827e60dd4..9bdce16c49 100644 --- a/docs/reference/interfaces/ThinkingPart.md +++ b/docs/reference/interfaces/ThinkingPart.md @@ -5,7 +5,7 @@ title: ThinkingPart # Interface: ThinkingPart -Defined in: [types.ts:308](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L308) +Defined in: [packages/typescript/ai/src/types.ts:334](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L334) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:308](https://github.com/TanStack/ai/blob/main/packages/typ content: string; ``` -Defined in: [types.ts:310](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L310) +Defined in: [packages/typescript/ai/src/types.ts:336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L336) *** @@ -25,4 +25,4 @@ Defined in: [types.ts:310](https://github.com/TanStack/ai/blob/main/packages/typ type: "thinking"; ``` -Defined in: [types.ts:309](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L309) +Defined in: [packages/typescript/ai/src/types.ts:335](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L335) diff --git a/docs/reference/interfaces/Tool.md b/docs/reference/interfaces/Tool.md index 73f410f2c6..965e8848e3 100644 --- a/docs/reference/interfaces/Tool.md +++ b/docs/reference/interfaces/Tool.md @@ -5,7 +5,7 @@ title: Tool # Interface: Tool\ -Defined in: [types.ts:390](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L390) +Defined in: [packages/typescript/ai/src/types.ts:416](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L416) Tool/Function definition for function calling. @@ -48,7 +48,7 @@ or plain JSON Schema objects for runtime validation and type safety. description: string; ``` -Defined in: [types.ts:413](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L413) +Defined in: [packages/typescript/ai/src/types.ts:439](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L439) Clear description of what the tool does. @@ -69,7 +69,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [types.ts:493](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L493) +Defined in: [packages/typescript/ai/src/types.ts:519](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L519) Optional function to execute when the model calls this tool. @@ -113,7 +113,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [types.ts:453](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L453) +Defined in: [packages/typescript/ai/src/types.ts:479](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L479) Schema describing the tool's input parameters. @@ -167,7 +167,7 @@ type({ optional lazy: boolean; ``` -Defined in: [types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:525](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L525) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -179,7 +179,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [types.ts:502](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L502) +Defined in: [packages/typescript/ai/src/types.ts:528](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L528) Additional metadata for adapters or custom extensions @@ -191,7 +191,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [types.ts:403](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L403) +Defined in: [packages/typescript/ai/src/types.ts:429](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L429) Unique name of the tool (used by the model to call it). @@ -212,7 +212,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [types.ts:496](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L496) +Defined in: [packages/typescript/ai/src/types.ts:522](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L522) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -224,7 +224,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [types.ts:474](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L474) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/ToolCall.md b/docs/reference/interfaces/ToolCall.md index e3bf10ca20..123d0109a7 100644 --- a/docs/reference/interfaces/ToolCall.md +++ b/docs/reference/interfaces/ToolCall.md @@ -5,7 +5,7 @@ title: ToolCall # Interface: ToolCall -Defined in: [types.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L87) +Defined in: [packages/typescript/ai/src/types.ts:113](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L113) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:87](https://github.com/TanStack/ai/blob/main/packages/type function: object; ``` -Defined in: [types.ts:90](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L90) +Defined in: [packages/typescript/ai/src/types.ts:116](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L116) #### arguments @@ -37,7 +37,7 @@ name: string; id: string; ``` -Defined in: [types.ts:88](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L88) +Defined in: [packages/typescript/ai/src/types.ts:114](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L114) *** @@ -47,7 +47,7 @@ Defined in: [types.ts:88](https://github.com/TanStack/ai/blob/main/packages/type optional providerMetadata: Record; ``` -Defined in: [types.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L95) +Defined in: [packages/typescript/ai/src/types.ts:121](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L121) Provider-specific metadata to carry through the tool call lifecycle @@ -59,4 +59,4 @@ Provider-specific metadata to carry through the tool call lifecycle type: "function"; ``` -Defined in: [types.ts:89](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L89) +Defined in: [packages/typescript/ai/src/types.ts:115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L115) diff --git a/docs/reference/interfaces/ToolCallArgsEvent.md b/docs/reference/interfaces/ToolCallArgsEvent.md index 54760a5277..f81665ba20 100644 --- a/docs/reference/interfaces/ToolCallArgsEvent.md +++ b/docs/reference/interfaces/ToolCallArgsEvent.md @@ -5,37 +5,34 @@ title: ToolCallArgsEvent # Interface: ToolCallArgsEvent -Defined in: [types.ts:861](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L861) +Defined in: [packages/typescript/ai/src/types.ts:905](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L905) Emitted when tool call arguments are streaming. -## Extends +@ag-ui/core provides: `toolCallId`, `delta` +TanStack AI adds: `model?`, `args?` (accumulated) -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +## Extends -## Properties +- `ToolCallArgsEvent` -### args? +## Indexable ```ts -optional args: string; +[k: string]: unknown ``` -Defined in: [types.ts:868](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L868) - -Full accumulated arguments so far - -*** +## Properties -### delta +### args? ```ts -delta: string; +optional args: string; ``` -Defined in: [types.ts:866](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L866) +Defined in: [packages/typescript/ai/src/types.ts:909](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L909) -Incremental JSON arguments delta +Full accumulated arguments so far (TanStack AI internal) *** @@ -45,66 +42,6 @@ Incremental JSON arguments delta optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:907](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L907) Model identifier for multi-model support - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### toolCallId - -```ts -toolCallId: string; -``` - -Defined in: [types.ts:864](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L864) - -Tool call identifier - -*** - -### type - -```ts -type: "TOOL_CALL_ARGS"; -``` - -Defined in: [types.ts:862](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L862) - -#### Overrides - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) diff --git a/docs/reference/interfaces/ToolCallEndEvent.md b/docs/reference/interfaces/ToolCallEndEvent.md index 5e5b8d3af2..2070ddf709 100644 --- a/docs/reference/interfaces/ToolCallEndEvent.md +++ b/docs/reference/interfaces/ToolCallEndEvent.md @@ -5,13 +5,22 @@ title: ToolCallEndEvent # Interface: ToolCallEndEvent -Defined in: [types.ts:874](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L874) +Defined in: [packages/typescript/ai/src/types.ts:918](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L918) Emitted when a tool call completes. +@ag-ui/core provides: `toolCallId` +TanStack AI adds: `model?`, `toolCallName?`, `toolName?` (deprecated), `input?`, `result?` + ## Extends -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +- `ToolCallEndEvent` + +## Indexable + +```ts +[k: string]: unknown +``` ## Properties @@ -21,9 +30,9 @@ Emitted when a tool call completes. optional input: unknown; ``` -Defined in: [types.ts:881](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L881) +Defined in: [packages/typescript/ai/src/types.ts:929](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L929) -Final parsed input arguments +Final parsed input arguments (TanStack AI internal) *** @@ -33,30 +42,10 @@ Final parsed input arguments optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:920](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L920) Model identifier for multi-model support -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - *** ### result? @@ -65,58 +54,33 @@ Original provider event for debugging/advanced use cases optional result: string; ``` -Defined in: [types.ts:883](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L883) - -Tool execution result (if executed) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### toolCallId - -```ts -toolCallId: string; -``` - -Defined in: [types.ts:877](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L877) +Defined in: [packages/typescript/ai/src/types.ts:931](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L931) -Tool call identifier +Tool execution result (TanStack AI internal) *** -### toolName +### toolCallName? ```ts -toolName: string; +optional toolCallName: string; ``` -Defined in: [types.ts:879](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L879) +Defined in: [packages/typescript/ai/src/types.ts:922](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L922) -Name of the tool +Name of the tool that completed *** -### type +### ~~toolName?~~ ```ts -type: "TOOL_CALL_END"; +optional toolName: string; ``` -Defined in: [types.ts:875](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L875) +Defined in: [packages/typescript/ai/src/types.ts:927](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L927) -#### Overrides +#### Deprecated -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) +Use `toolCallName` instead. +Kept for backward compatibility. diff --git a/docs/reference/interfaces/ToolCallHookContext.md b/docs/reference/interfaces/ToolCallHookContext.md index 7e4f59c5ab..11e0e650b6 100644 --- a/docs/reference/interfaces/ToolCallHookContext.md +++ b/docs/reference/interfaces/ToolCallHookContext.md @@ -5,7 +5,7 @@ title: ToolCallHookContext # Interface: ToolCallHookContext -Defined in: [activities/chat/middleware/types.ts:123](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L123) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:123](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L123) Context provided to tool call hooks (onBeforeToolCall / onAfterToolCall). @@ -17,7 +17,7 @@ Context provided to tool call hooks (onBeforeToolCall / onAfterToolCall). args: unknown; ``` -Defined in: [activities/chat/middleware/types.ts:129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L129) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L129) Parsed arguments for the tool call @@ -31,7 +31,7 @@ tool: | undefined; ``` -Defined in: [activities/chat/middleware/types.ts:127](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L127) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:127](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L127) The resolved tool definition, if found @@ -43,7 +43,7 @@ The resolved tool definition, if found toolCall: ToolCall; ``` -Defined in: [activities/chat/middleware/types.ts:125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L125) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L125) The tool call being executed @@ -55,7 +55,7 @@ The tool call being executed toolCallId: string; ``` -Defined in: [activities/chat/middleware/types.ts:133](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L133) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:133](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L133) ID of the tool call @@ -67,6 +67,6 @@ ID of the tool call toolName: string; ``` -Defined in: [activities/chat/middleware/types.ts:131](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L131) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:131](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L131) Name of the tool diff --git a/docs/reference/interfaces/ToolCallPart.md b/docs/reference/interfaces/ToolCallPart.md index 5da0fff510..61794bd5b2 100644 --- a/docs/reference/interfaces/ToolCallPart.md +++ b/docs/reference/interfaces/ToolCallPart.md @@ -5,7 +5,7 @@ title: ToolCallPart # Interface: ToolCallPart -Defined in: [types.ts:284](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L284) +Defined in: [packages/typescript/ai/src/types.ts:310](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L310) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:284](https://github.com/TanStack/ai/blob/main/packages/typ optional approval: object; ``` -Defined in: [types.ts:291](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L291) +Defined in: [packages/typescript/ai/src/types.ts:317](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L317) Approval metadata if tool requires user approval @@ -45,7 +45,7 @@ needsApproval: boolean; arguments: string; ``` -Defined in: [types.ts:288](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L288) +Defined in: [packages/typescript/ai/src/types.ts:314](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L314) *** @@ -55,7 +55,7 @@ Defined in: [types.ts:288](https://github.com/TanStack/ai/blob/main/packages/typ id: string; ``` -Defined in: [types.ts:286](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L286) +Defined in: [packages/typescript/ai/src/types.ts:312](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L312) *** @@ -65,7 +65,7 @@ Defined in: [types.ts:286](https://github.com/TanStack/ai/blob/main/packages/typ name: string; ``` -Defined in: [types.ts:287](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L287) +Defined in: [packages/typescript/ai/src/types.ts:313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L313) *** @@ -75,7 +75,7 @@ Defined in: [types.ts:287](https://github.com/TanStack/ai/blob/main/packages/typ optional output: any; ``` -Defined in: [types.ts:297](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L297) +Defined in: [packages/typescript/ai/src/types.ts:323](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L323) Tool execution output (for client tools or after approval) @@ -87,7 +87,7 @@ Tool execution output (for client tools or after approval) state: ToolCallState; ``` -Defined in: [types.ts:289](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L289) +Defined in: [packages/typescript/ai/src/types.ts:315](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L315) *** @@ -97,4 +97,4 @@ Defined in: [types.ts:289](https://github.com/TanStack/ai/blob/main/packages/typ type: "tool-call"; ``` -Defined in: [types.ts:285](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L285) +Defined in: [packages/typescript/ai/src/types.ts:311](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L311) diff --git a/docs/reference/interfaces/ToolCallResultEvent.md b/docs/reference/interfaces/ToolCallResultEvent.md new file mode 100644 index 0000000000..f262ae1dc8 --- /dev/null +++ b/docs/reference/interfaces/ToolCallResultEvent.md @@ -0,0 +1,35 @@ +--- +id: ToolCallResultEvent +title: ToolCallResultEvent +--- + +# Interface: ToolCallResultEvent + +Defined in: [packages/typescript/ai/src/types.ts:940](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L940) + +Emitted when a tool call result is available. + +@ag-ui/core provides: `messageId`, `toolCallId`, `content`, `role?` +TanStack AI adds: `model?` + +## Extends + +- `ToolCallResultEvent` + +## Indexable + +```ts +[k: string]: unknown +``` + +## Properties + +### model? + +```ts +optional model: string; +``` + +Defined in: [packages/typescript/ai/src/types.ts:942](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L942) + +Model identifier for multi-model support diff --git a/docs/reference/interfaces/ToolCallStartEvent.md b/docs/reference/interfaces/ToolCallStartEvent.md index eb1d44e979..94c3f13e3d 100644 --- a/docs/reference/interfaces/ToolCallStartEvent.md +++ b/docs/reference/interfaces/ToolCallStartEvent.md @@ -5,13 +5,22 @@ title: ToolCallStartEvent # Interface: ToolCallStartEvent -Defined in: [types.ts:844](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L844) +Defined in: [packages/typescript/ai/src/types.ts:885](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L885) Emitted when a tool call starts. +@ag-ui/core provides: `toolCallId`, `toolCallName`, `parentMessageId?` +TanStack AI adds: `model?`, `toolName` (deprecated alias), `index?`, `providerMetadata?` + ## Extends -- [`BaseAGUIEvent`](BaseAGUIEvent.md) +- `ToolCallStartEvent` + +## Indexable + +```ts +[k: string]: unknown +``` ## Properties @@ -21,7 +30,7 @@ Emitted when a tool call starts. optional index: number; ``` -Defined in: [types.ts:853](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L853) +Defined in: [packages/typescript/ai/src/types.ts:894](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L894) Index for parallel tool calls @@ -33,26 +42,10 @@ Index for parallel tool calls optional model: string; ``` -Defined in: [types.ts:756](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L756) +Defined in: [packages/typescript/ai/src/types.ts:887](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L887) Model identifier for multi-model support -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`model`](BaseAGUIEvent.md#model) - -*** - -### parentMessageId? - -```ts -optional parentMessageId: string; -``` - -Defined in: [types.ts:851](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L851) - -ID of the parent message that initiated this tool call - *** ### providerMetadata? @@ -61,74 +54,21 @@ ID of the parent message that initiated this tool call optional providerMetadata: Record; ``` -Defined in: [types.ts:855](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L855) +Defined in: [packages/typescript/ai/src/types.ts:896](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L896) Provider-specific metadata to carry into the ToolCall *** -### rawEvent? - -```ts -optional rawEvent: unknown; -``` - -Defined in: [types.ts:758](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L758) - -Original provider event for debugging/advanced use cases - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`rawEvent`](BaseAGUIEvent.md#rawevent) - -*** - -### timestamp - -```ts -timestamp: number; -``` - -Defined in: [types.ts:754](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L754) - -#### Inherited from - -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`timestamp`](BaseAGUIEvent.md#timestamp) - -*** - -### toolCallId - -```ts -toolCallId: string; -``` - -Defined in: [types.ts:847](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L847) - -Unique identifier for this tool call - -*** - -### toolName +### ~~toolName~~ ```ts toolName: string; ``` -Defined in: [types.ts:849](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L849) - -Name of the tool being called - -*** - -### type - -```ts -type: "TOOL_CALL_START"; -``` - -Defined in: [types.ts:845](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L845) +Defined in: [packages/typescript/ai/src/types.ts:892](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L892) -#### Overrides +#### Deprecated -[`BaseAGUIEvent`](BaseAGUIEvent.md).[`type`](BaseAGUIEvent.md#type) +Use `toolCallName` instead (from @ag-ui/core spec). +Kept for backward compatibility. diff --git a/docs/reference/interfaces/ToolConfig.md b/docs/reference/interfaces/ToolConfig.md index fdb75236a8..eb56d9a6b7 100644 --- a/docs/reference/interfaces/ToolConfig.md +++ b/docs/reference/interfaces/ToolConfig.md @@ -5,7 +5,7 @@ title: ToolConfig # Interface: ToolConfig -Defined in: [types.ts:505](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L505) +Defined in: [packages/typescript/ai/src/types.ts:531](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L531) ## Indexable diff --git a/docs/reference/interfaces/ToolDefinition.md b/docs/reference/interfaces/ToolDefinition.md index 638502b4af..f8d69290fa 100644 --- a/docs/reference/interfaces/ToolDefinition.md +++ b/docs/reference/interfaces/ToolDefinition.md @@ -5,7 +5,7 @@ title: ToolDefinition # Interface: ToolDefinition\ -Defined in: [activities/chat/tools/tool-definition.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L107) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L107) Tool definition builder that allows creating server or client tools from a shared definition @@ -35,7 +35,7 @@ Tool definition builder that allows creating server or client tools from a share __toolSide: "definition"; ``` -Defined in: [activities/chat/tools/tool-definition.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L50) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L50) #### Inherited from @@ -49,7 +49,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:50](https://github.com/Tan client: (execute?) => ClientTool; ``` -Defined in: [activities/chat/tools/tool-definition.ts:125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L125) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L125) Create a client-side tool with optional execute function @@ -73,7 +73,7 @@ Create a client-side tool with optional execute function description: string; ``` -Defined in: [types.ts:413](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L413) +Defined in: [packages/typescript/ai/src/types.ts:439](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L439) Clear description of what the tool does. @@ -98,7 +98,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [types.ts:493](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L493) +Defined in: [packages/typescript/ai/src/types.ts:519](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L519) Optional function to execute when the model calls this tool. @@ -146,7 +146,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [types.ts:453](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L453) +Defined in: [packages/typescript/ai/src/types.ts:479](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L479) Schema describing the tool's input parameters. @@ -204,7 +204,7 @@ type({ optional lazy: boolean; ``` -Defined in: [types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:525](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L525) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -220,7 +220,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [types.ts:502](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L502) +Defined in: [packages/typescript/ai/src/types.ts:528](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L528) Additional metadata for adapters or custom extensions @@ -236,7 +236,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [types.ts:403](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L403) +Defined in: [packages/typescript/ai/src/types.ts:429](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L429) Unique name of the tool (used by the model to call it). @@ -261,7 +261,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [types.ts:496](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L496) +Defined in: [packages/typescript/ai/src/types.ts:522](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L522) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -277,7 +277,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [types.ts:474](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L474) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Optional schema for validating tool output. @@ -312,7 +312,7 @@ z.object({ server: (execute) => ServerTool; ``` -Defined in: [activities/chat/tools/tool-definition.ts:115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L115) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L115) Create a server-side tool with execute function diff --git a/docs/reference/interfaces/ToolDefinitionConfig.md b/docs/reference/interfaces/ToolDefinitionConfig.md index fd27e25812..3d2fd25e0b 100644 --- a/docs/reference/interfaces/ToolDefinitionConfig.md +++ b/docs/reference/interfaces/ToolDefinitionConfig.md @@ -5,7 +5,7 @@ title: ToolDefinitionConfig # Interface: ToolDefinitionConfig\ -Defined in: [activities/chat/tools/tool-definition.ts:90](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L90) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:90](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L90) Tool definition configuration @@ -31,7 +31,7 @@ Tool definition configuration description: string; ``` -Defined in: [activities/chat/tools/tool-definition.ts:96](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L96) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:96](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L96) *** @@ -41,7 +41,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:96](https://github.com/Tan optional inputSchema: TInput; ``` -Defined in: [activities/chat/tools/tool-definition.ts:97](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L97) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:97](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L97) *** @@ -51,7 +51,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:97](https://github.com/Tan optional lazy: boolean; ``` -Defined in: [activities/chat/tools/tool-definition.ts:100](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L100) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:100](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L100) *** @@ -61,7 +61,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:100](https://github.com/Ta optional metadata: Record; ``` -Defined in: [activities/chat/tools/tool-definition.ts:101](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L101) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:101](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L101) *** @@ -71,7 +71,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:101](https://github.com/Ta name: TName; ``` -Defined in: [activities/chat/tools/tool-definition.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L95) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:95](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L95) *** @@ -81,7 +81,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:95](https://github.com/Tan optional needsApproval: boolean; ``` -Defined in: [activities/chat/tools/tool-definition.ts:99](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L99) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:99](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L99) *** @@ -91,4 +91,4 @@ Defined in: [activities/chat/tools/tool-definition.ts:99](https://github.com/Tan optional outputSchema: TOutput; ``` -Defined in: [activities/chat/tools/tool-definition.ts:98](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L98) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:98](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L98) diff --git a/docs/reference/interfaces/ToolDefinitionInstance.md b/docs/reference/interfaces/ToolDefinitionInstance.md index 3499e65f6b..3b3f2e14f6 100644 --- a/docs/reference/interfaces/ToolDefinitionInstance.md +++ b/docs/reference/interfaces/ToolDefinitionInstance.md @@ -5,7 +5,7 @@ title: ToolDefinitionInstance # Interface: ToolDefinitionInstance\ -Defined in: [activities/chat/tools/tool-definition.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L45) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L45) Tool definition that can be used directly or instantiated for server/client @@ -39,7 +39,7 @@ Tool definition that can be used directly or instantiated for server/client __toolSide: "definition"; ``` -Defined in: [activities/chat/tools/tool-definition.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L50) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L50) *** @@ -49,7 +49,7 @@ Defined in: [activities/chat/tools/tool-definition.ts:50](https://github.com/Tan description: string; ``` -Defined in: [types.ts:413](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L413) +Defined in: [packages/typescript/ai/src/types.ts:439](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L439) Clear description of what the tool does. @@ -74,7 +74,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [types.ts:493](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L493) +Defined in: [packages/typescript/ai/src/types.ts:519](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L519) Optional function to execute when the model calls this tool. @@ -122,7 +122,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [types.ts:453](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L453) +Defined in: [packages/typescript/ai/src/types.ts:479](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L479) Schema describing the tool's input parameters. @@ -180,7 +180,7 @@ type({ optional lazy: boolean; ``` -Defined in: [types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:525](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L525) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -196,7 +196,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [types.ts:502](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L502) +Defined in: [packages/typescript/ai/src/types.ts:528](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L528) Additional metadata for adapters or custom extensions @@ -212,7 +212,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [types.ts:403](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L403) +Defined in: [packages/typescript/ai/src/types.ts:429](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L429) Unique name of the tool (used by the model to call it). @@ -237,7 +237,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [types.ts:496](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L496) +Defined in: [packages/typescript/ai/src/types.ts:522](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L522) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -253,7 +253,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [types.ts:474](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L474) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/ToolExecutionContext.md b/docs/reference/interfaces/ToolExecutionContext.md index 25c9911056..f34f900256 100644 --- a/docs/reference/interfaces/ToolExecutionContext.md +++ b/docs/reference/interfaces/ToolExecutionContext.md @@ -5,7 +5,7 @@ title: ToolExecutionContext # Interface: ToolExecutionContext -Defined in: [types.ts:353](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L353) +Defined in: [packages/typescript/ai/src/types.ts:379](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L379) Context passed to tool execute functions, providing capabilities like emitting custom events during execution. @@ -18,7 +18,7 @@ emitting custom events during execution. emitCustomEvent: (eventName, value) => void; ``` -Defined in: [types.ts:374](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L374) +Defined in: [packages/typescript/ai/src/types.ts:400](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L400) Emit a custom event during tool execution. Events are streamed to the client in real-time as AG-UI CUSTOM events. @@ -61,6 +61,6 @@ const tool = toolDefinition({ ... }).server(async (args, context) => { optional toolCallId: string; ``` -Defined in: [types.ts:355](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L355) +Defined in: [packages/typescript/ai/src/types.ts:381](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L381) The ID of the tool call being executed diff --git a/docs/reference/interfaces/ToolPhaseCompleteInfo.md b/docs/reference/interfaces/ToolPhaseCompleteInfo.md index c83666ad97..484a26027c 100644 --- a/docs/reference/interfaces/ToolPhaseCompleteInfo.md +++ b/docs/reference/interfaces/ToolPhaseCompleteInfo.md @@ -5,7 +5,7 @@ title: ToolPhaseCompleteInfo # Interface: ToolPhaseCompleteInfo -Defined in: [activities/chat/middleware/types.ts:194](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L194) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:194](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L194) Aggregate information passed to onToolPhaseComplete after all tool calls in an iteration have been processed. @@ -18,7 +18,7 @@ in an iteration have been processed. needsApproval: object[]; ``` -Defined in: [activities/chat/middleware/types.ts:205](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L205) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:205](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L205) Tools that need user approval @@ -54,7 +54,7 @@ toolName: string; needsClientExecution: object[]; ``` -Defined in: [activities/chat/middleware/types.ts:212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L212) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L212) Tools that need client-side execution @@ -84,7 +84,7 @@ toolName: string; results: object[]; ``` -Defined in: [activities/chat/middleware/types.ts:198](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L198) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:198](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L198) Completed tool results @@ -120,6 +120,6 @@ toolName: string; toolCalls: ToolCall[]; ``` -Defined in: [activities/chat/middleware/types.ts:196](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L196) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:196](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L196) Tool calls that were assigned to the assistant message diff --git a/docs/reference/interfaces/ToolRegistry.md b/docs/reference/interfaces/ToolRegistry.md index 78082faa45..5b048d6027 100644 --- a/docs/reference/interfaces/ToolRegistry.md +++ b/docs/reference/interfaces/ToolRegistry.md @@ -5,7 +5,7 @@ title: ToolRegistry # Interface: ToolRegistry -Defined in: [tool-registry.ts:9](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L9) +Defined in: [packages/typescript/ai/src/tool-registry.ts:9](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L9) A registry that holds tools and allows dynamic tool management. @@ -20,7 +20,7 @@ or frozen (static tool list, for backward compatibility with tools arrays). add: (tool) => void; ``` -Defined in: [tool-registry.ts:22](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L22) +Defined in: [packages/typescript/ai/src/tool-registry.ts:22](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L22) Add a tool to the registry dynamically. For frozen registries, this is a no-op. @@ -47,7 +47,7 @@ get: (name) => | undefined; ``` -Defined in: [tool-registry.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L46) +Defined in: [packages/typescript/ai/src/tool-registry.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L46) Get a tool by name. @@ -74,7 +74,7 @@ The tool if found, undefined otherwise getTools: () => readonly Tool[]; ``` -Defined in: [tool-registry.ts:14](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L14) +Defined in: [packages/typescript/ai/src/tool-registry.ts:14](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L14) Get all current tools in the registry. Called each agent loop iteration to get the latest tool list. @@ -91,7 +91,7 @@ readonly [`Tool`](Tool.md)\<[`SchemaInput`](../type-aliases/SchemaInput.md), [`S has: (name) => boolean; ``` -Defined in: [tool-registry.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L38) +Defined in: [packages/typescript/ai/src/tool-registry.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L38) Check if a tool exists in the registry. @@ -115,7 +115,7 @@ The name of the tool to check readonly isFrozen: boolean; ``` -Defined in: [tool-registry.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L52) +Defined in: [packages/typescript/ai/src/tool-registry.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L52) Whether this registry is frozen (immutable). Frozen registries don't allow add/remove operations. @@ -128,7 +128,7 @@ Frozen registries don't allow add/remove operations. remove: (name) => boolean; ``` -Defined in: [tool-registry.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L31) +Defined in: [packages/typescript/ai/src/tool-registry.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L31) Remove a tool from the registry by name. For frozen registries, this always returns false. diff --git a/docs/reference/interfaces/ToolResultPart.md b/docs/reference/interfaces/ToolResultPart.md index 96a5a1e924..1137710ad5 100644 --- a/docs/reference/interfaces/ToolResultPart.md +++ b/docs/reference/interfaces/ToolResultPart.md @@ -5,7 +5,7 @@ title: ToolResultPart # Interface: ToolResultPart -Defined in: [types.ts:300](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L300) +Defined in: [packages/typescript/ai/src/types.ts:326](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L326) ## Properties @@ -15,7 +15,7 @@ Defined in: [types.ts:300](https://github.com/TanStack/ai/blob/main/packages/typ content: string; ``` -Defined in: [types.ts:303](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L303) +Defined in: [packages/typescript/ai/src/types.ts:329](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L329) *** @@ -25,7 +25,7 @@ Defined in: [types.ts:303](https://github.com/TanStack/ai/blob/main/packages/typ optional error: string; ``` -Defined in: [types.ts:305](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L305) +Defined in: [packages/typescript/ai/src/types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L331) *** @@ -35,7 +35,7 @@ Defined in: [types.ts:305](https://github.com/TanStack/ai/blob/main/packages/typ state: ToolResultState; ``` -Defined in: [types.ts:304](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L304) +Defined in: [packages/typescript/ai/src/types.ts:330](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L330) *** @@ -45,7 +45,7 @@ Defined in: [types.ts:304](https://github.com/TanStack/ai/blob/main/packages/typ toolCallId: string; ``` -Defined in: [types.ts:302](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L302) +Defined in: [packages/typescript/ai/src/types.ts:328](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L328) *** @@ -55,4 +55,4 @@ Defined in: [types.ts:302](https://github.com/TanStack/ai/blob/main/packages/typ type: "tool-result"; ``` -Defined in: [types.ts:301](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L301) +Defined in: [packages/typescript/ai/src/types.ts:327](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L327) diff --git a/docs/reference/interfaces/TranscriptionAdapter.md b/docs/reference/interfaces/TranscriptionAdapter.md index 5da6571d77..6a27128cb5 100644 --- a/docs/reference/interfaces/TranscriptionAdapter.md +++ b/docs/reference/interfaces/TranscriptionAdapter.md @@ -5,7 +5,7 @@ title: TranscriptionAdapter # Interface: TranscriptionAdapter\ -Defined in: [activities/generateTranscription/adapter.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L24) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:24](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L24) Transcription adapter interface with pre-resolved generics. @@ -34,7 +34,7 @@ Generic parameters: ~types: object; ``` -Defined in: [activities/generateTranscription/adapter.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L38) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L38) **`Internal`** @@ -54,7 +54,7 @@ providerOptions: TProviderOptions; readonly kind: "transcription"; ``` -Defined in: [activities/generateTranscription/adapter.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L29) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L29) Discriminator for adapter kind - used to determine API shape @@ -66,7 +66,7 @@ Discriminator for adapter kind - used to determine API shape readonly model: TModel; ``` -Defined in: [activities/generateTranscription/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L33) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L33) The model this adapter is configured for @@ -78,7 +78,7 @@ The model this adapter is configured for readonly name: string; ``` -Defined in: [activities/generateTranscription/adapter.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L31) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L31) Adapter name identifier @@ -90,7 +90,7 @@ Adapter name identifier transcribe: (options) => Promise; ``` -Defined in: [activities/generateTranscription/adapter.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L45) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L45) Transcribe audio to text diff --git a/docs/reference/interfaces/TranscriptionOptions.md b/docs/reference/interfaces/TranscriptionOptions.md index 4fb0d0e744..22eee6b100 100644 --- a/docs/reference/interfaces/TranscriptionOptions.md +++ b/docs/reference/interfaces/TranscriptionOptions.md @@ -5,7 +5,7 @@ title: TranscriptionOptions # Interface: TranscriptionOptions\ -Defined in: [types.ts:1183](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1183) +Defined in: [packages/typescript/ai/src/types.ts:1350](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1350) Options for audio transcription. These are the common options supported across providers. @@ -24,7 +24,7 @@ These are the common options supported across providers. audio: string | File | Blob | ArrayBuffer; ``` -Defined in: [types.ts:1189](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1189) +Defined in: [packages/typescript/ai/src/types.ts:1356](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1356) The audio data to transcribe - can be base64 string, File, Blob, or Buffer @@ -36,7 +36,7 @@ The audio data to transcribe - can be base64 string, File, Blob, or Buffer optional language: string; ``` -Defined in: [types.ts:1191](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1191) +Defined in: [packages/typescript/ai/src/types.ts:1358](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1358) The language of the audio in ISO-639-1 format (e.g., 'en') @@ -48,7 +48,7 @@ The language of the audio in ISO-639-1 format (e.g., 'en') model: string; ``` -Defined in: [types.ts:1187](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1187) +Defined in: [packages/typescript/ai/src/types.ts:1354](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1354) The model to use for transcription @@ -60,7 +60,7 @@ The model to use for transcription optional modelOptions: TProviderOptions; ``` -Defined in: [types.ts:1197](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1197) +Defined in: [packages/typescript/ai/src/types.ts:1364](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1364) Model-specific options for transcription @@ -72,7 +72,7 @@ Model-specific options for transcription optional prompt: string; ``` -Defined in: [types.ts:1193](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1193) +Defined in: [packages/typescript/ai/src/types.ts:1360](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1360) An optional prompt to guide the transcription @@ -84,6 +84,6 @@ An optional prompt to guide the transcription optional responseFormat: "text" | "json" | "srt" | "verbose_json" | "vtt"; ``` -Defined in: [types.ts:1195](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1195) +Defined in: [packages/typescript/ai/src/types.ts:1362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1362) The format of the transcription output diff --git a/docs/reference/interfaces/TranscriptionResult.md b/docs/reference/interfaces/TranscriptionResult.md index 13255bf406..264b93e839 100644 --- a/docs/reference/interfaces/TranscriptionResult.md +++ b/docs/reference/interfaces/TranscriptionResult.md @@ -5,7 +5,7 @@ title: TranscriptionResult # Interface: TranscriptionResult -Defined in: [types.ts:1233](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1233) +Defined in: [packages/typescript/ai/src/types.ts:1400](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1400) Result of audio transcription. @@ -17,7 +17,7 @@ Result of audio transcription. optional duration: number; ``` -Defined in: [types.ts:1243](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1243) +Defined in: [packages/typescript/ai/src/types.ts:1410](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1410) Duration of the audio in seconds @@ -29,7 +29,7 @@ Duration of the audio in seconds id: string; ``` -Defined in: [types.ts:1235](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1235) +Defined in: [packages/typescript/ai/src/types.ts:1402](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1402) Unique identifier for the transcription @@ -41,7 +41,7 @@ Unique identifier for the transcription optional language: string; ``` -Defined in: [types.ts:1241](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1241) +Defined in: [packages/typescript/ai/src/types.ts:1408](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1408) Language detected or specified @@ -53,7 +53,7 @@ Language detected or specified model: string; ``` -Defined in: [types.ts:1237](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1237) +Defined in: [packages/typescript/ai/src/types.ts:1404](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1404) Model used for transcription @@ -65,7 +65,7 @@ Model used for transcription optional segments: TranscriptionSegment[]; ``` -Defined in: [types.ts:1245](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1245) +Defined in: [packages/typescript/ai/src/types.ts:1412](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1412) Detailed segments with timing, if available @@ -77,7 +77,7 @@ Detailed segments with timing, if available text: string; ``` -Defined in: [types.ts:1239](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1239) +Defined in: [packages/typescript/ai/src/types.ts:1406](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1406) The full transcribed text @@ -89,6 +89,6 @@ The full transcribed text optional words: TranscriptionWord[]; ``` -Defined in: [types.ts:1247](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1247) +Defined in: [packages/typescript/ai/src/types.ts:1414](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1414) Word-level timestamps, if available diff --git a/docs/reference/interfaces/TranscriptionSegment.md b/docs/reference/interfaces/TranscriptionSegment.md index 7f5788d3a8..4b1dbc807b 100644 --- a/docs/reference/interfaces/TranscriptionSegment.md +++ b/docs/reference/interfaces/TranscriptionSegment.md @@ -5,7 +5,7 @@ title: TranscriptionSegment # Interface: TranscriptionSegment -Defined in: [types.ts:1203](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1203) +Defined in: [packages/typescript/ai/src/types.ts:1370](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1370) A single segment of transcribed audio with timing information. @@ -17,7 +17,7 @@ A single segment of transcribed audio with timing information. optional confidence: number; ``` -Defined in: [types.ts:1213](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1213) +Defined in: [packages/typescript/ai/src/types.ts:1380](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1380) Confidence score (0-1), if available @@ -29,7 +29,7 @@ Confidence score (0-1), if available end: number; ``` -Defined in: [types.ts:1209](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1209) +Defined in: [packages/typescript/ai/src/types.ts:1376](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1376) End time of the segment in seconds @@ -41,7 +41,7 @@ End time of the segment in seconds id: number; ``` -Defined in: [types.ts:1205](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1205) +Defined in: [packages/typescript/ai/src/types.ts:1372](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1372) Unique identifier for the segment @@ -53,7 +53,7 @@ Unique identifier for the segment optional speaker: string; ``` -Defined in: [types.ts:1215](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1215) +Defined in: [packages/typescript/ai/src/types.ts:1382](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1382) Speaker identifier, if diarization is enabled @@ -65,7 +65,7 @@ Speaker identifier, if diarization is enabled start: number; ``` -Defined in: [types.ts:1207](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1207) +Defined in: [packages/typescript/ai/src/types.ts:1374](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1374) Start time of the segment in seconds @@ -77,6 +77,6 @@ Start time of the segment in seconds text: string; ``` -Defined in: [types.ts:1211](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1211) +Defined in: [packages/typescript/ai/src/types.ts:1378](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1378) Transcribed text for this segment diff --git a/docs/reference/interfaces/TranscriptionWord.md b/docs/reference/interfaces/TranscriptionWord.md index deeca4dcb5..7dab967f97 100644 --- a/docs/reference/interfaces/TranscriptionWord.md +++ b/docs/reference/interfaces/TranscriptionWord.md @@ -5,7 +5,7 @@ title: TranscriptionWord # Interface: TranscriptionWord -Defined in: [types.ts:1221](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1221) +Defined in: [packages/typescript/ai/src/types.ts:1388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1388) A single word with timing information. @@ -17,7 +17,7 @@ A single word with timing information. end: number; ``` -Defined in: [types.ts:1227](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1227) +Defined in: [packages/typescript/ai/src/types.ts:1394](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1394) End time in seconds @@ -29,7 +29,7 @@ End time in seconds start: number; ``` -Defined in: [types.ts:1225](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1225) +Defined in: [packages/typescript/ai/src/types.ts:1392](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1392) Start time in seconds @@ -41,6 +41,6 @@ Start time in seconds word: string; ``` -Defined in: [types.ts:1223](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1223) +Defined in: [packages/typescript/ai/src/types.ts:1390](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1390) The transcribed word diff --git a/docs/reference/interfaces/UIMessage.md b/docs/reference/interfaces/UIMessage.md index 860b2e7b44..20aec0dc07 100644 --- a/docs/reference/interfaces/UIMessage.md +++ b/docs/reference/interfaces/UIMessage.md @@ -5,7 +5,7 @@ title: UIMessage # Interface: UIMessage -Defined in: [types.ts:327](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L327) +Defined in: [packages/typescript/ai/src/types.ts:353](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L353) UIMessage - Domain-specific message format optimized for building chat UIs Contains parts that can be text, tool calls, or tool results @@ -18,7 +18,7 @@ Contains parts that can be text, tool calls, or tool results optional createdAt: Date; ``` -Defined in: [types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L331) +Defined in: [packages/typescript/ai/src/types.ts:357](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L357) *** @@ -28,7 +28,7 @@ Defined in: [types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typ id: string; ``` -Defined in: [types.ts:328](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L328) +Defined in: [packages/typescript/ai/src/types.ts:354](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L354) *** @@ -38,7 +38,7 @@ Defined in: [types.ts:328](https://github.com/TanStack/ai/blob/main/packages/typ parts: MessagePart[]; ``` -Defined in: [types.ts:330](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L330) +Defined in: [packages/typescript/ai/src/types.ts:356](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L356) *** @@ -48,4 +48,4 @@ Defined in: [types.ts:330](https://github.com/TanStack/ai/blob/main/packages/typ role: "user" | "assistant" | "system"; ``` -Defined in: [types.ts:329](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L329) +Defined in: [packages/typescript/ai/src/types.ts:355](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L355) diff --git a/docs/reference/interfaces/UsageInfo.md b/docs/reference/interfaces/UsageInfo.md index 9f5f1f65a0..47d64d6812 100644 --- a/docs/reference/interfaces/UsageInfo.md +++ b/docs/reference/interfaces/UsageInfo.md @@ -5,7 +5,7 @@ title: UsageInfo # Interface: UsageInfo -Defined in: [activities/chat/middleware/types.ts:227](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L227) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:227](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L227) Token usage statistics passed to the onUsage hook. Extracted from the RUN_FINISHED chunk when usage data is present. @@ -18,7 +18,7 @@ Extracted from the RUN_FINISHED chunk when usage data is present. completionTokens: number; ``` -Defined in: [activities/chat/middleware/types.ts:229](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L229) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:229](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L229) *** @@ -28,7 +28,7 @@ Defined in: [activities/chat/middleware/types.ts:229](https://github.com/TanStac promptTokens: number; ``` -Defined in: [activities/chat/middleware/types.ts:228](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L228) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:228](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L228) *** @@ -38,4 +38,4 @@ Defined in: [activities/chat/middleware/types.ts:228](https://github.com/TanStac totalTokens: number; ``` -Defined in: [activities/chat/middleware/types.ts:230](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L230) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:230](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L230) diff --git a/docs/reference/interfaces/VADConfig.md b/docs/reference/interfaces/VADConfig.md index 23be07c2dc..862e30d58e 100644 --- a/docs/reference/interfaces/VADConfig.md +++ b/docs/reference/interfaces/VADConfig.md @@ -5,7 +5,7 @@ title: VADConfig # Interface: VADConfig -Defined in: [realtime/types.ts:8](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L8) +Defined in: [packages/typescript/ai/src/realtime/types.ts:8](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L8) Voice activity detection configuration @@ -17,7 +17,7 @@ Voice activity detection configuration optional prefixPaddingMs: number; ``` -Defined in: [realtime/types.ts:12](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L12) +Defined in: [packages/typescript/ai/src/realtime/types.ts:12](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L12) Audio to include before speech detection (ms) @@ -29,7 +29,7 @@ Audio to include before speech detection (ms) optional silenceDurationMs: number; ``` -Defined in: [realtime/types.ts:14](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L14) +Defined in: [packages/typescript/ai/src/realtime/types.ts:14](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L14) Silence duration to end turn (ms) @@ -41,6 +41,6 @@ Silence duration to end turn (ms) optional threshold: number; ``` -Defined in: [realtime/types.ts:10](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L10) +Defined in: [packages/typescript/ai/src/realtime/types.ts:10](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L10) Sensitivity threshold (0.0-1.0) diff --git a/docs/reference/interfaces/VideoAdapter.md b/docs/reference/interfaces/VideoAdapter.md index 7bd62212a6..7511a530f1 100644 --- a/docs/reference/interfaces/VideoAdapter.md +++ b/docs/reference/interfaces/VideoAdapter.md @@ -5,7 +5,7 @@ title: VideoAdapter # Interface: VideoAdapter\ -Defined in: [activities/generateVideo/adapter.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L35) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L35) **`Experimental`** @@ -48,7 +48,7 @@ Generic parameters: ~types: object; ``` -Defined in: [activities/generateVideo/adapter.ts:51](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L51) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:51](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L51) **`Internal`** @@ -80,7 +80,7 @@ providerOptions: TProviderOptions; createVideoJob: (options) => Promise; ``` -Defined in: [activities/generateVideo/adapter.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L61) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L61) **`Experimental`** @@ -105,7 +105,7 @@ Returns a job ID that can be used to poll for status and retrieve the video. getVideoStatus: (jobId) => Promise; ``` -Defined in: [activities/generateVideo/adapter.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L68) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L68) **`Experimental`** @@ -129,7 +129,7 @@ Get the current status of a video generation job. getVideoUrl: (jobId) => Promise; ``` -Defined in: [activities/generateVideo/adapter.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L74) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L74) **`Experimental`** @@ -154,7 +154,7 @@ Should only be called after status is 'completed'. readonly kind: "video"; ``` -Defined in: [activities/generateVideo/adapter.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L42) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L42) **`Experimental`** @@ -168,7 +168,7 @@ Discriminator for adapter kind - used to determine API shape readonly model: TModel; ``` -Defined in: [activities/generateVideo/adapter.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L46) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L46) **`Experimental`** @@ -182,7 +182,7 @@ The model this adapter is configured for readonly name: string; ``` -Defined in: [activities/generateVideo/adapter.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L44) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L44) **`Experimental`** diff --git a/docs/reference/interfaces/VideoGenerationOptions.md b/docs/reference/interfaces/VideoGenerationOptions.md index fba2e2bfd2..d6c51cd62d 100644 --- a/docs/reference/interfaces/VideoGenerationOptions.md +++ b/docs/reference/interfaces/VideoGenerationOptions.md @@ -5,7 +5,7 @@ title: VideoGenerationOptions # Interface: VideoGenerationOptions\ -Defined in: [types.ts:1076](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1076) +Defined in: [packages/typescript/ai/src/types.ts:1243](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1243) **`Experimental`** @@ -32,7 +32,7 @@ These are the common options supported across providers. optional duration: number; ``` -Defined in: [types.ts:1087](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1087) +Defined in: [packages/typescript/ai/src/types.ts:1254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1254) **`Experimental`** @@ -46,7 +46,7 @@ Video duration in seconds model: string; ``` -Defined in: [types.ts:1081](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1081) +Defined in: [packages/typescript/ai/src/types.ts:1248](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1248) **`Experimental`** @@ -60,7 +60,7 @@ The model to use for video generation optional modelOptions: TProviderOptions; ``` -Defined in: [types.ts:1089](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1089) +Defined in: [packages/typescript/ai/src/types.ts:1256](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1256) **`Experimental`** @@ -74,7 +74,7 @@ Model-specific options for video generation prompt: string; ``` -Defined in: [types.ts:1083](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1083) +Defined in: [packages/typescript/ai/src/types.ts:1250](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1250) **`Experimental`** @@ -88,7 +88,7 @@ Text description of the desired video optional size: TSize; ``` -Defined in: [types.ts:1085](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1085) +Defined in: [packages/typescript/ai/src/types.ts:1252](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1252) **`Experimental`** diff --git a/docs/reference/interfaces/VideoJobResult.md b/docs/reference/interfaces/VideoJobResult.md index c8a4fef076..c414f4da81 100644 --- a/docs/reference/interfaces/VideoJobResult.md +++ b/docs/reference/interfaces/VideoJobResult.md @@ -5,7 +5,7 @@ title: VideoJobResult # Interface: VideoJobResult -Defined in: [types.ts:1097](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1097) +Defined in: [packages/typescript/ai/src/types.ts:1264](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1264) **`Experimental`** @@ -21,7 +21,7 @@ Result of creating a video generation job. jobId: string; ``` -Defined in: [types.ts:1099](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1099) +Defined in: [packages/typescript/ai/src/types.ts:1266](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1266) **`Experimental`** @@ -35,7 +35,7 @@ Unique job identifier for polling status model: string; ``` -Defined in: [types.ts:1101](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1101) +Defined in: [packages/typescript/ai/src/types.ts:1268](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1268) **`Experimental`** diff --git a/docs/reference/interfaces/VideoPart.md b/docs/reference/interfaces/VideoPart.md index c07f8ae004..5ad10c8313 100644 --- a/docs/reference/interfaces/VideoPart.md +++ b/docs/reference/interfaces/VideoPart.md @@ -5,7 +5,7 @@ title: VideoPart # Interface: VideoPart\ -Defined in: [types.ts:187](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L187) +Defined in: [packages/typescript/ai/src/types.ts:213](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L213) Video content part for multimodal messages. @@ -25,7 +25,7 @@ Provider-specific metadata type optional metadata: TMetadata; ``` -Defined in: [types.ts:192](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L192) +Defined in: [packages/typescript/ai/src/types.ts:218](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L218) Provider-specific metadata (e.g., duration, resolution) @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., duration, resolution) source: ContentPartSource; ``` -Defined in: [types.ts:190](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L190) +Defined in: [packages/typescript/ai/src/types.ts:216](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L216) Source of the video content @@ -49,4 +49,4 @@ Source of the video content type: "video"; ``` -Defined in: [types.ts:188](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L188) +Defined in: [packages/typescript/ai/src/types.ts:214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L214) diff --git a/docs/reference/interfaces/VideoStatusResult.md b/docs/reference/interfaces/VideoStatusResult.md index 26990f4fdb..93733db14c 100644 --- a/docs/reference/interfaces/VideoStatusResult.md +++ b/docs/reference/interfaces/VideoStatusResult.md @@ -5,7 +5,7 @@ title: VideoStatusResult # Interface: VideoStatusResult -Defined in: [types.ts:1109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1109) +Defined in: [packages/typescript/ai/src/types.ts:1276](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1276) **`Experimental`** @@ -21,7 +21,7 @@ Status of a video generation job. optional error: string; ``` -Defined in: [types.ts:1117](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1117) +Defined in: [packages/typescript/ai/src/types.ts:1284](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1284) **`Experimental`** @@ -35,7 +35,7 @@ Error message if status is 'failed' jobId: string; ``` -Defined in: [types.ts:1111](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1111) +Defined in: [packages/typescript/ai/src/types.ts:1278](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1278) **`Experimental`** @@ -49,7 +49,7 @@ Job identifier optional progress: number; ``` -Defined in: [types.ts:1115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1115) +Defined in: [packages/typescript/ai/src/types.ts:1282](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1282) **`Experimental`** @@ -63,7 +63,7 @@ Progress percentage (0-100), if available status: "pending" | "processing" | "completed" | "failed"; ``` -Defined in: [types.ts:1113](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1113) +Defined in: [packages/typescript/ai/src/types.ts:1280](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1280) **`Experimental`** diff --git a/docs/reference/interfaces/VideoUrlResult.md b/docs/reference/interfaces/VideoUrlResult.md index 1a970849e6..e299e9b450 100644 --- a/docs/reference/interfaces/VideoUrlResult.md +++ b/docs/reference/interfaces/VideoUrlResult.md @@ -5,7 +5,7 @@ title: VideoUrlResult # Interface: VideoUrlResult -Defined in: [types.ts:1125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1125) +Defined in: [packages/typescript/ai/src/types.ts:1292](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1292) **`Experimental`** @@ -21,7 +21,7 @@ Result containing the URL to a generated video. optional expiresAt: Date; ``` -Defined in: [types.ts:1131](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1131) +Defined in: [packages/typescript/ai/src/types.ts:1298](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1298) **`Experimental`** @@ -35,7 +35,7 @@ When the URL expires, if applicable jobId: string; ``` -Defined in: [types.ts:1127](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1127) +Defined in: [packages/typescript/ai/src/types.ts:1294](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1294) **`Experimental`** @@ -49,7 +49,7 @@ Job identifier url: string; ``` -Defined in: [types.ts:1129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1129) +Defined in: [packages/typescript/ai/src/types.ts:1296](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1296) **`Experimental`** diff --git a/docs/reference/type-aliases/AGUIEvent.md b/docs/reference/type-aliases/AGUIEvent.md index 05cae502fd..6c53bedaaf 100644 --- a/docs/reference/type-aliases/AGUIEvent.md +++ b/docs/reference/type-aliases/AGUIEvent.md @@ -16,14 +16,21 @@ type AGUIEvent = | ToolCallStartEvent | ToolCallArgsEvent | ToolCallEndEvent + | ToolCallResultEvent | StepStartedEvent | StepFinishedEvent | MessagesSnapshotEvent | StateSnapshotEvent | StateDeltaEvent - | CustomEvent; + | CustomEvent + | ReasoningStartEvent + | ReasoningMessageStartEvent + | ReasoningMessageContentEvent + | ReasoningMessageEndEvent + | ReasoningEndEvent + | ReasoningEncryptedValueEvent; ``` -Defined in: [types.ts:955](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L955) +Defined in: [packages/typescript/ai/src/types.ts:1115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1115) Union of all AG-UI events. diff --git a/docs/reference/type-aliases/AGUIEventType.md b/docs/reference/type-aliases/AGUIEventType.md index e57edbd63a..ec78ef587e 100644 --- a/docs/reference/type-aliases/AGUIEventType.md +++ b/docs/reference/type-aliases/AGUIEventType.md @@ -3,31 +3,20 @@ id: AGUIEventType title: AGUIEventType --- -# Type Alias: AGUIEventType +# ~~Type Alias: AGUIEventType~~ ```ts -type AGUIEventType = - | "RUN_STARTED" - | "RUN_FINISHED" - | "RUN_ERROR" - | "TEXT_MESSAGE_START" - | "TEXT_MESSAGE_CONTENT" - | "TEXT_MESSAGE_END" - | "TOOL_CALL_START" - | "TOOL_CALL_ARGS" - | "TOOL_CALL_END" - | "STEP_STARTED" - | "STEP_FINISHED" - | "MESSAGES_SNAPSHOT" - | "STATE_SNAPSHOT" - | "STATE_DELTA" - | "CUSTOM"; +type AGUIEventType = `${EventType}`; ``` -Defined in: [types.ts:726](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L726) +Defined in: [packages/typescript/ai/src/types.ts:770](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L770) AG-UI Protocol event types. -Based on the AG-UI specification for agent-user interaction. + +## Deprecated + +Use `EventType` enum from `@ag-ui/core` instead. This type alias +is kept for backward compatibility but will be removed in a future version. ## See diff --git a/docs/reference/type-aliases/AIAdapter.md b/docs/reference/type-aliases/AIAdapter.md index ef7f5f5c66..aa8f2b895f 100644 --- a/docs/reference/type-aliases/AIAdapter.md +++ b/docs/reference/type-aliases/AIAdapter.md @@ -15,6 +15,6 @@ type AIAdapter = | AnyTranscriptionAdapter; ``` -Defined in: [activities/index.ts:149](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/index.ts#L149) +Defined in: [packages/typescript/ai/src/activities/index.ts:149](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/index.ts#L149) Union of all adapter types that can be passed to chat() diff --git a/docs/reference/type-aliases/AgentLoopStrategy.md b/docs/reference/type-aliases/AgentLoopStrategy.md index 39d377c892..823b930b6e 100644 --- a/docs/reference/type-aliases/AgentLoopStrategy.md +++ b/docs/reference/type-aliases/AgentLoopStrategy.md @@ -9,7 +9,7 @@ title: AgentLoopStrategy type AgentLoopStrategy = (state) => boolean; ``` -Defined in: [types.ts:625](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L625) +Defined in: [packages/typescript/ai/src/types.ts:651](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L651) Strategy function that determines whether the agent loop should continue diff --git a/docs/reference/type-aliases/AnyClientTool.md b/docs/reference/type-aliases/AnyClientTool.md index ae8019f2e4..ada3199f26 100644 --- a/docs/reference/type-aliases/AnyClientTool.md +++ b/docs/reference/type-aliases/AnyClientTool.md @@ -11,6 +11,6 @@ type AnyClientTool = | ToolDefinitionInstance; ``` -Defined in: [activities/chat/tools/tool-definition.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L56) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L56) Union type for any kind of client-side tool (client tool or definition) diff --git a/docs/reference/type-aliases/AnyImageAdapter.md b/docs/reference/type-aliases/AnyImageAdapter.md index aa8a929133..5556da838a 100644 --- a/docs/reference/type-aliases/AnyImageAdapter.md +++ b/docs/reference/type-aliases/AnyImageAdapter.md @@ -9,7 +9,7 @@ title: AnyImageAdapter type AnyImageAdapter = ImageAdapter; ``` -Defined in: [activities/generateImage/adapter.ts:67](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L67) +Defined in: [packages/typescript/ai/src/activities/generateImage/adapter.ts:67](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateImage/adapter.ts#L67) An ImageAdapter with any/unknown type parameters. Useful as a constraint in generic functions and interfaces. diff --git a/docs/reference/type-aliases/AnySummarizeAdapter.md b/docs/reference/type-aliases/AnySummarizeAdapter.md index 94be547fec..603c8c3053 100644 --- a/docs/reference/type-aliases/AnySummarizeAdapter.md +++ b/docs/reference/type-aliases/AnySummarizeAdapter.md @@ -9,7 +9,7 @@ title: AnySummarizeAdapter type AnySummarizeAdapter = SummarizeAdapter; ``` -Defined in: [activities/summarize/adapter.ts:65](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L65) +Defined in: [packages/typescript/ai/src/activities/summarize/adapter.ts:65](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/summarize/adapter.ts#L65) A SummarizeAdapter with any/unknown type parameters. Useful as a constraint in generic functions and interfaces. diff --git a/docs/reference/type-aliases/AnyTTSAdapter.md b/docs/reference/type-aliases/AnyTTSAdapter.md index 92de11d216..a8b8081be5 100644 --- a/docs/reference/type-aliases/AnyTTSAdapter.md +++ b/docs/reference/type-aliases/AnyTTSAdapter.md @@ -9,7 +9,7 @@ title: AnyTTSAdapter type AnyTTSAdapter = TTSAdapter; ``` -Defined in: [activities/generateSpeech/adapter.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L52) +Defined in: [packages/typescript/ai/src/activities/generateSpeech/adapter.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateSpeech/adapter.ts#L52) A TTSAdapter with any/unknown type parameters. Useful as a constraint in generic functions and interfaces. diff --git a/docs/reference/type-aliases/AnyTextAdapter.md b/docs/reference/type-aliases/AnyTextAdapter.md index f855cc6d78..5e7031ac22 100644 --- a/docs/reference/type-aliases/AnyTextAdapter.md +++ b/docs/reference/type-aliases/AnyTextAdapter.md @@ -9,7 +9,7 @@ title: AnyTextAdapter type AnyTextAdapter = TextAdapter; ``` -Defined in: [activities/chat/adapter.ts:98](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L98) +Defined in: [packages/typescript/ai/src/activities/chat/adapter.ts:98](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/adapter.ts#L98) A TextAdapter with any/unknown type parameters. Useful as a constraint in generic functions and interfaces. diff --git a/docs/reference/type-aliases/AnyTranscriptionAdapter.md b/docs/reference/type-aliases/AnyTranscriptionAdapter.md index b533e921ae..eb0e4b865f 100644 --- a/docs/reference/type-aliases/AnyTranscriptionAdapter.md +++ b/docs/reference/type-aliases/AnyTranscriptionAdapter.md @@ -9,7 +9,7 @@ title: AnyTranscriptionAdapter type AnyTranscriptionAdapter = TranscriptionAdapter; ``` -Defined in: [activities/generateTranscription/adapter.ts:54](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L54) +Defined in: [packages/typescript/ai/src/activities/generateTranscription/adapter.ts:54](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateTranscription/adapter.ts#L54) A TranscriptionAdapter with any/unknown type parameters. Useful as a constraint in generic functions and interfaces. diff --git a/docs/reference/type-aliases/AnyVideoAdapter.md b/docs/reference/type-aliases/AnyVideoAdapter.md index ef6a97b234..5a546ca2d7 100644 --- a/docs/reference/type-aliases/AnyVideoAdapter.md +++ b/docs/reference/type-aliases/AnyVideoAdapter.md @@ -9,7 +9,7 @@ title: AnyVideoAdapter type AnyVideoAdapter = VideoAdapter; ``` -Defined in: [activities/generateVideo/adapter.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L81) +Defined in: [packages/typescript/ai/src/activities/generateVideo/adapter.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/generateVideo/adapter.ts#L81) A VideoAdapter with any/unknown type parameters. Useful as a constraint in generic functions and interfaces. diff --git a/docs/reference/type-aliases/BeforeToolCallDecision.md b/docs/reference/type-aliases/BeforeToolCallDecision.md index 31d014a5a1..f087d5017b 100644 --- a/docs/reference/type-aliases/BeforeToolCallDecision.md +++ b/docs/reference/type-aliases/BeforeToolCallDecision.md @@ -24,7 +24,7 @@ type BeforeToolCallDecision = }; ``` -Defined in: [activities/chat/middleware/types.ts:143](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L143) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:143](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L143) Decision returned from onBeforeToolCall. - undefined/void: continue with normal execution diff --git a/docs/reference/type-aliases/ChatMiddlewarePhase.md b/docs/reference/type-aliases/ChatMiddlewarePhase.md index 0d72e0c38f..2ec7b3f468 100644 --- a/docs/reference/type-aliases/ChatMiddlewarePhase.md +++ b/docs/reference/type-aliases/ChatMiddlewarePhase.md @@ -9,7 +9,7 @@ title: ChatMiddlewarePhase type ChatMiddlewarePhase = "init" | "beforeModel" | "modelStream" | "beforeTools" | "afterTools"; ``` -Defined in: [activities/chat/middleware/types.ts:15](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L15) +Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:15](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L15) Phase of the chat middleware lifecycle. - 'init': Initial config transform before the chat engine starts diff --git a/docs/reference/type-aliases/ConstrainedContent.md b/docs/reference/type-aliases/ConstrainedContent.md index 26ae38f99d..e468820307 100644 --- a/docs/reference/type-aliases/ConstrainedContent.md +++ b/docs/reference/type-aliases/ConstrainedContent.md @@ -12,7 +12,7 @@ type ConstrainedContent = | ContentPartForInputModalitiesTypes[]; ``` -Defined in: [types.ts:255](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L255) +Defined in: [packages/typescript/ai/src/types.ts:281](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L281) Type for message content constrained by supported modalities. When modalities is ['text', 'image'], only TextPart and ImagePart are allowed in the array. diff --git a/docs/reference/type-aliases/ConstrainedModelMessage.md b/docs/reference/type-aliases/ConstrainedModelMessage.md index c20060656e..1c95fd4183 100644 --- a/docs/reference/type-aliases/ConstrainedModelMessage.md +++ b/docs/reference/type-aliases/ConstrainedModelMessage.md @@ -9,7 +9,7 @@ title: ConstrainedModelMessage type ConstrainedModelMessage = Omit & object; ``` -Defined in: [types.ts:343](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L343) +Defined in: [packages/typescript/ai/src/types.ts:369](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L369) A ModelMessage with content constrained to only allow content parts matching the specified input modalities. diff --git a/docs/reference/type-aliases/ContentPart.md b/docs/reference/type-aliases/ContentPart.md index 873a67b72a..2678fd0985 100644 --- a/docs/reference/type-aliases/ContentPart.md +++ b/docs/reference/type-aliases/ContentPart.md @@ -14,7 +14,7 @@ type ContentPart = | DocumentPart; ``` -Defined in: [types.ts:214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L214) +Defined in: [packages/typescript/ai/src/types.ts:240](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L240) Union type for all multimodal content parts. diff --git a/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md b/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md index dd5dfb9aa6..884f43c0d8 100644 --- a/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md +++ b/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md @@ -11,7 +11,7 @@ type ContentPartForInputModalitiesTypes = Extract; ``` -Defined in: [types.ts:231](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L231) +Defined in: [packages/typescript/ai/src/types.ts:257](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L257) Helper type to filter ContentPart union to only include specific modalities. Used to constrain message content based on model capabilities. diff --git a/docs/reference/type-aliases/ContentPartSource.md b/docs/reference/type-aliases/ContentPartSource.md index 796fd88d2a..c11bdee3b4 100644 --- a/docs/reference/type-aliases/ContentPartSource.md +++ b/docs/reference/type-aliases/ContentPartSource.md @@ -11,7 +11,7 @@ type ContentPartSource = | ContentPartUrlSource; ``` -Defined in: [types.ts:157](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L157) +Defined in: [packages/typescript/ai/src/types.ts:183](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L183) Source specification for multimodal content. Discriminated union supporting both inline data (base64) and URL-based content. diff --git a/docs/reference/type-aliases/InferSchemaType.md b/docs/reference/type-aliases/InferSchemaType.md index 10241edfe0..d5a50de4f4 100644 --- a/docs/reference/type-aliases/InferSchemaType.md +++ b/docs/reference/type-aliases/InferSchemaType.md @@ -9,7 +9,7 @@ title: InferSchemaType type InferSchemaType = T extends StandardJSONSchemaV1 ? TInput : unknown; ``` -Defined in: [types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L84) +Defined in: [packages/typescript/ai/src/types.ts:110](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L110) Infer the TypeScript type from a schema. For Standard JSON Schema compliant schemas, extracts the input type. diff --git a/docs/reference/type-aliases/InferToolInput.md b/docs/reference/type-aliases/InferToolInput.md index 2e1b864cea..54b67ab7dc 100644 --- a/docs/reference/type-aliases/InferToolInput.md +++ b/docs/reference/type-aliases/InferToolInput.md @@ -9,7 +9,7 @@ title: InferToolInput type InferToolInput = T extends object ? TInput extends StandardJSONSchemaV1 ? TInferred : TInput extends JSONSchema ? unknown : unknown : unknown; ``` -Defined in: [activities/chat/tools/tool-definition.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L68) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L68) Extract the input type from a tool (inferred from Standard JSON Schema, or `unknown` for plain JSONSchema) diff --git a/docs/reference/type-aliases/InferToolName.md b/docs/reference/type-aliases/InferToolName.md index de25b3f044..6e8080159a 100644 --- a/docs/reference/type-aliases/InferToolName.md +++ b/docs/reference/type-aliases/InferToolName.md @@ -9,7 +9,7 @@ title: InferToolName type InferToolName = T extends object ? N : never; ``` -Defined in: [activities/chat/tools/tool-definition.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L63) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L63) Extract the tool name as a literal type diff --git a/docs/reference/type-aliases/InferToolOutput.md b/docs/reference/type-aliases/InferToolOutput.md index c176862a15..a928d2f3de 100644 --- a/docs/reference/type-aliases/InferToolOutput.md +++ b/docs/reference/type-aliases/InferToolOutput.md @@ -9,7 +9,7 @@ title: InferToolOutput type InferToolOutput = T extends object ? TOutput extends StandardJSONSchemaV1 ? TInferred : TOutput extends JSONSchema ? unknown : unknown : unknown; ``` -Defined in: [activities/chat/tools/tool-definition.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L79) +Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/tools/tool-definition.ts#L79) Extract the output type from a tool (inferred from Standard JSON Schema, or `unknown` for plain JSONSchema) diff --git a/docs/reference/type-aliases/InputModalitiesTypes.md b/docs/reference/type-aliases/InputModalitiesTypes.md index 8fcfbebc8d..2c231dab51 100644 --- a/docs/reference/type-aliases/InputModalitiesTypes.md +++ b/docs/reference/type-aliases/InputModalitiesTypes.md @@ -9,7 +9,7 @@ title: InputModalitiesTypes type InputModalitiesTypes = object; ``` -Defined in: [types.ts:334](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L334) +Defined in: [packages/typescript/ai/src/types.ts:360](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L360) ## Properties @@ -19,7 +19,7 @@ Defined in: [types.ts:334](https://github.com/TanStack/ai/blob/main/packages/typ inputModalities: ReadonlyArray; ``` -Defined in: [types.ts:335](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L335) +Defined in: [packages/typescript/ai/src/types.ts:361](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L361) *** @@ -29,4 +29,4 @@ Defined in: [types.ts:335](https://github.com/TanStack/ai/blob/main/packages/typ messageMetadataByModality: DefaultMessageMetadataByModality; ``` -Defined in: [types.ts:336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L336) +Defined in: [packages/typescript/ai/src/types.ts:362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L362) diff --git a/docs/reference/type-aliases/MessagePart.md b/docs/reference/type-aliases/MessagePart.md index fdbdef677e..f9f76d2937 100644 --- a/docs/reference/type-aliases/MessagePart.md +++ b/docs/reference/type-aliases/MessagePart.md @@ -17,4 +17,4 @@ type MessagePart = | ThinkingPart; ``` -Defined in: [types.ts:313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L313) +Defined in: [packages/typescript/ai/src/types.ts:339](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L339) diff --git a/docs/reference/type-aliases/ModalitiesArrayToUnion.md b/docs/reference/type-aliases/ModalitiesArrayToUnion.md index d49959d2cb..8bd30a11a3 100644 --- a/docs/reference/type-aliases/ModalitiesArrayToUnion.md +++ b/docs/reference/type-aliases/ModalitiesArrayToUnion.md @@ -9,7 +9,7 @@ title: ModalitiesArrayToUnion type ModalitiesArrayToUnion = T[number]; ``` -Defined in: [types.ts:248](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L248) +Defined in: [packages/typescript/ai/src/types.ts:274](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L274) Helper type to convert a readonly array of modalities to a union type. e.g., readonly ['text', 'image'] -> 'text' | 'image' diff --git a/docs/reference/type-aliases/Modality.md b/docs/reference/type-aliases/Modality.md index 92d4156ee8..c240a2fb7e 100644 --- a/docs/reference/type-aliases/Modality.md +++ b/docs/reference/type-aliases/Modality.md @@ -9,7 +9,7 @@ title: Modality type Modality = "text" | "image" | "audio" | "video" | "document"; ``` -Defined in: [types.ts:110](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L110) +Defined in: [packages/typescript/ai/src/types.ts:136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L136) Supported input modality types for multimodal content. - 'text': Plain text content diff --git a/docs/reference/type-aliases/RealtimeErrorCode.md b/docs/reference/type-aliases/RealtimeErrorCode.md index 1bfacec91d..e16b995201 100644 --- a/docs/reference/type-aliases/RealtimeErrorCode.md +++ b/docs/reference/type-aliases/RealtimeErrorCode.md @@ -14,6 +14,6 @@ type RealtimeErrorCode = | "UNKNOWN"; ``` -Defined in: [realtime/types.ts:280](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L280) +Defined in: [packages/typescript/ai/src/realtime/types.ts:280](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L280) Error codes for realtime errors diff --git a/docs/reference/type-aliases/RealtimeEvent.md b/docs/reference/type-aliases/RealtimeEvent.md index 4313815bd0..117084b91e 100644 --- a/docs/reference/type-aliases/RealtimeEvent.md +++ b/docs/reference/type-aliases/RealtimeEvent.md @@ -17,6 +17,6 @@ type RealtimeEvent = | "error"; ``` -Defined in: [realtime/types.ts:238](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L238) +Defined in: [packages/typescript/ai/src/realtime/types.ts:238](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L238) Events emitted by the realtime connection diff --git a/docs/reference/type-aliases/RealtimeEventHandler.md b/docs/reference/type-aliases/RealtimeEventHandler.md index 4b9c3fe843..e9d1d44e6b 100644 --- a/docs/reference/type-aliases/RealtimeEventHandler.md +++ b/docs/reference/type-aliases/RealtimeEventHandler.md @@ -9,7 +9,7 @@ title: RealtimeEventHandler type RealtimeEventHandler = (payload) => void; ``` -Defined in: [realtime/types.ts:269](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L269) +Defined in: [packages/typescript/ai/src/realtime/types.ts:269](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L269) Handler type for realtime events diff --git a/docs/reference/type-aliases/RealtimeMessagePart.md b/docs/reference/type-aliases/RealtimeMessagePart.md index 80292d7b79..a19a771a05 100644 --- a/docs/reference/type-aliases/RealtimeMessagePart.md +++ b/docs/reference/type-aliases/RealtimeMessagePart.md @@ -14,6 +14,6 @@ type RealtimeMessagePart = | RealtimeImagePart; ``` -Defined in: [realtime/types.ts:147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L147) +Defined in: [packages/typescript/ai/src/realtime/types.ts:147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L147) Union of all realtime message parts diff --git a/docs/reference/type-aliases/RealtimeMode.md b/docs/reference/type-aliases/RealtimeMode.md index a5a26eff24..7f7c6d9178 100644 --- a/docs/reference/type-aliases/RealtimeMode.md +++ b/docs/reference/type-aliases/RealtimeMode.md @@ -9,6 +9,6 @@ title: RealtimeMode type RealtimeMode = "idle" | "listening" | "thinking" | "speaking"; ``` -Defined in: [realtime/types.ts:191](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L191) +Defined in: [packages/typescript/ai/src/realtime/types.ts:191](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L191) Current mode of the realtime session diff --git a/docs/reference/type-aliases/RealtimeStatus.md b/docs/reference/type-aliases/RealtimeStatus.md index fe34f5d353..dd4aee6d47 100644 --- a/docs/reference/type-aliases/RealtimeStatus.md +++ b/docs/reference/type-aliases/RealtimeStatus.md @@ -9,6 +9,6 @@ title: RealtimeStatus type RealtimeStatus = "idle" | "connecting" | "connected" | "reconnecting" | "error"; ``` -Defined in: [realtime/types.ts:181](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L181) +Defined in: [packages/typescript/ai/src/realtime/types.ts:181](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/realtime/types.ts#L181) Connection status of the realtime client diff --git a/docs/reference/type-aliases/SchemaInput.md b/docs/reference/type-aliases/SchemaInput.md index bd1595b71d..8cc81b1205 100644 --- a/docs/reference/type-aliases/SchemaInput.md +++ b/docs/reference/type-aliases/SchemaInput.md @@ -11,7 +11,7 @@ type SchemaInput = | JSONSchema; ``` -Defined in: [types.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L77) +Defined in: [packages/typescript/ai/src/types.ts:103](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L103) Union type for schema input - can be any Standard JSON Schema compliant schema or a plain JSONSchema object. diff --git a/docs/reference/type-aliases/StreamChunk.md b/docs/reference/type-aliases/StreamChunk.md index 4c0fb5cdb0..d223e68e3a 100644 --- a/docs/reference/type-aliases/StreamChunk.md +++ b/docs/reference/type-aliases/StreamChunk.md @@ -9,7 +9,7 @@ title: StreamChunk type StreamChunk = AGUIEvent; ``` -Defined in: [types.ts:976](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L976) +Defined in: [packages/typescript/ai/src/types.ts:1143](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1143) Chunk returned by the SDK during streaming chat completions. Uses the AG-UI protocol event format. diff --git a/docs/reference/type-aliases/StreamChunkType.md b/docs/reference/type-aliases/StreamChunkType.md index a11c3166d1..5cdc6bb1fa 100644 --- a/docs/reference/type-aliases/StreamChunkType.md +++ b/docs/reference/type-aliases/StreamChunkType.md @@ -3,12 +3,16 @@ id: StreamChunkType title: StreamChunkType --- -# Type Alias: StreamChunkType +# ~~Type Alias: StreamChunkType~~ ```ts type StreamChunkType = AGUIEventType; ``` -Defined in: [types.ts:746](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L746) +Defined in: [packages/typescript/ai/src/types.ts:776](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L776) Stream chunk/event types (AG-UI protocol). + +## Deprecated + +Use `EventType` enum instead. diff --git a/docs/reference/type-aliases/ToolCallState.md b/docs/reference/type-aliases/ToolCallState.md index dc71a615a0..34d82935dd 100644 --- a/docs/reference/type-aliases/ToolCallState.md +++ b/docs/reference/type-aliases/ToolCallState.md @@ -14,6 +14,6 @@ type ToolCallState = | "approval-responded"; ``` -Defined in: [types.ts:6](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L6) +Defined in: [packages/typescript/ai/src/types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L32) Tool call states - track the lifecycle of a tool call diff --git a/docs/reference/type-aliases/ToolResultState.md b/docs/reference/type-aliases/ToolResultState.md index c641d4c72a..ce47f609b4 100644 --- a/docs/reference/type-aliases/ToolResultState.md +++ b/docs/reference/type-aliases/ToolResultState.md @@ -9,6 +9,6 @@ title: ToolResultState type ToolResultState = "streaming" | "complete" | "error"; ``` -Defined in: [types.ts:16](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L16) +Defined in: [packages/typescript/ai/src/types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L42) Tool result states - track the lifecycle of a tool result diff --git a/docs/reference/variables/defaultJSONParser.md b/docs/reference/variables/defaultJSONParser.md index 0c72078d07..6f3d4f4688 100644 --- a/docs/reference/variables/defaultJSONParser.md +++ b/docs/reference/variables/defaultJSONParser.md @@ -9,6 +9,6 @@ title: defaultJSONParser const defaultJSONParser: PartialJSONParser; ``` -Defined in: [activities/chat/stream/json-parser.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L49) +Defined in: [packages/typescript/ai/src/activities/chat/stream/json-parser.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/json-parser.ts#L49) Default parser instance