@yourgpt/copilot-sdk 2.0.1 → 2.0.2-beta.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/README.md +42 -0
- package/dist/{ThreadManager-JT0sqSSD.d.ts → ThreadManager-Dkp_eLty.d.ts} +1 -1
- package/dist/{ThreadManager-CUq5Ocu2.d.cts → ThreadManager-LfFRhr4e.d.cts} +1 -1
- package/dist/anthropic-6F5GRE3B.js +4 -0
- package/dist/anthropic-6F5GRE3B.js.map +1 -0
- package/dist/anthropic-DGalr_Fw.d.cts +17 -0
- package/dist/anthropic-DkCEDYOt.d.ts +17 -0
- package/dist/anthropic-NMTRABEH.cjs +21 -0
- package/dist/anthropic-NMTRABEH.cjs.map +1 -0
- package/dist/brave-DdnWb7Gb.d.cts +17 -0
- package/dist/brave-DsI9n7Wr.d.ts +17 -0
- package/dist/brave-OYKCOZEM.cjs +21 -0
- package/dist/brave-OYKCOZEM.cjs.map +1 -0
- package/dist/brave-XSASGGH2.js +4 -0
- package/dist/brave-XSASGGH2.js.map +1 -0
- package/dist/chunk-2FAWEBZS.cjs +88 -0
- package/dist/chunk-2FAWEBZS.cjs.map +1 -0
- package/dist/chunk-53UGJNHN.js +92 -0
- package/dist/chunk-53UGJNHN.js.map +1 -0
- package/dist/chunk-6T5XXJEP.cjs +80 -0
- package/dist/chunk-6T5XXJEP.cjs.map +1 -0
- package/dist/chunk-7K7HZMP4.cjs +1170 -0
- package/dist/chunk-7K7HZMP4.cjs.map +1 -0
- package/dist/chunk-7W7QLZNC.js +72 -0
- package/dist/chunk-7W7QLZNC.js.map +1 -0
- package/dist/{chunk-JM7PB2LP.js → chunk-7XFFRV7D.js} +10 -66
- package/dist/chunk-7XFFRV7D.js.map +1 -0
- package/dist/chunk-ASV6JLYG.cjs +99 -0
- package/dist/chunk-ASV6JLYG.cjs.map +1 -0
- package/dist/chunk-BH7MNDWW.js +1152 -0
- package/dist/chunk-BH7MNDWW.js.map +1 -0
- package/dist/chunk-BKO7DSPU.js +67 -0
- package/dist/chunk-BKO7DSPU.js.map +1 -0
- package/dist/chunk-CBAHCI4R.cjs +76 -0
- package/dist/chunk-CBAHCI4R.cjs.map +1 -0
- package/dist/chunk-CEKAYA2Q.cjs +74 -0
- package/dist/chunk-CEKAYA2Q.cjs.map +1 -0
- package/dist/chunk-CEOMTQTP.js +85 -0
- package/dist/chunk-CEOMTQTP.js.map +1 -0
- package/dist/chunk-DABZYCVX.js +84 -0
- package/dist/chunk-DABZYCVX.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +10 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-G4SF2PNQ.js +33 -0
- package/dist/chunk-G4SF2PNQ.js.map +1 -0
- package/dist/chunk-GANCV72Z.cjs +110 -0
- package/dist/chunk-GANCV72Z.cjs.map +1 -0
- package/dist/{chunk-BLSI67J6.cjs → chunk-H5XMKBBA.cjs} +425 -30
- package/dist/chunk-H5XMKBBA.cjs.map +1 -0
- package/dist/{chunk-CJ7UWN2Y.js → chunk-IXFV6AW6.js} +397 -7
- package/dist/chunk-IXFV6AW6.js.map +1 -0
- package/dist/chunk-JEQ2X3Z6.cjs +12 -0
- package/dist/chunk-JEQ2X3Z6.cjs.map +1 -0
- package/dist/chunk-JO4BHPAD.cjs +40 -0
- package/dist/chunk-JO4BHPAD.cjs.map +1 -0
- package/dist/chunk-MEBXW75C.cjs +89 -0
- package/dist/chunk-MEBXW75C.cjs.map +1 -0
- package/dist/chunk-MNDGIW47.js +76 -0
- package/dist/chunk-MNDGIW47.js.map +1 -0
- package/dist/chunk-PPFHA6IL.js +83 -0
- package/dist/chunk-PPFHA6IL.js.map +1 -0
- package/dist/chunk-RQ74USYU.js +128 -0
- package/dist/chunk-RQ74USYU.js.map +1 -0
- package/dist/chunk-TXLIY7GF.cjs +132 -0
- package/dist/chunk-TXLIY7GF.cjs.map +1 -0
- package/dist/chunk-UIWFYMAO.cjs +82 -0
- package/dist/chunk-UIWFYMAO.cjs.map +1 -0
- package/dist/{chunk-4PRWNAXQ.cjs → chunk-UOWLKFXK.cjs} +27 -89
- package/dist/chunk-UOWLKFXK.cjs.map +1 -0
- package/dist/chunk-VD74IPKB.js +106 -0
- package/dist/chunk-VD74IPKB.js.map +1 -0
- package/dist/chunk-W73FBYIH.cjs +87 -0
- package/dist/chunk-W73FBYIH.cjs.map +1 -0
- package/dist/chunk-XGITAEXU.js +93 -0
- package/dist/chunk-XGITAEXU.js.map +1 -0
- package/dist/chunk-XWOHNY3F.cjs +96 -0
- package/dist/chunk-XWOHNY3F.cjs.map +1 -0
- package/dist/chunk-ZPYQDMUX.js +79 -0
- package/dist/chunk-ZPYQDMUX.js.map +1 -0
- package/dist/core/index.cjs +156 -84
- package/dist/core/index.d.cts +16 -4
- package/dist/core/index.d.ts +16 -4
- package/dist/core/index.js +13 -1
- package/dist/exa-72KFY5A7.cjs +21 -0
- package/dist/exa-72KFY5A7.cjs.map +1 -0
- package/dist/exa-Dp9U-WTc.d.ts +17 -0
- package/dist/exa-NNVPBC2M.js +4 -0
- package/dist/exa-NNVPBC2M.js.map +1 -0
- package/dist/exa-jJSPhyUW.d.cts +17 -0
- package/dist/google-CHU2yycE.d.cts +17 -0
- package/dist/google-CTEK6SV2.js +4 -0
- package/dist/google-CTEK6SV2.js.map +1 -0
- package/dist/google-Da8IQxaI.d.ts +17 -0
- package/dist/google-IIUXFFVF.cjs +21 -0
- package/dist/google-IIUXFFVF.cjs.map +1 -0
- package/dist/index-2VtgKM8S.d.cts +206 -0
- package/dist/index-pWEH7pUE.d.ts +206 -0
- package/dist/mcp/index.cjs +670 -0
- package/dist/mcp/index.cjs.map +1 -0
- package/dist/mcp/index.d.cts +779 -0
- package/dist/mcp/index.d.ts +779 -0
- package/dist/mcp/index.js +574 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/openai-6KTCQ7PZ.cjs +21 -0
- package/dist/openai-6KTCQ7PZ.cjs.map +1 -0
- package/dist/openai-7W2PCNW5.js +4 -0
- package/dist/openai-7W2PCNW5.js.map +1 -0
- package/dist/openai-Cam8hF4f.d.ts +17 -0
- package/dist/openai-HVSCuXgO.d.cts +17 -0
- package/dist/react/index.cjs +75 -42
- package/dist/react/index.d.cts +270 -45
- package/dist/react/index.d.ts +270 -45
- package/dist/react/index.js +15 -2
- package/dist/searxng-AXLVGY7Z.js +4 -0
- package/dist/searxng-AXLVGY7Z.js.map +1 -0
- package/dist/searxng-EJKNY236.cjs +21 -0
- package/dist/searxng-EJKNY236.cjs.map +1 -0
- package/dist/searxng-K0qtY9vp.d.ts +17 -0
- package/dist/searxng-QGOte_Gq.d.cts +17 -0
- package/dist/serper-3JYJHJX6.js +4 -0
- package/dist/serper-3JYJHJX6.js.map +1 -0
- package/dist/serper-63FT4AOL.cjs +21 -0
- package/dist/serper-63FT4AOL.cjs.map +1 -0
- package/dist/serper-7Czya3PW.d.ts +17 -0
- package/dist/serper-JzdaSnS9.d.cts +17 -0
- package/dist/styles.css +38 -0
- package/dist/tavily-AWFP4RM7.cjs +21 -0
- package/dist/tavily-AWFP4RM7.cjs.map +1 -0
- package/dist/tavily-C8cXXojE.d.cts +17 -0
- package/dist/tavily-CIWAAZPH.js +4 -0
- package/dist/tavily-CIWAAZPH.js.map +1 -0
- package/dist/tavily-DdSGVgkE.d.ts +17 -0
- package/dist/themes/catppuccin.css +2 -0
- package/dist/themes/claude.css +2 -0
- package/dist/themes/linear.css +2 -0
- package/dist/themes/modern-minimal.css +2 -0
- package/dist/themes/posthog.css +2 -0
- package/dist/themes/supabase.css +2 -0
- package/dist/themes/twitter.css +2 -0
- package/dist/themes/vercel.css +2 -0
- package/dist/tools/anthropic/index.cjs +61 -0
- package/dist/tools/anthropic/index.cjs.map +1 -0
- package/dist/tools/anthropic/index.d.cts +67 -0
- package/dist/tools/anthropic/index.d.ts +67 -0
- package/dist/tools/anthropic/index.js +56 -0
- package/dist/tools/anthropic/index.js.map +1 -0
- package/dist/tools/brave/index.cjs +85 -0
- package/dist/tools/brave/index.cjs.map +1 -0
- package/dist/tools/brave/index.d.cts +91 -0
- package/dist/tools/brave/index.d.ts +91 -0
- package/dist/tools/brave/index.js +80 -0
- package/dist/tools/brave/index.js.map +1 -0
- package/dist/tools/exa/index.cjs +90 -0
- package/dist/tools/exa/index.cjs.map +1 -0
- package/dist/tools/exa/index.d.cts +92 -0
- package/dist/tools/exa/index.d.ts +92 -0
- package/dist/tools/exa/index.js +85 -0
- package/dist/tools/exa/index.js.map +1 -0
- package/dist/tools/google/index.cjs +81 -0
- package/dist/tools/google/index.cjs.map +1 -0
- package/dist/tools/google/index.d.cts +81 -0
- package/dist/tools/google/index.d.ts +81 -0
- package/dist/tools/google/index.js +76 -0
- package/dist/tools/google/index.js.map +1 -0
- package/dist/tools/openai/index.cjs +83 -0
- package/dist/tools/openai/index.cjs.map +1 -0
- package/dist/tools/openai/index.d.cts +84 -0
- package/dist/tools/openai/index.d.ts +84 -0
- package/dist/tools/openai/index.js +78 -0
- package/dist/tools/openai/index.js.map +1 -0
- package/dist/tools/searxng/index.cjs +85 -0
- package/dist/tools/searxng/index.cjs.map +1 -0
- package/dist/tools/searxng/index.d.cts +91 -0
- package/dist/tools/searxng/index.d.ts +91 -0
- package/dist/tools/searxng/index.js +80 -0
- package/dist/tools/searxng/index.js.map +1 -0
- package/dist/tools/serper/index.cjs +85 -0
- package/dist/tools/serper/index.cjs.map +1 -0
- package/dist/tools/serper/index.d.cts +91 -0
- package/dist/tools/serper/index.d.ts +91 -0
- package/dist/tools/serper/index.js +80 -0
- package/dist/tools/serper/index.js.map +1 -0
- package/dist/tools/tavily/index.cjs +91 -0
- package/dist/tools/tavily/index.cjs.map +1 -0
- package/dist/tools/tavily/index.d.cts +95 -0
- package/dist/tools/tavily/index.d.ts +95 -0
- package/dist/tools/tavily/index.js +86 -0
- package/dist/tools/tavily/index.js.map +1 -0
- package/dist/tools/web-search/index.cjs +31 -0
- package/dist/tools/web-search/index.cjs.map +1 -0
- package/dist/tools/web-search/index.d.cts +3 -0
- package/dist/tools/web-search/index.d.ts +3 -0
- package/dist/tools/web-search/index.js +14 -0
- package/dist/tools/web-search/index.js.map +1 -0
- package/dist/{types-BtAaOV07.d.cts → tools-DDWrco4h.d.cts} +43 -367
- package/dist/{types-BtAaOV07.d.ts → tools-DDWrco4h.d.ts} +43 -367
- package/dist/types-B20VCJXL.d.cts +347 -0
- package/dist/types-B20VCJXL.d.ts +347 -0
- package/dist/types-Cizh9K_f.d.ts +441 -0
- package/dist/types-DG2ya08y.d.cts +367 -0
- package/dist/types-DG2ya08y.d.ts +367 -0
- package/dist/types-DjSfYNKj.d.cts +441 -0
- package/dist/types-ZguuKEs_.d.cts +127 -0
- package/dist/types-ZguuKEs_.d.ts +127 -0
- package/dist/ui/index.cjs +1075 -148
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +410 -4
- package/dist/ui/index.d.ts +410 -4
- package/dist/ui/index.js +1007 -96
- package/dist/ui/index.js.map +1 -1
- package/package.json +52 -2
- package/dist/chunk-4PRWNAXQ.cjs.map +0 -1
- package/dist/chunk-BLSI67J6.cjs.map +0 -1
- package/dist/chunk-CJ7UWN2Y.js.map +0 -1
- package/dist/chunk-JM7PB2LP.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"openai-7W2PCNW5.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { W as WebSearchProviderInterface } from './types-ZguuKEs_.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OpenAI Web Search Provider
|
|
5
|
+
*
|
|
6
|
+
* Uses OpenAI's built-in web_search tool via the Responses API.
|
|
7
|
+
* No third-party API key required - uses your OpenAI API key.
|
|
8
|
+
*
|
|
9
|
+
* @see https://platform.openai.com/docs/guides/tools-web-search
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* OpenAI native search provider implementation
|
|
14
|
+
*/
|
|
15
|
+
declare const openaiProvider: WebSearchProviderInterface;
|
|
16
|
+
|
|
17
|
+
export { openaiProvider as o };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { W as WebSearchProviderInterface } from './types-ZguuKEs_.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OpenAI Web Search Provider
|
|
5
|
+
*
|
|
6
|
+
* Uses OpenAI's built-in web_search tool via the Responses API.
|
|
7
|
+
* No third-party API key required - uses your OpenAI API key.
|
|
8
|
+
*
|
|
9
|
+
* @see https://platform.openai.com/docs/guides/tools-web-search
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* OpenAI native search provider implementation
|
|
14
|
+
*/
|
|
15
|
+
declare const openaiProvider: WebSearchProviderInterface;
|
|
16
|
+
|
|
17
|
+
export { openaiProvider as o };
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,169 +1,202 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkH5XMKBBA_cjs = require('../chunk-H5XMKBBA.cjs');
|
|
4
|
+
var chunkUOWLKFXK_cjs = require('../chunk-UOWLKFXK.cjs');
|
|
5
|
+
require('../chunk-7K7HZMP4.cjs');
|
|
6
|
+
require('../chunk-UIWFYMAO.cjs');
|
|
7
|
+
require('../chunk-CEKAYA2Q.cjs');
|
|
8
|
+
require('../chunk-ASV6JLYG.cjs');
|
|
9
|
+
require('../chunk-CBAHCI4R.cjs');
|
|
10
|
+
require('../chunk-MEBXW75C.cjs');
|
|
11
|
+
require('../chunk-W73FBYIH.cjs');
|
|
12
|
+
require('../chunk-2FAWEBZS.cjs');
|
|
13
|
+
require('../chunk-6T5XXJEP.cjs');
|
|
14
|
+
require('../chunk-GANCV72Z.cjs');
|
|
15
|
+
require('../chunk-XWOHNY3F.cjs');
|
|
16
|
+
require('../chunk-TXLIY7GF.cjs');
|
|
17
|
+
require('../chunk-JEQ2X3Z6.cjs');
|
|
5
18
|
|
|
6
19
|
|
|
7
20
|
|
|
8
21
|
Object.defineProperty(exports, "AbstractAgentLoop", {
|
|
9
22
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkH5XMKBBA_cjs.AbstractAgentLoop; }
|
|
11
24
|
});
|
|
12
25
|
Object.defineProperty(exports, "AbstractChat", {
|
|
13
26
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkH5XMKBBA_cjs.AbstractChat; }
|
|
15
28
|
});
|
|
16
29
|
Object.defineProperty(exports, "CopilotProvider", {
|
|
17
30
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkH5XMKBBA_cjs.CopilotProvider; }
|
|
19
32
|
});
|
|
20
33
|
Object.defineProperty(exports, "ReactChat", {
|
|
21
34
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkH5XMKBBA_cjs.ReactChat; }
|
|
23
36
|
});
|
|
24
37
|
Object.defineProperty(exports, "ReactChatState", {
|
|
25
38
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkH5XMKBBA_cjs.ReactChatState; }
|
|
27
40
|
});
|
|
28
41
|
Object.defineProperty(exports, "ReactThreadManager", {
|
|
29
42
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkH5XMKBBA_cjs.ReactThreadManager; }
|
|
31
44
|
});
|
|
32
45
|
Object.defineProperty(exports, "ReactThreadManagerState", {
|
|
33
46
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkH5XMKBBA_cjs.ReactThreadManagerState; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "createMessageIntentHandler", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunkH5XMKBBA_cjs.createMessageIntentHandler; }
|
|
35
52
|
});
|
|
36
53
|
Object.defineProperty(exports, "createPermissionStorage", {
|
|
37
54
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkH5XMKBBA_cjs.createPermissionStorage; }
|
|
39
56
|
});
|
|
40
57
|
Object.defineProperty(exports, "createReactChat", {
|
|
41
58
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkH5XMKBBA_cjs.createReactChat; }
|
|
43
60
|
});
|
|
44
61
|
Object.defineProperty(exports, "createReactChatState", {
|
|
45
62
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkH5XMKBBA_cjs.createReactChatState; }
|
|
47
64
|
});
|
|
48
65
|
Object.defineProperty(exports, "createReactThreadManager", {
|
|
49
66
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkH5XMKBBA_cjs.createReactThreadManager; }
|
|
51
68
|
});
|
|
52
69
|
Object.defineProperty(exports, "createReactThreadManagerState", {
|
|
53
70
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkH5XMKBBA_cjs.createReactThreadManagerState; }
|
|
55
72
|
});
|
|
56
73
|
Object.defineProperty(exports, "createSessionPermissionCache", {
|
|
57
74
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkH5XMKBBA_cjs.createSessionPermissionCache; }
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports, "createToolIntentHandler", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () { return chunkH5XMKBBA_cjs.createToolIntentHandler; }
|
|
59
80
|
});
|
|
60
81
|
Object.defineProperty(exports, "formatKnowledgeResultsForAI", {
|
|
61
82
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkH5XMKBBA_cjs.formatKnowledgeResultsForAI; }
|
|
63
84
|
});
|
|
64
85
|
Object.defineProperty(exports, "initialAgentLoopState", {
|
|
65
86
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkH5XMKBBA_cjs.initialAgentLoopState; }
|
|
67
88
|
});
|
|
68
89
|
Object.defineProperty(exports, "searchKnowledgeBase", {
|
|
69
90
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkH5XMKBBA_cjs.searchKnowledgeBase; }
|
|
71
92
|
});
|
|
72
93
|
Object.defineProperty(exports, "useAIAction", {
|
|
73
94
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkH5XMKBBA_cjs.useAIAction; }
|
|
75
96
|
});
|
|
76
97
|
Object.defineProperty(exports, "useAIActions", {
|
|
77
98
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkH5XMKBBA_cjs.useAIActions; }
|
|
79
100
|
});
|
|
80
101
|
Object.defineProperty(exports, "useAIContext", {
|
|
81
102
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkH5XMKBBA_cjs.useAIContext; }
|
|
83
104
|
});
|
|
84
105
|
Object.defineProperty(exports, "useAIContexts", {
|
|
85
106
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkH5XMKBBA_cjs.useAIContexts; }
|
|
87
108
|
});
|
|
88
109
|
Object.defineProperty(exports, "useAITools", {
|
|
89
110
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkH5XMKBBA_cjs.useAITools; }
|
|
91
112
|
});
|
|
92
113
|
Object.defineProperty(exports, "useAgent", {
|
|
93
114
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkH5XMKBBA_cjs.useAgent; }
|
|
95
116
|
});
|
|
96
117
|
Object.defineProperty(exports, "useCapabilities", {
|
|
97
118
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkH5XMKBBA_cjs.useCapabilities; }
|
|
99
120
|
});
|
|
100
121
|
Object.defineProperty(exports, "useChat", {
|
|
101
122
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkH5XMKBBA_cjs.useChat; }
|
|
103
124
|
});
|
|
104
125
|
Object.defineProperty(exports, "useCopilot", {
|
|
105
126
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkH5XMKBBA_cjs.useCopilot; }
|
|
107
128
|
});
|
|
108
129
|
Object.defineProperty(exports, "useDevLogger", {
|
|
109
130
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkH5XMKBBA_cjs.useDevLogger; }
|
|
111
132
|
});
|
|
112
133
|
Object.defineProperty(exports, "useFeatureSupport", {
|
|
113
134
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkH5XMKBBA_cjs.useFeatureSupport; }
|
|
115
136
|
});
|
|
116
137
|
Object.defineProperty(exports, "useKnowledgeBase", {
|
|
117
138
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkH5XMKBBA_cjs.useKnowledgeBase; }
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(exports, "useMCPClient", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function () { return chunkH5XMKBBA_cjs.useMCPClient; }
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "useMCPTools", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () { return chunkH5XMKBBA_cjs.useMCPTools; }
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(exports, "useMCPUIIntents", {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () { return chunkH5XMKBBA_cjs.useMCPUIIntents; }
|
|
119
152
|
});
|
|
120
153
|
Object.defineProperty(exports, "useSuggestions", {
|
|
121
154
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkH5XMKBBA_cjs.useSuggestions; }
|
|
123
156
|
});
|
|
124
157
|
Object.defineProperty(exports, "useSupportedMediaTypes", {
|
|
125
158
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkH5XMKBBA_cjs.useSupportedMediaTypes; }
|
|
127
160
|
});
|
|
128
161
|
Object.defineProperty(exports, "useThreadManager", {
|
|
129
162
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkH5XMKBBA_cjs.useThreadManager; }
|
|
131
164
|
});
|
|
132
165
|
Object.defineProperty(exports, "useTool", {
|
|
133
166
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkH5XMKBBA_cjs.useTool; }
|
|
135
168
|
});
|
|
136
169
|
Object.defineProperty(exports, "useToolExecutor", {
|
|
137
170
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkH5XMKBBA_cjs.useToolExecutor; }
|
|
139
172
|
});
|
|
140
173
|
Object.defineProperty(exports, "useToolWithSchema", {
|
|
141
174
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkH5XMKBBA_cjs.useToolWithSchema; }
|
|
143
176
|
});
|
|
144
177
|
Object.defineProperty(exports, "useTools", {
|
|
145
178
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkH5XMKBBA_cjs.useTools; }
|
|
147
180
|
});
|
|
148
181
|
Object.defineProperty(exports, "useToolsWithSchema", {
|
|
149
182
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkH5XMKBBA_cjs.useToolsWithSchema; }
|
|
151
184
|
});
|
|
152
185
|
Object.defineProperty(exports, "createLocalStorageAdapter", {
|
|
153
186
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkUOWLKFXK_cjs.createLocalStorageAdapter; }
|
|
155
188
|
});
|
|
156
189
|
Object.defineProperty(exports, "createMemoryAdapter", {
|
|
157
190
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkUOWLKFXK_cjs.createMemoryAdapter; }
|
|
159
192
|
});
|
|
160
193
|
Object.defineProperty(exports, "createServerAdapter", {
|
|
161
194
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkUOWLKFXK_cjs.createServerAdapter; }
|
|
163
196
|
});
|
|
164
197
|
Object.defineProperty(exports, "generateSuggestionReason", {
|
|
165
198
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkUOWLKFXK_cjs.generateSuggestionReason; }
|
|
167
200
|
});
|
|
168
201
|
//# sourceMappingURL=index.cjs.map
|
|
169
202
|
//# sourceMappingURL=index.cjs.map
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
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-
|
|
4
|
-
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
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-LfFRhr4e.cjs';
|
|
4
|
+
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-LfFRhr4e.cjs';
|
|
5
|
+
import { T as ToolDefinition, P as PermissionLevel, c as ToolInputSchema, k as ToolExecution$1, e as ToolContext, b as ToolResponse$1, f as ToolRenderProps, h as ToolSet, U as UnifiedToolCall, q as PermissionStorageConfig, r as PermissionStorageAdapter } from '../tools-DDWrco4h.cjs';
|
|
6
|
+
export { l as AgentLoopConfig, a as ToolExecutionStatus, p as ToolPermission } from '../tools-DDWrco4h.cjs';
|
|
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.cjs';
|
|
8
|
+
export { P as PersistenceConfig, h as ThreadStorageAdapter } from '../types-DG2ya08y.cjs';
|
|
9
|
+
import { U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-DjSfYNKj.cjs';
|
|
10
|
+
export { b as MCPClientState } from '../types-DjSfYNKj.cjs';
|
|
11
|
+
import { U as UseMCPUIIntentsConfig, m as UseMCPUIIntentsReturn } from '../types-B20VCJXL.cjs';
|
|
7
12
|
|
|
8
13
|
/**
|
|
9
14
|
* Server Thread Storage Adapter
|
|
@@ -48,46 +53,6 @@ interface ServerAdapterConfig {
|
|
|
48
53
|
*/
|
|
49
54
|
declare function createServerAdapter(config: ServerAdapterConfig): AsyncThreadStorageAdapter;
|
|
50
55
|
|
|
51
|
-
/**
|
|
52
|
-
* Message Types
|
|
53
|
-
*
|
|
54
|
-
* Pure type definitions for chat messages.
|
|
55
|
-
* No logic, no side effects - just types.
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Chat message roles
|
|
60
|
-
*/
|
|
61
|
-
type MessageRole = "user" | "assistant" | "system" | "tool";
|
|
62
|
-
/**
|
|
63
|
-
* UIMessage - The source of truth for UI state
|
|
64
|
-
*
|
|
65
|
-
* Inspired by Vercel AI SDK's UIMessage pattern.
|
|
66
|
-
* This is what your UI renders and what gets persisted.
|
|
67
|
-
*/
|
|
68
|
-
interface UIMessage {
|
|
69
|
-
/** Unique message ID */
|
|
70
|
-
id: string;
|
|
71
|
-
/** Message role */
|
|
72
|
-
role: MessageRole;
|
|
73
|
-
/** Message content */
|
|
74
|
-
content: string;
|
|
75
|
-
/** Thinking/reasoning content (for extended thinking models) */
|
|
76
|
-
thinking?: string;
|
|
77
|
-
/** Message attachments (images, PDFs, etc) */
|
|
78
|
-
attachments?: MessageAttachment[];
|
|
79
|
-
/** Tool calls made by assistant */
|
|
80
|
-
toolCalls?: ToolCall[];
|
|
81
|
-
/** Tool call ID (for tool result messages) */
|
|
82
|
-
toolCallId?: string;
|
|
83
|
-
/** Sources from knowledge base */
|
|
84
|
-
sources?: Source[];
|
|
85
|
-
/** Creation timestamp */
|
|
86
|
-
createdAt: Date;
|
|
87
|
-
/** Additional metadata */
|
|
88
|
-
metadata?: Record<string, unknown>;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
56
|
/**
|
|
92
57
|
* ChatTransport Interface
|
|
93
58
|
*
|
|
@@ -132,6 +97,32 @@ interface ChatResponse {
|
|
|
132
97
|
/** Whether client needs to execute tools */
|
|
133
98
|
requiresAction?: boolean;
|
|
134
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Tool result from server
|
|
102
|
+
*/
|
|
103
|
+
interface ToolResultData {
|
|
104
|
+
success: boolean;
|
|
105
|
+
data?: unknown;
|
|
106
|
+
error?: string;
|
|
107
|
+
_aiContext?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Citation from web search (unified format for all providers)
|
|
111
|
+
*/
|
|
112
|
+
interface Citation {
|
|
113
|
+
/** Unique citation index (1-based) */
|
|
114
|
+
index: number;
|
|
115
|
+
/** Source URL */
|
|
116
|
+
url: string;
|
|
117
|
+
/** Page title */
|
|
118
|
+
title: string;
|
|
119
|
+
/** Cited text snippet (optional) */
|
|
120
|
+
citedText?: string;
|
|
121
|
+
/** Source domain (extracted from URL) */
|
|
122
|
+
domain?: string;
|
|
123
|
+
/** Favicon URL (generated from domain) */
|
|
124
|
+
favicon?: string;
|
|
125
|
+
}
|
|
135
126
|
/**
|
|
136
127
|
* Stream chunk types
|
|
137
128
|
*/
|
|
@@ -160,6 +151,37 @@ type StreamChunk = {
|
|
|
160
151
|
type: "done";
|
|
161
152
|
messages?: unknown[];
|
|
162
153
|
requiresAction?: boolean;
|
|
154
|
+
} | {
|
|
155
|
+
type: "action:start";
|
|
156
|
+
id: string;
|
|
157
|
+
name: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: "action:args";
|
|
160
|
+
id: string;
|
|
161
|
+
args: string;
|
|
162
|
+
} | {
|
|
163
|
+
type: "action:end";
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
result?: ToolResultData;
|
|
167
|
+
error?: string;
|
|
168
|
+
} | {
|
|
169
|
+
type: "tool:result";
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
result: ToolResultData;
|
|
173
|
+
} | {
|
|
174
|
+
type: "loop:iteration";
|
|
175
|
+
iteration: number;
|
|
176
|
+
maxIterations: number;
|
|
177
|
+
} | {
|
|
178
|
+
type: "loop:complete";
|
|
179
|
+
iterations: number;
|
|
180
|
+
maxIterationsReached?: boolean;
|
|
181
|
+
aborted?: boolean;
|
|
182
|
+
} | {
|
|
183
|
+
type: "citation";
|
|
184
|
+
citations: Citation[];
|
|
163
185
|
};
|
|
164
186
|
/**
|
|
165
187
|
* ChatTransport interface
|
|
@@ -200,6 +222,46 @@ interface ChatTransport {
|
|
|
200
222
|
isStreaming(): boolean;
|
|
201
223
|
}
|
|
202
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Message Types
|
|
227
|
+
*
|
|
228
|
+
* Pure type definitions for chat messages.
|
|
229
|
+
* No logic, no side effects - just types.
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Chat message roles
|
|
234
|
+
*/
|
|
235
|
+
type MessageRole = "user" | "assistant" | "system" | "tool";
|
|
236
|
+
/**
|
|
237
|
+
* UIMessage - The source of truth for UI state
|
|
238
|
+
*
|
|
239
|
+
* Inspired by Vercel AI SDK's UIMessage pattern.
|
|
240
|
+
* This is what your UI renders and what gets persisted.
|
|
241
|
+
*/
|
|
242
|
+
interface UIMessage {
|
|
243
|
+
/** Unique message ID */
|
|
244
|
+
id: string;
|
|
245
|
+
/** Message role */
|
|
246
|
+
role: MessageRole;
|
|
247
|
+
/** Message content */
|
|
248
|
+
content: string;
|
|
249
|
+
/** Thinking/reasoning content (for extended thinking models) */
|
|
250
|
+
thinking?: string;
|
|
251
|
+
/** Message attachments (images, PDFs, etc) */
|
|
252
|
+
attachments?: MessageAttachment[];
|
|
253
|
+
/** Tool calls made by assistant */
|
|
254
|
+
toolCalls?: ToolCall[];
|
|
255
|
+
/** Tool call ID (for tool result messages) */
|
|
256
|
+
toolCallId?: string;
|
|
257
|
+
/** Sources from knowledge base */
|
|
258
|
+
sources?: Source[];
|
|
259
|
+
/** Creation timestamp */
|
|
260
|
+
createdAt: Date;
|
|
261
|
+
/** Additional metadata */
|
|
262
|
+
metadata?: Record<string, unknown>;
|
|
263
|
+
}
|
|
264
|
+
|
|
203
265
|
/**
|
|
204
266
|
* ChatState Interface
|
|
205
267
|
*
|
|
@@ -2051,6 +2113,169 @@ interface UseThreadManagerReturn {
|
|
|
2051
2113
|
*/
|
|
2052
2114
|
declare function useThreadManager(config?: UseThreadManagerConfig): UseThreadManagerReturn;
|
|
2053
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* React hook for managing an MCP client connection
|
|
2118
|
+
*
|
|
2119
|
+
* This hook provides a managed MCP client that handles connection lifecycle,
|
|
2120
|
+
* tool discovery, and state management automatically.
|
|
2121
|
+
*
|
|
2122
|
+
* @example
|
|
2123
|
+
* ```tsx
|
|
2124
|
+
* function MyComponent() {
|
|
2125
|
+
* const {
|
|
2126
|
+
* state,
|
|
2127
|
+
* connect,
|
|
2128
|
+
* disconnect,
|
|
2129
|
+
* callTool,
|
|
2130
|
+
* isConnected,
|
|
2131
|
+
* isLoading,
|
|
2132
|
+
* } = useMCPClient({
|
|
2133
|
+
* name: "github",
|
|
2134
|
+
* transport: "http",
|
|
2135
|
+
* url: "https://mcp.github.com",
|
|
2136
|
+
* headers: { Authorization: `Bearer ${token}` },
|
|
2137
|
+
* autoConnect: true,
|
|
2138
|
+
* });
|
|
2139
|
+
*
|
|
2140
|
+
* if (isLoading) return <div>Connecting...</div>;
|
|
2141
|
+
* if (!isConnected) return <button onClick={connect}>Connect</button>;
|
|
2142
|
+
*
|
|
2143
|
+
* return (
|
|
2144
|
+
* <div>
|
|
2145
|
+
* <p>Connected to {state.serverInfo?.name}</p>
|
|
2146
|
+
* <p>{state.tools.length} tools available</p>
|
|
2147
|
+
* </div>
|
|
2148
|
+
* );
|
|
2149
|
+
* }
|
|
2150
|
+
* ```
|
|
2151
|
+
*/
|
|
2152
|
+
declare function useMCPClient(config: UseMCPClientConfig): UseMCPClientReturn;
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* React hook for connecting to an MCP server and auto-registering its tools
|
|
2156
|
+
*
|
|
2157
|
+
* This hook combines the MCP client management with automatic tool registration
|
|
2158
|
+
* to the CopilotProvider. When connected, all MCP tools become available to
|
|
2159
|
+
* the AI assistant automatically.
|
|
2160
|
+
*
|
|
2161
|
+
* @example
|
|
2162
|
+
* ```tsx
|
|
2163
|
+
* function CopilotWithGitHub() {
|
|
2164
|
+
* const {
|
|
2165
|
+
* state,
|
|
2166
|
+
* isConnected,
|
|
2167
|
+
* isLoading,
|
|
2168
|
+
* toolDefinitions,
|
|
2169
|
+
* } = useMCPTools({
|
|
2170
|
+
* name: "github",
|
|
2171
|
+
* transport: "http",
|
|
2172
|
+
* url: "https://mcp.github.com",
|
|
2173
|
+
* headers: { Authorization: `Bearer ${token}` },
|
|
2174
|
+
* autoConnect: true,
|
|
2175
|
+
* prefixToolNames: true, // Tools named: github_create_issue, etc.
|
|
2176
|
+
* onElicitationRequest: async (request) => {
|
|
2177
|
+
* // Show custom approval UI
|
|
2178
|
+
* const approved = await showApprovalDialog(request);
|
|
2179
|
+
* return { requestId: request.requestId, accepted: approved };
|
|
2180
|
+
* },
|
|
2181
|
+
* });
|
|
2182
|
+
*
|
|
2183
|
+
* return (
|
|
2184
|
+
* <div>
|
|
2185
|
+
* {isLoading && <div>Connecting to GitHub MCP...</div>}
|
|
2186
|
+
* {isConnected && (
|
|
2187
|
+
* <div>{toolDefinitions.length} GitHub tools available</div>
|
|
2188
|
+
* )}
|
|
2189
|
+
* <CopilotChat />
|
|
2190
|
+
* </div>
|
|
2191
|
+
* );
|
|
2192
|
+
* }
|
|
2193
|
+
* ```
|
|
2194
|
+
*/
|
|
2195
|
+
declare function useMCPTools(config: UseMCPToolsConfig): UseMCPToolsReturn;
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* useMCPUIIntents - Hook for handling MCP-UI intents
|
|
2199
|
+
*
|
|
2200
|
+
* This hook provides a unified handler for all MCP-UI intent types.
|
|
2201
|
+
* Use it to handle user interactions from MCP-UI components rendered
|
|
2202
|
+
* in the chat interface.
|
|
2203
|
+
*
|
|
2204
|
+
* @example
|
|
2205
|
+
* ```tsx
|
|
2206
|
+
* function ChatWithMCPUI() {
|
|
2207
|
+
* const { sendMessage, callTool } = useCopilotChat();
|
|
2208
|
+
*
|
|
2209
|
+
* const { handleIntent } = useMCPUIIntents({
|
|
2210
|
+
* // Handle tool calls from UI
|
|
2211
|
+
* onToolCall: async (name, args) => {
|
|
2212
|
+
* await callTool(name, args);
|
|
2213
|
+
* },
|
|
2214
|
+
* // Handle semantic actions
|
|
2215
|
+
* onIntent: (action, data) => {
|
|
2216
|
+
* if (action === "add_to_cart") {
|
|
2217
|
+
* // Dispatch to state management or send to agent
|
|
2218
|
+
* sendMessage(`Add ${data?.productId} to cart`);
|
|
2219
|
+
* }
|
|
2220
|
+
* },
|
|
2221
|
+
* // Pre-fill chat input
|
|
2222
|
+
* onPrompt: (text) => {
|
|
2223
|
+
* setInputValue(text);
|
|
2224
|
+
* },
|
|
2225
|
+
* // Show toast notifications
|
|
2226
|
+
* onNotify: (message, level) => {
|
|
2227
|
+
* toast({ message, type: level });
|
|
2228
|
+
* },
|
|
2229
|
+
* // Handle link clicks
|
|
2230
|
+
* onLink: (url, newTab) => {
|
|
2231
|
+
* // Return false to prevent default behavior
|
|
2232
|
+
* if (url.startsWith('internal://')) {
|
|
2233
|
+
* navigate(url.replace('internal://', '/'));
|
|
2234
|
+
* return false;
|
|
2235
|
+
* }
|
|
2236
|
+
* },
|
|
2237
|
+
* });
|
|
2238
|
+
*
|
|
2239
|
+
* return (
|
|
2240
|
+
* <CopilotChat
|
|
2241
|
+
* onUIIntent={handleIntent}
|
|
2242
|
+
* />
|
|
2243
|
+
* );
|
|
2244
|
+
* }
|
|
2245
|
+
* ```
|
|
2246
|
+
*/
|
|
2247
|
+
declare function useMCPUIIntents(config?: UseMCPUIIntentsConfig): UseMCPUIIntentsReturn;
|
|
2248
|
+
/**
|
|
2249
|
+
* Create a simple intent handler that sends intents as messages
|
|
2250
|
+
*
|
|
2251
|
+
* This is a convenience function for when you want all intents
|
|
2252
|
+
* to be converted to natural language messages sent to the agent.
|
|
2253
|
+
*
|
|
2254
|
+
* @example
|
|
2255
|
+
* ```tsx
|
|
2256
|
+
* const { sendMessage } = useCopilotChat();
|
|
2257
|
+
* const { handleIntent } = useMCPUIIntents(
|
|
2258
|
+
* createMessageIntentHandler(sendMessage)
|
|
2259
|
+
* );
|
|
2260
|
+
* ```
|
|
2261
|
+
*/
|
|
2262
|
+
declare function createMessageIntentHandler(sendMessage: (message: string) => void | Promise<void>): UseMCPUIIntentsConfig;
|
|
2263
|
+
/**
|
|
2264
|
+
* Create an intent handler that integrates with a tool executor
|
|
2265
|
+
*
|
|
2266
|
+
* This connects MCP-UI tool intents directly to useMCPTools
|
|
2267
|
+
* for seamless tool chaining.
|
|
2268
|
+
*
|
|
2269
|
+
* @example
|
|
2270
|
+
* ```tsx
|
|
2271
|
+
* const { callTool } = useMCPTools({ ... });
|
|
2272
|
+
* const { handleIntent } = useMCPUIIntents(
|
|
2273
|
+
* createToolIntentHandler(callTool)
|
|
2274
|
+
* );
|
|
2275
|
+
* ```
|
|
2276
|
+
*/
|
|
2277
|
+
declare function createToolIntentHandler(callTool: (name: string, args?: Record<string, unknown>) => Promise<unknown>): UseMCPUIIntentsConfig;
|
|
2278
|
+
|
|
2054
2279
|
/**
|
|
2055
2280
|
* Create a permission storage adapter based on config
|
|
2056
2281
|
*/
|
|
@@ -2294,4 +2519,4 @@ interface UseChatReturn {
|
|
|
2294
2519
|
*/
|
|
2295
2520
|
declare function useChat(config: UseChatConfig): UseChatReturn;
|
|
2296
2521
|
|
|
2297
|
-
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, Message, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, type ServerAdapterConfig, Source, type Suggestion, Thread, ThreadData, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolType, type ToolsActions, ToolsConfig, type ToolsState, type UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
|
2522
|
+
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, Message, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, type ServerAdapterConfig, Source, type Suggestion, Thread, ThreadData, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolType, type ToolsActions, ToolsConfig, type ToolsState, type UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, 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 };
|