/** * Slice `b1-filesplit-campaign` (wave 3) โ€” verbatim extraction of the two * back-compat `awaitBatch` wrappers from `./sub-agent-dispatcher.ts`, so that * module clears the 300 raw-line cap. Both are thin wrappers around the unified * service in `./await-batch.ts`; neither body, default timeout, note prefix or * doc comment changed, and the dispatch-record file layout they read is the one * `./await-batch.ts#defaultReadOutcome` parses. `sub-agent-dispatcher.ts` * imports and re-exports both, so the per-IDE dispatchers keep calling them * through the same path and * `tests/unit/services/dispatch/sub-agent-dispatcher-timeouts.test.ts` keeps * observing the same per-IDE configuration through the same `vi.mock` seam. */ import type { SubAgentAwaitBatchInput, SubAgentBatchResult } from './sub-agent-dispatcher-types.js'; /** * Real awaitBatch for claude-code (MVP). In 1.2, dispatch + await are * both in the same process; we record the batch size and resolve after * `dispatchCount` heartbeats land for the given `recordPaths`, or after * `timeoutMs` elapses (per-dispatch `timeout` status). * * Implementation contract (MVP): * - We poll each `recordPaths[i]` for an `outcome: success | failed` or * `status: done | failed` field; if absent after `timeoutMs`, that * dispatch is reported as `timeout`. * - The poll interval is 50ms (fast enough for unit tests, cheap enough * for the MVP; the real cross-process version uses heartbeat polling). */ export declare function awaitClaudeCodeBatch(input: SubAgentAwaitBatchInput): Promise; /** * Slice 1.3 โ€” shared per-IDE polling core for trae / codex / cursor. * Same polling loop shape as `awaitClaudeCodeBatch`, with per-IDE * default timeout + note prefix. The 3 IDEs differ only in * (a) `defaultTimeoutMs` (Trae / Cursor = 30s, Codex = 45s per slice * #13 R-3) and (b) the `note` label surfaced when an IDE times out * (so 1.4 dogfood can attribute a timeout to the right IDE). * * MVP rationale (per Karpathy ยง2 Simplicity First): the 3 IDEs * currently share the same file-based polling transport. The only * per-IDE distinction is the timeout + label. Future per-IDE * divergence (real IPC / shell hooks) is a 1.4 dogfood concern โ€” * here we keep the dispatcher interface uniform while each IDE's * `awaitBatch` is a real implementation. */ export interface PollDispatchRecordsOptions { readonly defaultTimeoutMs: number; readonly notePrefix: string; } export declare function pollDispatchRecords(input: SubAgentAwaitBatchInput, opts: PollDispatchRecordsOptions): Promise;