@solazah/solazah-runtime 0.2.53 → 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/Copilot.d.ts +9 -3
- package/types/Plugin.d.ts +8 -0
package/package.json
CHANGED
package/types/Copilot.d.ts
CHANGED
|
@@ -70,10 +70,16 @@ export type CopilotInputImage = {
|
|
|
70
70
|
path: string;
|
|
71
71
|
mime?: string;
|
|
72
72
|
};
|
|
73
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* 待投递给主 agent 的一条内容:
|
|
75
|
+
* notice = 后台任务完成通知,interject = 用户在生成途中插的话,
|
|
76
|
+
* agent = 本对话的参与者(子代理)发来的消息。
|
|
77
|
+
*
|
|
78
|
+
* 真源在本文件,插件侧的镜像在 `../solazah-plugin-copilot` 的 runtime 契约里,两边要一致。
|
|
79
|
+
*/
|
|
74
80
|
export interface CopilotPendingInjection {
|
|
75
|
-
kind: "notice" | "interject";
|
|
76
|
-
/** 通知的执行端 subAgentType
|
|
81
|
+
kind: "notice" | "interject" | "agent";
|
|
82
|
+
/** 通知的执行端 subAgentType;插话不带;参与者消息带发送方名字。 */
|
|
77
83
|
source?: string;
|
|
78
84
|
/** 注入时用作消息 id(落库切片按 id 去重),同时是撤回的凭据。 */
|
|
79
85
|
id: string;
|
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 工具。
|