/** * What kind of note this is, on the shared project shelf. * * Derived from what crews already did by hand, not invented: across 32 real * notes in two production projects/ boxes, agents opened their own text * with a bracketed tag because the storage carried none. Counted: * status(11), claim(4), blocker(4), shipped(3), decision(2), context(2), plus * security/bug/handoff-pointer one-offs. The vocabulary below collapses that * into the seven that carry coordination meaning; the spellings it dropped are * kept working by MEMORY_ENTRY_KIND_ALIASES rather than rejected. * * Closed on purpose. An open string would reproduce exactly the problem this * fixes: a forgeable in-text tag that no reader can rely on. Absent stays * valid and means unclassified, so every write that predates this change, and * every caller that never sends it, keeps its current meaning. */ declare const MEMORY_ENTRY_KINDS: readonly ["context", "claim", "status", "finding", "decision", "question", "blocker"]; type MemoryEntryKind = typeof MEMORY_ENTRY_KINDS[number]; /** * SDK configuration options. */ interface ConfigureOptions { /** API key (sk_xxx). Alternative to passing as first constructor argument. */ apiKey?: string; /** Advanced: override API origin for local development or private deployments. */ baseUrl?: string; /** Agent handle — lowercase letters, numbers, and hyphens. */ agent?: string; /** Developer app-local user ID for unlinked profiles — sends X-User-Id. */ externalId?: string; /** Optional timeout in milliseconds for requests */ timeout?: number; /** Custom fetch implementation (for Node.js compatibility) */ fetch?: typeof fetch; } type ProfileSection = 'identity' | 'preferences' | 'integrations' | 'imports' | 'agents' | 'summary' | 'soul' | 'context'; /** * Selector for `profile.forget()`. Pass exactly one of `id`, `match`, * `import_id`, or `scope` (a bare string is shorthand for `{ id }`). `confirm` * only applies with `match`: without it, a match previews and deletes nothing. */ interface ForgetSelector { id?: string; match?: string; confirm?: boolean; import_id?: string; scope?: 'imports' | 'saved' | 'all'; date?: string; reason?: 'correction' | 'user_request'; } interface ProfileRuntimeOptions { /** Bearer token from Configure Link or auth flow for a linked profile. */ token?: string; /** Developer app-local user ID for an unlinked profile. */ externalId?: string; } /** Everything `remember` takes besides the fact itself. */ interface RememberOptions { /** Namespace box (shelf) to file under, including "projects/". */ box?: string; /** What kind of note this is. "question" and "blocker" are tracked as open * in a project box until another note resolves them; omitted is valid and * means unclassified. An unrecognized value never loses the note: it is * saved unclassified and the response reports which value was ignored. */ kind?: MemoryEntryKind; /** Memory id ("mem_...") of a note in the SAME box this one answers. */ reply_to?: string; /** Memory id ("mem_...") of a question or blocker in the SAME box this note * closes, which is what stops it being reported as open. */ resolves?: string; } interface ProfileReadOptions { sections?: ProfileSection[]; /** Open one box from the profile read's table of contents — a category * ("work"), a source ("agents/parry"), or a shared project tag * ("projects/"). */ box?: string; /** Continue a long box; pages start at 1. Only meaningful with box. */ page?: number; /** Delta cursor for a box open: only notes newer than this ("YYYY-MM-DD" or * ISO timestamp). The box result's `latest` is the next cursor. Only * meaningful with box. */ since?: string; /** Box-open verbosity: "compact" (default) truncates long notes and marks * them `truncated: true`; "full" returns whole notes. Only meaningful with * box. */ detail?: 'compact' | 'full'; } interface ProfileReadResult { profile: UserProfile; portable: boolean; filtered: boolean; hiddenSources?: string[]; } interface ProfileFormatOptions { /** Legacy alias for includeConnectorSnapshots. Prefer Configure connector tools for fresh data. */ includeTools?: boolean; /** Include small connector-derived snapshots already present in the profile read response. */ includeConnectorSnapshots?: boolean; /** Include CONFIGURE_GUIDELINES (default: true). Pass false to opt out. */ guidelines?: boolean; } interface ProfileSearchOptions { /** Optional search query. Omit or pass "*" to list bounded permitted attributed results. */ query?: string; /** Optional category box id from the profile read's table of contents; composes with query. */ box?: string; source?: string; from?: string; to?: string; limit?: number; /** Default "compact" may return snippets. "full" includes complete text plus safe inspectable metadata. */ detail?: 'compact' | 'full'; } interface ProfileSearchHit { id: string; title?: string; text: string; snippet?: string; path?: string; source: string; source_type?: 'agent' | 'import'; provider?: ImportMemoryProvider; written_by?: string; imported_by_agent?: string; /** Date the memory was saved, YYYY-MM-DD (the wire's temporal field). */ saved_on?: string; created_at?: string; updated_at?: string; event_at?: string; score?: number; type?: string; markers?: string[]; provenance?: Record; } interface ProfileSearchResult { results: ProfileSearchHit[]; visibleSources?: string[]; sourceCounts?: Record; diagnostic?: ProfileSearchDiagnostic; truncated?: boolean; } interface ProfileSearchSourceCount { matched: number; returned: number; } type ProfileSearchDiagnosticStatus = 'ok' | 'partial_results' | 'truncated' | 'no_matches' | 'source_not_found' | 'filtered_by_permissions' | 'auth_missing' | 'agent_unresolved'; interface ProfileSearchDiagnostic { status: ProfileSearchDiagnosticStatus; message: string; next_action?: string; } interface ProfileCommitMessage { role: 'user' | 'assistant' | 'tool'; content: string; toolName?: string; } interface ProfileCommitInput { messages?: ProfileCommitMessage[]; response?: unknown; toolResults?: Array<{ toolName: string; content: string | object; }>; memories?: string[]; sync?: boolean; } type ConnectorName = 'gmail' | 'outlook' | 'calendar' | 'drive' | 'notion' | 'sheets'; type ActionName = 'email.send' | 'calendar.create_event' | 'sheets.values_update' | 'sheets.values_append' | 'sheets.create_spreadsheet' | 'sheets.add_sheet'; interface ProfileToolsOptions { /** Optional connector tools this hosted/product surface requested and this app supports. */ connectors?: ConnectorName[]; /** Optional action tools this hosted/product surface requested and this app supports. Execution still enforces user state and approval. */ actions?: ActionName[]; /** Advanced adapter/runtime tools. Omit unless the host runtime explicitly supports them. */ advanced?: { /** Expose the model-facing commit tool for MCP/adapter runtimes. */ commit?: boolean; /** Expose raw profile file tools for advanced runtimes. */ files?: boolean; /** Expose Configure web search and URL fetch utility tools. */ utilitySearch?: boolean; }; } interface JsonSchemaObject { type: 'object'; properties: Record; required?: string[]; additionalProperties?: boolean; } interface ConfigureToolDefinition { name: string; description: string; input_schema: JsonSchemaObject; } interface ConfigureToolCall { name?: string; arguments?: Record | string; input?: Record; function?: { name?: string; arguments?: Record | string; }; } interface OtpStartResponse { ok: boolean; mocked?: boolean; } interface OtpVerifyResponse { token: string; userId: string; embedReceipt?: string; } interface SignInUrlOptions { /** Optional legacy browser credential. Registered agents resolve it server-side. */ publishableKey?: string; /** Web callback or deep link that receives a short-lived sign-in code. */ returnTo?: string; /** Optional opaque value returned with the sign-in code. */ state?: string; /** Optional id used to correlate message-agent browser completion with the original message space. */ journeyId?: string; /** Cosmetic app label shown on the hosted page. */ displayName?: string; /** Alias for displayName. */ agentName?: string; /** Optional logo URL shown on the hosted page. */ agentLogo?: string; /** Use "message" for sign-in.me message-agent handoffs. */ delivery?: 'browser' | 'message' | 'messages' | 'imessage' | 'sms' | 'opener' | string; /** Message line that users return to after hosted sign-in. */ messageLinePhone?: string; /** Alias for messageLinePhone: the agent's current message line, usually supplied by the messaging provider. */ agentPhone?: string; /** Suggested SMS/iMessage body for returning to the agent. */ messageBody?: string; /** Optional endpoint called by hosted message delivery with the agent token. */ messageCompleteUrl?: string; /** Optional connector setup requested during sign-in. */ connectors?: ConnectorName[] | string; /** Hosted sign-in origin. Defaults to https://sign-in.me. */ signInOrigin?: string; /** Hosted page theme. */ theme?: 'light' | 'dark'; } interface SignInReturnDestination { destination: string; createdAt?: string; } interface SignInReturnDestinationList { destinations: SignInReturnDestination[]; } interface SignInReturnDestinationResult extends SignInReturnDestination { deleted?: boolean; } interface MessageLine { id: string; channel: string; phoneLast4: string; label: string | null; status: 'active' | 'revoked'; /** Non-secret operator metadata stored with the line. Raw phone numbers are never returned. */ metadata: Record; createdAt?: string; updatedAt?: string; } interface RegisterMessageLineOptions { /** Stable message channel identifier. Defaults server-side to "imessage" for compatibility. */ channel?: string; /** Agent-owned return line in E.164 format. Requires a server-side `sk_` key. */ phone: string; /** Optional operator-readable label. */ label?: string; /** Optional non-secret metadata about where this line came from. Raw phone fields and phone-like values are rejected. */ metadata?: Record; } interface RevokeMessageLineOptions { /** Stable message channel identifier. Defaults server-side to "imessage" for compatibility. */ channel?: string; /** Agent-owned return line in E.164 format. */ phone: string; } interface RegisterMessageLineResult { line: MessageLine; } interface ListMessageLinesResult { lines: MessageLine[]; } interface RevokeMessageLineResult { deleted: boolean; lines: MessageLine[]; } interface SignInExchangeResult { token: string; userId: string; tokenUse: 'agent'; approved: boolean; agent: string; } interface SignInTokenValidationResult { valid: boolean; userId?: string; tokenUse?: 'agent'; approved?: boolean; agent?: string; } interface SignInPhoneRecognitionResult { matched: boolean; recognized?: boolean; approved: boolean; linked: boolean; token?: string; agentToken?: string; userId?: string; agent?: string; displayName?: string | null; phoneCandidateCount: number; } type MessageSignInReason = 'signin' | 'reconnect' | 'permissions'; type MessageSignInFallbackReason = 'sender_proof_missing' | 'sender_proof_invalid' | 'sender_proof_unsupported'; interface CreateMessageSignInUrlOptions { reason: MessageSignInReason; channel: string; subject: { key: string; externalId: string; senderId?: string; }; thread?: { key?: string; spaceId?: string; messageId?: string; }; /** Provider-signed evidence that the message sender/thread claim is authentic. */ messageSenderProof?: string; connectors?: ConnectorName[] | string[]; displayName?: string; agentLogo?: string; theme?: 'light' | 'dark'; /** Message line that users return to after hosted sign-in. */ messageLinePhone?: string; /** Alias for messageLinePhone: the agent's current message line, usually supplied by the messaging provider. */ agentPhone?: string; messageBody?: string; messageCompleteUrl?: string; journeyId?: string; returnMode?: 'message'; idempotencyKey?: string; } type CreateMessageSignInUrlResult = { mode: 'minted'; url: string; code: string; reason: MessageSignInReason; expiresAt: string; idempotencyKey?: string; } | { mode: 'plain'; url: string; reason: MessageSignInReason; fallbackReason: MessageSignInFallbackReason; idempotencyKey?: string; }; type MessageIdentitySource = 'token' | 'phone_recognition' | 'external_id'; interface MessageIdentityResolveOptions { /** Stable app-local subject for unlinked, developer-scoped memory. */ externalId: string; /** Previously stored Configure agent token, if one exists. */ token?: string | null; /** Phone-like sender IDs from the message platform, usually E.164 when available. */ phoneCandidates?: string | string[] | null; /** Validate an existing token before accepting it. Defaults to false for hot paths. */ validateToken?: boolean; /** Throw recognition/validation errors instead of falling back to externalId. */ throwOnAuthError?: boolean; } interface MessageIdentity { externalId: string; token?: string; userId?: string; linked: boolean; approved: boolean; recognized: boolean; displayName?: string | null; source: MessageIdentitySource; } interface IntegrationData { connected: boolean; reconnectRequired?: boolean; error?: string; accountEmail?: string; accountName?: string; accountUsername?: string; providerAccountId?: string; connectedAccountId?: string; defaultAccountId?: string; accounts?: Array<{ connectedAccountId: string; providerAccountId?: string; accountEmail?: string; accountName?: string; accountUsername?: string; status?: 'ready' | 'reconnect'; error?: string; }>; ranked?: Record[]; synthesis?: { facts: { category: string; fact: string; confidence: number; }[]; summary: string; }; preferences?: string[]; events?: unknown[]; files?: unknown[]; pages?: unknown[]; spreadsheets?: unknown[]; } type ImportMemoryProvider = 'chatgpt' | 'gemini' | 'claude' | 'grok' | 'other'; interface ImportedMemory { id?: string; date?: string; text?: string; content?: string; path?: string; source?: string; source_type?: 'import'; provider?: ImportMemoryProvider; written_by?: string; imported_by_agent?: string; created_at?: string; event_at?: string; type?: string; } interface ImportedSourceData { name?: string; provider?: ImportMemoryProvider; source?: string; importedAt?: string; user_summary?: string; memory_count?: number; imported_by_agent?: string; legacy?: boolean; memories?: ImportedMemory[]; preferences?: string[]; } interface UserIdentity { name?: string; email?: string; phone_last4?: string; occupation?: string; location?: string; bio?: string; interests?: string[]; } interface UserProfile { identity: UserIdentity; preferences: string[]; summary?: string; integrations: Record; imports: Record; agents: Record>; /** Whether the user has linked their identity (completed auth at least once) */ linked?: boolean; /** Whether any sections were filtered due to user permissions */ filtered?: boolean; /** Section names hidden by user permissions (e.g., ['integrations.gmail', 'agents.travelbot']) */ hiddenSections?: string[]; /** Format this profile as a prompt-ready string */ format(options?: ProfileFormatOptions): string; } interface RememberResponse { saved: boolean; app: string; fact: string; memory?: ProfileSearchHit; } interface ForgetResponse { deleted: boolean; /** Present on a single-id delete; absent on bulk (`scope`/`import_id`) and `match` deletes. */ id?: string; path?: string; source?: string; /** Bulk (`scope`/`import_id`) and confirmed `match` deletes return how many memories were removed and their ids. */ deleted_count?: number; deleted_ids?: string[]; /** A `match` preview (no `confirm: true`) returns how many memories matched, having deleted nothing. */ matched?: number; suppressed?: boolean; suppressed_copies?: number; message?: string; } interface ImportResponse { saved: boolean; /** The namespace box the distilled note was filed under. */ box: string; /** False when the distiller degraded and stored a clamped raw stream. */ distilled?: boolean; memory?: unknown; path?: string; source?: string; /** True when the content matched a user_request suppression and was not saved. */ suppressed?: boolean; message?: string; } /** Apps a connect link can target. `import` lands on the memory-import page. */ type ConnectApp = 'gmail' | 'calendar' | 'drive' | 'notion' | 'sheets' | 'import'; /** Scope upgrades a connect link can request for a single capability. */ type ConnectCapability = 'gmail:read' | 'gmail:send' | 'calendar:read' | 'calendar:write'; /** * A server-minted connect link. Configure signs and hosts every link; you never * build one yourself. Include `connect_url` (or `import_url`) verbatim in your * reply so the user can act on it, and do not retry the underlying action until * they have. */ /** A short-lived single-bearer MCP session for the current user's runtime. */ interface McpSessionResponse { ok: boolean; /** true when the user has approved this agent; false = connect-only session. */ linked: boolean; /** * true when this mint carried the previous session's read/commit correlation * forward (a refresh with a still-valid `previousToken` for the same linked * user). false on first mints and whenever the previous token had expired. */ continued?: boolean; session: { token: string; expires_at: string; }; mcp_url: string; /** Drop-in for Anthropic's `mcp_servers` parameter or any MCP client config. */ mcp_servers: Array<{ type: 'url'; url: string; name: string; authorization_token: string; }>; message?: string; } interface McpSessionOptions { /** * The session token this mint replaces. When it is still valid and names the * same linked user, the new session keeps its read/commit correlation, so a * profile read done on the old token can be committed on the new one. * Expired or unusable previous tokens degrade to a fresh session * (`continued: false`) — they never fail the mint. */ previousToken?: string; } interface McpAuthOptions { /** * Re-mint when fewer than this many seconds remain on the current session. * Default 60 — wide enough that a slow mint never races the old token's * expiry on a live connection. */ refreshSkewSeconds?: number; } /** * A self-refreshing MCP session for runtimes that outlive one 15-minute token * (daemons, workers, long agent loops). Call `mcpServers()` (or `token()`) * before EVERY model call or MCP request batch: it returns the cached session * while it is fresh and transparently re-mints — carrying read/commit * correlation forward — when it is near expiry. On an unexpected 401, call * `invalidate()` and retry once. Sessions stay in memory only; nothing about * this provider extends a token's 15-minute life. */ interface McpSessionProvider { /** The full current session, minting or refreshing if needed. */ session(): Promise; /** The current bearer token (refreshing if needed). */ token(): Promise; /** The current `mcp_servers` block (refreshing if needed). */ mcpServers(): Promise; /** * Drop the cached session so the next call mints anew. Use after an * unexpected 401 (then retry once), and after the user completes a connect * link so an unlinked session upgrades to linked immediately instead of at * the next scheduled refresh. Remember to re-issue `tools/list` after an * unlinked session becomes linked — the tool surface grows. */ invalidate(): void; } interface ConnectResponse { /** * `authorization_required`: the user is not signed in; the link signs them in. * `connect_app`: signed in; the link connects or manages an app. * `permission_needed`: a specific capability (e.g. gmail:send) is missing; the * link grants that scope. * `import_ready`: the link opens the memory-import page. */ status: 'authorization_required' | 'connect_app' | 'permission_needed' | 'import_ready'; /** Configure-hosted link. Present on every status except `import_ready`. */ connect_url?: string; /** Present instead of `connect_url` when `status` is `import_ready`. */ import_url?: string; /** The connector this link targets, when one was named. */ app?: string; /** For `connect_app` with an app: whether that app is already connected. */ connected?: boolean; /** For `permission_needed`: the capability being requested (e.g. `gmail:send`). */ capability?: string; /** For `permission_needed`: the underlying connector (e.g. `gmail`). */ connector?: string; /** For `permission_needed`: a human label for the capability. */ label?: string; /** The human-facing reason shown on the connect page, when supplied. */ purpose?: string; /** ISO timestamp when the link expires. */ expires_at: string; /** Agent-facing instruction describing how to surface the link. */ instructions: string; /** * This same response pre-wrapped as an MCP tool-result envelope — the * ready-to-mount value for `ConfigureMcpAppHost.mount({ result })`, so the * envelope-vs-payload shape question cannot arise. Added client-side by the * SDK (additive; the rest of the response is unchanged). */ mcp_result?: { structuredContent: Record; }; } interface ProfileCommitResult { status: 'processing' | 'completed'; /** Facts extracted and saved to the user's memory */ facts_written?: string[]; /** Updated user summary after commit */ user_summary?: string; memories_written?: Array<{ id?: string; path: string; source: string; written_by?: string; created_at?: string; type?: string; marker?: string; }>; obligations_committed?: string[]; rejected_memories?: Array<{ memory: string; reason: string; }>; } type ImportMode = 'backfill'; type ImportJobStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'cancelled'; interface ImportProfilesRequest { mode: ImportMode; users: ImportProfileUser[]; idempotencyKey?: string; } interface ImportProfileUser { externalId: string; idempotencyKey?: string; profile?: { summary?: string; preferences?: string[]; facts?: string[]; identity?: Record; [key: string]: unknown; }; conversations?: ImportConversation[]; } interface ImportConversation { id?: string; messages: ImportMessage[]; } interface ImportMessage { role: 'system' | 'user' | 'assistant' | 'tool'; content: string; } interface ImportQuotaState { used: number; limit: number | 'unlimited'; requestedNew: number; remaining: number | 'unlimited'; } interface ImportCaps { max_profiles_per_job: number; max_total_input_chars_per_job: number; max_concurrent_import_jobs: number; max_conversations_per_profile: number; max_messages_per_conversation: number; max_chars_per_message: number; } interface ImportJob { id: string; mode: ImportMode; status: ImportJobStatus; accepted_profiles: number; estimated_message_count: number; estimated_input_chars: number; imported_memory_count: number; processed_profile_count: number; failed_profile_count: number; quota?: { imported_profiles: ImportQuotaState; }; caps?: ImportCaps; created_at: string; updated_at: string; started_at?: string | null; completed_at?: string | null; cancelled_at?: string | null; error?: { code?: string | null; message?: string | null; }; reused?: boolean; } /** A single document in the document suite */ interface DocumentEntry { content: string; generated_at: string; } /** Response from generateDocuments() */ interface GenerateDocumentsResponse { documents: { 'user.md'?: (DocumentEntry & { chars: number; }) | null; 'soul.md'?: (DocumentEntry & { chars: number; }) | null; 'preferences.md'?: (DocumentEntry & { chars: number; }) | null; 'context.md'?: (DocumentEntry & { chars: number; }) | null; }; cached: boolean; } interface CreateEventResponse { created: boolean; event: { title: string; start: string; end: string; description?: string; location?: string; }; message: string; } interface SendEmailResponse { sent: boolean; retryable?: boolean; email: { to: string; subject: string; bodyPreview: string; body_preview?: string; delivery_status?: 'accepted' | 'unconfirmed'; provider_message_id?: string; from_account?: { id?: string; email?: string; provider?: EmailProvider; account?: { id: string; email?: string; } | null; }; gmail_data?: unknown; outlook_data?: unknown; }; message: string; } interface SearchOptions { maxResults?: number; account?: string; } interface SearchSpreadsheetsResponse { query: string; count: number; spreadsheets: Array<{ id?: string; name?: string; title?: string; webViewLink?: string; url?: string; modifiedTime?: string; }>; } interface GetSheetValuesResponse { spreadsheetId: string; ranges: string[]; valueRanges: Array<{ range?: string; majorDimension?: string; values?: unknown[][]; }>; } interface SheetValuesMutationInput { spreadsheetId: string; range: string; values: unknown[][]; valueInputOption?: 'USER_ENTERED' | 'RAW'; } interface UpdateSheetValuesResponse { updated: boolean; spreadsheetId: string; range: string; updatedRange?: string; updatedRows?: number; updatedColumns?: number; updatedCells?: number; data?: unknown; } interface AppendSheetValuesResponse { appended: boolean; spreadsheetId: string; range: string; tableRange?: string; updatedRange?: string; updatedRows?: number; updatedColumns?: number; updatedCells?: number; data?: unknown; } interface CreateSpreadsheetResponse { created: boolean; spreadsheetId?: string; title: string; url?: string; data?: unknown; } interface AddSheetResponse { created: boolean; spreadsheetId: string; title: string; sheetId?: number; data?: unknown; } type ConnectorType = 'gmail' | 'outlook' | 'calendar' | 'drive' | 'notion' | 'sheets'; type EmailProvider = 'gmail' | 'outlook'; interface Connector { id: ConnectorType; name: string; connected: boolean; reconnectRequired?: boolean; error?: string; description?: string; } interface ListConnectorsResponse { connectors: Connector[]; } interface ConnectConnectorResponse { success: boolean; url?: string; connectionRequestId: string; alreadyConnected?: boolean; connectedAccountId?: string; providerAccountId?: string; accountEmail?: string; accountName?: string; } interface ConfirmConnectorResponse { success: boolean; connected: boolean; /** True when the user granted only some of the requested OAuth permissions; reconnect to retry. */ partialPermissions?: boolean; sync?: { itemsSynced?: number; [key: string]: unknown; }; connectedAccountId?: string; providerAccountId?: string; accountEmail?: string; accountName?: string; } interface SyncConnectorResponse { synced: boolean; connector: ConnectorType; threads_count?: number; events_count?: number; files_count?: number; pages_count?: number; } interface SearchEmailsResponse { query: string; count: number; emails: Array<{ subject: string; snippet: string; date?: string; from?: string; body?: string; provider?: EmailProvider; account?: { id: string; email?: string; }; }>; accounts_searched?: Array<{ id: string; email?: string; provider?: EmailProvider; account?: { id: string; email?: string; }; }>; partial?: boolean; errors?: Array<{ provider: EmailProvider; error: string; }>; } interface SearchCalendarResponse { range: string; count: number; events: Array<{ summary: string; start?: string; end?: string; location?: string; description?: string; }>; } interface SearchFilesResponse { query: string; count: number; files: Array<{ name: string; mimeType?: string; modifiedTime?: string; webViewLink?: string; }>; } interface SearchNotesResponse { query: string; count: number; notes: Array<{ title: string; url?: string; lastEdited?: string; }>; } interface SearchWebResponse { query: string; count: number; results: Array<{ title: string; url?: string; snippet: string; publishedDate?: string; }>; } interface FetchUrlResponse { url: string; title: string; content: string; content_type: string; status_code: number; truncated: boolean; } /** * Authentication, hosted sign-in, and message-agent identity helpers. */ declare class AuthModule { private baseUrl; private appKey; private fetchFn; private timeout?; private agent?; constructor(baseUrl: string, appKey: string, fetchFn: typeof fetch, timeout?: number, agent?: string); private createAbortSignal; private requestHeaders; /** * Server/headless OTP method. Browser integrations should use `Configure.link()` * from the hosted iframe script instead. * * Sends an OTP to a phone number. * @param phone - Phone number in E.164 format (e.g., "+14155551234") */ sendOtp(phone: string): Promise; /** * Server/headless OTP method. Browser integrations should use `Configure.link()` * from the hosted iframe script instead. * * Verifies an OTP code. * @param phone - Phone number in E.164 format * @param code - 6-digit OTP code */ verifyOtp(phone: string, code: string, options?: { externalId?: string; embed?: boolean; }): Promise; /** * Build a plain hosted sign-in URL for web, deep-link, account-link, or * fallback message handoffs. * * Message-aware agents should prefer `createMessageSignInUrl()` when the * runtime wants Configure to own message URL orchestration. */ signInUrl(options?: SignInUrlOptions): string; /** * Allowlist a return destination for the hosted sign-in code flow. * Requires a server-side `sk_` key. */ allowSignInReturnTo(returnTo: string): Promise; /** * List allowlisted hosted sign-in return destinations for the acting agent. */ listSignInReturnDestinations(): Promise; /** * Remove an allowlisted hosted sign-in return destination. */ removeSignInReturnTo(returnTo: string): Promise; /** * Register an agent-owned message return line for hosted message sign-in. * * Requires a server-side `sk_` key. Configure stores only a hash and last4; * the raw phone is sent at request time so the backend can verify ownership * before reflecting it in a hosted sign-in URL. */ registerMessageLine(options: RegisterMessageLineOptions): Promise; /** * List active agent-owned message return lines. */ listMessageLines(): Promise; /** * Revoke an agent-owned message return line. */ revokeMessageLine(options: RevokeMessageLineOptions): Promise; /** * Exchange a short-lived hosted sign-in code for an agent-scoped token. * Requires a server-side `sk_` key. */ exchangeSignInCode(code: string): Promise; /** * Validate a stored Configure agent token for the acting agent. */ validateSignInToken(token: string): Promise; /** * Recognize a message-channel sender by phone-like candidates and return an * agent token when the user already approved this agent. */ recognizePhone(candidates: string | string[]): Promise; /** * Create a hosted message sign-in/reconnect URL for a message-channel sender. * * Requires a server-side `sk_` key. Code-bearing URLs are returned only when * the backend can verify signed message sender proof; otherwise the result * is `mode: "plain"` with the normal `https://sign-in.me/{agent}` fallback. */ createMessageSignInUrl(options: CreateMessageSignInUrlOptions): Promise; /** * Resolve the identity for a message-based agent turn. * * The result can be passed directly to `configure.profile(identity)`: linked * users use the stored/recognized token, and everyone else falls back to the * developer-scoped `externalId`. */ resolveMessageIdentity(options: MessageIdentityResolveOptions): Promise; private postJson; private requestJson; } interface FileEntry { path: string; type: 'markdown' | 'json' | 'ref'; metadata: Record; updated_at: string; } interface FileListResult { entries: FileEntry[]; count: number; } interface FileListOperationOptions { /** Listing depth (default: 1) */ depth?: number; /** Max entries (default: 100) */ limit?: number; } interface FileReadResult { path: string; content: string; type: 'markdown' | 'json' | 'ref'; metadata: Record; tokens: number; is_directory: boolean; } interface FileWriteOperationOptions { /** Content type (default: 'markdown') */ type?: 'markdown' | 'json'; /** Write mode (default: 'overwrite') */ mode?: 'overwrite' | 'append' | 'merge'; } interface FileWriteResult { path: string; created: boolean; tokens: number; } interface FileSearchHit { path: string; type: 'markdown' | 'json' | 'ref'; snippet?: string; score: number; } interface FileSearchResult { results: FileSearchHit[]; count: number; } interface FileSearchOperationOptions { /** Limit to path prefix (default: '/') */ scope?: string; /** Max results (default: 10) */ limit?: number; /** Return only matching paths without snippets (default: false) */ filesOnly?: boolean; } interface FileDeleteResult { deleted: number; } type FileUserOptions = { token?: string; /** Developer app-local user ID for unlinked profiles. */ externalId?: string; /** Advanced raw file routes may still require an explicit Configure user id. */ userId?: string; }; type FileReadOptions = FileUserOptions & { path: string; }; type FileWriteOptions = FileUserOptions & FileWriteOperationOptions & { path: string; content: string; }; type FileListOptions = FileUserOptions & FileListOperationOptions & { path?: string; }; type FileSearchOptions = FileUserOptions & FileSearchOperationOptions & { path?: string; query: string; }; type FileDeleteOptions = FileUserOptions & { path: string; }; declare class FilesModule { private baseUrl; private appKey; private fetchFn; private timeout?; private defaultExternalId?; constructor(baseUrl: string, appKey: string, fetchFn: typeof fetch, timeout?: number | undefined, defaultExternalId?: string | undefined); private getHeaders; private resolveUserId; private profileUrl; private createAbortSignal; list(options?: FileListOptions): Promise; read(options: FileReadOptions): Promise; write(options: FileWriteOptions): Promise; search(options: FileSearchOptions): Promise; delete(options: FileDeleteOptions): Promise; } declare class ImportRequester { private baseUrl; private apiKey; private fetchFn; private timeout?; constructor(baseUrl: string, apiKey: string, fetchFn: typeof fetch, timeout?: number | undefined); importProfiles(input: ImportProfilesRequest): Promise; getJob(jobId: string): Promise; private request; private createAbortSignal; } declare class ImportJobsModule { private requester; constructor(requester: ImportRequester); get(jobId: string): Promise; } /** * Connector module for managing connected services and live external operations * Handles Gmail, Calendar, Drive, Notion integrations + search/action methods */ declare class ConnectorsModule { private baseUrl; private appKey; private fetchFn; private timeout?; constructor(baseUrl: string, appKey: string, fetchFn: typeof fetch, timeout?: number); private getHeaders; private createAbortSignal; /** * List all available connectors and their connection status */ list(authToken: string, options?: { includeOutlook?: boolean; }): Promise; /** * Start connecting a connector (initiates OAuth flow) * * @example * ```typescript * const { url, connectionRequestId } = await configure.connectors.connect(token, 'gmail', 'myapp://callback'); * ``` */ connect(authToken: string, connector: ConnectorType, callbackUrl?: string, forceNew?: boolean): Promise; /** * Confirm connector connection after OAuth callback */ confirm(authToken: string, connector: ConnectorType, connectionRequestId: string): Promise; /** * Sync a connected connector to refresh data */ sync(authToken: string, connector: ConnectorType): Promise; /** * Sync all connected connectors to refresh profile data. * Triggers data pull from Gmail, Calendar, Drive, Notion into the user's profile. */ syncAll(authToken: string, connectors?: ConnectorType[]): Promise<{ userId: string; synced: Record; }>; /** * Disconnect a connector */ disconnect(authToken: string, connector: ConnectorType): Promise; /** * Disconnect all connectors */ disconnectAll(authToken: string): Promise; /** * Search the user's Gmail * Results are automatically saved to the user's profile. * * @example * ```typescript * const results = await configure.connectors.searchEmails(token, 'flight confirmation'); * ``` */ searchEmails(authToken: string, query: string, options?: SearchOptions): Promise; /** Search permitted Gmail and Outlook accounts through the provider-neutral endpoint. */ searchHostedEmails(authToken: string, query: string, options?: SearchOptions & { provider?: EmailProvider; }): Promise; /** * Get the user's calendar events * Results are automatically saved to the user's profile. */ getCalendar(authToken: string, range?: 'today' | 'tomorrow' | 'week' | 'month'): Promise; /** * Search the user's Google Drive files * Results are automatically saved to the user's profile. */ searchFiles(authToken: string, query: string, options?: SearchOptions): Promise; /** * Search the user's Notion pages * Results are automatically saved to the user's profile. */ searchNotes(authToken: string, query: string, options?: SearchOptions): Promise; /** * Search the user's Google Sheets spreadsheets by title. */ searchSpreadsheets(authToken: string, query: string, options?: SearchOptions): Promise; /** * Read bounded A1 ranges from a Google Sheets spreadsheet. */ getSheetValues(authToken: string, spreadsheetId: string, ranges: string[]): Promise; /** * Search the web. * Results are automatically saved to the user's profile. * No user connection required — works for all authenticated users. */ searchWeb(authToken: string, query: string, options?: SearchOptions): Promise; /** * Fetch a web page's content by URL. * Returns the page title and readable text content. * No user connection required — works for all authenticated users. */ fetchUrl(authToken: string, url: string, options?: { maxLength?: number; }): Promise; /** * Create a calendar event for the user * Requires the user to have Google Calendar connected. */ createCalendarEvent(authToken: string, event: { title: string; startTime: string; endTime: string; description?: string; location?: string; }): Promise; /** * Update values in a specific A1 range in a Google Sheets spreadsheet. */ updateSheetValues(authToken: string, input: SheetValuesMutationInput): Promise; /** * Append rows to a Google Sheets spreadsheet range. */ appendSheetValues(authToken: string, input: SheetValuesMutationInput): Promise; /** * Create a Google Sheets spreadsheet. */ createSpreadsheet(authToken: string, title: string): Promise; /** * Add a worksheet tab to an existing Google Sheets spreadsheet. */ addSheet(authToken: string, input: { spreadsheetId: string; title: string; rowCount?: number; columnCount?: number; }): Promise; /** * Send an email on behalf of the user * Requires the user to have Gmail connected. */ sendEmail(authToken: string, email: { to: string; subject: string; body: string; account?: string; }): Promise; /** Send through a specifically selected or unambiguous hosted email provider. */ sendHostedEmail(authToken: string, email: { to: string; subject: string; body: string; provider?: EmailProvider; account?: string; }): Promise; } interface PrivateRuntimeCorrelation { sessionId: string; runtimeScopeId: string; readId?: string; } declare class ProfileRequester { private baseUrl; private appKey; private fetchFn; private timeout?; private defaultExternalId?; constructor(baseUrl: string, appKey: string, fetchFn: typeof fetch, timeout?: number | undefined, defaultExternalId?: string | undefined); private getHeaders; private resolveSubject; private createAbortSignal; read(runtime: ProfileRuntimeOptions, options?: ProfileReadOptions, correlation?: PrivateRuntimeCorrelation): Promise; search(runtime: ProfileRuntimeOptions, options?: ProfileSearchOptions | string, correlation?: PrivateRuntimeCorrelation): Promise; remember(runtime: ProfileRuntimeOptions, fact: string, options?: RememberOptions): Promise; import(runtime: ProfileRuntimeOptions, text: string, options?: { box?: string; kind?: 'memories' | 'context'; }): Promise; mcpSession(runtime: ProfileRuntimeOptions, options?: McpSessionOptions): Promise; connect(runtime: ProfileRuntimeOptions, options?: { app?: ConnectApp; capability?: ConnectCapability; purpose?: string; client?: string; client_name?: string; returnUrl?: string; }): Promise; forget(runtime: ProfileRuntimeOptions, selector: string | ForgetSelector, options?: { date?: string; reason?: 'correction' | 'user_request'; }): Promise; commit(runtime: ProfileRuntimeOptions, input: ProfileCommitInput, correlation?: PrivateRuntimeCorrelation): Promise; /** * Refresh the user's generated profile documents. Gated server-side: * serves cached documents unless profile inputs changed since the last * generation, and refreshes at most once per user per day — check * `cached` on the result. Raw memories and facts are always current on * reads regardless; only the prose documents are gated. */ generateDocuments(runtime: ProfileRuntimeOptions, documents?: ('user.md' | 'soul.md' | 'preferences.md' | 'context.md' | 'all')[]): Promise; } declare class ProfileRuntime { private requester; private connectorRequester; private filesRequester; private runtime; private enabledToolNames; private readonly sessionId; private runtimeScopeId; private pendingReadIds; constructor(requester: ProfileRequester, connectorRequester: ConnectorsModule, filesRequester: FilesModule, runtime: ProfileRuntimeOptions); read: (options?: ProfileReadOptions) => Promise; search: (options?: ProfileSearchOptions | string) => Promise; remember: (fact: string, options?: RememberOptions) => Promise; /** * Delete memories this agent wrote. Parity with the MCP `configure_profile_forget` * tool: pass a memory id string for a single delete, or a selector object to * delete by content (`match`, with `confirm: true` to go past the preview), * undo one import (`import_id`), or clear your own writes in bulk (`scope`). */ forget: (selector: string | ForgetSelector, options?: { date?: string; reason?: "correction" | "user_request"; }) => Promise; import: (text: string, options?: { box?: string; kind?: "memories" | "context"; }) => Promise; /** * Mint a Configure-hosted connect link. Parity with the MCP `configure_connect` * tool: with no options it mints a sign-in link; `app` targets a connector (or * `import`); `capability` asks for a specific scope upgrade (e.g. `gmail:send`). * Include the returned `connect_url` verbatim in your reply; never build links * yourself. * * `returnUrl` (https only) sends the user back into your product when the * hosted flow finishes — pass the page they were on. Configure forwards * automatically when the destination matches your app's known domain, and * otherwise shows them a button naming the host. */ connect: (options?: { app?: ConnectApp; capability?: ConnectCapability; purpose?: string; client?: string; client_name?: string; returnUrl?: string; }) => Promise; /** * Mint a SHORT-LIVED (15m) single-bearer MCP session for this user, so an * MCP-capable agent runtime can hold its own connection to Configure — * drop `mcp_servers` straight into the model call or the runtime's MCP * config. Mint per conversation; never store the token. `linked: false` * means the user has not approved this agent yet: personal tools fail * closed and configure_connect mints the sign-in link. * * If your runtime outlives one token, prefer `mcpAuth()` — it refreshes * for you. Refreshing by hand? Pass the token you are replacing as * `previousToken` so a read done on the old session can still be committed * on the new one. */ mcpSession: (options?: McpSessionOptions) => Promise; /** * A self-refreshing MCP session for runtimes that outlive one 15-minute * token (daemons, workers, long agent loops). Call `mcpServers()` before * EVERY model call — it returns the cached session while fresh and * transparently re-mints near expiry, carrying read/commit correlation * forward via `previousToken`. On an unexpected 401 from the MCP server, * call `invalidate()` and retry once. Nothing here extends a token's life: * every refresh is a fresh 15-minute mint under your live credential, so * revoking your key still cuts everything off within one TTL. * * Create ONE provider per user runtime and hold onto it. A new provider per * request has an empty cache every time, which means a mint per model call: * exactly the stampede the provider exists to prevent. */ mcpAuth: (options?: McpAuthOptions) => McpSessionProvider; commit: (input: ProfileCommitInput) => Promise; tools: (options?: ProfileToolsOptions) => ConfigureToolDefinition[]; /** * Execute one Configure tool call. * * `options.allow` names the tools THIS caller enabled, instead of relying on * the handle's set. That matters because `tools()` rewrites handle state, so * two consumers of one handle otherwise fight over it: whoever called * `tools()` last decides what everyone else may execute, and the loser gets * ACCESS_DENIED. Passing an allow-list keeps a caller's own selection local * and mutates nothing. */ executeTool: (toolCall: ConfigureToolCall, options?: { allow?: Iterable; }) => Promise; private correlation; private recordObligations; } declare function validateAgentHandle(agent: string): string; declare class Configure { /** Server/headless authentication helpers. Browser integrations should use Configure Link. */ readonly auth: AuthModule; /** Connector management and direct connector operations. */ readonly connectors: ConnectorsModule; /** Advanced raw profile file operations. */ readonly files: FilesModule; /** Server-side profile import/backfill job status helpers. */ readonly importJobs: ImportJobsModule; private readonly profileRequester; private readonly importRequester; constructor(options?: ConfigureOptions); profile(options?: ProfileRuntimeOptions): ProfileRuntime; importProfiles(input: ImportProfilesRequest): Promise; } /** * Error codes returned by SDK methods. * Use these to programmatically handle specific failure modes. * * @example * ```typescript * import { ConfigureError, ErrorCode } from 'configure'; * * try { * await profile.read(); * } catch (e) { * if (e instanceof ConfigureError && e.code === ErrorCode.AUTH_REQUIRED) { * // Token expired — re-authenticate * } * } * ``` */ declare const ErrorCode: { /** No API key provided to Configure */ readonly API_KEY_MISSING: "API_KEY_MISSING"; /** Token is missing, invalid, or expired (HTTP 401/403) */ readonly AUTH_REQUIRED: "AUTH_REQUIRED"; /** Input failed validation before reaching the API */ readonly INVALID_INPUT: "INVALID_INPUT"; /** The requested tool is not connected for this user (HTTP 400) */ readonly TOOL_NOT_CONNECTED: "TOOL_NOT_CONNECTED"; /** Network request failed (DNS, connection refused, etc.) */ readonly NETWORK_ERROR: "NETWORK_ERROR"; /** Too many requests (HTTP 429) */ readonly RATE_LIMITED: "RATE_LIMITED"; /** Resource not found (HTTP 404) */ readonly NOT_FOUND: "NOT_FOUND"; /** Server error (HTTP 5xx) */ readonly SERVER_ERROR: "SERVER_ERROR"; /** Request timed out */ readonly TIMEOUT: "TIMEOUT"; /** Not authorized for this resource (HTTP 403, distinct from AUTH_REQUIRED) */ readonly ACCESS_DENIED: "ACCESS_DENIED"; /** Tool operation failed (provider error, misconfiguration) */ readonly TOOL_ERROR: "TOOL_ERROR"; /** Billing/quota limit reached (HTTP 402) */ readonly PAYMENT_REQUIRED: "PAYMENT_REQUIRED"; /** A prior portable profile read must be committed before another portable read. */ readonly COMMIT_REQUIRED: "COMMIT_REQUIRED"; }; type ErrorCodeValue = (typeof ErrorCode)[keyof typeof ErrorCode]; /** Optional structured error details from a backend response. */ interface ErrorDetails { type?: string; param?: string | null; retryable?: boolean; suggestedAction?: string | null; docUrl?: string | null; retryAfter?: number | null; requestId?: string; } /** * Typed error thrown by all SDK methods. * Always has a `code` property for programmatic handling. */ declare class ConfigureError extends Error { /** Machine-readable error code (see {@link ErrorCode}) */ readonly code: ErrorCodeValue; /** HTTP status code from the API response, if applicable */ readonly statusCode?: number; /** Backend error type (e.g., "authentication_error", "tool_error") */ readonly type?: string; /** The field or parameter that caused the error, if applicable */ readonly param?: string | null; /** Whether the same request might succeed if retried */ readonly retryable?: boolean; /** Machine-readable suggested next action (e.g., "reauthenticate", "connect_tool") */ readonly suggestedAction?: string | null; /** Link to error documentation */ readonly docUrl?: string | null; /** Seconds to wait before retrying (rate limits) */ readonly retryAfter?: number | null; /** Request ID from the backend response */ readonly requestId?: string; constructor(code: ErrorCodeValue, message: string, statusCode?: number, details?: ErrorDetails); /** * Create a ConfigureError from an HTTP response body. * Parses structured error responses ({ error: { type, code, message, ... } }) * and falls back to status-code mapping for legacy string responses. */ static fromResponse(status: number, body: Record): ConfigureError; /** * Create a ConfigureError from a caught exception (network failures, timeouts). */ static fromCatch(error: unknown, fallbackMessage: string): ConfigureError; } /** * Classify any caught error into a ConfigureError. * Works with SDK errors, Anthropic errors, network errors, or plain strings. * Use in agent catch blocks for errors from any source. */ declare function classifyError(error: unknown): ConfigureError; type ConfigureHostedTheme = "light" | "dark"; type ConfigureHostedPresentation = "inline" | "modal"; type ConfigureHostedIntent = "link" | "signin"; type ConfigureHostedMethod = "phone"; type ConfigureHostedSurface = "auth" | "profile" | "connections" | "single_connector" | "access_request" | "memory_import" | "memory_card" | "confirmation" | "tool_approval"; interface ConfigureFrame { id: string; iframe: HTMLIFrameElement; destroy(): void; close(): void; refresh(): void; } interface ConfigureController { destroy(): void; close(): void; refresh(): void; } interface ConfigurePopupController extends ConfigureController { popup: Window | null; } interface ConfigurePersonalizationEntry extends ConfigureController { root: HTMLElement; open(): void; } interface ConfigureHostedEvent { type: string; frameId?: string; payload: Record; } interface ConfigureHostedBaseOptions { el?: string | Element; publishableKey: string; agent: string; baseUrl?: string; theme?: ConfigureHostedTheme; presentation?: ConfigureHostedPresentation; /** Legacy alias for presentation; public docs should use presentation. */ mode?: ConfigureHostedPresentation; intent?: ConfigureHostedIntent; /** Legacy alias for intent; public docs should use intent. */ flow?: ConfigureHostedIntent; /** Optional human-facing label for UI copy only. `agent` remains the identity handle. */ displayName?: string; /** Legacy alias for displayName. Public integrations should use displayName. */ agentName?: string; agentLogo?: string; /** Copy variant for hosted auth. Use "hosted" for co-branded agent sign-in, "configure" for Configure-owned surfaces. */ copyMode?: "configure" | "hosted" | string; font?: string; /** Optional max width for inline hosted artifacts. Defaults by surface. */ inlineWidth?: number | string; /** Alias for inlineWidth. */ inlineMaxWidth?: number | string; /** Legacy alias for inlineWidth. */ maxWidth?: number | string; onEvent?: (event: ConfigureHostedEvent) => void; props?: Record; } interface ConfigureHostedSessionOptions extends ConfigureHostedBaseOptions { token?: string; userId?: string; } interface ConfigureMountOptions extends ConfigureHostedBaseOptions { surface: ConfigureHostedSurface; token?: string; userId?: string; externalId?: string; loginHint?: string; methods?: ConfigureHostedMethod[] | string; connectors?: string[] | string; connector?: string; tool?: string; tools?: string[] | string; connected?: boolean; reconnectRequired?: boolean; error?: string; providers?: string[] | string; message?: string; description?: string; memories?: unknown[]; confirmLabel?: string; cancelLabel?: string; params?: Record; actionId?: string; timeoutSeconds?: number; maxVisible?: number; showSettings?: boolean; showActions?: boolean; } interface ConfigureLinkOptions extends ConfigureHostedBaseOptions { externalId?: string; loginHint?: string; methods?: ConfigureHostedMethod[] | string; token?: string; userId?: string; connectors?: string[] | string; tools?: string[] | string; } interface ConfigureSignInOptions extends ConfigureLinkOptions { } interface ConfigureSignInPopupOptions extends Omit { returnTo?: string; return_to?: string; callbackUrl?: string; callbackURL?: string; state?: string; /** If popup opening is blocked, redirect the current window to accounts.configure.dev. Defaults to "error". */ fallback?: "error" | "redirect"; popupName?: string; popupFeatures?: string; accountsOrigin?: string; } interface ConfigureProfileEditorOptions extends ConfigureHostedSessionOptions { } interface ConfigureConnectionsOptions extends ConfigureHostedSessionOptions { connectors?: string[] | string; tools?: string[] | string; } interface ConfigureSingleConnectorOptions extends ConfigureHostedSessionOptions { connector?: string; tool?: string; message?: string; name?: string; connected?: boolean; reconnectRequired?: boolean; error?: string; } interface ConfigureAccessRequestOptions extends ConfigureHostedSessionOptions { connector?: string; tool?: string; message?: string; description?: string; } interface ConfigureMemoryImportOptions extends ConfigureHostedSessionOptions { providers?: string[] | string; } interface ConfigureMemoryCardOptions extends ConfigureHostedBaseOptions { memories: unknown[]; maxVisible?: number; showSettings?: boolean; showActions?: boolean; } interface ConfigureConfirmationOptions extends ConfigureHostedBaseOptions { message: string; confirmLabel?: string; cancelLabel?: string; } interface ConfigureToolApprovalOptions extends ConfigureHostedBaseOptions { tool: string; params?: Record; actionId?: string; timeoutSeconds?: number; } interface ConfigurePersonalizationButtonOptions extends ConfigureHostedBaseOptions { token?: string; userId?: string; externalId?: string; /** Mount Configure Link into a separate inline chat panel instead of inside the trigger. */ linkEl?: string | Element; /** Alias for linkEl. */ inlineEl?: string | Element; /** Alias for linkEl. */ panelEl?: string | Element; connectors?: string[] | string; tools?: string[] | string; placeholder?: string; personalizationLabel?: string; imageLabel?: string; fileLabel?: string; variant?: 'menu' | 'integration' | 'lockup'; trigger?: 'menu' | 'integration' | 'lockup'; lockupSrc?: string; showImages?: boolean; showFiles?: boolean; onImage?: () => void; onFile?: () => void; onPersonalizationToggle?: (enabled: boolean) => void; } interface ConfigureWindow { mount(options: ConfigureMountOptions): ConfigureFrame | null; link(options: ConfigureLinkOptions): ConfigureFrame | null; signIn(options: ConfigureSignInOptions): ConfigureFrame | null; signInWithPopup(options: ConfigureSignInPopupOptions): ConfigurePopupController | null; signInPopup(options: ConfigureSignInPopupOptions): ConfigurePopupController | null; profileEditor(options: ConfigureProfileEditorOptions): ConfigureFrame | null; connections(options: ConfigureConnectionsOptions): ConfigureFrame | null; singleConnector(options: ConfigureSingleConnectorOptions): ConfigureFrame | null; accessRequest(options: ConfigureAccessRequestOptions): ConfigureFrame | null; memoryImport(options: ConfigureMemoryImportOptions): ConfigureFrame | null; memoryCard(options: ConfigureMemoryCardOptions): ConfigureFrame | null; confirmation(options: ConfigureConfirmationOptions): ConfigureFrame | null; toolApproval(options: ConfigureToolApprovalOptions): ConfigureFrame | null; personalizationButton(options: ConfigurePersonalizationButtonOptions): ConfigurePersonalizationEntry | ConfigureController | null; } declare global { interface Window { Configure?: ConfigureWindow; } } export { Configure, ConfigureError, type ConfigureOptions, type ConfigureWindow, ErrorCode, type ErrorCodeValue, classifyError, validateAgentHandle };