Skip to content

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

Merge remote-tracking branch 'origin/dev' into fix/148-roster-name-claims

Fei2411d4e0a09a895c
diff --cc ds-bot/src/host/roster.js
index 92f493f9,6e4be1f8..29fe3b69
--- a/ds-bot/src/host/roster.js
+++ b/ds-bot/src/host/roster.js
@@@ -308,15 -298,9 +322,13 @@@ export function install(rt)
const members = [...new Set(memberIds)].filter(id => rt.botOf(id))
checkMembers(members)
const custom = cleanRoomName(roomName ?? '')
- // A Main Bot leads the groups it makes; a group the user makes is led by a Main
- // Bot member when it has one.
- const adminId = admin !== undefined ? admin : (members.includes(createdBy) ? createdBy : members.find(rt.isMain) ?? null)
+ const adminId = admin !== undefined ? admin : defaultAdmin(members, createdBy)
if (adminId !== null && !members.includes(adminId)) throw new Error('The admin must be a member of the group')
if (mode !== undefined && !ROOM_MODES.includes(mode)) throw new Error(`Reply mode must be one of ${ROOM_MODES.join(', ')}`)
+ return holdName('room', custom, () => buildRoom({ members, custom, notice, mode, adminId, createdBy }))
+ }
+
+ async function buildRoom({ members, custom, notice, mode, adminId, createdBy }) {
const title = custom || autoRoomName(members)
// The group's own Session only relays, so it stays in the team workspace; the
// group's folder is for its members' Sessions.