/**
 * Bootstrap module for single-token SDK initialization.
 *
 * Usage:
 * ```typescript
 * import { Syntro } from '@syntrologie/runtime-sdk';
 *
 * const { canvas, runtime } = await Syntro.init({
 *   token: "syn_eyJ2IjoxLCJleHAiOnsiayI6InNkay14eHgiLCJwIjoiZ3Jvd3RoYm9vayJ9fQ"
 * });
 *
 * // Access runtime providers
 * runtime.telemetry?.trackAction(...);
 * runtime.context.subscribe((ctx, prev) => { ... });
 * runtime.events.subscribe({ names: ['ui.click'] }, (event) => { ... });
 * runtime.state.dismissals.mark('my-tile');
 * ```
 */
import { type SmartCanvasConfig, type SmartCanvasHandle } from './api';
import type { appRegistry } from './apps';
import { type AppLoader } from './apps/AppLoader';
import type { ExperimentClient } from './experiments/types';
import { type SessionMetricTracker } from './metrics';
import { type SmartCanvasRuntime } from './runtime';
import type { TelemetryClient } from './telemetry/types';
import { decodeToken, encodeToken } from './token';
import type { CanvasConfigFetcher } from './types';
export interface SyntroInitOptions {
    /**
     * The Syntro token containing all credentials.
     * Generated from your admin dashboard.
     *
     * Optional in editor mode (when editor_token is present in URL params).
     */
    token?: string;
    /**
     * Optional canvas configuration overrides.
     */
    canvas?: Partial<Omit<SmartCanvasConfig, 'integrations' | 'fetcher'>>;
    /**
     * Custom config fetcher to override the default experiment-based fetcher.
     * Use this for local development or when bypassing the experiment server.
     *
     * When provided, this fetcher is used instead of the experiments-based config lookup.
     * The token's telemetry credentials (t field) are still used if present.
     */
    fetcher?: CanvasConfigFetcher;
    /**
     * Enable session-based metric tracking.
     * When true, a SessionMetricTracker is created that tracks metrics during
     * the user's session and updates GrowthBook attributes in real-time.
     *
     * @default false
     */
    enableSessionMetrics?: boolean;
    /**
     * CDN base URL for loading adaptive bundles.
     * Adaptives are loaded from: {cdnBase}/adaptives/{appId}/index.js
     *
     * @default "https://cdn.syntrologie.com"
     */
    cdnBase?: string;
    /**
     * @deprecated Core app executors are now registered synchronously.
     * This option has no effect and will be removed in a future version.
     */
    registerBuiltInApps?: boolean;
}
export interface SyntroInitResult {
    /**
     * The SmartCanvas handle for controlling the canvas.
     */
    canvas: SmartCanvasHandle;
    /**
     * The unified v2 runtime with all providers.
     * Use this to access telemetry, context, events, and state.
     */
    runtime: SmartCanvasRuntime;
    /**
     * The experiment client, if experiments are configured in the token.
     * @deprecated Access via runtime.telemetry or use DecisionStrategy instead
     */
    experiments?: ExperimentClient;
    /**
     * The telemetry client, if telemetry is configured in the token.
     * @deprecated Access via runtime.telemetry instead
     */
    telemetry?: TelemetryClient;
    /**
     * The session metric tracker, if enableSessionMetrics is true.
     * @deprecated Access via runtime.sessionMetrics instead
     */
    sessionMetrics?: SessionMetricTracker;
    /**
     * App loader for loading external apps from CDN.
     * Exposed for manual app loading if needed.
     */
    appLoader: AppLoader;
}
/**
 * Initialize the Syntro SDK with a single token.
 *
 * Environment variable overrides (for dev):
 *   SYNTRO_EXPERIMENT_HOST - Override experiment server URL
 *   SYNTRO_TELEMETRY_HOST  - Override telemetry server URL
 *
 * In editor mode (when editor_token is in URL), the token is optional.
 * The editor SDK handles its own authentication.
 *
 * @param options - Initialization options
 * @returns The initialized SDK components
 */
declare function init(options: SyntroInitOptions): Promise<SyntroInitResult>;
/**
 * The Syntro namespace for single-token initialization.
 */
export declare const Syntro: {
    init: typeof init;
    encodeToken: typeof encodeToken;
    decodeToken: typeof decodeToken;
};
declare global {
    interface Window {
        Syntro?: typeof Syntro;
        SynOS?: {
            appRegistry: typeof appRegistry;
            runtime: SmartCanvasRuntime;
            version: string;
        };
    }
}
export {};
