/**
 * Workbench NET API wire protocol encoder/decoder.
 *
 * Protocol format (per request):
 *   [int32LE protocolVersion=1]
 *   [pascalString clientId]
 *   [pascalString contentType="JsonRPC"]
 *   [pascalString payload (JSON)]
 *
 * Pascal string = 4-byte LE length prefix + UTF-8 content.
 * Each call uses a fresh TCP connection.
 */
/** Encode a 32-bit signed integer as 4-byte little-endian Buffer. */
export declare function encodeInt32LE(value: number): Buffer;
/** Decode a 32-bit signed integer from a Buffer at the given offset. */
export declare function decodeInt32LE(buf: Buffer, offset: number): {
    value: number;
    bytesRead: number;
};
/** Encode a string as a Pascal-style string: [int32LE length][UTF-8 bytes]. */
export declare function encodePascalString(s: string): Buffer;
/** Decode a Pascal-style string from a Buffer at the given offset. */
export declare function decodePascalString(buf: Buffer, offset: number): {
    value: string;
    bytesRead: number;
};
/**
 * Encode a full Workbench NET API request.
 *
 * @param clientId  Identifier for this client (e.g. "ClaudeMCP")
 * @param apiFunc   The NetApiHandler class name or built-in function
 * @param params    Additional JSON parameters merged into the payload
 * @returns Complete request buffer ready to send over TCP
 */
export declare function encodeRequest(clientId: string, apiFunc: string, params?: Record<string, unknown>): Buffer;
/**
 * Decode a Workbench NET API response.
 *
 * Response wire format:
 *   [pascalString status]   — "Ok" on success, error message otherwise
 *   [pascalString payload]  — JSON data (only present when status is "Ok")
 *
 * @param buf  Raw response bytes from the TCP socket
 * @returns Parsed JSON object from the payload
 * @throws Error if status is not "Ok" or payload JSON is invalid
 */
export declare function decodeResponse<T = Record<string, unknown>>(buf: Buffer): T;
//# sourceMappingURL=protocol.d.ts.map