import type { CommandResult } from "../commands/commandRegistry.js"; import type { GameContext } from "./gameContext.js"; import type { LiveGameBackend } from "./transport.js"; /** A UI command completes locally or after its authoritative host acknowledges it. */ export type DispatchedCommandResult = CommandResult | Promise>; type Route = { transport: LiveGameBackend["transport"]; serverId: () => string | null; }; /** Bind UI command dispatch to the host for this context. A missing join rejects; it never mutates the local replica. */ export declare function bindCommandTransport(ctx: GameContext, route: Route): () => void; /** Dispatch a player's command through the bound host, or locally for an unbound offline context. Await the result before showing success. */ export declare function dispatchCommand(ctx: GameContext, name: string, input: unknown): DispatchedCommandResult; export {};