@yourgpt/copilot-sdk 2.0.2-beta.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -42
- package/dist/{chunk-UOWLKFXK.cjs → chunk-33JSFVGH.cjs} +23 -23
- package/dist/{chunk-UOWLKFXK.cjs.map → chunk-33JSFVGH.cjs.map} +1 -1
- package/dist/{chunk-IXFV6AW6.js → chunk-3SP6V22Y.js} +246 -219
- package/dist/chunk-3SP6V22Y.js.map +1 -0
- package/dist/{chunk-7XFFRV7D.js → chunk-7PJ4GAJR.js} +4 -4
- package/dist/{chunk-7XFFRV7D.js.map → chunk-7PJ4GAJR.js.map} +1 -1
- package/dist/{chunk-ZPYQDMUX.js → chunk-7YZVSG62.js} +3 -3
- package/dist/{chunk-ZPYQDMUX.js.map → chunk-7YZVSG62.js.map} +1 -1
- package/dist/{chunk-BKO7DSPU.js → chunk-BRUDSHCV.js} +2 -2
- package/dist/chunk-BRUDSHCV.js.map +1 -0
- package/dist/{chunk-BH7MNDWW.js → chunk-EWVQWTNV.js} +13 -3
- package/dist/chunk-EWVQWTNV.js.map +1 -0
- package/dist/{chunk-CEKAYA2Q.cjs → chunk-HNRFRNMY.cjs} +2 -2
- package/dist/chunk-HNRFRNMY.cjs.map +1 -0
- package/dist/{chunk-7K7HZMP4.cjs → chunk-JGPDQDY4.cjs} +13 -3
- package/dist/chunk-JGPDQDY4.cjs.map +1 -0
- package/dist/{chunk-H5XMKBBA.cjs → chunk-MUZ2RYS2.cjs} +268 -241
- package/dist/chunk-MUZ2RYS2.cjs.map +1 -0
- package/dist/{chunk-UIWFYMAO.cjs → chunk-O33I4HBL.cjs} +5 -5
- package/dist/{chunk-UIWFYMAO.cjs.map → chunk-O33I4HBL.cjs.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-pWEH7pUE.d.ts → index-25qIYJ21.d.ts} +1 -1
- package/dist/{index-2VtgKM8S.d.cts → index-C261xY-B.d.cts} +1 -1
- package/dist/mcp/index.cjs +47 -47
- package/dist/mcp/index.d.cts +13 -3
- package/dist/mcp/index.d.ts +13 -3
- package/dist/mcp/index.js +2 -2
- package/dist/react/index.cjs +50 -50
- package/dist/react/index.d.cts +18 -5
- package/dist/react/index.d.ts +18 -5
- package/dist/react/index.js +5 -5
- 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-DDWrco4h.d.cts → tools-Clyufshc.d.cts} +14 -1
- package/dist/{tools-DDWrco4h.d.ts → tools-Clyufshc.d.ts} +14 -1
- package/dist/{types-DjSfYNKj.d.cts → types-DM6M_pv_.d.cts} +43 -2
- package/dist/{types-Cizh9K_f.d.ts → types-wudOhedT.d.ts} +43 -2
- package/dist/ui/index.cjs +56 -26
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +37 -3
- package/dist/ui/index.d.ts +37 -3
- package/dist/ui/index.js +52 -22
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-7K7HZMP4.cjs.map +0 -1
- package/dist/chunk-BH7MNDWW.js.map +0 -1
- package/dist/chunk-BKO7DSPU.js.map +0 -1
- package/dist/chunk-CEKAYA2Q.cjs.map +0 -1
- package/dist/chunk-H5XMKBBA.cjs.map +0 -1
- package/dist/chunk-IXFV6AW6.js.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ 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, P as PermissionLevel, c as ToolInputSchema,
|
|
6
|
-
export {
|
|
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-Clyufshc.js';
|
|
6
|
+
export { m as AgentLoopConfig, a as ToolExecutionStatus, q as ToolPermission } from '../tools-Clyufshc.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 { 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-wudOhedT.js';
|
|
10
|
+
export { b as MCPClientState } from '../types-wudOhedT.js';
|
|
11
11
|
import { U as UseMCPUIIntentsConfig, m as UseMCPUIIntentsReturn } from '../types-B20VCJXL.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -447,6 +447,11 @@ interface ToolExecution {
|
|
|
447
447
|
args: Record<string, unknown>;
|
|
448
448
|
status: ToolExecutionStatus;
|
|
449
449
|
approvalStatus: ToolApprovalStatus;
|
|
450
|
+
/**
|
|
451
|
+
* Source/origin of the tool.
|
|
452
|
+
* Used to distinguish MCP tools from native/custom tools for UI rendering.
|
|
453
|
+
*/
|
|
454
|
+
source?: ToolSource;
|
|
450
455
|
result?: unknown;
|
|
451
456
|
error?: string;
|
|
452
457
|
startedAt?: Date;
|
|
@@ -889,6 +894,8 @@ interface CopilotProviderProps {
|
|
|
889
894
|
maxIterations?: number;
|
|
890
895
|
/** Custom message when max iterations reached (sent to AI as tool result) */
|
|
891
896
|
maxIterationsMessage?: string;
|
|
897
|
+
/** MCP servers to connect to automatically */
|
|
898
|
+
mcpServers?: MCPServerConfig[];
|
|
892
899
|
}
|
|
893
900
|
interface CopilotContextValue {
|
|
894
901
|
messages: UIMessage[];
|
|
@@ -918,7 +925,7 @@ interface CopilotContextValue {
|
|
|
918
925
|
toolsConfig?: ToolsConfig;
|
|
919
926
|
}
|
|
920
927
|
declare function useCopilot(): CopilotContextValue;
|
|
921
|
-
declare function CopilotProvider({ children, runtimeUrl, systemPrompt, tools: toolsConfig, threadId, initialMessages, onMessagesChange, onError, streaming, headers, debug, maxIterations, maxIterationsMessage, }: CopilotProviderProps): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
922
929
|
|
|
923
930
|
/**
|
|
924
931
|
* Chat UI state interface (UI-only state, not message data)
|
|
@@ -1241,6 +1248,12 @@ interface UseToolConfig<TParams = Record<string, unknown>> {
|
|
|
1241
1248
|
needsApproval?: boolean;
|
|
1242
1249
|
/** Custom approval message (can be string or function that receives params) */
|
|
1243
1250
|
approvalMessage?: string | ((params: TParams) => string);
|
|
1251
|
+
/**
|
|
1252
|
+
* Hide this tool from the chat UI.
|
|
1253
|
+
* Tool will still execute, but won't show in tool execution display.
|
|
1254
|
+
* @default false
|
|
1255
|
+
*/
|
|
1256
|
+
hidden?: boolean;
|
|
1244
1257
|
}
|
|
1245
1258
|
/**
|
|
1246
1259
|
* Register a client-side tool
|
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-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../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-3SP6V22Y.js';
|
|
2
|
+
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-7PJ4GAJR.js';
|
|
3
|
+
import '../chunk-EWVQWTNV.js';
|
|
4
|
+
import '../chunk-7YZVSG62.js';
|
|
5
|
+
import '../chunk-BRUDSHCV.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 chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_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 chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_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 chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_cjs.failure(errorMessage);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_cjs.failure(errorMessage);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_cjs.failure(errorMessage);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_cjs.failure(errorMessage);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { failure } from '../../chunk-
|
|
1
|
+
import { failure } from '../../chunk-BRUDSHCV.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 chunkHNRFRNMY_cjs = require('../../chunk-HNRFRNMY.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 chunkHNRFRNMY_cjs.failure(errorMessage);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { failure } from '../../chunk-
|
|
1
|
+
import { failure } from '../../chunk-BRUDSHCV.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 chunkO33I4HBL_cjs = require('../../chunk-O33I4HBL.cjs');
|
|
4
|
+
require('../../chunk-HNRFRNMY.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 chunkO33I4HBL_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-C261xY-B.cjs';
|
|
3
|
+
import '../../tools-Clyufshc.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-25qIYJ21.js';
|
|
3
|
+
import '../../tools-Clyufshc.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { webSearchTool } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { webSearchTool } from '../../chunk-7YZVSG62.js';
|
|
2
|
+
import '../../chunk-BRUDSHCV.js';
|
|
3
3
|
export { formatSearchResultsForAI, summarizeSearchResults } from '../../chunk-XGITAEXU.js';
|
|
4
4
|
import '../../chunk-7W7QLZNC.js';
|
|
5
5
|
import '../../chunk-CEOMTQTP.js';
|
|
@@ -9,6 +9,13 @@ type AIProvider = "anthropic" | "openai" | "xai" | "grok" | "gemini" | "groq" |
|
|
|
9
9
|
* Where the tool executes
|
|
10
10
|
*/
|
|
11
11
|
type ToolLocation = "server" | "client";
|
|
12
|
+
/**
|
|
13
|
+
* Source/origin of the tool
|
|
14
|
+
* - "mcp": Tool from an MCP (Model Context Protocol) server
|
|
15
|
+
* - "native": Built-in SDK tool
|
|
16
|
+
* - "custom": User-defined tool
|
|
17
|
+
*/
|
|
18
|
+
type ToolSource = "mcp" | "native" | "custom";
|
|
12
19
|
/**
|
|
13
20
|
* JSON Schema property definition
|
|
14
21
|
*/
|
|
@@ -293,6 +300,12 @@ interface ToolDefinition<TParams = Record<string, unknown>> {
|
|
|
293
300
|
description: string;
|
|
294
301
|
/** Where the tool executes (server or client) */
|
|
295
302
|
location: ToolLocation;
|
|
303
|
+
/**
|
|
304
|
+
* Source/origin of the tool.
|
|
305
|
+
* Used to distinguish MCP tools from native/custom tools for UI rendering.
|
|
306
|
+
* @default "custom"
|
|
307
|
+
*/
|
|
308
|
+
source?: ToolSource;
|
|
296
309
|
/**
|
|
297
310
|
* Human-readable title for UI display.
|
|
298
311
|
* Can be a static string or a function that generates title from args.
|
|
@@ -634,4 +647,4 @@ declare function success<T = unknown>(data?: T, message?: string): ToolResponse<
|
|
|
634
647
|
*/
|
|
635
648
|
declare function failure(error: string): ToolResponse;
|
|
636
649
|
|
|
637
|
-
export { type AIProvider as A, type JSONSchemaProperty as J, type PermissionLevel as P, type ToolDefinition as T, type UnifiedToolCall as U, type ToolExecutionStatus as a, type ToolResponse as b, type ToolInputSchema as c, type ToolLocation as d, type ToolContext as e, type
|
|
650
|
+
export { type AIProvider as A, type JSONSchemaProperty as J, type PermissionLevel as P, type ToolDefinition as T, type UnifiedToolCall as U, type ToolExecutionStatus as a, type ToolResponse as b, type ToolInputSchema as c, type ToolLocation as d, type ToolContext as e, type ToolSource as f, type ToolRenderProps as g, type ToolConfig as h, type ToolSet as i, type UnifiedToolResult as j, type ToolApprovalStatus as k, type ToolExecution as l, type AgentLoopConfig as m, type AgentLoopState as n, type AIResponseMode as o, type AIContent as p, type ToolPermission as q, type PermissionStorageConfig as r, type PermissionStorageAdapter as s, tool as t, toolToOpenAIFormat as u, toolToAnthropicFormat as v, createToolResult as w, success as x, failure as y };
|
|
@@ -9,6 +9,13 @@ type AIProvider = "anthropic" | "openai" | "xai" | "grok" | "gemini" | "groq" |
|
|
|
9
9
|
* Where the tool executes
|
|
10
10
|
*/
|
|
11
11
|
type ToolLocation = "server" | "client";
|
|
12
|
+
/**
|
|
13
|
+
* Source/origin of the tool
|
|
14
|
+
* - "mcp": Tool from an MCP (Model Context Protocol) server
|
|
15
|
+
* - "native": Built-in SDK tool
|
|
16
|
+
* - "custom": User-defined tool
|
|
17
|
+
*/
|
|
18
|
+
type ToolSource = "mcp" | "native" | "custom";
|
|
12
19
|
/**
|
|
13
20
|
* JSON Schema property definition
|
|
14
21
|
*/
|
|
@@ -293,6 +300,12 @@ interface ToolDefinition<TParams = Record<string, unknown>> {
|
|
|
293
300
|
description: string;
|
|
294
301
|
/** Where the tool executes (server or client) */
|
|
295
302
|
location: ToolLocation;
|
|
303
|
+
/**
|
|
304
|
+
* Source/origin of the tool.
|
|
305
|
+
* Used to distinguish MCP tools from native/custom tools for UI rendering.
|
|
306
|
+
* @default "custom"
|
|
307
|
+
*/
|
|
308
|
+
source?: ToolSource;
|
|
296
309
|
/**
|
|
297
310
|
* Human-readable title for UI display.
|
|
298
311
|
* Can be a static string or a function that generates title from args.
|
|
@@ -634,4 +647,4 @@ declare function success<T = unknown>(data?: T, message?: string): ToolResponse<
|
|
|
634
647
|
*/
|
|
635
648
|
declare function failure(error: string): ToolResponse;
|
|
636
649
|
|
|
637
|
-
export { type AIProvider as A, type JSONSchemaProperty as J, type PermissionLevel as P, type ToolDefinition as T, type UnifiedToolCall as U, type ToolExecutionStatus as a, type ToolResponse as b, type ToolInputSchema as c, type ToolLocation as d, type ToolContext as e, type
|
|
650
|
+
export { type AIProvider as A, type JSONSchemaProperty as J, type PermissionLevel as P, type ToolDefinition as T, type UnifiedToolCall as U, type ToolExecutionStatus as a, type ToolResponse as b, type ToolInputSchema as c, type ToolLocation as d, type ToolContext as e, type ToolSource as f, type ToolRenderProps as g, type ToolConfig as h, type ToolSet as i, type UnifiedToolResult as j, type ToolApprovalStatus as k, type ToolExecution as l, type AgentLoopConfig as m, type AgentLoopState as n, type AIResponseMode as o, type AIContent as p, type ToolPermission as q, type PermissionStorageConfig as r, type PermissionStorageAdapter as s, tool as t, toolToOpenAIFormat as u, toolToAnthropicFormat as v, createToolResult as w, success as x, failure as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolDefinition } from './tools-
|
|
1
|
+
import { T as ToolDefinition } from './tools-Clyufshc.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* MCP (Model Context Protocol) Type Definitions
|
|
@@ -401,6 +401,47 @@ interface UseMCPToolsConfig extends UseMCPClientConfig {
|
|
|
401
401
|
prefixToolNames?: boolean;
|
|
402
402
|
/** Auto-register tools with CopilotProvider (default: true) */
|
|
403
403
|
autoRegister?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Hide all tools from this MCP server in the chat UI.
|
|
406
|
+
* Tools will still execute, but won't show in the tool execution display.
|
|
407
|
+
* @default false
|
|
408
|
+
*/
|
|
409
|
+
hidden?: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* Source label for tools from this MCP server.
|
|
412
|
+
* Used to identify MCP tools in the UI for custom rendering.
|
|
413
|
+
* @default "mcp"
|
|
414
|
+
*/
|
|
415
|
+
source?: "mcp" | "native" | "custom";
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* MCP server configuration for CopilotProvider
|
|
419
|
+
*/
|
|
420
|
+
interface MCPServerConfig {
|
|
421
|
+
/** Unique name for this server connection */
|
|
422
|
+
name: string;
|
|
423
|
+
/** Transport type */
|
|
424
|
+
transport: MCPTransportType;
|
|
425
|
+
/** Server URL (for http/sse transports) */
|
|
426
|
+
url: string;
|
|
427
|
+
/** Custom headers (for http/sse transports) */
|
|
428
|
+
headers?: Record<string, string>;
|
|
429
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
430
|
+
timeout?: number;
|
|
431
|
+
/** Prefix tool names with server name (default: true) */
|
|
432
|
+
prefixToolNames?: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Hide all tools from this MCP server in the chat UI.
|
|
435
|
+
* Tools will still execute, but won't show in the tool execution display.
|
|
436
|
+
* @default false
|
|
437
|
+
*/
|
|
438
|
+
hidden?: boolean;
|
|
439
|
+
/**
|
|
440
|
+
* Source label for tools from this MCP server.
|
|
441
|
+
* Used to identify MCP tools in the UI for custom rendering.
|
|
442
|
+
* @default "mcp"
|
|
443
|
+
*/
|
|
444
|
+
source?: "mcp" | "native" | "custom";
|
|
404
445
|
}
|
|
405
446
|
/**
|
|
406
447
|
* Return type for useMCPClient hook
|
|
@@ -438,4 +479,4 @@ declare class MCPError extends Error {
|
|
|
438
479
|
static fromJsonRpcError(error: JsonRpcError): MCPError;
|
|
439
480
|
}
|
|
440
481
|
|
|
441
|
-
export { type MCPElicitationRequest as A, type MCPElicitationResponse as B, type MCPElicitationOption as C, type UseMCPClientReturn as D, type UseMCPToolsConfig as E, type UseMCPToolsReturn as F,
|
|
482
|
+
export { type MCPElicitationRequest as A, type MCPElicitationResponse as B, type MCPElicitationOption as C, type UseMCPClientReturn as D, type UseMCPToolsConfig as E, type UseMCPToolsReturn as F, type MCPServerConfig as G, MCPError as H, MCP_PROTOCOL_VERSION as I, type JsonRpcRequest as J, JSON_RPC_ERROR_CODES as K, type MCPClientConfig as M, type UseMCPClientConfig as U, type MCPClientEvents as a, type MCPClientState as b, type MCPToolCallResult as c, type MCPToolDefinition as d, type MCPServerInfo as e, type MCPServerCapabilities as f, type MCPConnectionState as g, type JsonRpcNotification as h, type JsonRpcMessage as i, type JsonRpcResponse as j, type MCPClientInfo as k, type MCPClientCapabilities as l, type MCPInitializeParams as m, type MCPToolCallParams as n, type MCPTransportType as o, type MCPTransportConfig as p, type MCPHttpTransportConfig as q, type MCPSSETransportConfig as r, type MCPStdioTransportConfig as s, type JsonRpcError as t, type MCPToolInputSchema as u, type MCPToolResultContent as v, type MCPTextContent as w, type MCPImageContent as x, type MCPResourceContent as y, type MCPUIContent as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolDefinition } from './tools-
|
|
1
|
+
import { T as ToolDefinition } from './tools-Clyufshc.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* MCP (Model Context Protocol) Type Definitions
|
|
@@ -401,6 +401,47 @@ interface UseMCPToolsConfig extends UseMCPClientConfig {
|
|
|
401
401
|
prefixToolNames?: boolean;
|
|
402
402
|
/** Auto-register tools with CopilotProvider (default: true) */
|
|
403
403
|
autoRegister?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Hide all tools from this MCP server in the chat UI.
|
|
406
|
+
* Tools will still execute, but won't show in the tool execution display.
|
|
407
|
+
* @default false
|
|
408
|
+
*/
|
|
409
|
+
hidden?: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* Source label for tools from this MCP server.
|
|
412
|
+
* Used to identify MCP tools in the UI for custom rendering.
|
|
413
|
+
* @default "mcp"
|
|
414
|
+
*/
|
|
415
|
+
source?: "mcp" | "native" | "custom";
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* MCP server configuration for CopilotProvider
|
|
419
|
+
*/
|
|
420
|
+
interface MCPServerConfig {
|
|
421
|
+
/** Unique name for this server connection */
|
|
422
|
+
name: string;
|
|
423
|
+
/** Transport type */
|
|
424
|
+
transport: MCPTransportType;
|
|
425
|
+
/** Server URL (for http/sse transports) */
|
|
426
|
+
url: string;
|
|
427
|
+
/** Custom headers (for http/sse transports) */
|
|
428
|
+
headers?: Record<string, string>;
|
|
429
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
430
|
+
timeout?: number;
|
|
431
|
+
/** Prefix tool names with server name (default: true) */
|
|
432
|
+
prefixToolNames?: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Hide all tools from this MCP server in the chat UI.
|
|
435
|
+
* Tools will still execute, but won't show in the tool execution display.
|
|
436
|
+
* @default false
|
|
437
|
+
*/
|
|
438
|
+
hidden?: boolean;
|
|
439
|
+
/**
|
|
440
|
+
* Source label for tools from this MCP server.
|
|
441
|
+
* Used to identify MCP tools in the UI for custom rendering.
|
|
442
|
+
* @default "mcp"
|
|
443
|
+
*/
|
|
444
|
+
source?: "mcp" | "native" | "custom";
|
|
404
445
|
}
|
|
405
446
|
/**
|
|
406
447
|
* Return type for useMCPClient hook
|
|
@@ -438,4 +479,4 @@ declare class MCPError extends Error {
|
|
|
438
479
|
static fromJsonRpcError(error: JsonRpcError): MCPError;
|
|
439
480
|
}
|
|
440
481
|
|
|
441
|
-
export { type MCPElicitationRequest as A, type MCPElicitationResponse as B, type MCPElicitationOption as C, type UseMCPClientReturn as D, type UseMCPToolsConfig as E, type UseMCPToolsReturn as F,
|
|
482
|
+
export { type MCPElicitationRequest as A, type MCPElicitationResponse as B, type MCPElicitationOption as C, type UseMCPClientReturn as D, type UseMCPToolsConfig as E, type UseMCPToolsReturn as F, type MCPServerConfig as G, MCPError as H, MCP_PROTOCOL_VERSION as I, type JsonRpcRequest as J, JSON_RPC_ERROR_CODES as K, type MCPClientConfig as M, type UseMCPClientConfig as U, type MCPClientEvents as a, type MCPClientState as b, type MCPToolCallResult as c, type MCPToolDefinition as d, type MCPServerInfo as e, type MCPServerCapabilities as f, type MCPConnectionState as g, type JsonRpcNotification as h, type JsonRpcMessage as i, type JsonRpcResponse as j, type MCPClientInfo as k, type MCPClientCapabilities as l, type MCPInitializeParams as m, type MCPToolCallParams as n, type MCPTransportType as o, type MCPTransportConfig as p, type MCPHttpTransportConfig as q, type MCPSSETransportConfig as r, type MCPStdioTransportConfig as s, type JsonRpcError as t, type MCPToolInputSchema as u, type MCPToolResultContent as v, type MCPTextContent as w, type MCPImageContent as x, type MCPResourceContent as y, type MCPUIContent as z };
|