refactor(agent): remove inbox service
This commit is contained in:
1 parent
df2bae9639
commit
bd3b651ea8
86 files changed
+160
-344
No files matched your search
@@ -11,7 +11,6 @@ import SystemPrompt from '@deepseek-ai/dsh-system-prompt'
|
||||
import ToolRuntime, { RUN_CODE_NAME, defineTool } from '@deepseek-ai/dsh-tools'
|
||||
import type { ToolExecutionResult } from '@deepseek-ai/dsh-tools'
|
||||
import AgentRegistry, { type Agent } from '@deepseek-ai/dsh-agent'
|
||||
import InboxService from '@deepseek-ai/dsh-agent/inbox'
|
||||
|
||||
import AgentLoop from '@deepseek-ai/dsh-agent-loop'
|
||||
import { LocalBashExecutor } from '@deepseek-ai/dsh-bash-local'
|
||||
@@ -56,7 +55,6 @@ async function codeModeHarness(cwd: string): Promise<Context> {
|
||||
await harness.plugin(LlmRuntime)
|
||||
await harness.plugin(SessionStore)
|
||||
await harness.plugin(SessionProjectionRegistry)
|
||||
await harness.plugin(InboxService)
|
||||
await harness.plugin(SystemPrompt, { persona: PERSONA })
|
||||
await harness.plugin(ToolRuntime, { mode: 'code' })
|
||||
await harness.plugin(AgentRegistry)
|
||||
@@ -75,7 +73,6 @@ async function workspaceCodeModeHarness(): Promise<Context> {
|
||||
await harness.plugin(LlmRuntime)
|
||||
await harness.plugin(SessionStore)
|
||||
await harness.plugin(SessionProjectionRegistry)
|
||||
await harness.plugin(InboxService)
|
||||
await harness.plugin(SystemPrompt, { persona: PERSONA })
|
||||
await harness.plugin(ToolRuntime, { mode: 'code' })
|
||||
await harness.plugin(AgentRegistry)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { resolve } from 'node:path'
|
||||
import { boot } from '@deepseek-ai/dsh-app-boot'
|
||||
import type { Agent } from '@deepseek-ai/dsh-agent'
|
||||
import { agentEvents, Inbox, type Agent } from '@deepseek-ai/dsh-agent'
|
||||
import { Session, SessionId } from '@deepseek-ai/dsh-session'
|
||||
import type {} from '@deepseek-ai/dsh-fs-e2b'
|
||||
import type {} from '@deepseek-ai/dsh-bash-local'
|
||||
@@ -30,7 +30,7 @@ const owner: Agent = {
|
||||
runMaintenance: task => task(new AbortController().signal),
|
||||
whenIdle: () => Promise.resolve(),
|
||||
}
|
||||
Object.assign(owner, { inbox: ctx.inboxes.create(owner) })
|
||||
Object.assign(owner, { inbox: new Inbox(ctx, owner.session, agentEvents(ctx, owner)) })
|
||||
const unregisterOwner = ctx.agents.register(owner)
|
||||
let terminalId: Awaited<ReturnType<typeof ctx.terminals.spawn>>['sessionId'] | undefined
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user