import { ClientEndpoint as CoreClientEndpoint, Endpoint as CoreEndpoint, Process as CoreProcess, Program as CoreProgram, ServerEndpoint as CoreServerEndpoint, type AnswerOutcome, type AnswerSubscriber, type AskSubscriber, type Cleanup, type ClientDeclaration, type EndpointReference as CoreEndpointReference, type EndpointSnapshot, type HandleAddress, type ProcessSnapshot, type ProgramSnapshot, type EndpointDeclaration, type EndpointLifecycleEvents, type EventOptions, type Exit, type ProgramProcessRunEvent as CoreProgramProcessRunEvent, type ProgramProcessRunOptions as CoreProgramProcessRunOptions, type TrafficMessage, type TrafficEvents, type Window as CoreWindow, type WindowState } from "@phreshos/core"; import Events from "./events.js"; export type { HandleAddress }; export type EndpointDeclarationRecord = EndpointDeclaration; export type ClientDeclarationRecord = ClientDeclaration; export type ProgramRecord = ProgramSnapshot; export type ProcessRecord = ProcessSnapshot; export type EndpointRecord = EndpointSnapshot; export type EndpointReference = CoreEndpointReference; export type WindowRecord = WindowState; export type Program = CoreProgram; export type ProgramProcessRunEvent = CoreProgramProcessRunEvent; export type ProgramProcessRunOptions = CoreProgramProcessRunOptions; export type Process = CoreProcess; export type Endpoint = CoreEndpoint; export type ServerEndpoint = CoreServerEndpoint; export type ClientEndpoint = CoreClientEndpoint; /** Authoritative Window capability permanently owned by a Client Endpoint. */ export type Window = CoreWindow; /** Internal transport address for a Program handle created by this SDK. */ export declare function programAddress(value: Program): HandleAddress; export declare class TrafficHandle extends Events, TrafficMessage> { protected readonly target: HandleAddress | null; protected readonly kind: "server" | "client"; constructor(target: HandleAddress | null, kind: "server" | "client"); subscribeAsks(subscriber: AskSubscriber): Cleanup; asks(options?: EventOptions): AsyncIterableIterator; process: string; endpoint: "server" | "client"; }>; payload: Payload; }>; }>>; private followAsks; } export declare class ServerTrafficHandle extends TrafficHandle { subscribeAnswers(subscriber: AnswerSubscriber): Cleanup; answers(options?: EventOptions): AsyncIterableIterator; process: string; endpoint: "server" | "client"; }> | null; outcome: AnswerOutcome; }>; }>>; private followAnswers; } type WindowTarget = () => Promise; type LifecycleTarget = HandleAddress | WindowTarget; export declare function scoped(route: string, subject: string | null, convert: (event: string, values: unknown[]) => unknown): Events; /** One value's `change`, carried on its owner's route under the owner's own event name. */ export declare function change(route: string, subject: string, event: string, convert: (values: unknown[]) => Value): Events<{ change: Value; }, never>; /** Destinationless events originating from one Endpoint handle. */ export declare function endpointEvents(target: HandleAddress | null, half: "server" | "client"): Events<{}, unknown>; /** Start and stop transitions belonging directly to one permanent Endpoint. */ export declare function endpointLifecycle(target: LifecycleTarget, half: "server" | "client"): Events; export declare function exit(code: unknown, signal: unknown): Exit; export declare function trafficMessage(value: unknown): TrafficMessage; export declare function program(value: unknown): Program; export declare function process(value: unknown, endpoints?: { server?: ServerEndpoint; client?: ClientEndpoint; }): Process; export declare function endpoint(value: unknown): Endpoint; export declare function claimEndpoint(reference: string, kind: "server" | "client", endpoint: Endpoint): Endpoint<{}, unknown>; export declare function window(target: WindowTarget): Window; /** Runtime constructor used to identify and type Server-visible Program handles. */ export declare const Program: typeof CoreProgram; /** Runtime constructor used to identify and type Server-visible Process handles. */ export declare const Process: typeof CoreProcess; /** Runtime constructor used to identify and type Server-visible Endpoint handles. */ export declare const Endpoint: typeof CoreEndpoint; /** Runtime constructor used to identify and type Server-visible Server Endpoint handles. */ export declare const ServerEndpoint: typeof CoreServerEndpoint; /** Runtime constructor used to identify and type Server-visible Client Endpoint handles. */ export declare const ClientEndpoint: typeof CoreClientEndpoint; /** A time as it travels, ISO text, as the time it names; anything else, as `null`, is none. */ export declare function timeOrNull(value: unknown): Date | null;