@yourgpt/copilot-sdk 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-33JSFVGH.cjs → chunk-7MZLBGFQ.cjs} +23 -23
- package/dist/{chunk-33JSFVGH.cjs.map → chunk-7MZLBGFQ.cjs.map} +1 -1
- package/dist/{chunk-BRUDSHCV.js → chunk-BMYNG3WM.js} +2 -2
- package/dist/{chunk-BRUDSHCV.js.map → chunk-BMYNG3WM.js.map} +1 -1
- package/dist/{chunk-MUZ2RYS2.cjs → chunk-BNBEKK3U.cjs} +226 -33
- package/dist/chunk-BNBEKK3U.cjs.map +1 -0
- package/dist/{chunk-HNRFRNMY.cjs → chunk-CSEZZ5DX.cjs} +2 -2
- package/dist/{chunk-HNRFRNMY.cjs.map → chunk-CSEZZ5DX.cjs.map} +1 -1
- package/dist/{chunk-O33I4HBL.cjs → chunk-GSTTJ46F.cjs} +5 -5
- package/dist/{chunk-O33I4HBL.cjs.map → chunk-GSTTJ46F.cjs.map} +1 -1
- package/dist/{chunk-7YZVSG62.js → chunk-VUHP6TAN.js} +3 -3
- package/dist/{chunk-7YZVSG62.js.map → chunk-VUHP6TAN.js.map} +1 -1
- package/dist/{chunk-3SP6V22Y.js → chunk-VXT2O6R6.js} +202 -9
- package/dist/chunk-VXT2O6R6.js.map +1 -0
- package/dist/{chunk-7PJ4GAJR.js → chunk-XAC7NTIO.js} +4 -4
- package/dist/{chunk-7PJ4GAJR.js.map → chunk-XAC7NTIO.js.map} +1 -1
- package/dist/core/index.cjs +80 -80
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +3 -3
- package/dist/{index-25qIYJ21.d.ts → index-Du3Akr_E.d.ts} +1 -1
- package/dist/{index-C261xY-B.d.cts → index-jwRcC2QD.d.cts} +1 -1
- package/dist/mcp/index.d.cts +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/react/index.cjs +49 -49
- package/dist/react/index.d.cts +130 -15
- package/dist/react/index.d.ts +130 -15
- package/dist/react/index.js +4 -4
- package/dist/tools/anthropic/index.d.cts +1 -1
- package/dist/tools/anthropic/index.d.ts +1 -1
- package/dist/tools/brave/index.cjs +2 -2
- package/dist/tools/brave/index.d.cts +1 -1
- package/dist/tools/brave/index.d.ts +1 -1
- package/dist/tools/brave/index.js +1 -1
- package/dist/tools/exa/index.cjs +2 -2
- package/dist/tools/exa/index.d.cts +1 -1
- package/dist/tools/exa/index.d.ts +1 -1
- package/dist/tools/exa/index.js +1 -1
- package/dist/tools/google/index.cjs +2 -2
- package/dist/tools/google/index.d.cts +1 -1
- package/dist/tools/google/index.d.ts +1 -1
- package/dist/tools/google/index.js +1 -1
- package/dist/tools/openai/index.cjs +2 -2
- package/dist/tools/openai/index.d.cts +1 -1
- package/dist/tools/openai/index.d.ts +1 -1
- package/dist/tools/openai/index.js +1 -1
- package/dist/tools/searxng/index.cjs +2 -2
- package/dist/tools/searxng/index.d.cts +1 -1
- package/dist/tools/searxng/index.d.ts +1 -1
- package/dist/tools/searxng/index.js +1 -1
- package/dist/tools/serper/index.cjs +2 -2
- package/dist/tools/serper/index.d.cts +1 -1
- package/dist/tools/serper/index.d.ts +1 -1
- package/dist/tools/serper/index.js +1 -1
- package/dist/tools/tavily/index.cjs +2 -2
- package/dist/tools/tavily/index.d.cts +1 -1
- package/dist/tools/tavily/index.d.ts +1 -1
- package/dist/tools/tavily/index.js +1 -1
- package/dist/tools/web-search/index.cjs +3 -3
- package/dist/tools/web-search/index.d.cts +2 -2
- package/dist/tools/web-search/index.d.ts +2 -2
- package/dist/tools/web-search/index.js +2 -2
- package/dist/{tools-Clyufshc.d.cts → tools-BHQRB_YT.d.cts} +5 -0
- package/dist/{tools-Clyufshc.d.ts → tools-BHQRB_YT.d.ts} +5 -0
- package/dist/{types-DM6M_pv_.d.cts → types-8_Hp2rmm.d.cts} +1 -1
- package/dist/{types-wudOhedT.d.ts → types-OYi-iUVY.d.ts} +1 -1
- package/dist/ui/index.cjs +39 -18
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +6 -1
- package/dist/ui/index.d.ts +6 -1
- package/dist/ui/index.js +35 -14
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3SP6V22Y.js.map +0 -1
- package/dist/chunk-MUZ2RYS2.cjs.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -2,14 +2,44 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
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-Dkp_eLty.js';
|
|
4
4
|
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-Dkp_eLty.js';
|
|
5
|
-
import { T as ToolDefinition, f as ToolSource, P as PermissionLevel, c as ToolInputSchema, l as ToolExecution$1, e as ToolContext, b as ToolResponse$1, g as ToolRenderProps, i as ToolSet, U as UnifiedToolCall, r as PermissionStorageConfig, s as PermissionStorageAdapter } from '../tools-
|
|
6
|
-
export { m as AgentLoopConfig, a as ToolExecutionStatus, q as ToolPermission } from '../tools-
|
|
5
|
+
import { T as ToolDefinition, f as ToolSource, P as PermissionLevel, c as ToolInputSchema, l as ToolExecution$1, e as ToolContext, b as ToolResponse$1, g as ToolRenderProps, i as ToolSet, U as UnifiedToolCall, r as PermissionStorageConfig, s as PermissionStorageAdapter } from '../tools-BHQRB_YT.js';
|
|
6
|
+
export { m as AgentLoopConfig, a as ToolExecutionStatus, q as ToolPermission } from '../tools-BHQRB_YT.js';
|
|
7
7
|
import { A as AsyncThreadStorageAdapter, c as MessageAttachment, f as ToolCall, S as Source, M as Message, T as Thread, a as ThreadData, b as ThreadStorageAdapter } from '../types-DG2ya08y.js';
|
|
8
8
|
export { P as PersistenceConfig, h as ThreadStorageAdapter } from '../types-DG2ya08y.js';
|
|
9
|
-
import { G as MCPServerConfig, U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-
|
|
10
|
-
export { b as MCPClientState } from '../types-
|
|
9
|
+
import { G as MCPServerConfig, U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-OYi-iUVY.js';
|
|
10
|
+
export { b as MCPClientState } from '../types-OYi-iUVY.js';
|
|
11
11
|
import { U as UseMCPUIIntentsConfig, m as UseMCPUIIntentsReturn } from '../types-B20VCJXL.js';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Resolvable - Type utility for values that can be static or dynamic
|
|
15
|
+
*
|
|
16
|
+
* This pattern allows SDK consumers to pass either:
|
|
17
|
+
* - Static value: `headers: { "x-api-key": "abc123" }`
|
|
18
|
+
* - Getter function: `headers: () => ({ "x-api-key": getToken() })`
|
|
19
|
+
*
|
|
20
|
+
* Values are resolved at request time, ensuring fresh data on every API call.
|
|
21
|
+
* This is the modern pattern used by tanstack-query, tRPC, and axios interceptors.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Static (for values that never change)
|
|
26
|
+
* <CopilotProvider headers={{ "x-api-key": "static-key" }} />
|
|
27
|
+
*
|
|
28
|
+
* // Dynamic (for values that change at runtime)
|
|
29
|
+
* <CopilotProvider
|
|
30
|
+
* headers={() => ({
|
|
31
|
+
* Authorization: `Bearer ${getToken()}`,
|
|
32
|
+
* ...getCustomHeaders(),
|
|
33
|
+
* })}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* A value that can be either static or a getter function
|
|
39
|
+
* Getter can be sync or async for flexibility
|
|
40
|
+
*/
|
|
41
|
+
type Resolvable<T> = T | (() => T) | (() => Promise<T>);
|
|
42
|
+
|
|
13
43
|
/**
|
|
14
44
|
* Server Thread Storage Adapter
|
|
15
45
|
*
|
|
@@ -59,6 +89,7 @@ declare function createServerAdapter(config: ServerAdapterConfig): AsyncThreadSt
|
|
|
59
89
|
* Contract for different transport implementations.
|
|
60
90
|
* HTTP, WebSocket, or mock for testing.
|
|
61
91
|
*/
|
|
92
|
+
|
|
62
93
|
/**
|
|
63
94
|
* Chat request to send
|
|
64
95
|
*/
|
|
@@ -93,9 +124,18 @@ interface ChatResponse {
|
|
|
93
124
|
role: string;
|
|
94
125
|
content: string | null;
|
|
95
126
|
tool_calls?: unknown[];
|
|
127
|
+
/** Tool call ID for tool result messages */
|
|
128
|
+
tool_call_id?: string;
|
|
96
129
|
}>;
|
|
97
130
|
/** Whether client needs to execute tools */
|
|
98
131
|
requiresAction?: boolean;
|
|
132
|
+
/** Tool calls with metadata (includes hidden flag for server-side tools) */
|
|
133
|
+
toolCalls?: Array<{
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
args: Record<string, unknown>;
|
|
137
|
+
hidden?: boolean;
|
|
138
|
+
}>;
|
|
99
139
|
}
|
|
100
140
|
/**
|
|
101
141
|
* Tool result from server
|
|
@@ -149,12 +189,18 @@ type StreamChunk = {
|
|
|
149
189
|
message: string;
|
|
150
190
|
} | {
|
|
151
191
|
type: "done";
|
|
152
|
-
messages?:
|
|
192
|
+
messages?: Array<{
|
|
193
|
+
role: string;
|
|
194
|
+
content: string | null;
|
|
195
|
+
tool_calls?: unknown[];
|
|
196
|
+
tool_call_id?: string;
|
|
197
|
+
}>;
|
|
153
198
|
requiresAction?: boolean;
|
|
154
199
|
} | {
|
|
155
200
|
type: "action:start";
|
|
156
201
|
id: string;
|
|
157
202
|
name: string;
|
|
203
|
+
hidden?: boolean;
|
|
158
204
|
} | {
|
|
159
205
|
type: "action:args";
|
|
160
206
|
id: string;
|
|
@@ -220,6 +266,21 @@ interface ChatTransport {
|
|
|
220
266
|
* Check if currently streaming
|
|
221
267
|
*/
|
|
222
268
|
isStreaming(): boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Update headers configuration (optional)
|
|
271
|
+
* Can be static headers or a getter function for dynamic resolution
|
|
272
|
+
*/
|
|
273
|
+
setHeaders?(headers: Resolvable<Record<string, string>>): void;
|
|
274
|
+
/**
|
|
275
|
+
* Update URL configuration (optional)
|
|
276
|
+
* Can be static URL or a getter function for dynamic resolution
|
|
277
|
+
*/
|
|
278
|
+
setUrl?(url: Resolvable<string>): void;
|
|
279
|
+
/**
|
|
280
|
+
* Update body configuration (optional)
|
|
281
|
+
* Additional properties merged into every request body
|
|
282
|
+
*/
|
|
283
|
+
setBody?(body: Resolvable<Record<string, unknown>>): void;
|
|
223
284
|
}
|
|
224
285
|
|
|
225
286
|
/**
|
|
@@ -369,18 +430,37 @@ interface ChatState$1<T extends UIMessage = UIMessage> {
|
|
|
369
430
|
type ChatStatus$1 = "ready" | "submitted" | "streaming" | "error";
|
|
370
431
|
/**
|
|
371
432
|
* Chat configuration
|
|
433
|
+
*
|
|
434
|
+
* Supports both static values and getter functions for dynamic configuration.
|
|
435
|
+
* Using getter functions ensures fresh values on every request.
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* ```typescript
|
|
439
|
+
* const config: ChatConfig = {
|
|
440
|
+
* // Static URL
|
|
441
|
+
* runtimeUrl: "/api/chat",
|
|
442
|
+
*
|
|
443
|
+
* // Dynamic headers - resolved fresh on every request
|
|
444
|
+
* headers: () => ({
|
|
445
|
+
* Authorization: `Bearer ${getToken()}`,
|
|
446
|
+
* ...getCustomHeaders(),
|
|
447
|
+
* }),
|
|
448
|
+
* };
|
|
449
|
+
* ```
|
|
372
450
|
*/
|
|
373
451
|
interface ChatConfig {
|
|
374
|
-
/** Runtime API endpoint */
|
|
375
|
-
runtimeUrl: string
|
|
452
|
+
/** Runtime API endpoint - can be static or getter function */
|
|
453
|
+
runtimeUrl: Resolvable<string>;
|
|
376
454
|
/** LLM configuration */
|
|
377
455
|
llm?: Partial<LLMConfig>;
|
|
378
456
|
/** System prompt */
|
|
379
457
|
systemPrompt?: string;
|
|
380
458
|
/** Enable streaming (default: true) */
|
|
381
459
|
streaming?: boolean;
|
|
382
|
-
/** Request headers */
|
|
383
|
-
headers?: Record<string, string
|
|
460
|
+
/** Request headers - can be static or getter function */
|
|
461
|
+
headers?: Resolvable<Record<string, string>>;
|
|
462
|
+
/** Additional body properties - can be static or getter function */
|
|
463
|
+
body?: Resolvable<Record<string, unknown>>;
|
|
384
464
|
/** Thread ID for conversation persistence */
|
|
385
465
|
threadId?: string;
|
|
386
466
|
/** Debug mode */
|
|
@@ -460,6 +540,11 @@ interface ToolExecution {
|
|
|
460
540
|
approvalMessage?: string;
|
|
461
541
|
/** Data passed from user's approval action (e.g., selected supervisor) */
|
|
462
542
|
approvalData?: Record<string, unknown>;
|
|
543
|
+
/**
|
|
544
|
+
* Whether this tool execution should be hidden from the UI.
|
|
545
|
+
* When true, the tool won't appear in the chat, but still executes normally.
|
|
546
|
+
*/
|
|
547
|
+
hidden?: boolean;
|
|
463
548
|
}
|
|
464
549
|
/**
|
|
465
550
|
* Tool response
|
|
@@ -659,6 +744,21 @@ declare class AbstractChat<T extends UIMessage = UIMessage> {
|
|
|
659
744
|
* This allows updating the system prompt after initialization
|
|
660
745
|
*/
|
|
661
746
|
setSystemPrompt(prompt: string): void;
|
|
747
|
+
/**
|
|
748
|
+
* Set headers configuration
|
|
749
|
+
* Can be static headers or a getter function for dynamic resolution
|
|
750
|
+
*/
|
|
751
|
+
setHeaders(headers: ChatConfig["headers"]): void;
|
|
752
|
+
/**
|
|
753
|
+
* Set URL configuration
|
|
754
|
+
* Can be static URL or a getter function for dynamic resolution
|
|
755
|
+
*/
|
|
756
|
+
setUrl(url: ChatConfig["runtimeUrl"]): void;
|
|
757
|
+
/**
|
|
758
|
+
* Set body configuration
|
|
759
|
+
* Additional properties merged into every request body
|
|
760
|
+
*/
|
|
761
|
+
setBody(body: ChatConfig["body"]): void;
|
|
662
762
|
/**
|
|
663
763
|
* Build the request payload
|
|
664
764
|
*/
|
|
@@ -870,8 +970,11 @@ declare class AbstractAgentLoop implements AgentLoopActions {
|
|
|
870
970
|
|
|
871
971
|
interface CopilotProviderProps {
|
|
872
972
|
children: React__default.ReactNode;
|
|
873
|
-
/**
|
|
874
|
-
|
|
973
|
+
/**
|
|
974
|
+
* Runtime API endpoint URL
|
|
975
|
+
* Can be static string or getter function for dynamic resolution.
|
|
976
|
+
*/
|
|
977
|
+
runtimeUrl: Resolvable<string>;
|
|
875
978
|
/** System prompt sent with each request */
|
|
876
979
|
systemPrompt?: string;
|
|
877
980
|
/** @deprecated Use useTools() hook instead */
|
|
@@ -886,8 +989,16 @@ interface CopilotProviderProps {
|
|
|
886
989
|
onError?: (error: Error) => void;
|
|
887
990
|
/** Enable/disable streaming (default: true) */
|
|
888
991
|
streaming?: boolean;
|
|
889
|
-
/**
|
|
890
|
-
|
|
992
|
+
/**
|
|
993
|
+
* Custom headers to send with each request
|
|
994
|
+
* Can be static object or getter function for dynamic resolution.
|
|
995
|
+
*/
|
|
996
|
+
headers?: Resolvable<Record<string, string>>;
|
|
997
|
+
/**
|
|
998
|
+
* Additional body properties to include in each request
|
|
999
|
+
* Can be static object or getter function for dynamic resolution.
|
|
1000
|
+
*/
|
|
1001
|
+
body?: Resolvable<Record<string, unknown>>;
|
|
891
1002
|
/** Enable debug logging */
|
|
892
1003
|
debug?: boolean;
|
|
893
1004
|
/** Max tool execution iterations (default: 20) */
|
|
@@ -921,11 +1032,15 @@ interface CopilotContextValue {
|
|
|
921
1032
|
removeContext: (id: string) => void;
|
|
922
1033
|
setSystemPrompt: (prompt: string) => void;
|
|
923
1034
|
threadId?: string;
|
|
924
|
-
|
|
1035
|
+
/**
|
|
1036
|
+
* Runtime URL configuration.
|
|
1037
|
+
* Can be a static string or getter function (matches what was passed to provider).
|
|
1038
|
+
*/
|
|
1039
|
+
runtimeUrl: Resolvable<string>;
|
|
925
1040
|
toolsConfig?: ToolsConfig;
|
|
926
1041
|
}
|
|
927
1042
|
declare function useCopilot(): CopilotContextValue;
|
|
928
|
-
declare function CopilotProvider({ children, runtimeUrl, systemPrompt, tools: toolsConfig, threadId, initialMessages, onMessagesChange, onError, streaming, headers, debug, maxIterations, maxIterationsMessage, mcpServers, }: CopilotProviderProps): react_jsx_runtime.JSX.Element;
|
|
1043
|
+
declare function CopilotProvider({ children, runtimeUrl, systemPrompt, tools: toolsConfig, threadId, initialMessages, onMessagesChange, onError, streaming, headers, body, debug, maxIterations, maxIterationsMessage, mcpServers, }: CopilotProviderProps): react_jsx_runtime.JSX.Element;
|
|
929
1044
|
|
|
930
1045
|
/**
|
|
931
1046
|
* Chat UI state interface (UI-only state, not message data)
|
package/dist/react/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AbstractAgentLoop, AbstractChat, CopilotProvider, ReactChat, ReactChatState, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema } from '../chunk-
|
|
2
|
-
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-
|
|
1
|
+
export { AbstractAgentLoop, AbstractChat, CopilotProvider, ReactChat, ReactChatState, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema } from '../chunk-VXT2O6R6.js';
|
|
2
|
+
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-XAC7NTIO.js';
|
|
3
3
|
import '../chunk-EWVQWTNV.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-VUHP6TAN.js';
|
|
5
|
+
import '../chunk-BMYNG3WM.js';
|
|
6
6
|
import '../chunk-XGITAEXU.js';
|
|
7
7
|
import '../chunk-7W7QLZNC.js';
|
|
8
8
|
import '../chunk-CEOMTQTP.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -70,7 +70,7 @@ function braveSearch(config) {
|
|
|
70
70
|
};
|
|
71
71
|
} catch (error) {
|
|
72
72
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
73
|
-
return
|
|
73
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|
package/dist/tools/exa/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -75,7 +75,7 @@ function exaSearch(config) {
|
|
|
75
75
|
};
|
|
76
76
|
} catch (error) {
|
|
77
77
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
78
|
-
return
|
|
78
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
package/dist/tools/exa/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -66,7 +66,7 @@ function googleSearch(config) {
|
|
|
66
66
|
};
|
|
67
67
|
} catch (error) {
|
|
68
68
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
69
|
-
return
|
|
69
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -68,7 +68,7 @@ function openaiSearch(config) {
|
|
|
68
68
|
} catch (error) {
|
|
69
69
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
70
70
|
console.error("[OpenAI Search] Error:", errorMessage);
|
|
71
|
-
return
|
|
71
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -70,7 +70,7 @@ function searxngSearch(config) {
|
|
|
70
70
|
};
|
|
71
71
|
} catch (error) {
|
|
72
72
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
73
|
-
return
|
|
73
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
var chunkMEBXW75C_cjs = require('../../chunk-MEBXW75C.cjs');
|
|
@@ -70,7 +70,7 @@ function serperSearch(config) {
|
|
|
70
70
|
};
|
|
71
71
|
} catch (error) {
|
|
72
72
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
73
|
-
return
|
|
73
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { failure } from '../../chunk-
|
|
1
|
+
import { failure } from '../../chunk-BMYNG3WM.js';
|
|
2
2
|
import { formatSearchResultsForAI, summarizeSearchResults } from '../../chunk-XGITAEXU.js';
|
|
3
3
|
import '../../chunk-7W7QLZNC.js';
|
|
4
4
|
import { searchSerper } from '../../chunk-CEOMTQTP.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCSEZZ5DX_cjs = require('../../chunk-CSEZZ5DX.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
var chunkCBAHCI4R_cjs = require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -76,7 +76,7 @@ function tavilySearch(config) {
|
|
|
76
76
|
};
|
|
77
77
|
} catch (error) {
|
|
78
78
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
79
|
-
return
|
|
79
|
+
return chunkCSEZZ5DX_cjs.failure(errorMessage);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { failure } from '../../chunk-
|
|
1
|
+
import { failure } from '../../chunk-BMYNG3WM.js';
|
|
2
2
|
import { formatSearchResultsForAI, summarizeSearchResults } from '../../chunk-XGITAEXU.js';
|
|
3
3
|
import { searchTavily } from '../../chunk-7W7QLZNC.js';
|
|
4
4
|
export { tavilyProvider } from '../../chunk-7W7QLZNC.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkGSTTJ46F_cjs = require('../../chunk-GSTTJ46F.cjs');
|
|
4
|
+
require('../../chunk-CSEZZ5DX.cjs');
|
|
5
5
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
6
6
|
require('../../chunk-CBAHCI4R.cjs');
|
|
7
7
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -17,7 +17,7 @@ require('../../chunk-JEQ2X3Z6.cjs');
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "webSearchTool", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkGSTTJ46F_cjs.webSearchTool; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "formatSearchResultsForAI", {
|
|
23
23
|
enumerable: true,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { b as WebSearchConfig, e as WebSearchImage, c as WebSearchParams, a as WebSearchProvider, W as WebSearchProviderInterface, f as WebSearchResponse, d as WebSearchResult } from '../../types-ZguuKEs_.cjs';
|
|
2
|
-
export { f as formatSearchResultsForAI, s as summarizeSearchResults, w as webSearchTool } from '../../index-
|
|
3
|
-
import '../../tools-
|
|
2
|
+
export { f as formatSearchResultsForAI, s as summarizeSearchResults, w as webSearchTool } from '../../index-jwRcC2QD.cjs';
|
|
3
|
+
import '../../tools-BHQRB_YT.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { b as WebSearchConfig, e as WebSearchImage, c as WebSearchParams, a as WebSearchProvider, W as WebSearchProviderInterface, f as WebSearchResponse, d as WebSearchResult } from '../../types-ZguuKEs_.js';
|
|
2
|
-
export { f as formatSearchResultsForAI, s as summarizeSearchResults, w as webSearchTool } from '../../index-
|
|
3
|
-
import '../../tools-
|
|
2
|
+
export { f as formatSearchResultsForAI, s as summarizeSearchResults, w as webSearchTool } from '../../index-Du3Akr_E.js';
|
|
3
|
+
import '../../tools-BHQRB_YT.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { webSearchTool } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { webSearchTool } from '../../chunk-VUHP6TAN.js';
|
|
2
|
+
import '../../chunk-BMYNG3WM.js';
|
|
3
3
|
export { formatSearchResultsForAI, summarizeSearchResults } from '../../chunk-XGITAEXU.js';
|
|
4
4
|
import '../../chunk-7W7QLZNC.js';
|
|
5
5
|
import '../../chunk-CEOMTQTP.js';
|
|
@@ -532,6 +532,11 @@ interface ToolExecution {
|
|
|
532
532
|
approvalMessage?: string;
|
|
533
533
|
/** Timestamp when user responded to approval request */
|
|
534
534
|
approvalTimestamp?: number;
|
|
535
|
+
/**
|
|
536
|
+
* Whether this tool execution should be hidden from the UI.
|
|
537
|
+
* Server-side tools can set this to hide internal operations from users.
|
|
538
|
+
*/
|
|
539
|
+
hidden?: boolean;
|
|
535
540
|
}
|
|
536
541
|
/**
|
|
537
542
|
* Agentic loop configuration
|
|
@@ -532,6 +532,11 @@ interface ToolExecution {
|
|
|
532
532
|
approvalMessage?: string;
|
|
533
533
|
/** Timestamp when user responded to approval request */
|
|
534
534
|
approvalTimestamp?: number;
|
|
535
|
+
/**
|
|
536
|
+
* Whether this tool execution should be hidden from the UI.
|
|
537
|
+
* Server-side tools can set this to hide internal operations from users.
|
|
538
|
+
*/
|
|
539
|
+
hidden?: boolean;
|
|
535
540
|
}
|
|
536
541
|
/**
|
|
537
542
|
* Agentic loop configuration
|