thinkpool-pair 0.7.134 → 0.7.136
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 +7 -0
- package/event-id.mjs +8 -4
- package/package.json +1 -1
package/bridge.mjs
CHANGED
|
@@ -2180,6 +2180,13 @@ channel
|
|
|
2180
2180
|
// when you left + returned to the tab. onEvent refines s.model to the full
|
|
2181
2181
|
// id on the next turn; the announce carries it to every device meanwhile.
|
|
2182
2182
|
s.model = mm[1]; announce()
|
|
2183
|
+
// Durably save the pick RIGHT NOW — not only after the next turn's debounced
|
|
2184
|
+
// write. Without this, switching then restarting the bridge before a turn
|
|
2185
|
+
// (exactly what an update-restart does) lost the choice: the resumed session
|
|
2186
|
+
// re-launched on the host default (Opus), so the switch read as "reverts on
|
|
2187
|
+
// reload" (Max 2026-07-02). flush() writes the model into the session record
|
|
2188
|
+
// synchronously; the restore path re-applies it via query opts.model.
|
|
2189
|
+
s.flush?.()
|
|
2183
2190
|
ctlLine(`switched model → ${mm[1]}`)
|
|
2184
2191
|
}
|
|
2185
2192
|
else { ctlLine('use /model <name> to switch — e.g. opus, sonnet, haiku') }
|
package/event-id.mjs
CHANGED
|
@@ -53,10 +53,14 @@ export function makeSeqCounter(startAfter = 0) {
|
|
|
53
53
|
// transcript events, so a seq on one of these would leave a hole in the applied
|
|
54
54
|
// sequence → the client sees a false gap → spurious resync storms. So the counter
|
|
55
55
|
// skips them and they ride the log seq-less (the client cid-handles/ignores them).
|
|
56
|
-
// MUST
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
|
|
56
|
+
// MUST equal REPLAY_CHROME ∩ {kinds the bridge logs} — guarded by bridge/test-seq.mjs
|
|
57
|
+
// S6. (mode/usage/clear/compact/stalled are bridge-chrome and never logged at all, so
|
|
58
|
+
// they never reach the counter.) 2026-07-02: models/queue-add/queue-cancel/propose-done/
|
|
59
|
+
// update-available were MISSING here — they're bridge-logged but web-filtered, so they
|
|
60
|
+
// consumed a seq + set the durable archive floor while the client dropped them, leaving
|
|
61
|
+
// the client's oldest RENDERED seq above the floor → a phantom "load earlier history"
|
|
62
|
+
// pill on a fresh lane (models fires on every session init) that fetched nothing.
|
|
63
|
+
export const NO_SEQ_KINDS = new Set(['system', 'thinking_tokens', 'effort', 'models', 'queue-add', 'queue-cancel', 'propose-done', 'update-available'])
|
|
60
64
|
export const seqable = (evt) => !!evt && typeof evt === 'object' && !NO_SEQ_KINDS.has(evt.kind)
|
|
61
65
|
|
|
62
66
|
// Highest numeric `seq` across a log of events (0 when none) — the floor a restored
|