This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/@agentclientprotocol/sdk/dist/stream.d.ts
T

25 lines
949 B
TypeScript

import type { AnyMessage } from "./jsonrpc.js";
/**
* Stream interface for ACP connections.
*
* This type powers the bidirectional communication for an ACP connection,
* providing readable and writable streams of messages.
*
* The most common way to create a Stream is using {@link ndJsonStream}.
*/
export type Stream = {
writable: WritableStream<AnyMessage>;
readable: ReadableStream<AnyMessage>;
};
/**
* Creates an ACP Stream from a pair of newline-delimited JSON streams.
*
* This is the typical way to handle ACP connections over stdio, converting
* between AnyMessage objects and newline-delimited JSON.
*
* @param output - The writable stream to send encoded messages to
* @param input - The readable stream to receive encoded messages from
* @returns A Stream for bidirectional ACP communication
*/
export declare function ndJsonStream(output: WritableStream<Uint8Array>, input: ReadableStream<Uint8Array>): Stream;