@solazah/solazah-runtime 0.1.19 → 0.1.21

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.19",
3
+ "version": "0.1.21",
4
4
  "main": "index.cjs",
5
5
  "module": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -136,4 +136,25 @@ export default class CopilotSubAgent {
136
136
  * (通常是顶层的任务管理器),需要分发给多个组件时自行在这层之上做扇出。
137
137
  */
138
138
  onTaskFinished: (onFinished: (msg: CopilotAsyncTaskFinishedMessage) => void) => (() => void);
139
+ /**
140
+ * 订阅「该会话已空闲、有后台通知待投递」。
141
+ *
142
+ * 主进程只在确认该会话没有回合在跑时才发这个信号,收到即可直接起新一轮 ——
143
+ * 不需要自己轮询 streaming/loading 判断忙闲。回合进行中完成的任务不会走这条,
144
+ * 它们由主进程的中间件直接注入正在跑的那一轮。
145
+ *
146
+ * @param onPending 回调,参数为 `{ threadId }`
147
+ * @returns 退订函数
148
+ */
149
+ onBackgroundNoticePending: (onPending: (msg: {
150
+ threadId: string;
151
+ }) => void) => (() => void);
152
+ /**
153
+ * 取走某会话待投递的后台通知文案(取走即清空)。
154
+ * 与主进程「轮中注入」共用同一个队列,同一条通知只会被其中一方领到。
155
+ *
156
+ * @param threadId 会话 ID
157
+ * @returns 待投递文案数组;没有则空数组
158
+ */
159
+ takeBackgroundNotices: (threadId: string) => Promise<string[]>;
139
160
  }