Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Merge branch 'main' into devin/1791792833-mid-round-group-message

FeiZhuLulube33bcf94bdf
diff --cc CHANGELOG.md
index 132776d2,d1f2c166..43c0f50a
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -4,14 -4,26 +4,30 @@@ All notable changes to DS Bot are liste
## [Unreleased]
+ ### Added
+
+ - In a Bot's chat or a group chat, `@` lists the Bots you can mention first: a group's members and **Everyone**, or the other Bots. Picking one writes `@Name`.
+ - **Reference a chat** in the composer's **+** menu adds another Bot's chat, or a recent conversation outside the team, to your message as context.
+
### Changed
+ - Bots give a brief progress message when starting a multi-step task in their own chat with the user, and at meaningful milestones on long tasks.
- Every Bot can change its own name, role, color, model and instructions; only a Main Bot changes other Bots.
+ - Updating a copy installed from GitHub uses the repository's current address.
+
+ ### Fixed
+
+ - In a group chat, a conversation referenced in a message reached none of the members, and a reference whose title started with a member's name called that member. Now the members who answer the message get the referenced conversation.
+ - In a group chat, typing `@` and a Bot's name and pressing Enter inserted a conversation reference instead of the Bot's name.
+ - Deleting a Bot or group chat also removes its scheduled tasks, including ones left on the Bot's earlier chat parts. Before, armed tasks stayed active and kept running the deleted Session; the archive that would have stopped them was refused and the failure was silent.
+ - A long conversation's fresh part keeps the Bot's model and thinking level. Before, the new part fell back to the default model.
+ - A provider adapter that cannot measure tokens no longer fails every turn. The context size is estimated instead, with one warning in the log.
+ - The memory panel's summary works on models that think by default. The call asks for the model's lowest thinking level, and when the answer is cut off at the output limit it is written once more with a larger budget instead of failing or being saved half-written.
+### Fixed
+
+- A message sent to a group chat while a round is running shows at once and joins that round instead of waiting for it to end.
+
## [0.1.2] - 2026-10-11
### Added
diff --cc ds-bot/src/host/turns.js
index ebc19dde,0db9647b..ff52e510
--- a/ds-bot/src/host/turns.js
+++ b/ds-bot/src/host/turns.js
@@@ -30,12 -40,9 +40,12 @@@ export function install(rt)
const roomWaiters = new Map()
/** @type {Map<string, {roomId:string, replies:any[], members:string[], speaking:string|null}>} */
const roomProgress = new Map()
- /** @type {Map<string, {text:string, botId?:string, name?:string, reportBack?:boolean, hop?:number, kickoff?:boolean}[]>} messages a room's next relay posts */
+ /** @type {Map<string, {text:string, botId?:string, name?:string, reportBack?:boolean, hop?:number, kickoff?:boolean, references?:{labels:string[], text:string}[]}[]>} messages a room's next relay posts */
const roomInbox = new Map()
- const queueRoomMessage = (roomId, item) => roomInbox.set(roomId, [...(roomInbox.get(roomId) ?? []), item])
+ const queueRoomMessage = (roomId, item) => {
+ roomInbox.set(roomId, [...(roomInbox.get(roomId) ?? []), item])
+ return item
+ }
const liveOf = id => {
let entry = live.get(id)
@@@ -183,23 -196,13 +199,25 @@@
} else if (source?.kind === 'schedule' && rt.roomOf(id)) {
// A group's scheduled task reaches the group as the user's message.
queueRoomMessage(id, { text: reminderText(textOf(event.data.content)) })
+ } else if (source?.kind === REFERENCE_KIND && rt.roomOf(id)) {
+ attachReference(roomInbox.get(id), source, textOf(event.data.content))
} else if (source?.kind === 'user' || source?.kind === REPLY_KIND) {
if (rt.roomOf(id) && source.kind === 'user') {
+ const text = textOf(event.data.content)
const images = (Array.isArray(event.data.content) ? event.data.content : [])
.filter(block => block?.type === 'image' && !block.offloaded).map(block => block.attachment)
- queueRoomMessage(id, { text: textOf(event.data.content), ...(images.length > 0 ? { images } : {}) })
+ // A message recorded for a running round (`early`) reaches the Session
+ // again once its queued prompt lands: keep the round's own posting and
+ // treat this copy as consumed so it neither posts nor opens a round.
+ const earlier = images.length === 0
+ ? (rt.roomInbox.get(id) ?? []).find(item => item.early === true && item.claimed !== true && item.text === text)
+ : undefined
+ if (earlier !== undefined) {
+ earlier.claimed = true
+ queueRoomMessage(id, { text, consumed: true })
+ } else {
+ queueRoomMessage(id, { text, ...(images.length > 0 ? { images } : {}) })
+ }
}
const own = rt.chatOwners.get(id)
if (own !== undefined) rt.dropKickoff(own)