import { IntentAvailability, IntentRequest, IntentResult, Subscription, IntentOpenOptions } from '@napplet/core'; /** * Napplet NAP intent shim entrypoint. * * @module */ /** * Route an INTENT envelope received from the runtime. * * @param msg Runtime-delivered INTENT envelope * @returns Nothing */ declare function handleIntentMessage(msg: { type: string; [key: string]: unknown; }): void; /** * Dispatch an intent request by archetype. * * @param request Archetype dispatch request * @returns Promise resolving to the structured dispatch result * * @example * ```ts * const result = await invoke({ * archetype: 'note', * action: 'open', * convention: 'napplet:note/open', * payload: { id: 'abc' }, * }); * ``` */ declare function invoke(request: IntentRequest): Promise; /** * Open a napplet by archetype. * * @param archetype Role slug to open * @param payload Optional opaque payload * @param opts Optional convention, handler selection, and behavior hints * @returns Promise resolving to the structured dispatch result * * @example * ```ts * await open('note', { id: 'abc' }, { convention: 'napplet:note/open' }); * ``` */ declare function open(archetype: string, payload?: unknown, opts?: IntentOpenOptions): Promise; /** * Check whether the runtime can satisfy an archetype. * * @param archetype Role slug to inspect * @returns Installed-catalog availability */ declare function available(archetype: string): Promise; /** * List every archetype the runtime can satisfy. * * @returns Installed-catalog availability records */ declare function handlers(): Promise; /** * Subscribe to runtime-pushed availability changes. * * @param handler Callback for each availability update * @returns Subscription handle */ declare function onChanged(handler: (availability: IntentAvailability) => void): Subscription; /** * Install the INTENT shim state. * * @returns Cleanup function */ declare function installIntentShim(): () => void; export { available, handleIntentMessage, handlers, installIntentShim, invoke, onChanged, open };