export { getProcessEnv } from './env';
export { buildUrl, defaultBaseUrl } from './url';
export { resolveDevWebSocketUrl } from './dev-ws';
export { deserializeData } from './serialization';
export { createReconnectManager, type ReconnectOptions, type ReconnectManager } from './reconnect';
export { jsonEqual } from './memo';
export {
	WebSocketManager,
	type MessageHandler as WebSocketMessageHandler,
	type WebSocketCallbacks,
	type WebSocketManagerOptions,
	type WebSocketManagerState,
} from './websocket-manager';
export {
	EventStreamManager,
	type MessageHandler as EventStreamMessageHandler,
	type EventStreamCallbacks,
	type EventStreamManagerOptions,
	type EventStreamManagerState,
} from './eventstream-manager';
export {
	WebRTCManager,
	UserMediaSource,
	DisplayMediaSource,
	CustomStreamSource,
	type WebRTCManagerOptions,
	type WebRTCManagerState,
	type WebRTCClientCallbacks,
	type TrackSource,
} from './webrtc-manager';

// Re-export core WebRTC types for convenience
export type {
	WebRTCConnectionState,
	WebRTCDisconnectReason,
	DataChannelConfig,
	DataChannelMessage,
	DataChannelState,
	ConnectionQualitySummary,
	RecordingOptions,
	RecordingHandle,
	RecordingState,
} from '@agentuity/core';

// Export analytics (beacon is bundled separately via beacon-standalone.ts)
export {
	getAnalytics,
	track,
	getVisitorId,
	isOptedOut,
	setOptOut,
	getUTMParams,
	type AnalyticsClient,
	type AnalyticsPayload,
	type AnalyticsPageConfig,
	type PageViewPayload,
	type ScrollEvent,
	type AnalyticsCustomEvent,
	type GeoLocation,
} from './analytics';

// Re-export beacon script for server-side use
// The actual value is replaced at build time by scripts/build-beacon.ts
export { BEACON_SCRIPT, validateBeaconScript } from './beacon-script';
