import type { IncomingMessage, ServerResponse } from 'node:http'; import type { ConfigStore } from '../config/store.js'; import type { Logger } from '../log/logger.js'; import type { UsageStore } from '../status/usage-store.js'; import type { CaptureBuffer } from './capture.js'; import type { StatusTracker } from '../status/tracker.js'; import type { RouterResult } from './types.js'; import type { InboundType } from './translation.js'; import type { VisionCache } from './vision-cache.js'; export interface ParseResult { body: Record; rawBody: string; modelName: string; } /** * 解析请求 Body、JSON 解析、代理认证、提取 model。 * 成功返回 { body, rawBody, modelName },失败直接写响应并返回 null。 */ export declare function parseAndAuth(req: IncomingMessage, res: ServerResponse, store: ConfigStore, logger: Logger, logLabel: string): Promise; /** 流水线上下文——与 ServerContext/ProxyContext 结构相同 */ export interface PipelineContext { store: ConfigStore; tracker: StatusTracker; logger: Logger; usageStore: UsageStore; capture?: CaptureBuffer; visionCache?: VisionCache; } /** * 执行代理转发流水线:transformInboundRequest → forwardRequest → capture → token 统计 → 计时。 * 响应由 forwardRequest 直接写入 res。 */ export declare function forwardPipeline(ctx: PipelineContext, req: IncomingMessage, res: ServerResponse, body: Record, rawBody: string, route: RouterResult, inboundType: InboundType, logLabel: string, /** 适配器名称(适配器请求时传入) */ adapterName?: string): Promise; //# sourceMappingURL=pipeline.d.ts.map