/** * swarm/specs — createAgentSwarmSpecs for the AgentSwarm tool. * * #127: extracted from the test fixture in tests/swarm-tool.test.ts so the * production Swarm tool handler and the test suite share one source of * truth. Adds: * - 128-subagent cap (MAX_AGENT_SWARM_SUBAGENTS) — matches AGENTS.md * "Single to 128 subagents" and the test intent * - Duplicate prompt detection (throws with both colliding indices) * - Resume entries first, then spawn entries * - 1-based indexing across resume + spawn * - path-traversal rejection in resume_agent_ids keys */ import type { SwarmSpec } from "../shared/types.js"; export declare const PROMPT_TEMPLATE_PLACEHOLDER = "{{item}}"; /** Maximum number of subagents in a single AgentSwarm call (#127). */ export declare const MAX_AGENT_SWARM_SUBAGENTS = 128; export interface CreateAgentSwarmSpecsArgs { items?: string[]; resume_agent_ids?: Record; prompt_template?: string; } /** * Build the spawn + resume spec list from AgentSwarm tool parameters. * * Throws on: * - empty items and no resume entries * - missing prompt_template when items are provided * - prompt_template without the {{item}} placeholder * - total (items + resume) > MAX_AGENT_SWARM_SUBAGENTS * - duplicate resolved prompts (cost amplification) * - unsafe characters in resume_agent_ids keys (path traversal) */ export declare function createAgentSwarmSpecs(args: CreateAgentSwarmSpecsArgs): SwarmSpec[]; //# sourceMappingURL=specs.d.ts.map