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/708-subagent-results
Fei2411e0ee80116315
diff --cc ds-bot/test/handoff-results.test.jsindex 9500aff1,ca662e4d..b2d6b89b--- a/ds-bot/test/handoff-results.test.js+++ b/ds-bot/test/handoff-results.test.js@@@ -10,8 -10,9 +10,10 @@@ import { createRuntime } from '../indeximport { fakeContext } from './fake-ctx.js'import { SOURCE_KIND } from '../src/host/constants.js'import { install as installHandoffs } from '../src/host/handoffs.js'+import { scopeTarget } from '@deepseek-ai/dsh-scope'+ let rt+const seed = () => ({version: 1,mainBotIds: ['a'],@@@ -95,14 -96,7 +97,14 @@@ async function startHost(home, team)if (listener.length >= 2) listener({ id }, { type, seq: ++seq, data })}}+ // Scoped Cordis events (subagent lifecycle, tool results) reach the plugin+ // through a dispatch carrier DSH keys by the agent the event is for — that+ // carrier is what `this` is in a real listener call.+ const emitScoped = (parentId, name, ...args) => {+ const carrier = scopeTarget({}, agentOf(parentId))+ for (const listener of ctx.listeners.get(name) ?? []) listener.call(carrier, ...args)+ }- const tool = (name, args, sessionId) => ctx.registeredTools.get(name).execute(args, { agent: { id: sessionId } })+ const tool = (name, args, sessionId) => rt.teamTools.find(d => d.name === name).execute(args, { agent: { id: sessionId } })const call = async (endpoint, payload) => (await route.fetch(new Request('http://localhost/api/bot', {method: 'POST', body: JSON.stringify({ endpoint, payload }),}))).json()diff --cc ds-bot/test/install.test.jsindex 2339e093,fc51058a..1a5c82ab--- a/ds-bot/test/install.test.js+++ b/ds-bot/test/install.test.js@@@ -40,13 -41,8 +41,11 @@@ test('apply registers listeners and eff'on credentials/reference-updated','on settings/document-updated','on session/event',+ 'on subagent/start',+ 'on subagent/end',+ 'on tools/result','on session/event','on tools/execute',- 'effect ds-bot: agent tool restrict retry',- 'on agent/created','effect ds-bot: identity section','prompt bot-identity 640','on agent/pre-step (prepend)',