import { ChannelHandle, Subscription, ChannelInfo, IncEvent } from '@napplet/core'; import { IncEventMessage } from './types.js'; /** * Napplet NAP INC shim entrypoint. * * @module */ /** Broadcast an INC topic event. */ declare function emit(topic: string, payload?: unknown): void; /** Subscribe to exact INC topic events. */ declare function on(topic: string, callback: (event: IncEvent) => void): Subscription; /** Open a symmetric point-to-point channel. */ declare function open(target: string): Promise; /** Subscribe to inbound channel handles, replaying retained opens in order. */ declare function onOpened(callback: (handle: ChannelHandle) => void): Subscription; /** List active channel snapshots. */ declare function list(): Promise; /** Broadcast to every open channel peer. */ declare function broadcast(payload?: unknown): void; /** Canonical channel namespace exposed as `window.napplet.inc.channel`. */ declare const channel: { open: typeof open; onOpened: typeof onOpened; list: typeof list; broadcast: typeof broadcast; }; /** Dispatch one topic event from the runtime. */ declare function handleIncEvent(msg: IncEventMessage): void; /** Route any runtime-delivered INC envelope. */ declare function handleIncMessage(msg: { type: string; [key: string]: unknown; }): void; /** Install INC state and return endpoint-teardown cleanup. */ declare function installIncShim(): () => void; export { broadcast, channel, emit, handleIncEvent, handleIncMessage, installIncShim, list, on, onOpened, open };