mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-26 02:31:20 +08:00
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
17 lines
688 B
TypeScript
17 lines
688 B
TypeScript
import { OneBotAction, OneBotRequestToolkit } from '../OneBotAction';
|
|
import { NetworkAdapterConfig } from '@/napcat-onebot/config/config';
|
|
export type StreamPacketBasic = {
|
|
type: StreamStatus;
|
|
data_type?: string;
|
|
};
|
|
export type StreamPacket<T> = T & StreamPacketBasic;
|
|
export enum StreamStatus {
|
|
Stream = 'stream', // 分片流数据包
|
|
Response = 'response', // 流最终响应
|
|
Reset = 'reset', // 重置流
|
|
Error = 'error', // 流错误
|
|
}
|
|
export abstract class BasicStream<T, R> extends OneBotAction<T, StreamPacket<R>> {
|
|
abstract override _handle (_payload: T, _adaptername: string, _config: NetworkAdapterConfig, req: OneBotRequestToolkit): Promise<StreamPacket<R>>;
|
|
}
|