@opentiny/next-remoter 0.3.3 → 0.4.1
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 +1 -1
- package/dist/components/TinyRobotChat.vue.d.ts +29 -24
- package/dist/composable/useBuiltinMcpServer.d.ts +5 -5
- package/dist/composable/usePluginSession.d.ts +1 -1
- package/dist/composable/useSkill.d.ts +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/next-remoter-runtime.es.js +158032 -178533
- package/dist/next-remoter.cjs.js +53 -48
- package/dist/next-remoter.css +1 -1
- package/dist/next-remoter.es.js +10661 -10017
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/composable/useNextAgent.d.ts +0 -54
package/README.md
CHANGED
|
@@ -23,15 +23,24 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
23
23
|
selectedModelId: import('vue').PropType<any>;
|
|
24
24
|
genUiAble: import('vue').PropType<any>;
|
|
25
25
|
enabledTools: import('vue').PropType<any>;
|
|
26
|
+
/** 后端的代理服务器地址 */
|
|
27
|
+
agentRoot: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
26
31
|
/** 会话 id,可选;未传时仅显示「打开对话框」,不展示扫码等菜单 */
|
|
27
32
|
sessionId: {
|
|
28
33
|
type: StringConstructor;
|
|
29
34
|
default: undefined;
|
|
30
35
|
};
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
menuItems: {
|
|
37
|
+
type: () => MenuItemConfig[];
|
|
38
|
+
};
|
|
39
|
+
remoteUrl: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
qrCodeUrl: {
|
|
33
43
|
type: StringConstructor;
|
|
34
|
-
default: string;
|
|
35
44
|
};
|
|
36
45
|
/** 系统提示词 */
|
|
37
46
|
systemPrompt: {
|
|
@@ -48,15 +57,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
48
57
|
type: StringConstructor;
|
|
49
58
|
default: string;
|
|
50
59
|
};
|
|
51
|
-
remoteUrl: {
|
|
52
|
-
type: StringConstructor;
|
|
53
|
-
};
|
|
54
|
-
menuItems: {
|
|
55
|
-
type: () => MenuItemConfig[];
|
|
56
|
-
};
|
|
57
|
-
qrCodeUrl: {
|
|
58
|
-
type: StringConstructor;
|
|
59
|
-
};
|
|
60
60
|
/** 悬浮AI图标的地址 */
|
|
61
61
|
AILogoUrl: {
|
|
62
62
|
type: StringConstructor;
|
|
@@ -259,6 +259,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
259
259
|
deletePlugin: (plugin: PluginInfo) => Promise<void>;
|
|
260
260
|
/** 注册内容渲染器 */
|
|
261
261
|
registerContentRenderer: typeof registerContentRenderer;
|
|
262
|
+
/**
|
|
263
|
+
* 刷新已安装插件的工具列表(从 agent.mcpTools 同步到 UI)
|
|
264
|
+
* 适用于 builtin client 工具变化后的快速刷新,避免 remove + reload 导致的 UI 闪烁
|
|
265
|
+
*/
|
|
266
|
+
refreshPluginTools(): Promise<void>;
|
|
262
267
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
263
268
|
"before-ai-render": (currMessage: {
|
|
264
269
|
role: string;
|
|
@@ -272,15 +277,24 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
272
277
|
selectedModelId: import('vue').PropType<any>;
|
|
273
278
|
genUiAble: import('vue').PropType<any>;
|
|
274
279
|
enabledTools: import('vue').PropType<any>;
|
|
280
|
+
/** 后端的代理服务器地址 */
|
|
281
|
+
agentRoot: {
|
|
282
|
+
type: StringConstructor;
|
|
283
|
+
default: string;
|
|
284
|
+
};
|
|
275
285
|
/** 会话 id,可选;未传时仅显示「打开对话框」,不展示扫码等菜单 */
|
|
276
286
|
sessionId: {
|
|
277
287
|
type: StringConstructor;
|
|
278
288
|
default: undefined;
|
|
279
289
|
};
|
|
280
|
-
|
|
281
|
-
|
|
290
|
+
menuItems: {
|
|
291
|
+
type: () => MenuItemConfig[];
|
|
292
|
+
};
|
|
293
|
+
remoteUrl: {
|
|
294
|
+
type: StringConstructor;
|
|
295
|
+
};
|
|
296
|
+
qrCodeUrl: {
|
|
282
297
|
type: StringConstructor;
|
|
283
|
-
default: string;
|
|
284
298
|
};
|
|
285
299
|
/** 系统提示词 */
|
|
286
300
|
systemPrompt: {
|
|
@@ -297,15 +311,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
297
311
|
type: StringConstructor;
|
|
298
312
|
default: string;
|
|
299
313
|
};
|
|
300
|
-
remoteUrl: {
|
|
301
|
-
type: StringConstructor;
|
|
302
|
-
};
|
|
303
|
-
menuItems: {
|
|
304
|
-
type: () => MenuItemConfig[];
|
|
305
|
-
};
|
|
306
|
-
qrCodeUrl: {
|
|
307
|
-
type: StringConstructor;
|
|
308
|
-
};
|
|
309
314
|
/** 悬浮AI图标的地址 */
|
|
310
315
|
AILogoUrl: {
|
|
311
316
|
type: StringConstructor;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { AgentModelProvider } from '@opentiny/next-sdk';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* 检测当前浏览器是否支持内置 WebMCP(`
|
|
4
|
+
* 检测当前浏览器是否支持内置 WebMCP(`document.modelContext`)。
|
|
5
5
|
*/
|
|
6
6
|
export declare function isBuiltinMcpSupported(): boolean;
|
|
7
7
|
/**
|
|
8
|
-
* 将浏览器内置 WebMCP(`
|
|
8
|
+
* 将浏览器内置 WebMCP(`document.modelContext`)作为一个 MCP Server
|
|
9
9
|
* 注入到 AgentModelProvider,使 AI 可以调用浏览器原生工具。
|
|
10
10
|
*
|
|
11
11
|
* 特点:
|
|
12
|
-
* - 类型为 `{ type: 'builtin', client:
|
|
13
|
-
* - 工具列表通过 `
|
|
14
|
-
* - 工具执行通过 `
|
|
12
|
+
* - 类型为 `{ type: 'builtin', client: document.modelContext }`
|
|
13
|
+
* - 工具列表通过 `await document.modelContext.getTools()` 获取
|
|
14
|
+
* - 工具执行通过 `document.modelContext.executeTool(toolObj, input)` 代理
|
|
15
15
|
*
|
|
16
16
|
* @param agent - AgentModelProvider 实例
|
|
17
17
|
* @param serverName - MCP server 名称,默认 'mcp-server-builtin-webmcp'
|
|
@@ -18,5 +18,5 @@ export declare function useSkillWithTools(options: UseSkillWithToolsOptions): {
|
|
|
18
18
|
}>;
|
|
19
19
|
skillPromptPart: import('vue').ComputedRef<string>;
|
|
20
20
|
skillTools: import('vue').ComputedRef<import('@opentiny/next-sdk').SkillToolsSet>;
|
|
21
|
-
skillOverviews: import('vue').
|
|
21
|
+
skillOverviews: import('vue').ShallowRef<SkillMeta[], SkillMeta[]>;
|
|
22
22
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as TinyRemoter } from './components/TinyRobotChat.vue';
|
|
2
|
-
import { useNextAgent } from './composable/useNextAgent';
|
|
3
2
|
|
|
4
3
|
export * from './types/type';
|
|
5
4
|
export * from './types/model-config';
|
|
6
5
|
export { default as useModel } from './composable/useModel';
|
|
7
|
-
export { TinyRemoter
|
|
6
|
+
export { TinyRemoter };
|