/**
 * Cursor Protobuf Decoder
 * Implements ConnectRPC protobuf wire format decoding
 */
/// <reference types="node" />
/// <reference types="node" />
import { type WireType } from './cursor-protobuf-schema.js';
/**
 * Decode a varint from buffer
 * Returns [value, newOffset]
 */
export declare function decodeVarint(buffer: Uint8Array, offset: number): [number, number];
/**
 * Decode a single protobuf field
 * Returns [fieldNum, wireType, value, newOffset]
 */
export declare function decodeField(buffer: Uint8Array, offset: number): [number | null, WireType | null, Uint8Array | number | null, number];
/**
 * Decode a protobuf message into a map of fields
 */
export declare function decodeMessage(data: Uint8Array): Map<number, Array<{
    wireType: WireType;
    value: Uint8Array | number;
}>>;
/**
 * Parse ConnectRPC frame from buffer
 * Returns frame data or null if incomplete
 */
export declare function parseConnectRPCFrame(buffer: Buffer): {
    flags: number;
    length: number;
    payload: Uint8Array;
    consumed: number;
} | null;
/**
 * Extract text and tool calls from response payload
 */
export declare function extractTextFromResponse(payload: Uint8Array): {
    text: string | null;
    error: string | null;
    toolCall: {
        id: string;
        type: string;
        function: {
            name: string;
            arguments: string;
        };
        isLast: boolean;
    } | null;
    thinking: string | null;
};
//# sourceMappingURL=cursor-protobuf-decoder.d.ts.map