import type { Model } from "@openclaw/llm-core"; /** Strict-tool policy inputs for OpenAI-compatible routes. */ export interface OpenAIStrictToolSettingOptions { transport?: "stream" | "websocket"; supportsStrictMode?: boolean; } /** Narrow host ports consumed by the built-in provider adapters. */ export interface AiTransportHost { /** * Builds a policy-guarded fetch for one model request. * Returning undefined keeps the provider SDK's default fetch. */ buildModelFetch(model: Model, timeoutMs?: number, options?: { sanitizeSse?: boolean; }): typeof fetch | undefined; /** Resolves host-owned process-local secret sentinel substrings immediately before egress. */ resolveSecretSentinel(value: string): string; /** Redacts secrets inside structured tool-result payloads. */ redactSecrets(value: T): T; /** Redacts secret-bearing text in tool payload strings. */ redactToolPayloadText(text: string): string; /** * Resolves the host strict-tool default for OpenAI-compatible routes. * undefined lets the request omit the strict flag entirely. */ resolveOpenAIStrictToolSetting(model: Pick & { compat?: unknown; }, options?: OpenAIStrictToolSettingOptions): boolean | undefined; /** * Emits one transport diagnostic; build runs only when the host logs it and * may return null to suppress the entry (e.g. de-duplication). */ logDebug(subsystem: string, build: () => { message: string; data?: Record; } | null): void; } /** Installs host implementations for the transport policy ports. */ export declare function configureAiTransportHost(host: Partial): void; /** Returns the active transport host (inert defaults unless configured). */ export declare function getAiTransportHost(): AiTransportHost; /** Resolves sentinel substrings in custom headers at a no-fetch adapter boundary. */ export declare function resolveAiTransportHeaderSentinels(headers: Record | undefined): Record | undefined;