A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
WIP: test fixtures for DSH 0.2.2 (executor, clock fiber)
Fei24117665766702c7
diff --git a/ds-bot/test/browser-plugin-output.test.js b/ds-bot/test/browser-plugin-output.test.jsindex 1f6c6966..56851243 100644--- a/ds-bot/test/browser-plugin-output.test.js+++ b/ds-bot/test/browser-plugin-output.test.js@@ -5,6 +5,7 @@ import { createToolResultMessage, ToolCallId } from '@deepseek-ai/dsh-llm'import { Session } from '@deepseek-ai/dsh-session'import SystemPrompt from '@deepseek-ai/dsh-system-prompt'import ToolRuntime, { defineTool } from '@deepseek-ai/dsh-tools'+import * as NativeExecutor from '@deepseek-ai/dsh-tool-executor-native'import { mountBrowserPlugin } from '../src/host/browser/mount.js'import { toolDefs as refsTools } from '../src/host/browser/refs.js'@@ -12,6 +13,7 @@ test('browser handoff and resume return valid DSH outputs and clear the Bot holdconst ctx = new Context()await ctx.plugin(SystemPrompt)await ctx.plugin(ToolRuntime)+ await ctx.plugin(NativeExecutor)t.after(async () => ctx.fiber.dispose())let hold = null@@ -90,6 +92,7 @@ test('a screenshot degrades to text when no attachments service is mounted', asyconst ctx = new Context()await ctx.plugin(SystemPrompt)await ctx.plugin(ToolRuntime)+ await ctx.plugin(NativeExecutor)t.after(async () => ctx.fiber.dispose())const plugin = inner => {@@ -125,6 +128,7 @@ test('a stored browser screenshot is repaired before the next step and survivesconst ctx = new Context()await ctx.plugin(SystemPrompt)await ctx.plugin(ToolRuntime)+ await ctx.plugin(NativeExecutor)t.after(async () => ctx.fiber.dispose())const session = Session.create('old-browser-chat')const call = session.append('tool/call', { turn: 1, step: 1, callId: 'shot', name: 'browser_screenshot', arguments: '{}' })@@ -162,6 +166,7 @@ test('browser tools refuse every operation while a user hold is active', async tconst ctx = new Context()await ctx.plugin(SystemPrompt)await ctx.plugin(ToolRuntime)+ await ctx.plugin(NativeExecutor)t.after(async () => ctx.fiber.dispose())const hold = { by: 'user', reason: 'stopped', note: 'The user is controlling this browser.' }const plugin = inner => {@@ -205,6 +210,7 @@ test('browser endpoint connection uses the execution Bot identity, not tool arguconst ctx = new Context()await ctx.plugin(SystemPrompt)await ctx.plugin(ToolRuntime)+ await ctx.plugin(NativeExecutor)t.after(async () => ctx.fiber.dispose())let connectedconst plugin = inner => {@@ -240,6 +246,7 @@ test('a channel user hold closes the cached Playwright session and give-back recconst ctx = new Context()await ctx.plugin(SystemPrompt)await ctx.plugin(ToolRuntime)+ await ctx.plugin(NativeExecutor)t.after(async () => ctx.fiber.dispose())let hold = nulllet notifyHolddiff --git a/ds-bot/test/time-context.test.js b/ds-bot/test/time-context.test.jsindex c0d5905a..f96cae28 100644--- a/ds-bot/test/time-context.test.js+++ b/ds-bot/test/time-context.test.js@@ -84,6 +84,8 @@ test('a loaded DSH clock gets no second clock in either listener order', async (},})ctx.sessionProjections = ctx.get('sessionProjections')+ // DSH 0.2.2's clock checks that its plugin is still loaded before each step.+ ctx.fiber = { assertActive() {} }// Prepended listeners run last-registered first.ctx.on = (name, listener) => { ctx.listeners.set(name, [listener, ...(ctx.listeners.get(name) ?? [])]) }const rt = { ctx, config: { timeZone: 'UTC' }, load: async () => {}, isBotSession: () => true, async* eventsBackwards() {} }