refactor(agent): remove inbox service

This commit is contained in:
_Kerman
2026-08-31 13:34:22 +08:00
parent df2bae9639
commit bd3b651ea8
86 changed files with 160 additions and 344 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'node:url'
import { Context } from '@deepseek-ai/cordis'
import { agentEvents, type Agent } from '@deepseek-ai/dsh-agent'
import { agentEvents, Inbox, type Agent } from '@deepseek-ai/dsh-agent'
import { CallId } from '@deepseek-ai/dsh-llm'
import { boot, loadOverlayPatches } from '@deepseek-ai/dsh-app-boot'
import { SessionId } from '@deepseek-ai/dsh-session'
@@ -34,7 +34,7 @@ try {
runMaintenance: job => job(new AbortController().signal),
whenIdle: () => Promise.resolve(),
}
Object.assign(agent, { inbox: ctx.inboxes.create(agent) })
Object.assign(agent, { inbox: new Inbox(ctx, agent.session, agentEvents(ctx, agent)) })
const decision = await agentEvents(ctx, agent).waterfall(
'agent/pre-step',
{ messages: [], turn: 1, step: 1, signal: new AbortController().signal },