mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 12:31:45 +00:00
18 lines
527 B
TypeScript
18 lines
527 B
TypeScript
import type { AgentSideConnection } from "@agentclientprotocol/sdk";
|
|
import { vi } from "vitest";
|
|
import type { GatewayClient } from "../gateway/client.js";
|
|
|
|
export function createAcpConnection(): AgentSideConnection {
|
|
return {
|
|
sessionUpdate: vi.fn(async () => {}),
|
|
} as unknown as AgentSideConnection;
|
|
}
|
|
|
|
export function createAcpGateway(
|
|
request: GatewayClient["request"] = vi.fn(async () => ({ ok: true })) as GatewayClient["request"],
|
|
): GatewayClient {
|
|
return {
|
|
request,
|
|
} as unknown as GatewayClient;
|
|
}
|