import type { BattleResult } from './run-battle.js'; import type { PRNGSeed } from '../seed.js'; export interface BattleJob { p1: string; p2: string; seed: PRNGSeed; maxTurns?: number; } /** One unit of the pool — wraps a real thread, or a fake in tests. */ export interface PoolWorker { exec(job: BattleJob): Promise; terminate(): void; } export declare class BattlePool { private readonly workers; private readonly idle; private readonly queue; constructor(size: number, spawn: () => PoolWorker); /** Run one Battle, queued until a worker is free. */ run(job: BattleJob): Promise; private pump; close(): void; } /** The shared pool for this process, or null when concurrency ≤ 1 (run inline). */ export declare function getBattlePool(): BattlePool | null;