import type { Server } from 'node:http'; import type { ConfigStore } from '../config/store.js'; import type { StatusTracker } from '../status/tracker.js'; import type { UsageStore } from '../status/usage-store.js'; import type { CaptureBuffer } from '../proxy/capture.js'; import type { VisionCache } from '../proxy/vision-cache.js'; import type { Logger } from '../log/logger.js'; import { AdminHandoffStore } from './handlers/index.js'; export interface ServerContext { store: ConfigStore; tracker: StatusTracker; usageStore: UsageStore; logger: Logger; capture?: CaptureBuffer; visionCache?: VisionCache; /** 配置端口变化后的服务内重绑定。 */ rebindPort?: (port: number) => Promise; /** 配置语言变化后的后端运行时同步。 */ changeLocale?: (locale: string) => void; adminHandoffs: AdminHandoffStore; } export interface ServerOptions { adminHost: string; adminPort: number; proxyHost: string; proxyPort: number; store: ConfigStore; tracker: StatusTracker; usageStore: UsageStore; logger: Logger; capture?: CaptureBuffer; visionCache?: VisionCache; onPortChanged?: (port: number) => void; changeLocale?: (locale: string) => void; } export declare function createProxyServer(opts: ServerOptions): Server; //# sourceMappingURL=server.d.ts.map