thinkpool-pair 0.7.244 → 0.7.245
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/bridge.mjs +1 -1
- package/cross-terminal.mjs +5 -1
- package/package.json +1 -1
- package/pair-control-authority.mjs +3 -0
package/bridge.mjs
CHANGED
|
@@ -3773,7 +3773,7 @@ channel
|
|
|
3773
3773
|
if (p.timer) clearTimeout(p.timer)
|
|
3774
3774
|
s.pending.delete(payload.id)
|
|
3775
3775
|
s.permNotifier?.resolve(payload.id)
|
|
3776
|
-
p.resolve(pendingResolution(p, { ...payload, decision: authority.decision }))
|
|
3776
|
+
p.resolve(pendingResolution(p, { ...payload, decision: authority.decision, answers: authority.answers }))
|
|
3777
3777
|
announce()
|
|
3778
3778
|
})
|
|
3779
3779
|
})
|
package/cross-terminal.mjs
CHANGED
|
@@ -64,6 +64,10 @@ export const laneStatusOf = (entry = {}, now = Date.now(), limits = LANE_STATUS)
|
|
|
64
64
|
const pendingCount = entry?.pending instanceof Map
|
|
65
65
|
? entry.pending.size
|
|
66
66
|
: Math.max(0, Number(entry?.pendingCount) || 0)
|
|
67
|
+
const pendingReason = entry?.pending instanceof Map && [...entry.pending.values()]
|
|
68
|
+
.some((pending) => pending?.payload?.risk === 'ask')
|
|
69
|
+
? BLOCKED_REASON.NEEDS_INPUT
|
|
70
|
+
: BLOCKED_REASON.NEEDS_DECISION
|
|
67
71
|
const failures = recentFailureCount(log, limits)
|
|
68
72
|
|
|
69
73
|
let statusFlag = null, statusReason = null
|
|
@@ -79,7 +83,7 @@ export const laneStatusOf = (entry = {}, now = Date.now(), limits = LANE_STATUS)
|
|
|
79
83
|
events: log,
|
|
80
84
|
busy: !!busy,
|
|
81
85
|
pendingCount,
|
|
82
|
-
pendingReason
|
|
86
|
+
pendingReason,
|
|
83
87
|
stalled: statusFlag === 'STUCK',
|
|
84
88
|
failed: failures >= limits.repeatedFailureCount && !busy,
|
|
85
89
|
rawStatus: statusFlag || (busy ? 'busy' : 'idle'),
|
package/package.json
CHANGED
|
@@ -38,6 +38,9 @@ export function verifyPairControlDeliveryAuthority ({ item, attempts, payload, r
|
|
|
38
38
|
ok: true,
|
|
39
39
|
code: 'durable_delivery_authorized',
|
|
40
40
|
decision: resolution.decision,
|
|
41
|
+
// App Server input is recovered from the durable resolution only. The public
|
|
42
|
+
// broadcast intentionally remains a wake-up hint and cannot supply answers.
|
|
43
|
+
answers: resolution.answers && typeof resolution.answers === 'object' ? resolution.answers : {},
|
|
41
44
|
itemId: item.id,
|
|
42
45
|
version: Number(item.version),
|
|
43
46
|
attemptKey: payload.attemptKey,
|