Skip to content

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

Merge dev into feat/windows-onboarding-m4-start-window

AdamPlatin123a56174f785f8
diff --cc ds-bot/src/host/turns.js
index 89517f0d,fbde4ebe..7f797d10
--- a/ds-bot/src/host/turns.js
+++ b/ds-bot/src/host/turns.js
@@@ -2,19 -2,11 +2,19 @@@
// triggered, the waiters and inboxes of group rounds, and routing a finished turn's reply.
//
// Turn tracking: which turns were triggered by another Bot, and what they said.
- import { HANDOFF_ACK, MESSAGE_INLINE_MAX, REFERENCE_KIND, REPLY_KIND, SOURCE_KIND } from './constants.js'
+ import { HANDOFF_ACK, MESSAGE_INLINE_MAX, REFERENCE_KIND, REPLY_KIND, SOURCE_KIND, STEER_CUT } from './constants.js'
import { absoluteLinks } from './links.js'
-import { textOf } from './text.js'
+import { splitRef, textOf } from './text.js'
import { reminderText } from './schedules.js'
+// Failures only the user can fix: a key, a sign-in, a balance. They block the Bot
+// until it is fixed (`bot.blocked`, for the repair card).
+export const BLOCKING_CODES = new Set(['MISSING_CREDENTIAL', 'INVALID_CREDENTIAL', 'AUTH', 'QUOTA', 'ACCOUNT_QUOTA', 'ACCOUNT_SIGN_IN_REQUIRED', 'ACCOUNT_SIGNED_OUT', 'ACCOUNT_TOKEN_INVALID'])
+// The ones a key set outside a turn can fix, and the ones a sign-in can (unblockBots).
+// A balance only a turn that completes shows fixed, as Retry runs one.
+const KEY_CODES = new Set(['MISSING_CREDENTIAL', 'INVALID_CREDENTIAL', 'AUTH'])
+const SIGN_IN_CODES = new Set(['ACCOUNT_SIGN_IN_REQUIRED', 'ACCOUNT_SIGNED_OUT', 'ACCOUNT_TOKEN_INVALID'])
+
// A failed turn's `LlmFailure`, kept to what can be shown and logged. Like DSH's own
// error row, an AUTH failure loses its message: providers may echo part of the key.
export function turnFailure(error) {
@@@ -745,5 -709,10 +784,10 @@@ export function install(rt)
}
})
- Object.assign(rt, { live, liveOf, roomWaiters, roomProgress, roomInbox, activityView, workView, roomWorkView, turnsView, steeredView, callDetail, doingOf, stopRoomTurn, releaseBot, unblockBots, resumeBot })
+ const markSteerCut = (id) => {
+ const entry = live.get(id)
+ if (entry?.turn !== undefined) entry.cut = { texts: entry.texts.length }
+ }
+
- Object.assign(rt, { live, liveOf, roomWaiters, roomProgress, roomInbox, activityView, workView, roomWorkView, turnsView, steeredView, callDetail, doingOf, stopRoomTurn, releaseBot, markSteerCut })
++ Object.assign(rt, { live, liveOf, roomWaiters, roomProgress, roomInbox, activityView, workView, roomWorkView, turnsView, steeredView, callDetail, doingOf, stopRoomTurn, releaseBot, unblockBots, resumeBot, markSteerCut })
}
diff --cc ds-bot/test/install.test.js
index 67256e25,d5ec81e1..74ad3652
--- a/ds-bot/test/install.test.js
+++ b/ds-bot/test/install.test.js
@@@ -38,9 -38,9 +38,10 @@@ test('apply registers listeners, tools
'effect ds-bot: state lock',
'on llm/adapters-updated',
'on credentials/reference-updated',
+ 'on credentials/record-updated',
'on settings/document-updated',
'on session/event',
+ 'on session/event',
'on tools/execute',
'effect ds-bot: agent tool restrict retry',
'on agent/created',