/**
 * A central dispatcher is aware of the world.  Basically that means that names are also urls.
 * URL schemes can be mapped to EnvelopePorts, so that e.g. remote:// goes somewhere else.
 *
 * This means that 404s happen when the dispatcher doesn't know about the scheme or port.
 */
import { type Supervisor } from '@devvit/protos/types/devvit/runtime/actor/supervisor.js';
import { Envelope } from '@devvit/protos/types/devvit/runtime/envelope.js';
import type { EnvelopeRecipient } from '../EnvelopeRecipient.js';
import type { EnvelopeDispatcher } from './EnvelopeDispatcher.js';
type RecipientsByHostname = {
    [hostname: string]: EnvelopeRecipient;
};
export declare class CentralDispatcher implements EnvelopeDispatcher {
    #private;
    static readonly UNRESOLVED_HOSTNAMES: string;
    readonly hostname: string;
    /**
     * All known recipients by hostname excluding local clients. Only meant to be
     * used in a debug mode REPL.
     */
    get debugRecipientsByHostname(): RecipientsByHostname | undefined;
    /** Local clients. Only meant to be used in a debug mode REPL. */
    get debugClients(): Set<EnvelopeRecipient> | undefined;
    constructor(hostname: string);
    onBind(recipient: Readonly<EnvelopeRecipient>): void;
    onUnbind(other: Readonly<EnvelopeRecipient>): void;
    bind(recipient: Readonly<EnvelopeRecipient>): void;
    /** For runtimes only, bind a supervisor client. */
    bindSupervisor(supervisor: Supervisor & EnvelopeRecipient): void;
    isBound(recipient: Readonly<EnvelopeRecipient>): boolean;
    unbind(recipient: Readonly<EnvelopeRecipient>): void;
    release(recipient: EnvelopeRecipient): Promise<void>;
    post(caller: Readonly<EnvelopeRecipient>, envelope: Envelope): void;
    dispose(): Promise<void>;
}
export {};
//# sourceMappingURL=CentralDispatcher.d.ts.map