peertable 0.8.32 → 0.8.33
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/room/client.mjs +1 -1
- package/skill/scripts/wakeup-bridge.mjs +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peertable",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.33",
|
|
4
4
|
"description": "A round table of peer agents. No orchestrator at the head. Turn Claude Code, Codex, and Grok sessions into a team of equal, long-lived peers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/room/client.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { boundedRecent, boundedUnread } from './message-bounds.mjs'
|
|
|
14
14
|
|
|
15
15
|
// client.mjs 側のハードコード版数。package.json の version と一致していることを
|
|
16
16
|
// diagnostics の version_consistency が見る(2 つの版数源の drift 検出。決定45)
|
|
17
|
-
const MCP_VERSION = '0.8.
|
|
17
|
+
const MCP_VERSION = '0.8.33'
|
|
18
18
|
const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
19
19
|
|
|
20
20
|
const USAGE = `usage:
|
|
@@ -166,7 +166,37 @@ async function beatBridge() {
|
|
|
166
166
|
}
|
|
167
167
|
let receiptSupported = null
|
|
168
168
|
const postedReceipts = new Map() // `${seq}:${recipient}` -> `${result}:${reason}`(同内容の再送を抑える)
|
|
169
|
+
// 配達失敗は台帳(pull)に書くだけでは親に届かない(実被弾 2026-08-29: 裁定DMのSTUCKが
|
|
170
|
+
// 1時間誰にも知られず放置された。オーナー裁定「配達失敗だけ届ければいい」)。
|
|
171
|
+
// failed / seat_unavailable の初回だけ、親宛DMを1通送る——親宛DMは parent-watch が起こすので
|
|
172
|
+
// 既存の通知経路にそのまま乗り、この bridge 自身は親へ配達しないため再帰しない。
|
|
173
|
+
const notifiedFailures = new Set() // `${seq}:${recipient}`(delivered への回復で解除し、再failで再通知)
|
|
174
|
+
async function notifyParentOfFailure(seq, recipient, result, reason) {
|
|
175
|
+
if (!parentName) return
|
|
176
|
+
const key = `${seq}:${recipient}`
|
|
177
|
+
if (result === 'delivered') {
|
|
178
|
+
notifiedFailures.delete(key)
|
|
179
|
+
return
|
|
180
|
+
}
|
|
181
|
+
// not_a_delivery_target は「そもそもTUI配達対象でない」平常応答であって失敗ではない
|
|
182
|
+
if (reason === 'not_a_delivery_target') return
|
|
183
|
+
if (notifiedFailures.has(key)) return
|
|
184
|
+
try {
|
|
185
|
+
const res = await fetch(`${url}/api/${encodeURIComponent(room)}/messages`, {
|
|
186
|
+
method: 'POST', headers: writeHeaders,
|
|
187
|
+
body: JSON.stringify({
|
|
188
|
+
from: 'wakeup', to: parentName,
|
|
189
|
+
body: `[配達失敗] seq=${seq} 宛先=${recipient} 状態=${result}${reason ? ` 理由=${reason}` : ''}。台帳とwakeup-bridge.logを確認し、席の復旧または再送を判断すること`,
|
|
190
|
+
}),
|
|
191
|
+
})
|
|
192
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
193
|
+
notifiedFailures.add(key)
|
|
194
|
+
} catch (error) {
|
|
195
|
+
log(`DELIVERY_FAILURE_NOTIFY_FAILED ${JSON.stringify({ seq, recipient, detail: error.message.split('\n')[0] })}`)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
169
198
|
async function postReceipt(seq, recipient, result, reason = null) {
|
|
199
|
+
await notifyParentOfFailure(seq, recipient, result, reason)
|
|
170
200
|
if (receiptSupported === false) return
|
|
171
201
|
const key = `${seq}:${recipient}`
|
|
172
202
|
const value = `${result}:${reason ?? ''}`
|