import { ConnectController } from "@opengeni/connect"; import type { OpenGeniBrowserClient as OpenGeniClient } from "@opengeni/sdk/browser"; import type { OpenGeniText } from "../messages/runtime.js"; import type { AuthNeededItem } from "../timeline/types.js"; /** Whether an auth notice is an agent's prepared key setup for a custom MCP server. */ export declare function isPreparedMcpSetup(item: AuthNeededItem): boolean; /** * Start (or replay) the prepared setup attempt. The card identity is a stable * operation key, including across reloads and Strict Mode, so an unrelated * pending setup is never recovered by provider alone. Mount once per client, * workspace, session, person and card. */ export declare function usePreparedMcpSetupAttempt({ client, workspaceId, item, canConfigure, returnUrl, }: { client: OpenGeniClient; workspaceId: string; item: AuthNeededItem; canConfigure: boolean; returnUrl: string; }): { proposal: { kind: "mcp"; ownership?: "personal" | "workspace" | undefined; mcpSetup?: import("@opengeni/contracts/prepared-mcp-setup").PreparedMcpSetup | undefined; name: string; endpointUrl: string; rationale: string; }; controller: ConnectController | null; failed: boolean; reload: () => void; /** Begin a new setup after the previous one was cancelled or expired. */ restart: (previousId: string) => void; }; /** * After the key is verified and the server installed, add its tools to this * chat with the existing CAS-fenced selection, which preserves every other * choice. A failure here never asks for the key again. */ export declare function usePreparedMcpSetupAccess({ t, controller, client, workspaceId, sessionId, onConfigured, }: { t: OpenGeniText; controller: ConnectController; client: OpenGeniClient; workspaceId: string; sessionId: string; onConfigured?: (() => void | Promise) | undefined; }): { view: import("../in-chat-connect-model.js").ConnectView; /** The verified server's capability, once setup installed it. */ connectedCapabilityId: string | undefined; access: "failed" | "pending" | "ready"; /** The attempt ended without connecting; a new setup can start. */ restartable: boolean; recheckAccess: () => void; };