import type { ToolDetails } from "./timeline/tool-presentation.js"; import { type WorkspaceControlEvent, type WorkspaceInteractionRevisionEvent } from "@opengeni/sdk"; import { type ReactNode } from "react"; import type { SessionClientLike } from "./client.js"; import { type ErrorMessageFormatter } from "./lib/error-message.js"; import { type OpenGeniMessages } from "./messages/runtime.js"; export type { ErrorMessageFormatter } from "./lib/error-message.js"; export { useOpenGeni, useOpenGeniClient } from "./session-context.js"; export type { ClientOverride, OpenGeniContextValue } from "./session-context.js"; export type OpenGeniProviderProps = { client: SessionClientLike; workspaceId: string; onWorkspaceControlEvent?: ((event: WorkspaceControlEvent) => void) | undefined; onWorkspaceInteractionEvent?: ((event: WorkspaceInteractionRevisionEvent) => void) | undefined; /** * Stale-tab protection for the stock Opengeni web app: when the server's API * contract revision differs from this bundle's, cover the page and reload it * once. Off by default, because an embedded product's page must never be * blocked or reloaded when Opengeni deploys; there a mismatch is ignored and * the SDK's tolerant-reader compatibility applies. */ reloadOnApiContractChange?: boolean | undefined; /** * Keep subscription account lists and usage readings (`useCodexAccounts`, * `useSuperGrokAccounts`) and the last view of each conversation left (its * event tail and session projections) for `client` after the components that * read them unmount, so returning to them renders the last rows at once and * re-reads in the background. Off by default: then readers mounted together share one * request, but nothing is served to a later mount. Opt in only when every * signed-in person gets their own `client` object (the stock Opengeni console * creates a new client on every identity change). Retained rows are dropped * when `client` changes or this provider unmounts. */ retainReadsAcrossMounts?: boolean | undefined; /** Host-owned error copy. Receives the original diagnostic error and neutral default copy. */ formatError?: ErrorMessageFormatter | undefined; /** * BCP 47 locale of the host UI. Selects plural forms, and the language of dates, * times and numbers the components format. Defaults to the runtime locale. */ locale?: string | undefined; /** * Your text for any subset of the catalog keys (see `englishMessages`), so every * component shows the host's own words and language. Missing keys fall back to English. */ messages?: OpenGeniMessages | undefined; /** * The product name people know, shown wherever the built-in text names the product. * Default "Opengeni". */ productName?: string | undefined; /** * How much of each tool call the chat shows. `"full"` (default) shows commands, * arguments, output and diffs. `"plain"` keeps every step visible with its plain * name and status but never shows raw arguments, output or JSON: for products * whose people are not developers. */ toolDetails?: ToolDetails | undefined; children?: ReactNode; }; /** * Supplies the Opengeni client + workspace to all hooks below it. Hooks also * accept `{ client, workspaceId }` overrides per call for multi-workspace UIs. */ export declare function OpenGeniProvider({ client, workspaceId, onWorkspaceControlEvent, onWorkspaceInteractionEvent, reloadOnApiContractChange, retainReadsAcrossMounts, formatError, locale, messages, productName, toolDetails, children, }: OpenGeniProviderProps): import("react").JSX.Element;