flower-trellis 0.6.13-beta.8 → 0.6.13-beta.9

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "syncedAt": "2026-11-10T07:32:50.766Z",
2
+ "syncedAt": "2026-11-10T15:16:44.709Z",
3
3
  "syncedFrom": "vendor/skill-garden",
4
4
  "sourceCommit": "ada1fe170443e2ffc4c0baeb1d74928628c13141",
5
5
  "common": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flower-trellis",
3
- "version": "0.6.13-beta.8",
3
+ "version": "0.6.13-beta.9",
4
4
  "description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -73,9 +73,9 @@
73
73
  "commit-and-tag-version": "^12.7.3"
74
74
  },
75
75
  "flowerReleaseNotes": {
76
- "version": "0.6.13-beta.8",
76
+ "version": "0.6.13-beta.9",
77
77
  "source": "CHANGELOG.md",
78
- "body": "### ✨ 新功能 Features\n\n* **confirmation:** 将确认运行时迁移为项目内 Python ([016cde7](https://github.com/SilentFlower/flower-trellis/commit/016cde775f1a8dec3a1a01634802915369e9c19e))\n\n\n### 🐛 修复 Bug Fixes\n\n* **confirmation:** 修复 Windows 文件共享占用竞争 ([8e24d13](https://github.com/SilentFlower/flower-trellis/commit/8e24d131abc7724413ce4bac26137e18447fed33))",
78
+ "body": "### 🐛 修复 Bug Fixes\n\n* **confirmation:** 空轮询跳过状态写锁 ([3c6291d](https://github.com/SilentFlower/flower-trellis/commit/3c6291d45d4a2a4bb2e22af0b9bdb97fe277f4d9))",
79
79
  "truncated": false
80
80
  },
81
81
  "optionalDependencies": {
@@ -81,11 +81,19 @@ def _normalize_display(text):
81
81
  return "\n".join(lines)
82
82
 
83
83
 
84
- def _observe(store, request_id, snapshot):
84
+ def _observe(store, request_id, snapshot, *, observed=None):
85
85
  identifiers = snapshot.get("humanEvents", []) + [snapshot.get("humanId")]
86
+
87
+ def is_new(identifier, request, state):
88
+ return identifier and identifier not in (state.get("lastHumanMessageId"), request["baselineMessageId"])
89
+
90
+ # 等待轮询只用已读状态跳过无变化的观察;新消息必须按锁内最新状态重新判断。
91
+ if observed is not None and not any(is_new(identifier, observed["request"], observed) for identifier in identifiers):
92
+ return observed
93
+
86
94
  def apply(request, state):
87
95
  for identifier in identifiers:
88
- if not identifier or identifier in (state.get("lastHumanMessageId"), request["baselineMessageId"]):
96
+ if not is_new(identifier, request, state):
89
97
  continue
90
98
  state["lastHumanMessageId"] = identifier
91
99
  state["generation"] += 1
@@ -247,7 +255,7 @@ def wait(store, client, request_id, interrupted=lambda: False, notify=lambda val
247
255
  if interrupted():
248
256
  raise ValueError("worker_interrupted")
249
257
  snapshot = client.snapshot()
250
- _observe(store, request_id, snapshot)
258
+ _observe(store, request_id, snapshot, observed=value)
251
259
  if time.monotonic() - began > 2 * 86400:
252
260
  raise ValueError("worker_lifetime_exceeded")
253
261
  if request["state"] == "prepared":