import type { IncomingMessage, AgentResult } from '../types.js'; /** * Build the Copilot CLI argv. Exported for unit testing — the live `spawn` * path stays inside `runCopilotTurn`. * * Args we always pass and why: * --output-format json emit JSONL events to stdout * --allow-all bypass tool/path/url prompts (we run unattended) * -s / --silent only the agent's response (suppress stats banner) * --no-ask-user disable the interactive ask_user tool * --no-auto-update never block on a self-update during a turn * --no-custom-instructions skip AGENTS.md / CLAUDE.md auto-injection; * teamsclaw already builds the prompt with context. */ export interface CopilotArgsInput { /** Existing copilot session id to resume; undefined for first turn. */ existingSessionId: string | undefined; /** New session id (UUID) to use when starting a fresh session. */ newSessionId: string; /** Model name (e.g. `claude-sonnet-4.5`, `gpt-5`). Empty/undefined → omit. */ model: string | undefined; /** Optional `--context` tier. */ contextTier: string | undefined; /** Optional `--effort` reasoning level. */ effort: string | undefined; /** Attachment paths (already verified to exist). */ attachments: string[]; /** Working directory passed via `-C`. */ cwd: string; } export declare function buildCopilotArgs(input: CopilotArgsInput): string[]; /** * Run one Copilot CLI turn for the given conversation. * * Signature mirrors `processMessage` in `agent/index.ts` so the top-level * dispatcher can hand a message off to either backend transparently. */ export declare function runCopilotTurn(incoming: IncomingMessage, conversationKey: string): Promise;