import type { App } from '@solid/community-server'; import type http from 'node:http'; import type { AuthContext } from '../../api/auth/AuthContext'; import type { ApiServiceHandle } from '../../api/runtime'; import type { Supervisor } from '../../supervisor/Supervisor'; import type { RuntimeConnectionTarget, RuntimeHost } from '../host/types'; export interface CssRuntimeRunnerStartOptions { configPath: string; packageRoot: string; logLevel: string; shorthand: Record; } export interface CssRuntimeRunner { readonly name: string; start(options: CssRuntimeRunnerStartOptions): Promise; } export interface ApiRuntimeRunnerStartOptions { open: boolean; authContext: AuthContext; runtimeHost: RuntimeHost; } export interface ApiRuntimeRunner { readonly name: string; start(options: ApiRuntimeRunnerStartOptions): Promise; } export interface GatewayRuntimeRunnerStartOptions { port?: number; bindHost: string; socketPath?: string; shutdownHandler: () => Promise; baseUrl: string; runtimeHost: RuntimeHost; supervisor: Supervisor; internalAdminAuthSecret: string; clientRemoteAddressResolver?: (req: http.IncomingMessage) => string | undefined; /** * Loopback-only ingress listener for remote forwarding paths (tunnels, P2P). * Port transport only; socket transport has no remote ingress. */ ingressPort?: number; targets: { css: RuntimeConnectionTarget; api: RuntimeConnectionTarget; }; } export interface GatewayRuntimeHandle { stop(): Promise; } export interface GatewayRuntimeRunner { readonly name: string; start(options: GatewayRuntimeRunnerStartOptions): Promise; }