@opentiny/next-remoter 0.4.0 → 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.
@@ -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
- agentRoot: {
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;
@@ -277,15 +277,24 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
277
277
  selectedModelId: import('vue').PropType<any>;
278
278
  genUiAble: import('vue').PropType<any>;
279
279
  enabledTools: import('vue').PropType<any>;
280
+ /** 后端的代理服务器地址 */
281
+ agentRoot: {
282
+ type: StringConstructor;
283
+ default: string;
284
+ };
280
285
  /** 会话 id,可选;未传时仅显示「打开对话框」,不展示扫码等菜单 */
281
286
  sessionId: {
282
287
  type: StringConstructor;
283
288
  default: undefined;
284
289
  };
285
- /** 后端的代理服务器地址 */
286
- agentRoot: {
290
+ menuItems: {
291
+ type: () => MenuItemConfig[];
292
+ };
293
+ remoteUrl: {
294
+ type: StringConstructor;
295
+ };
296
+ qrCodeUrl: {
287
297
  type: StringConstructor;
288
- default: string;
289
298
  };
290
299
  /** 系统提示词 */
291
300
  systemPrompt: {
@@ -302,15 +311,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
302
311
  type: StringConstructor;
303
312
  default: string;
304
313
  };
305
- remoteUrl: {
306
- type: StringConstructor;
307
- };
308
- menuItems: {
309
- type: () => MenuItemConfig[];
310
- };
311
- qrCodeUrl: {
312
- type: StringConstructor;
313
- };
314
314
  /** 悬浮AI图标的地址 */
315
315
  AILogoUrl: {
316
316
  type: StringConstructor;
@@ -1,17 +1,17 @@
1
1
  import { AgentModelProvider } from '@opentiny/next-sdk';
2
2
 
3
3
  /**
4
- * 检测当前浏览器是否支持内置 WebMCP(`navigator.modelContextTesting`)。
4
+ * 检测当前浏览器是否支持内置 WebMCP(`document.modelContext`)。
5
5
  */
6
6
  export declare function isBuiltinMcpSupported(): boolean;
7
7
  /**
8
- * 将浏览器内置 WebMCP(`navigator.modelContextTesting`)作为一个 MCP Server
8
+ * 将浏览器内置 WebMCP(`document.modelContext`)作为一个 MCP Server
9
9
  * 注入到 AgentModelProvider,使 AI 可以调用浏览器原生工具。
10
10
  *
11
11
  * 特点:
12
- * - 类型为 `{ type: 'builtin', client: navigator.modelContextTesting }`
13
- * - 工具列表通过 `modelContextTesting.listTools()` / `getTools()` 获取
14
- * - 工具执行通过 `modelContextTesting.executeTool(name, input)` 代理
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'
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, useNextAgent };
6
+ export { TinyRemoter };