/** * @fileoverview Package-wide configuration: app branding, defaults, and the auth client contract, overridable via configureResearchAgentUI. */ export interface FooterLink { url: string; text: string; icon?: string; } /** * Auth client shape expected by `SessionProvider`. Matches the subset of the * better-auth React client actually used by this package, so the consuming * app can pass its own configured instance without this package depending on * `better-auth` directly. */ export interface ResearchAgentAuthClient { getSession: (...args: any[]) => Promise; oneTap: (opts: { fetchOptions: { onSuccess: () => void; }; }) => void; signIn: { social: (opts: { provider: string; callbackURL: string; }) => void; }; signOut: (opts: { fetchOptions: { onSuccess: () => void; }; }) => Promise; } export interface ResearchAgentUIConfig { /** Product name shown in document titles, etc. */ appName: string; /** Default prompt used to summarize an extracted article. */ defaultSummarizePrompt: string; /** Max character length for article body sent to the LLM. */ maxArticleLength: number; /** Chrome Web Store URL advertised on the homepage. */ downloadChromeUrl: string; /** Microsoft Store product ID advertised on the homepage. */ downloadWindowsStoreId: string; /** Links rendered in the homepage footer. */ footerLinks: FooterLink[]; /** Google API key used by the Google Drive file picker. */ googleApiKey: string; /** Whether to auto-trigger image/video media search after a response completes. */ getAutoMediaSearch: () => boolean; /** * Requests that the settings UI be opened. Lets the consuming app render * settings in a modal (e.g. on large desktop screens) instead of navigating * to the `/settings` route. Return `true` when the request was handled — the * caller then skips route navigation; return `false`/`undefined` to fall back * to navigating to the settings page (e.g. on small screens). `section` * optionally deep-links to a specific settings tab. */ onOpenSettings?: (section?: string) => boolean; /** * Requests that a chat from history be opened in place. Lets the consuming * app switch to the chat as a tab within its current workspace (e.g. on * the homepage) instead of navigating to the `/c/` route. Return * `true` when handled — the caller then skips route navigation; return * `false`/`undefined` (or leave unset) to fall back to navigating to * `/c/`. */ onOpenChat?: (chatId: string) => boolean; } export declare const researchAgentUIConfig: ResearchAgentUIConfig; /** * Overrides default configuration. Call once, before rendering, from the * consuming app (e.g. in the root layout) to wire up app-specific values. */ export declare function configureResearchAgentUI(overrides: Partial): void;