import { type DshLoaderUi } from './ui/index.js'; export * from './ui/index.js'; export { createClientAPI, ensureDshModulesGlobal, installClient, installSettingsFetchInterceptor, ModuleNotFoundError, } from './client.js'; export { installConversationEventsCompat } from './client-conversation-compat.js'; export { installConnectionApiCompat, buildLegacyApiProxy } from './client-connection-api-compat.js'; /** cordis plugin name (matches the npm package name and the bundle id). */ export declare const name = "@dsh-plugin/dsh-loader"; /** dshloader consumes no cordis service; it only provides. */ export declare const inject: string[]; /** * The UI facade for callers that reach dshloader through the module table rather * than `window.__dshLoader__`. * * @returns the facade, or `undefined` before the client plugin has applied. */ export declare function getUi(): DshLoaderUi | undefined; /** * The cordis client service name dshloader publishes its UI facade under. * * Consumers should declare `inject: ['dshLoaderUi']` and read `ctx.dshLoaderUi`: * cordis then activates them only after dshloader's client half has applied, * which is the only ordering guarantee available on the browser side. * `dsh.client.immediately` guarantees the bundle's factory is REGISTERED early, * not that its `apply` has run — so a plugin that reads * `window.__dshLoader__.ui` without injecting can observe `undefined`. */ export declare const UI_SERVICE = "dshLoaderUi"; /** Minimal cordis client context surface this entry touches. */ interface ClientContextLike { get?: (name: string) => unknown; effect?: (fn: () => unknown) => unknown; provide?: (name: string, value: unknown) => unknown; /** Ordered dependent-fiber hook used by the conversationEvents bridge. */ inject?: (inject: string[], callback: (ctx: ClientContextLike) => unknown) => unknown; /** * The cordis plugin-loader service. dsh 0.1.0-rc.8+ carries the client * module system here (`ctx.loader.internal`) instead of exposing it as the * legacy `window.__DSH_MODULES__` global — see ensureDshModulesGlobal. */ loader?: { internal?: { import(specifier: string): Promise; }; }; } /** * cordis client-plugin entry. * * Mirrors the client module system back onto `window.__DSH_MODULES__` first * (legacy plugins' lazy chunks read the global; dsh 0.1.0-rc.8+ stopped * installing it), then mounts the infrastructure (so the `__ModuleLoader__` * wrapper is in place before any sibling bundle materialises), then the UI * facade, then publishes it both as the `dshLoaderUi` cordis service * (ordered access) and on `window.__dshLoader__.ui` (ad-hoc access from * non-cordis code). * * Every patch installClient makes (the load wrapper, the settings fetch * interceptor) is registered through `ctx.effect`, so fiber unload / HMR * reverts them instead of stacking wrappers on the shared window. */ export declare function apply(ctx: ClientContextLike): void;