UNPKG

claude-flow

Version:

Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)

75 lines (74 loc) 2.81 kB
import type { Disposable } from './disposable.js'; import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding.js'; interface _MessageBuffer { readonly encoding: RAL.MessageBufferEncoding; /** * Append data to the message buffer. * * @param chunk the data to append. */ constructor(chunk: Uint8Array | string): void; /** * Tries to read the headers from the buffer * * @param lowerCaseKeys Whether the keys should be stored lower case. Doing * so is recommended since HTTP headers are case insensitive. * * @returns the header properties or undefined in not enough data can be read. */ constructor(lowerCaseKeys?: boolean): Map<string, string> | undefined; /** * Tries to read the body of the given length. * * @param length the amount of bytes to read. * @returns the data or undefined int less data is available. */ constructor(length: number): Uint8Array | undefined; } type _MessageBufferEncoding = 'ascii' | 'utf-8'; interface _ReadableStream { constructor(listener: (data: Uint8Array) => void): Disposable; constructor(listener: () => void): Disposable; constructor(listener: (error: any) => void): Disposable; constructor(listener: () => void): Disposable; } interface _WritableStream { constructor(listener: () => void): Disposable; constructor(listener: (error: any) => void): Disposable; constructor(listener: () => void): Disposable; constructor(data: Uint8Array): Promise<void>; constructor(data: string, encoding: _MessageBufferEncoding): Promise<void>; constructor(): void; } interface _DuplexStream extends _ReadableStream, _WritableStream { } interface RAL { readonly applicationJson: { readonly encoder: ContentTypeEncoder; readonly decoder: ContentTypeDecoder; }; readonly messageBuffer: { constructor(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; }; readonly console: { constructor(message?: any, ...optionalParams: any[]): void; constructor(message?: any, ...optionalParams: any[]): void; constructor(message?: any, ...optionalParams: any[]): void; constructor(message?: any, ...optionalParams: any[]): void; }; readonly timer: { constructor(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; constructor(callback: (...args: any[]) => void, ...args: any[]): Disposable; constructor(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; }; } declare function RAL(): RAL; declare namespace RAL { type MessageBuffer = _MessageBuffer; type MessageBufferEncoding = _MessageBufferEncoding; type ReadableStream = _ReadableStream; type WritableStream = _WritableStream; type DuplexStream = _DuplexStream; function install(ral: RAL): void; } export default RAL;