2026-08-06 20:41:53 +08:00
|
|
|
/**
|
|
|
|
|
* Loader fixture that resumes the seeded diagnostic-scenario parent before
|
|
|
|
|
* CLI dispatch, so `list_agents` runs against its pre-seeded cold child.
|
|
|
|
|
* @module subagent-diagnostic-agent
|
|
|
|
|
*/
|
|
|
|
|
|
2026-08-10 22:04:06 +08:00
|
|
|
import type { Context } from '@deepseek-ai/cordis'
|
2026-08-06 20:41:53 +08:00
|
|
|
import type { SessionId } from '@deepseek-ai/dsh-session'
|
|
|
|
|
|
|
|
|
|
/** Fixture plugin name. */
|
|
|
|
|
export const name = 'subagent-diagnostic-agent'
|
|
|
|
|
/** Services that must exist before the fixture resumes its agent. */
|
|
|
|
|
export const inject = ['agents', 'agentLoop', 'sessionPersistence']
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Resume the seeded session and bind its exact handle to this fixture's lifetime.
|
|
|
|
|
* @param ctx - settled agent and persistence services from the Loader tree.
|
|
|
|
|
* @returns after the resumed agent is published.
|
|
|
|
|
*/
|
|
|
|
|
export async function apply(ctx: Context): Promise<void> {
|
|
|
|
|
const handle = await ctx.agents.resume({
|
|
|
|
|
resumeSessionId: 'subagent-diagnostic-parent' as SessionId,
|
|
|
|
|
agentOptions: { provider: 'deepseek-official', model: 'deepseek-v4-flash' },
|
|
|
|
|
})
|
|
|
|
|
ctx.effect(() => () => handle.dispose(), 'subagent-diagnostic-agent.handle')
|
|
|
|
|
}
|