@solazah/solazah-runtime 0.1.140 → 0.1.144

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solazah/solazah-runtime",
3
- "version": "0.1.140",
3
+ "version": "0.1.144",
4
4
  "main": "index.cjs",
5
5
  "module": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -124,6 +124,29 @@ export default class Copilot {
124
124
  * @returns 无返回;requestId 无对应在跑运行时静默无操作。
125
125
  */
126
126
  abort: (requestId: string) => Promise<any>;
127
+ /**
128
+ * 生成途中插一句话:排进待注入队列,模型下一个决策点领走,不中止当前回合。
129
+ *
130
+ * @param threadId 会话 ID
131
+ * @param id 消息 id,由渲染层生成;撤回与去重都按它
132
+ * @param text 插话正文
133
+ */
134
+ interjectPush: (threadId: string, id: string, text: string) => Promise<any>;
135
+ /**
136
+ * 撤回一条还没被领走的插话。
137
+ *
138
+ * @returns 撤下来了返回 true;已经被模型读过则 false
139
+ */
140
+ interjectRevoke: (threadId: string, id: string) => Promise<boolean>;
141
+ /**
142
+ * 订阅「插话已被模型领走」。渲染层据此把气泡从未读改成已读。
143
+ *
144
+ * @returns 退订函数
145
+ */
146
+ onInterjectTaken: (onTaken: (msg: {
147
+ threadId: string;
148
+ ids: string[];
149
+ }) => void) => (() => void);
127
150
  resume: (response: any, options: CopilotRunOptions) => Promise<AsyncIterableIterator<any>>;
128
151
  private invokeStream;
129
152
  }
@@ -146,15 +146,15 @@ export default class CopilotSubAgent {
146
146
  * @param onPending 回调,参数为 `{ threadId }`
147
147
  * @returns 退订函数
148
148
  */
149
- onBackgroundNoticePending: (onPending: (msg: {
149
+ onPendingInjection: (onPending: (msg: {
150
150
  threadId: string;
151
151
  }) => void) => (() => void);
152
152
  /**
153
- * 取走某会话待投递的后台通知文案(取走即清空)。
153
+ * 取走某会话待注入的文案(取走即清空):后台通知与用户插话共用同一个队列。
154
154
  * 与主进程「轮中注入」共用同一个队列,同一条通知只会被其中一方领到。
155
155
  *
156
156
  * @param threadId 会话 ID
157
157
  * @returns 待投递文案数组;没有则空数组
158
158
  */
159
- takeBackgroundNotices: (threadId: string) => Promise<string[]>;
159
+ takePendingInjections: (threadId: string) => Promise<string[]>;
160
160
  }
@@ -82,9 +82,13 @@ export default class SystemScreen {
82
82
  * 截图尺寸按物理像素(display.size × scaleFactor),保证 retina/高分屏清晰度。
83
83
  *
84
84
  * @param displayId 目标显示器 id;省略则截取光标当前所在的显示器。
85
+ * @param options excludeSelf 为真时截那一刻把 Solazah 自己的全部窗口排除出画面:采集目标应用的画面时用,
86
+ * 免得助理窗口、插件窗口盖在上面。
85
87
  * @returns 截图的 PNG Data URL;未找到显示器或截图源时返回 null。
86
88
  */
87
- captureDisplay: (displayId?: number) => Promise<any>;
89
+ captureDisplay: (displayId?: number, options?: {
90
+ excludeSelf?: boolean;
91
+ }) => Promise<any>;
88
92
  /**
89
93
  * 列出当前所有显示器信息,包含 id、逻辑像素边界、缩放因子、是否主屏。
90
94
  *
@@ -204,6 +208,7 @@ export default class SystemScreen {
204
208
  *
205
209
  * @param frame 被分析图片的 Base64(整个显示器的截图)。
206
210
  * @param request `{templates?: [{id, image, region?, scale?, minScore?, maxResults?}], texts?: [{id, region?, detRatio?, zoom?}]}`,region 相对图片左上角。
211
+ * frame 与 templates[].image 都可以给 Data URL 或本机绝对路径;反复分析同一批图时给路径,同一张只解码一次。
207
212
  * @returns `{templates: {id: [{x, y, width, height, score, scale}]}, texts: {id: [{text, score, x, y, width, height}]}}`,坐标相对图片左上角。
208
213
  */
209
214
  analyzeFrame: (frame: string, request?: {