claude-code / mods /sec-default /tests /fixtures /agent-spawned.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
bdbd3b2 verified
Raw History Blame Contribute Delete
569 Bytes
import type { AgentSpawnInput, Origin } from 'claude-code'
/**
* A subagent's spawn as the engine raises it, pinned to who provides the
* agent's definition.
*
* @param provider who provides the agent, as the engine pinned it
* @returns the `agent.spawn` input
*/
export const agentSpawned = (provider: Origin): AgentSpawnInput => ({
tool_use_id: 't1',
prompt: 'list the files in src',
description: 'List files',
subagentType: 'general-purpose',
provider,
parentModel: 'the-model',
permissionMode: 'default',
background: false,
fork: false,
})