@yourgpt/copilot-sdk 2.1.5-alpha.5 → 2.1.5-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ThreadManager-DK46fVl3.d.cts → ThreadManager-B12N-zpq.d.cts} +3 -3
- package/dist/{ThreadManager-D7KwT2FJ.d.ts → ThreadManager-BxGOeykx.d.ts} +3 -3
- package/dist/{chunk-KGYDGK3U.cjs → chunk-7GWEW2DU.cjs} +24 -8
- package/dist/chunk-7GWEW2DU.cjs.map +1 -0
- package/dist/{chunk-YLZCTR4O.js → chunk-J5D3AZF6.js} +24 -8
- package/dist/chunk-J5D3AZF6.js.map +1 -0
- package/dist/{chunk-5UGWLGFS.cjs → chunk-M66XAHSW.cjs} +84 -46
- package/dist/chunk-M66XAHSW.cjs.map +1 -0
- package/dist/{chunk-LHLVTGIP.cjs → chunk-NPBOKT63.cjs} +297 -96
- package/dist/chunk-NPBOKT63.cjs.map +1 -0
- package/dist/{chunk-DH6EO6NW.js → chunk-UZHGMDOK.js} +293 -92
- package/dist/chunk-UZHGMDOK.js.map +1 -0
- package/dist/{chunk-ZAOTYA5L.js → chunk-YHW6JZEF.js} +48 -11
- package/dist/chunk-YHW6JZEF.js.map +1 -0
- package/dist/core/index.cjs +72 -72
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/experimental/index.cjs +3 -3
- package/dist/experimental/index.js +2 -2
- package/dist/react/index.cjs +70 -66
- package/dist/react/index.d.cts +207 -5
- package/dist/react/index.d.ts +207 -5
- package/dist/react/index.js +3 -3
- package/dist/ui/index.cjs +1178 -228
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +119 -7
- package/dist/ui/index.d.ts +119 -7
- package/dist/ui/index.js +1173 -227
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5UGWLGFS.cjs.map +0 -1
- package/dist/chunk-DH6EO6NW.js.map +0 -1
- package/dist/chunk-KGYDGK3U.cjs.map +0 -1
- package/dist/chunk-LHLVTGIP.cjs.map +0 -1
- package/dist/chunk-YLZCTR4O.js.map +0 -1
- package/dist/chunk-ZAOTYA5L.js.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { U as UIMessage, B as BranchInfo } from '../MessageTree-Clhiv_k2.js';
|
|
|
3
3
|
export { M as MessageTree } from '../MessageTree-Clhiv_k2.js';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { L as LLMConfig, l as ToolsConfig, s as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, y as InternalKnowledgeBaseConfig, B as InternalKnowledgeBaseSearchResponse, z as InternalKnowledgeBaseResult, Y as ThreadManagerState, Z as LoadStatus, U as ThreadManagerConfig, F as ThreadManager, V as ThreadManagerCallbacks, W as CreateThreadOptions, X as UpdateThreadOptions } from '../ThreadManager-
|
|
7
|
-
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-
|
|
6
|
+
import { L as LLMConfig, l as ToolsConfig, s as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, y as InternalKnowledgeBaseConfig, B as InternalKnowledgeBaseSearchResponse, z as InternalKnowledgeBaseResult, Y as ThreadManagerState, Z as LoadStatus, U as ThreadManagerConfig, F as ThreadManager, V as ThreadManagerCallbacks, W as CreateThreadOptions, X as UpdateThreadOptions } from '../ThreadManager-BxGOeykx.js';
|
|
7
|
+
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-BxGOeykx.js';
|
|
8
8
|
import { T as ToolDefinition, t as ToolOptimizationConfig, r as ContextUsage, f as ToolSource, P as PermissionLevel, c as ToolInputSchema, y as ToolExecution$1, e as ToolContext, b as ToolResponse$1, g as ToolRenderProps, i as ToolResultConfig, D as AIResponseMode, u as ToolSet, U as UnifiedToolCall, G as PermissionStorageConfig, H as PermissionStorageAdapter } from '../tools-DcS6Aeao.js';
|
|
9
9
|
export { z as AgentLoopConfig, q as ContextUsagePart, h as ToolConfig, a as ToolExecutionStatus, F as ToolPermission, v as ToolSetEntry, I as tool } from '../tools-DcS6Aeao.js';
|
|
10
10
|
import { A as AsyncThreadStorageAdapter, M as MessageAttachment, T as ToolCall, d as Message, S as Source, a as Thread, b as ThreadData, c as ThreadStorageAdapter } from '../types-waEqyE4K.js';
|
|
@@ -142,6 +142,8 @@ interface ChatResponse {
|
|
|
142
142
|
/** Tool call ID for tool result messages */
|
|
143
143
|
tool_call_id?: string;
|
|
144
144
|
}>;
|
|
145
|
+
/** Session ID — present when server storage adapter created/resolved a session */
|
|
146
|
+
threadId?: string;
|
|
145
147
|
/** Whether client needs to execute tools */
|
|
146
148
|
requiresAction?: boolean;
|
|
147
149
|
/** Tool calls with metadata (includes hidden flag for server-side tools) */
|
|
@@ -211,6 +213,8 @@ type StreamChunk = {
|
|
|
211
213
|
tool_call_id?: string;
|
|
212
214
|
}>;
|
|
213
215
|
requiresAction?: boolean;
|
|
216
|
+
/** Session ID from server storage adapter */
|
|
217
|
+
threadId?: string;
|
|
214
218
|
} | {
|
|
215
219
|
type: "action:start";
|
|
216
220
|
id: string;
|
|
@@ -427,6 +431,17 @@ interface ChatState$1<T extends UIMessage = UIMessage> {
|
|
|
427
431
|
* Chat status
|
|
428
432
|
*/
|
|
429
433
|
type ChatStatus$1 = "ready" | "submitted" | "streaming" | "error";
|
|
434
|
+
/**
|
|
435
|
+
* YourGPT configuration for automatic session management
|
|
436
|
+
*/
|
|
437
|
+
interface YourGPTConfig {
|
|
438
|
+
/** YourGPT API key (sent as api-key header) */
|
|
439
|
+
apiKey: string;
|
|
440
|
+
/** Widget UID to scope sessions to */
|
|
441
|
+
widgetUid: string;
|
|
442
|
+
/** API base URL (default: https://api.yourgpt.ai) */
|
|
443
|
+
endpoint?: string;
|
|
444
|
+
}
|
|
430
445
|
/**
|
|
431
446
|
* Chat configuration
|
|
432
447
|
*
|
|
@@ -462,6 +477,37 @@ interface ChatConfig {
|
|
|
462
477
|
body?: Resolvable<Record<string, unknown>>;
|
|
463
478
|
/** Thread ID for conversation persistence */
|
|
464
479
|
threadId?: string;
|
|
480
|
+
/**
|
|
481
|
+
* Called once before the first message on a new thread to obtain a session/thread ID.
|
|
482
|
+
* The returned value IS the thread ID — session and thread are the same identity.
|
|
483
|
+
*
|
|
484
|
+
* Only called when `config.threadId` is not set (new thread).
|
|
485
|
+
* If `threadId` is already provided, this is skipped entirely.
|
|
486
|
+
* Takes priority over `yourgptConfig` when both are provided.
|
|
487
|
+
*
|
|
488
|
+
* @example Async server session
|
|
489
|
+
* ```ts
|
|
490
|
+
* onCreateSession={async () => {
|
|
491
|
+
* const res = await fetch('/api/sessions', { method: 'POST' })
|
|
492
|
+
* return (await res.json()).id
|
|
493
|
+
* }}
|
|
494
|
+
* ```
|
|
495
|
+
*/
|
|
496
|
+
onCreateSession?: () => string | Promise<string>;
|
|
497
|
+
/**
|
|
498
|
+
* YourGPT config — enables automatic session creation with zero boilerplate.
|
|
499
|
+
* When provided, the SDK calls YourGPT's createSession API before the first
|
|
500
|
+
* message and uses the returned session_uid as `threadId`.
|
|
501
|
+
*
|
|
502
|
+
* @example
|
|
503
|
+
* ```tsx
|
|
504
|
+
* yourgptConfig={{
|
|
505
|
+
* apiKey: process.env.YOURGPT_API_KEY,
|
|
506
|
+
* widgetUid: widgetUid,
|
|
507
|
+
* }}
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
yourgptConfig?: YourGPTConfig;
|
|
465
511
|
/** Enable debug logging */
|
|
466
512
|
debug?: boolean;
|
|
467
513
|
/** Available tools (passed to LLM) */
|
|
@@ -500,6 +546,17 @@ interface ChatCallbacks<T extends UIMessage = UIMessage> {
|
|
|
500
546
|
onFinish?: (messages: T[]) => void;
|
|
501
547
|
/** Called when prompt context usage changes */
|
|
502
548
|
onContextUsageChange?: (usage: ContextUsage) => void;
|
|
549
|
+
/**
|
|
550
|
+
* Called once when a new session/thread ID is assigned (null → sessionId transition).
|
|
551
|
+
* Use this to persist the session ID in your storage layer.
|
|
552
|
+
* The returned ID is the same as the threadId that will be used for all subsequent requests.
|
|
553
|
+
*/
|
|
554
|
+
onThreadChange?: (id: string) => void;
|
|
555
|
+
/**
|
|
556
|
+
* Called when the session creation status changes.
|
|
557
|
+
* Use this to show/hide a spinner while the session is being created.
|
|
558
|
+
*/
|
|
559
|
+
onSessionStatusChange?: (status: "idle" | "creating" | "ready" | "error") => void;
|
|
503
560
|
/** Called when a server-side tool starts executing (action:start event) */
|
|
504
561
|
onServerToolStart?: (info: ServerToolInfo) => void;
|
|
505
562
|
/** Called when a server-side tool receives args (action:args event) */
|
|
@@ -731,6 +788,9 @@ declare class AbstractChat<T extends UIMessage = UIMessage> {
|
|
|
731
788
|
protected callbacks: ChatCallbacks<T>;
|
|
732
789
|
protected optimizer: ChatContextOptimizer;
|
|
733
790
|
protected lastContextUsage: ContextUsage | null;
|
|
791
|
+
private onCreateSession?;
|
|
792
|
+
private sessionInitPromise;
|
|
793
|
+
private sessionStatus;
|
|
734
794
|
private eventHandlers;
|
|
735
795
|
private streamState;
|
|
736
796
|
constructor(init: ChatInit<T>);
|
|
@@ -880,6 +940,27 @@ declare class AbstractChat<T extends UIMessage = UIMessage> {
|
|
|
880
940
|
* Set dynamic context (appended to system prompt)
|
|
881
941
|
*/
|
|
882
942
|
setContext(context: string): void;
|
|
943
|
+
/**
|
|
944
|
+
* Switch to a different thread (or start a new one).
|
|
945
|
+
*
|
|
946
|
+
* - Pass the session/thread ID from persistence → used as-is, no session creation call.
|
|
947
|
+
* - Pass null → threadId cleared, new session created on first sendMessage.
|
|
948
|
+
*
|
|
949
|
+
* The session ID IS the thread ID: whatever is stored in persistence is passed here directly.
|
|
950
|
+
*/
|
|
951
|
+
setActiveThread(id: string | null): void;
|
|
952
|
+
/**
|
|
953
|
+
* Force a new session to be created on the next sendMessage.
|
|
954
|
+
* Call this when the current session has expired or credits are exhausted.
|
|
955
|
+
* After calling this, the next sendMessage will invoke onCreateSession/yourgptConfig
|
|
956
|
+
* again and onThreadChange will fire with the new session ID.
|
|
957
|
+
*/
|
|
958
|
+
renewSession(): void;
|
|
959
|
+
private setSessionStatus;
|
|
960
|
+
/**
|
|
961
|
+
* Get the current session creation status.
|
|
962
|
+
*/
|
|
963
|
+
getSessionStatus(): "idle" | "creating" | "ready" | "error";
|
|
883
964
|
/**
|
|
884
965
|
* Set system prompt dynamically
|
|
885
966
|
* This allows updating the system prompt after initialization
|
|
@@ -900,9 +981,17 @@ declare class AbstractChat<T extends UIMessage = UIMessage> {
|
|
|
900
981
|
* Additional properties merged into every request body
|
|
901
982
|
*/
|
|
902
983
|
setBody(body: ChatConfig["body"]): void;
|
|
984
|
+
/**
|
|
985
|
+
* Default session creation via yourgptConfig.
|
|
986
|
+
* Only called when yourgptConfig is set and no onCreateSession is provided.
|
|
987
|
+
* The returned session_uid IS the thread ID going forward.
|
|
988
|
+
*/
|
|
989
|
+
private _defaultCreateSession;
|
|
903
990
|
/**
|
|
904
991
|
* Build the request payload
|
|
905
992
|
*/
|
|
993
|
+
/** Inline text-file attachments into message content for the LLM */
|
|
994
|
+
private inlineTextAttachments;
|
|
906
995
|
protected buildRequest(): {
|
|
907
996
|
messages: {
|
|
908
997
|
role: string;
|
|
@@ -1337,8 +1426,39 @@ interface CopilotProviderProps {
|
|
|
1337
1426
|
tools?: ToolsConfig;
|
|
1338
1427
|
/** Thread ID for conversation persistence */
|
|
1339
1428
|
threadId?: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* Called once before the first message on a new thread to create a session.
|
|
1431
|
+
* The returned value IS the thread ID — session and thread are the same identity.
|
|
1432
|
+
* Only called when `threadId` is not set. If `threadId` is provided, this is skipped.
|
|
1433
|
+
* Takes priority over `yourgptConfig`.
|
|
1434
|
+
*
|
|
1435
|
+
* @example
|
|
1436
|
+
* ```tsx
|
|
1437
|
+
* onCreateSession={async () => {
|
|
1438
|
+
* const res = await fetch('/api/sessions', { method: 'POST', headers })
|
|
1439
|
+
* return (await res.json()).id
|
|
1440
|
+
* }}
|
|
1441
|
+
* ```
|
|
1442
|
+
*/
|
|
1443
|
+
onCreateSession?: () => string | Promise<string>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Called when a new session/thread ID is assigned (new thread created).
|
|
1446
|
+
* Use this to persist the session ID in your storage layer.
|
|
1447
|
+
*/
|
|
1448
|
+
onThreadChange?: (id: string) => void;
|
|
1449
|
+
/**
|
|
1450
|
+
* YourGPT config — enables automatic session creation with zero boilerplate.
|
|
1451
|
+
* The SDK calls YourGPT's createSession API before the first message and
|
|
1452
|
+
* uses the returned session_uid as `threadId`.
|
|
1453
|
+
*
|
|
1454
|
+
* @example
|
|
1455
|
+
* ```tsx
|
|
1456
|
+
* yourgptConfig={{ apiKey: "your-api-key", widgetUid: widgetUid }}
|
|
1457
|
+
* ```
|
|
1458
|
+
*/
|
|
1459
|
+
yourgptConfig?: YourGPTConfig;
|
|
1340
1460
|
/** Initial messages to populate the chat */
|
|
1341
|
-
initialMessages?:
|
|
1461
|
+
initialMessages?: UIMessage[];
|
|
1342
1462
|
/** Callback when messages change */
|
|
1343
1463
|
onMessagesChange?: (messages: Message[]) => void;
|
|
1344
1464
|
/** Callback when an error occurs */
|
|
@@ -1443,6 +1563,19 @@ interface CopilotContextValue {
|
|
|
1443
1563
|
}>) => void;
|
|
1444
1564
|
agentIteration: number;
|
|
1445
1565
|
threadId?: string;
|
|
1566
|
+
/**
|
|
1567
|
+
* Switch to a different thread (or start a new one).
|
|
1568
|
+
* Pass the session/thread ID from persistence to reuse it (no new session call),
|
|
1569
|
+
* or null to start a fresh thread (new session created on first sendMessage).
|
|
1570
|
+
*/
|
|
1571
|
+
setActiveThread: (id: string | null) => void;
|
|
1572
|
+
/**
|
|
1573
|
+
* Force a new session to be created on the next sendMessage.
|
|
1574
|
+
* Call when the current session has expired or credits are exhausted.
|
|
1575
|
+
*/
|
|
1576
|
+
renewSession: () => void;
|
|
1577
|
+
/** Current session creation status */
|
|
1578
|
+
sessionStatus: "idle" | "creating" | "ready" | "error";
|
|
1446
1579
|
/**
|
|
1447
1580
|
* Runtime URL configuration.
|
|
1448
1581
|
* Can be a static string or getter function (matches what was passed to provider).
|
|
@@ -1469,7 +1602,7 @@ interface CopilotContextValue {
|
|
|
1469
1602
|
messageMeta: MessageMetaStore;
|
|
1470
1603
|
}
|
|
1471
1604
|
declare function useCopilot(): CopilotContextValue;
|
|
1472
|
-
declare function CopilotProvider(
|
|
1605
|
+
declare function CopilotProvider(props: CopilotProviderProps): react_jsx_runtime.JSX.Element;
|
|
1473
1606
|
|
|
1474
1607
|
/**
|
|
1475
1608
|
* Chat UI state interface (UI-only state, not message data)
|
|
@@ -2722,6 +2855,71 @@ interface UseThreadManagerReturn {
|
|
|
2722
2855
|
*/
|
|
2723
2856
|
declare function useThreadManager(config?: UseThreadManagerConfig): UseThreadManagerReturn;
|
|
2724
2857
|
|
|
2858
|
+
/**
|
|
2859
|
+
* useThread — Session/thread management hook
|
|
2860
|
+
*
|
|
2861
|
+
* Provides clean semantics for managing the active session/thread.
|
|
2862
|
+
* When yourgptConfig or onCreateSession is configured, the session ID
|
|
2863
|
+
* IS the thread ID — they are the same identity.
|
|
2864
|
+
*
|
|
2865
|
+
* Use this hook instead of calling setActiveThread/renewSession directly.
|
|
2866
|
+
*/
|
|
2867
|
+
interface UseThreadReturn {
|
|
2868
|
+
/**
|
|
2869
|
+
* Current session/thread ID.
|
|
2870
|
+
* undefined until the first session is created (new thread not yet sent).
|
|
2871
|
+
*/
|
|
2872
|
+
threadId: string | undefined;
|
|
2873
|
+
/**
|
|
2874
|
+
* Current session creation status.
|
|
2875
|
+
* - "idle" — no session config, or threadId already set
|
|
2876
|
+
* - "creating" — session creation request in flight
|
|
2877
|
+
* - "ready" — threadId is set and usable
|
|
2878
|
+
* - "error" — session creation failed
|
|
2879
|
+
*/
|
|
2880
|
+
sessionStatus: "idle" | "creating" | "ready" | "error";
|
|
2881
|
+
/**
|
|
2882
|
+
* Switch to an existing thread/session.
|
|
2883
|
+
* Pass the session ID from your persistence layer — it is used as-is,
|
|
2884
|
+
* no new session creation call is made.
|
|
2885
|
+
*/
|
|
2886
|
+
switchThread: (sessionId: string) => void;
|
|
2887
|
+
/**
|
|
2888
|
+
* Start a fresh thread.
|
|
2889
|
+
* Clears the current session; a new session is created on the next sendMessage.
|
|
2890
|
+
* onThreadChange fires with the new session ID once it is assigned.
|
|
2891
|
+
*/
|
|
2892
|
+
newThread: () => void;
|
|
2893
|
+
/**
|
|
2894
|
+
* Force a new session to be created on the next sendMessage.
|
|
2895
|
+
* Call this when the current session has expired or credits are exhausted.
|
|
2896
|
+
* onThreadChange fires with the new session ID once it is assigned.
|
|
2897
|
+
*/
|
|
2898
|
+
renewSession: () => void;
|
|
2899
|
+
}
|
|
2900
|
+
/**
|
|
2901
|
+
* useThread — Clean hook for session/thread management
|
|
2902
|
+
*
|
|
2903
|
+
* @example
|
|
2904
|
+
* ```tsx
|
|
2905
|
+
* function ChatHeader() {
|
|
2906
|
+
* const { threadId, sessionStatus, newThread, switchThread, renewSession } = useThread();
|
|
2907
|
+
*
|
|
2908
|
+
* const loadThread = (stored: { sessionId: string }) => {
|
|
2909
|
+
* switchThread(stored.sessionId); // session ID IS the thread ID
|
|
2910
|
+
* };
|
|
2911
|
+
*
|
|
2912
|
+
* return (
|
|
2913
|
+
* <>
|
|
2914
|
+
* {sessionStatus === "creating" && <Spinner />}
|
|
2915
|
+
* <button onClick={newThread}>New Chat</button>
|
|
2916
|
+
* </>
|
|
2917
|
+
* );
|
|
2918
|
+
* }
|
|
2919
|
+
* ```
|
|
2920
|
+
*/
|
|
2921
|
+
declare function useThread(): UseThreadReturn;
|
|
2922
|
+
|
|
2725
2923
|
/**
|
|
2726
2924
|
* React hook for managing an MCP client connection
|
|
2727
2925
|
*
|
|
@@ -3159,6 +3357,10 @@ interface ReactChatConfig {
|
|
|
3159
3357
|
llm?: ChatConfig["llm"];
|
|
3160
3358
|
/** Thread ID */
|
|
3161
3359
|
threadId?: string;
|
|
3360
|
+
/** Called once before first message to obtain a session/thread ID */
|
|
3361
|
+
onCreateSession?: () => string | Promise<string>;
|
|
3362
|
+
/** YourGPT config — enables automatic session creation */
|
|
3363
|
+
yourgptConfig?: YourGPTConfig;
|
|
3162
3364
|
/** Enable streaming (default: true) */
|
|
3163
3365
|
streaming?: boolean;
|
|
3164
3366
|
/** Request headers */
|
|
@@ -3472,4 +3674,4 @@ interface UseMessageMetaReturn<T extends Record<string, unknown>> {
|
|
|
3472
3674
|
*/
|
|
3473
3675
|
declare function useMessageMeta<T extends Record<string, unknown> = Record<string, unknown>>(messageId: string | undefined): UseMessageMetaReturn<T>;
|
|
3474
3676
|
|
|
3475
|
-
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, BranchInfo, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CompactedToolResult, type CompactionEvent, type CompactionMarker, type CompactionStrategy, type ContextStats, ContextUsage, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, type DisplayMessage, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, type LLMMessage, Message, type MessageCheckpoint, type MessageHistoryConfig, MessageHistoryContext, type MessageHistoryContextValue, MessageMetaStore, type MessageTokenUsage, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, ResolvedSkill, type ServerAdapterConfig, type SessionCompactionState, SkillDefinition, SkillProvider, type SkillProviderProps, Source, type StreamChunkWithMessageId, type StreamEventHandler, type Suggestion, Thread, ThreadData, type TokenUsage, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolSet, ToolType, type ToolsActions, ToolsConfig, type ToolsState, UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseMessageCheckpointsReturn, type UseMessageHistoryOptions, type UseMessageHistoryReturn, type UseMessageMetaReturn, type UseSkillStatusReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, createToolIntentHandler, defaultMessageHistoryConfig, defineSkill, formatKnowledgeResultsForAI, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, searchKnowledgeBase, toDisplayMessage, toLLMMessage, toLLMMessages, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useContextStats, useCopilot, useCopilotEvent, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useMessageCheckpoints, useMessageHistory, useMessageHistoryContext, useMessageMeta, useSkill, useSkillStatus, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
|
3677
|
+
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, BranchInfo, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CompactedToolResult, type CompactionEvent, type CompactionMarker, type CompactionStrategy, type ContextStats, ContextUsage, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, type DisplayMessage, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, type LLMMessage, Message, type MessageCheckpoint, type MessageHistoryConfig, MessageHistoryContext, type MessageHistoryContextValue, MessageMetaStore, type MessageTokenUsage, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, ResolvedSkill, type ServerAdapterConfig, type SessionCompactionState, SkillDefinition, SkillProvider, type SkillProviderProps, Source, type StreamChunkWithMessageId, type StreamEventHandler, type Suggestion, Thread, ThreadData, type TokenUsage, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolSet, ToolType, type ToolsActions, ToolsConfig, type ToolsState, UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseMessageCheckpointsReturn, type UseMessageHistoryOptions, type UseMessageHistoryReturn, type UseMessageMetaReturn, type UseSkillStatusReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseThreadReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, createToolIntentHandler, defaultMessageHistoryConfig, defineSkill, formatKnowledgeResultsForAI, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, searchKnowledgeBase, toDisplayMessage, toLLMMessage, toLLMMessages, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useContextStats, useCopilot, useCopilotEvent, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useMessageCheckpoints, useMessageHistory, useMessageHistoryContext, useMessageMeta, useSkill, useSkillStatus, useSuggestions, useSupportedMediaTypes, useThread, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ReactChat, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, defineSkill, formatKnowledgeResultsForAI, searchKnowledgeBase, useAIAction, useAIActions, useAITools, useAgent, useCapabilities, useChat, useContextStats, useCopilotEvent, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPUIIntents, useMessageCheckpoints, useMessageMeta, useSkill, useSkillStatus, useSuggestions, useSupportedMediaTypes, useThreadManager, useToolExecutor, useToolWithSchema, useToolsWithSchema } from '../chunk-
|
|
2
|
-
export { AbstractAgentLoop, AbstractChat, CopilotProvider, MessageHistoryContext, MessageTree, ReactChatState, SkillProvider, createReactChatState, defaultMessageHistoryConfig, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, toDisplayMessage, toLLMMessage, toLLMMessages, useAIContext, useAIContexts, useCopilot, useMCPClient, useMCPTools, useMessageHistory, useMessageHistoryContext, useTool, useTools } from '../chunk-
|
|
3
|
-
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-
|
|
1
|
+
export { ReactChat, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, defineSkill, formatKnowledgeResultsForAI, searchKnowledgeBase, useAIAction, useAIActions, useAITools, useAgent, useCapabilities, useChat, useContextStats, useCopilotEvent, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPUIIntents, useMessageCheckpoints, useMessageMeta, useSkill, useSkillStatus, useSuggestions, useSupportedMediaTypes, useThread, useThreadManager, useToolExecutor, useToolWithSchema, useToolsWithSchema } from '../chunk-YHW6JZEF.js';
|
|
2
|
+
export { AbstractAgentLoop, AbstractChat, CopilotProvider, MessageHistoryContext, MessageTree, ReactChatState, SkillProvider, createReactChatState, defaultMessageHistoryConfig, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, toDisplayMessage, toLLMMessage, toLLMMessages, useAIContext, useAIContexts, useCopilot, useMCPClient, useMCPTools, useMessageHistory, useMessageHistoryContext, useTool, useTools } from '../chunk-UZHGMDOK.js';
|
|
3
|
+
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-J5D3AZF6.js';
|
|
4
4
|
import '../chunk-EWVQWTNV.js';
|
|
5
5
|
import '../chunk-VNLLW3ZI.js';
|
|
6
6
|
import '../chunk-533K2Z7C.js';
|