import { GatewayRequestClient } from "./gateway-request-client.js"; import { type GatewayVerificationOperation } from "./gateway-verification-client.js"; import type { GatewayVerificationReply } from "../gateway/verification-contracts.js"; import type { GatewayMessageDebugReply } from "../gateway/message-debug-contracts.js"; import { type GatewaySendResult } from "../gateway/send-contracts.js"; import { type ControlSendContext, type ControlSendRequest } from "@onebots/core/control"; import { GatewayMcpClient } from "./gateway-mcp-client.js"; import type { GatewayMcpRequest, GatewayMcpResult } from "../gateway/mcp-contracts.js"; import { type ChildProcess } from "node:child_process"; import { type GatewayStartMessage } from "../gateway/contracts.js"; import { type GatewayDriver, type GatewayInstance } from "./gateway-controller.js"; export interface GatewayPreparation { configPath: string; workspacePath: string; selection: GatewayStartMessage["selection"]; configVersion: string; dependencyVersion: string; entrypoint: string; runtimeRoot: string; } export interface NodeGatewayDriverOptions { controlInstanceId: string; prepare(): Promise; onExit(instanceId: string, error?: string): void; startupTimeoutMs?: number; stopTimeoutMs?: number; } interface ManagedChild { child: ChildProcess; id: string; closed: Promise; exited: boolean; stopping: boolean; mcp?: GatewayMcpClient; requests?: GatewayRequestClient; sendContext?: ControlSendContext; messageDebug?: boolean; verificationConfig?: string; accounts?: Array<{ platform: string; accountId: string; status: "pending" | "online" | "offline"; }>; } /** This is process lifecycle isolation, not a security sandbox for hostile plugins. */ export declare class NodeGatewayDriver implements GatewayDriver { private readonly options; private readonly children; private starting; constructor(options: NodeGatewayDriverOptions); hasLiveChildren(): boolean; accountStatuses(instanceId: string): { available: boolean; items: NonNullable; }; start(): Promise; sendContext(instanceId: string): ControlSendContext | undefined; send(instanceId: string, request: ControlSendRequest): Promise; messageDebug(instanceId: string, action: "history" | "clear"): Promise; verificationContext(instanceId: string): { gatewayInstanceId: string; configVersion: string; } | undefined; verification(instanceId: string, operation: GatewayVerificationOperation): Promise; mcp(instanceId: string, request: GatewayMcpRequest): Promise; stop(instance: GatewayInstance): Promise; private track; private handshake; private terminate; } export {}; //# sourceMappingURL=gateway-driver.d.ts.map