test(sdk): mount session projections in loop fixtures
This commit is contained in:
parent
8528e4039d
commit
fddad3a236
2 changed files with 5 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ const [
|
|||
{ Context },
|
||||
{ default: AgentLoop },
|
||||
{ mountAgentLoopTestDependencies },
|
||||
{ default: SessionProjectionRegistry },
|
||||
{ default: SubagentRuntime },
|
||||
{ default: JsonlSessionPersistence },
|
||||
{ HarnessSdkJsonRpcServer },
|
||||
|
|
@ -36,6 +37,7 @@ const [
|
|||
load("vendor/cordis/lib/index.js"),
|
||||
load("packages/core/agent-loop/lib/index.js"),
|
||||
load("packages/test-support/agent-loop-testkit/lib/index.js"),
|
||||
load("packages/session/session-projection/lib/index.js"),
|
||||
load("packages/subagent/subagent/lib/index.js"),
|
||||
load("packages/session/session-persistence-jsonl/lib/index.js"),
|
||||
load("packages/sdk/server/lib/index.js"),
|
||||
|
|
@ -46,6 +48,7 @@ const storageRoot = await mkdtemp(join(tmpdir(), "jsonrpc-built-scope-"));
|
|||
const ctx = new Context();
|
||||
try {
|
||||
await mountAgentLoopTestDependencies(ctx);
|
||||
await ctx.plugin(SessionProjectionRegistry);
|
||||
await ctx.plugin(AgentLoop, { agents: [] });
|
||||
await ctx.plugin(SubagentRuntime);
|
||||
await ctx.plugin(JsonlSessionPersistence, { root: storageRoot });
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop'
|
|||
import { mountAgentLoopTestDependencies } from '@deepseek-ai/dsh-agent-loop-testkit'
|
||||
import { LlmAdapter } from '@deepseek-ai/dsh-llm'
|
||||
import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm'
|
||||
import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection'
|
||||
import JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl'
|
||||
import * as jsonrpc from '../src/index.ts'
|
||||
|
||||
|
|
@ -76,6 +77,7 @@ async function mountPlugin(
|
|||
): Promise<ApplyHarness> {
|
||||
const ctx = new Context()
|
||||
await mountAgentLoopTestDependencies(ctx)
|
||||
await ctx.plugin(SessionProjectionRegistry)
|
||||
await ctx.plugin(AgentLoop, { agents: [] })
|
||||
await ctx.plugin(JsonlSessionPersistence, { root: storageDir })
|
||||
await new Promise(resolve => setTimeout(resolve, 50))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue