A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Split only on the compactor's own prune marker
Fei2411229fad4dd687
diff --git a/ds-bot/client.js b/ds-bot/client.jsindex d27e27cf..4bc0ac5e 100644--- a/ds-bot/client.js+++ b/ds-bot/client.js@@ -7810,7 +7810,7 @@ function useLiveNote(actions, sessionId, id, entry) {}, [sessionId, id, key]);}var RELAY_LIST = /"replies"\s*:\s*\[/;-var PRUNE_MARKER = /\[\s*\.\.\.[^\]]*\]/;+var PRUNE_MARKER = /\[\.\.\. tool result middle pruned \.\.\.\]/;function parseReplies(text) {try {return { replies: JSON.parse(text).replies ?? [], broken: false };diff --git a/ds-bot/src/client/cells.js b/ds-bot/src/client/cells.jsindex f7c6d49d..0b792fe1 100644--- a/ds-bot/src/client/cells.js+++ b/ds-bot/src/client/cells.js@@ -818,7 +818,7 @@ const RELAY_LIST = /"replies"\s*:\s*\[/// Compaction marks a pruned span with a literal bracketed note like// "[... tool result middle pruned ...]". Its "]" looks like the end of the// replies array to a naive scan, so the text is split on the marker first.-const PRUNE_MARKER = /\[\s*\.\.\.[^\]]*\]/+const PRUNE_MARKER = /\[\.\.\. tool result middle pruned \.\.\.\]/function parseReplies(text) {try { return { replies: JSON.parse(text).replies ?? [], broken: false } } catch { /* fall through */ }const replies = []diff --git a/ds-bot/test/tool-cells.test.js b/ds-bot/test/tool-cells.test.jsindex 768d1ad3..6bcc12e1 100644--- a/ds-bot/test/tool-cells.test.js+++ b/ds-bot/test/tool-cells.test.js@@ -612,6 +612,14 @@ test('a group relay recovers replies after the prune marker', () => {assert.match(text(out2), /Writer.*First\..*Last\./)})+// Only the compactor's own marker splits the text: a reply that quotes a+// bracketed ellipsis stays whole.+test('a reply quoting a bracketed ellipsis is not mistaken for a prune marker', () => {+ const quoted = '{"replies":[{"botId":"writer","text":"Step [... details ...] done."}[... tool result middle pruned ...]{"botId":"chief","text":"Last."}]}'+ const out = show(call('group_relay', 'direct', { content: quoted }), { sessionId: 'room' })+ assert.match(text(out), /Step \[... details ...] done\..*Chief.*Last\./)+})+// #38: a PTC group round's replies vanished once the round ended.test('a PTC group relay shows its replies from the sub-call, live and after reload', async () => {const replies = [{ botId: 'writer', text: 'Hello from Writer.' }, { botId: 'chief', text: 'Hello from Chief.' }]