mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:40:44 +00:00
refactor: trim test harness internal exports
This commit is contained in:
@@ -6,15 +6,15 @@ import { createInMemorySessionStore } from "./session.js";
|
||||
import { AcpGatewayAgent } from "./translator.js";
|
||||
import { createAcpConnection, createAcpGateway } from "./translator.test-helpers.js";
|
||||
|
||||
export type PendingPromptHarness = {
|
||||
type PendingPromptHarness = {
|
||||
agent: AcpGatewayAgent;
|
||||
promptPromise: ReturnType<AcpGatewayAgent["prompt"]>;
|
||||
runId: string;
|
||||
};
|
||||
|
||||
export const DEFAULT_SESSION_ID = "session-1";
|
||||
const DEFAULT_SESSION_ID = "session-1";
|
||||
export const DEFAULT_SESSION_KEY = "agent:main:main";
|
||||
export const DEFAULT_PROMPT_TEXT = "hello";
|
||||
const DEFAULT_PROMPT_TEXT = "hello";
|
||||
|
||||
export function createSessionAgentHarness(
|
||||
request: GatewayClient["request"],
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { AgentSideConnection } from "@agentclientprotocol/sdk";
|
||||
import { vi } from "vitest";
|
||||
import type { GatewayClient } from "../gateway/client.js";
|
||||
|
||||
export type TestAcpConnection = AgentSideConnection & {
|
||||
type TestAcpConnection = AgentSideConnection & {
|
||||
__sessionUpdateMock: ReturnType<typeof vi.fn>;
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const require = createRequire(import.meta.url);
|
||||
const SDK_CLIENT_INDEX_PATH = require.resolve("@modelcontextprotocol/sdk/client/index.js");
|
||||
const SDK_CLIENT_STDIO_PATH = require.resolve("@modelcontextprotocol/sdk/client/stdio.js");
|
||||
|
||||
export { writeBundleProbeMcpServer, writeClaudeBundle, writeExecutable };
|
||||
export { writeBundleProbeMcpServer, writeClaudeBundle };
|
||||
|
||||
export async function writeFakeClaudeLiveCli(params: {
|
||||
filePath: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { MockFn } from "../test-utils/vitest-mock-fn.js";
|
||||
import { __testing as subagentAnnounceTesting } from "./subagent-announce.js";
|
||||
import { __testing as subagentControlTesting } from "./subagent-control.js";
|
||||
|
||||
export type LoadedConfig = ReturnType<(typeof import("../config/config.js"))["getRuntimeConfig"]>;
|
||||
type LoadedConfig = ReturnType<(typeof import("../config/config.js"))["getRuntimeConfig"]>;
|
||||
|
||||
export const callGatewayMock: MockFn = vi.fn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user