import type { AuthContext } from '../api/auth/AuthContext'; import type http from 'node:http'; import type { Supervisor } from '../supervisor/Supervisor'; import type { AuthMode } from '../authorization/AuthMode'; import type { RuntimeDriver } from './driver/types'; import type { RuntimeHost } from './host/types'; import type { RuntimePlatform } from './platform/types'; import type { ApiRuntimeRunner, CssRuntimeRunner, GatewayRuntimeRunner } from './runner/types'; export interface XpodRuntimePorts { gateway?: number; css?: number; api?: number; ingress?: number; } export interface XpodRuntimeSockets { gateway?: string; css?: string; api?: string; } export interface XpodRuntimeOptions { mode?: 'local' | 'cloud'; open?: boolean; authMode?: AuthMode; apiOpen?: boolean; authContext?: AuthContext; envFile?: string; env?: Record; shorthand?: Record; baseUrl?: string; bindHost?: string; transport?: 'auto' | 'socket' | 'port'; runtimeRoot?: string; rootFilePath?: string; sparqlEndpoint?: string; rdfIndexPath?: string; identityDbUrl?: string; usageDbUrl?: string; logLevel?: string; seedConfig?: string; gatewayPort?: number; cssPort?: number; apiPort?: number; gatewaySocketPath?: string; cssSocketPath?: string; apiSocketPath?: string; edgeNodesEnabled?: boolean; centerRegistrationEnabled?: boolean; driver?: RuntimeDriver; host?: RuntimeHost; platform?: RuntimePlatform; cssRunner?: CssRuntimeRunner; apiRunner?: ApiRuntimeRunner; gatewayRunner?: GatewayRuntimeRunner; gatewayClientRemoteAddressResolver?: (req: http.IncomingMessage) => string | undefined; } export interface XpodRuntimeHandle { id: string; mode: 'local' | 'cloud'; transport: 'socket' | 'port'; baseUrl: string; supervisor: Supervisor; ports: XpodRuntimePorts; sockets: XpodRuntimeSockets; fetch: (input: string | URL | Request, init?: RequestInit) => Promise; stop: () => Promise; }