/** * Low-level HTTP transport for the TencentDB Agent Memory v2 API. * * - Auth: `Authorization: Bearer {apiKey}` + `x-tdai-service-id` + optional `x-tdai-user-key` * - Envelope unwrap: `code === 0` → return `data`; else throw `TDAMError` * - trace_id: extracted from `x-trace-id` response header * - Zero runtime dependencies — uses native `fetch`. * - TLS: `rejectUnauthorized` defaults to `false` (self-signed cert friendly). */ export interface HttpTransportOptions { endpoint: string; /** 网关 Bearer 密钥(KERNEL_AUTH_TOKEN / TDAI_GATEWAY_API_KEY)。 */ apiKey: string; /** 记忆实例 ID(x-tdai-service-id)。 */ serviceId: string; /** 用户 API 密钥(x-tdai-user-key);user/create、user/delete 须 system_admin key。 */ userKey?: string; timeout?: number; /** Whether to reject self-signed / invalid TLS certs. Default: false. */ rejectUnauthorized?: boolean; } export declare class HttpTransport { private readonly endpoint; private readonly headers; private readonly timeout; private dispatcher; constructor(opts: HttpTransportOptions); post(path: string, body?: Record): Promise; }