import type { WebResponse } from "@microsoft/agents-hosting"; import { TeamsApiError } from "./errors.js"; import type { TeamsConfig, TeamsHttpContext, TeamsHttpRequest, TeamsHttpResponse } from "./types.js"; /** 在内存中实现 Agents SDK 响应接口,作为所有 HTTP Host 的单一结构化边界。 */ export declare class StructuredAgentsResponse implements WebResponse { private ended; private sent; private statusCode; private readonly headers; private body; get headersSent(): boolean; get writableEnded(): boolean; status(code: number): this; setHeader(name: string, value: string): this; send(body?: unknown): this; end(): this; toResponse(): TeamsHttpResponse; } export declare function normalizeHeaders(headers: Readonly>): Record; /** 将宿主无关响应写回 OneBots/Koa Context。 */ export declare function applyTeamsHttpResponse(context: TeamsHttpContext, response: TeamsHttpResponse): void; /** 将宿主无关响应转换为 Fetch/WinterCG 标准响应。 */ export declare function toTeamsFetchResponse(response: TeamsHttpResponse): Response; /** 跨 realm 识别 Fetch/WinterCG Request,不依赖 instanceof。 */ export declare function isTeamsFetchRequest(value: unknown): value is Request; /** 解析标准 Request,并把它桥接到结构化 Teams HTTP 入口。 */ export declare function acceptTeamsFetchRequest(request: Request, ingest: (input: TeamsHttpRequest) => Promise, reportError: (error: TeamsApiError) => void): Promise; export declare function resolveTeamsWebhookPath(config: TeamsConfig, defaultPath: string): string; export declare function resolveTeamsReceiveMode(config: TeamsConfig): "webhook" | "manual"; export declare function bodyValue(value: unknown): Record; export declare function responsePayload(response: Response): Promise; export declare function recordValue(value: unknown, key: string): unknown; export declare function recordString(value: unknown, key: string): string | undefined; export declare function graphErrorCode(value: unknown): string; export declare function graphTokenAuthority(authority: string, tenantId: string): string; export declare function allowedServiceUrlHosts(entries: TeamsConfig["allowed_service_urls"]): string[]; export declare function requireHttpsConfigUrl(value: string, name: string): string; //# sourceMappingURL=bot-utils.d.ts.map