import type { Languages as GrammarLanguage } from '../grammars/index.ts'; import type { GetTokensOptions, TokenizedLines } from '../utils/get-tokens.ts'; import type { SourceTextHydrationMetadata } from './query/source-text-metadata.ts'; import type { QuickInfoAtPosition } from '../utils/get-quick-info-at-position.ts'; import { type AnalysisClientBrowserRefreshNotification as ClientBrowserRefreshNotification } from './client-refresh-state.ts'; import { type AnalysisServerRuntime } from './runtime-env.ts'; import type { AnalysisOptions } from './types.ts'; export type { AnalysisClientBrowserRefreshNotification } from './client-refresh-state.ts'; export { getAnalysisClientBrowserRuntime, onAnalysisClientBrowserRuntimeChange, } from './browser-runtime.ts'; export { getAnalysisClientRetainedBrowserRuntimeActivationKey, hasRetainedAnalysisClientBrowserRuntime, onAnalysisClientBrowserRuntimeRetentionChange, } from './client-browser-runtime-retention.ts'; export { onAnalysisClientRefreshVersionChange } from './client-refresh-state.ts'; /** * A monotonic version that advances as refresh notifications invalidate client * runtime state. UI caches can include this to avoid stale data after edits. */ export declare function getAnalysisClientRefreshVersion(runtime?: AnalysisServerRuntime): string; export declare function onAnalysisClientBrowserRefreshNotification(listener: (message: ClientBrowserRefreshNotification) => void): () => void; export declare function subscribeToAnalysisClientBrowserRuntimeRefresh(runtime: AnalysisServerRuntime, listener: (message: ClientBrowserRefreshNotification) => void): () => void; export declare function setAnalysisClientBrowserRuntime(runtime?: AnalysisServerRuntime): void; export declare function retainAnalysisClientBrowserRuntime(runtime?: AnalysisServerRuntime, options?: { preferCurrentRuntime?: boolean; }): () => void; export interface AnalysisClientRuntimeOptions { useRpcCache?: boolean; rpcCacheTtlMs?: number; consumeRefreshNotifications?: boolean; } export declare function configureAnalysisClientRuntime(options: AnalysisClientRuntimeOptions): void; export declare function resetAnalysisClientRuntimeConfiguration(): void; declare function disposeAnalysisBrowserClient(): void; /** * Resolve quick info for a symbol position in a source file. */ export declare function getQuickInfoAtPosition(filePath: string, position: number, analysisOptions?: AnalysisOptions, runtime?: AnalysisServerRuntime, cacheKey?: string, sourceMetadata?: SourceTextHydrationMetadata): Promise; /** * Read source text for a CodeBlock path through the active analysis runtime. */ export declare function getCodeBlockSourceText(options: { filePath: string; baseDirectory?: string; runtime?: AnalysisServerRuntime; }): Promise; /** * Tokenize source text based on a language and return highlighted tokens. */ export declare function getTokens(options: Omit & { languages?: GrammarLanguage[]; analysisOptions?: AnalysisOptions; waitForWarmResult?: boolean; runtime?: AnalysisServerRuntime; }): Promise; declare function setAnalysisClientRefreshVersionForTests(version: string): void; declare function clearAnalysisClientStateForTests(): void; export declare const __TEST_ONLY__: { clearAnalysisClientRpcState: typeof clearAnalysisClientStateForTests; disposeAnalysisBrowserClient: typeof disposeAnalysisBrowserClient; setAnalysisClientRefreshVersion: typeof setAnalysisClientRefreshVersionForTests; };