@solazah/solazah-runtime 0.2.54 → 0.2.57
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/package.json +1 -1
- package/types/Plugin.d.ts +8 -0
package/package.json
CHANGED
package/types/Plugin.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface PluginTool {
|
|
|
19
19
|
description: string;
|
|
20
20
|
schema: object | null;
|
|
21
21
|
timeoutMs?: number;
|
|
22
|
+
resident?: boolean;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* 宿主自身的信息,随 `plugin.info()` 一起给到插件。
|
|
@@ -33,6 +34,12 @@ export interface PluginHostInfo {
|
|
|
33
34
|
export interface PluginToolOptions {
|
|
34
35
|
/** 宿主等待回执的上限(毫秒),给执行耗时长的工具(如跑一段脚本)用 */
|
|
35
36
|
timeoutMs?: number;
|
|
37
|
+
/**
|
|
38
|
+
* 声明这个工具常驻:每轮都在模型的工具表里,不必经 tool_search 取用。
|
|
39
|
+
* 常驻工具进的是缓存前缀最前面的工具块,所以只给模型必须主动用、等用户提起就晚了的工具,
|
|
40
|
+
* 且在插件里**固定不变**(按需增删会让整段历史前缀失配)。
|
|
41
|
+
*/
|
|
42
|
+
resident?: boolean;
|
|
36
43
|
}
|
|
37
44
|
export default class Plugin {
|
|
38
45
|
private ipcRenderer;
|
|
@@ -45,6 +52,7 @@ export default class Plugin {
|
|
|
45
52
|
description: string;
|
|
46
53
|
schema: object | null;
|
|
47
54
|
timeoutMs: number | undefined;
|
|
55
|
+
resident: boolean | undefined;
|
|
48
56
|
}[];
|
|
49
57
|
/**
|
|
50
58
|
* 给 Otta 注册 AI 工具。
|