/** * Agent 本机 RPC server 网络层。 * * 职责说明(中文) * - 为本机 `RemoteAgent(rpc://...)` 与 downcity runtime 提供 Agent RPC 入口。 * - 只负责 TCP/NDJSON framing、socket 生命周期与订阅清理。 * - 具体 `sdk.*` / `internal.*` 方法由 server handlers 承接。 */ import net from "node:net"; import type { RpcServerStartOptions } from "./server/ServerTypes.js"; /** * RPC server 运行实例。 */ export interface RpcServerInstance { /** 当前监听 host。 */ host: string; /** 当前监听 port。 */ port: number; /** 当前访问 URL。 */ url: string; /** 原生 net server。 */ server: net.Server; /** 停止当前服务。 */ stop(): Promise; } /** * 启动 Agent 本机 RPC server。 */ export declare function start_rpc_server(options: RpcServerStartOptions): Promise; //# sourceMappingURL=RpcServer.d.ts.map