@saltpub/agent-bridge 0.1.1 → 0.1.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# agent-bridge
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Highlights
|
|
6
|
+
|
|
7
|
+
- 所有 Profile 空闲后,更新会同时切换有变动的 launcher。从 0.1.2 升级时自动迁移已有后台服务。修复控制台端口冲突导致页面无法打开,以及小九 webhook 默认无法从局域网访问的问题。
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- feat(update): 空闲时自动升级 launcher 并迁移旧服务
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- fix(web): 修复端口冲突导致控制台无法打开
|
|
16
|
+
- fix(host): 修复小九 webhook 默认无法从局域网访问
|
|
17
|
+
|
|
18
|
+
## 0.1.2
|
|
19
|
+
|
|
20
|
+
### Highlights
|
|
21
|
+
|
|
22
|
+
- 收敛隐性状态机:Profile 状态跨进程统一词表与解析;投递会话、原生准入席位、插件实例增加显式迁移守卫;飞书 CoT 文本改为三态枚举;Setup 阶段统一为单一词表;run/input/control 完成判定改为显式谓词;Turn 终态收敛为一个投影函数。
|
|
23
|
+
- 加固进程管理:`unregister` 不再被失联监听器阻塞,停止所有在线 profile(含手动启动)后删注册并核对 kill 结果,必要时补杀 listener;清理遗留 `service-requests`/`service-results`/`stopped`/`required`/`restore`;`ps`/`status` 在控制 API 无响应时回退注册表显示 `unreachable`;`start` 在 listener 关闭窗口内重试;自动更新遇到外部监听器时延后切换;旧端口号 launcher 也纳入清理。
|
|
24
|
+
- 恢复 `registry/processes.json` 进程索引:监听器登记 supervisor / listener / 在线 profile(含 launcher pid、port、uid、version),下线时删除;`ps` 在控制 API 不可用时回退到索引,`unregister` 用索引与 boot 记录清理 launcher 进程树。单实例仍由 seat/host 锁保证,索引仅作发现与清理。
|
|
25
|
+
- 修复 `agent-bridge unregister` 删除服务注册后仍残留 launcher 进程树的问题:只在 cohort seat 仍被持有时(证明该 supervisor 正在运行)按 boot 记录中的 pid 终止整棵进程树,避免 PID 复用时误杀;`stop` 仍按文档只停 profile、保留服务注册。
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- feat(cli): profile 输出统一增加 name 和 app_id
|
|
30
|
+
- feat(runtime): 恢复 home 级进程注册表
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- refactor(state): 收敛隐性状态机为显式迁移
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- fix(cli): 加固进程管理与 unregister 清理
|
|
39
|
+
- fix(cli): unregister 清理 launcher 进程树
|
|
40
|
+
|
|
3
41
|
## 0.1.1
|
|
4
42
|
|
|
5
43
|
### Highlights
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"pin": {
|
|
43
43
|
"package": "@saltpub/channel-feishu",
|
|
44
44
|
"version": "3.0.0",
|
|
45
|
-
"integrity": "sha256-tree-v1:
|
|
45
|
+
"integrity": "sha256-tree-v1:661d9432039677c516ae9e4497af436e80865b03596ca47f1db2978698c50192",
|
|
46
46
|
"path": "node_modules/@saltpub/channel-feishu"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -1366,8 +1366,7 @@ var SnapshotCot = class {
|
|
|
1366
1366
|
const current = this.currentText;
|
|
1367
1367
|
if (!current) return;
|
|
1368
1368
|
emit("TEXT_MESSAGE_END", { messageId: current.messageId });
|
|
1369
|
-
current.
|
|
1370
|
-
current.closed = true;
|
|
1369
|
+
current.phase = "closed";
|
|
1371
1370
|
this.currentText = void 0;
|
|
1372
1371
|
};
|
|
1373
1372
|
const reasoningDelta = snapshot.reasoning.content.startsWith(this.reasoningSent) ? snapshot.reasoning.content.slice(this.reasoningSent.length) : "";
|
|
@@ -1385,27 +1384,26 @@ var SnapshotCot = class {
|
|
|
1385
1384
|
for (const part of snapshot.parts) {
|
|
1386
1385
|
if (part.kind === "text") {
|
|
1387
1386
|
const previous2 = this.texts.get(part.id);
|
|
1388
|
-
const state2 = previous2 ?? { messageId: `text-${this.delivery}-${++this.textIndex}`, sent: "",
|
|
1387
|
+
const state2 = previous2 ?? { messageId: `text-${this.delivery}-${++this.textIndex}`, sent: "", phase: "new" };
|
|
1389
1388
|
const delta = part.text.startsWith(state2.sent) ? part.text.slice(state2.sent.length) : "";
|
|
1390
|
-
if (!
|
|
1389
|
+
if (!previous2 || delta || part.streaming && state2.phase === "new") {
|
|
1391
1390
|
closeReasoning();
|
|
1392
1391
|
if (!this.textStepOpen) {
|
|
1393
1392
|
this.textStepOpen = true;
|
|
1394
1393
|
emit("STEP_STARTED", { stepId: this.finalStepId, stepName: "\u8F93\u51FA\u8FC7\u7A0B" });
|
|
1395
1394
|
}
|
|
1396
|
-
if (
|
|
1395
|
+
if (state2.phase !== "closed") {
|
|
1397
1396
|
if (this.currentText !== state2) closeText();
|
|
1398
|
-
if (
|
|
1399
|
-
state2.
|
|
1397
|
+
if (state2.phase !== "open") {
|
|
1398
|
+
state2.phase = "open";
|
|
1400
1399
|
this.currentText = state2;
|
|
1401
1400
|
emit("TEXT_MESSAGE_START", { messageId: state2.messageId, role: "assistant" });
|
|
1402
1401
|
}
|
|
1403
1402
|
if (delta) emit("TEXT_MESSAGE_CONTENT", { messageId: state2.messageId, delta: truncate(delta, COT_TEXT_MAX) });
|
|
1404
1403
|
}
|
|
1405
1404
|
}
|
|
1406
|
-
if (!part.streaming && state2.open) closeText();
|
|
1405
|
+
if (!part.streaming && state2.phase === "open") closeText();
|
|
1407
1406
|
state2.sent = part.text;
|
|
1408
|
-
state2.seen = true;
|
|
1409
1407
|
this.texts.set(part.id, state2);
|
|
1410
1408
|
continue;
|
|
1411
1409
|
}
|