refactor: trim test harness internal exports · openclaw/openclaw@d464537
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,15 +6,15 @@ import { createInMemorySessionStore } from "./session.js";
|
6 | 6 | import { AcpGatewayAgent } from "./translator.js"; |
7 | 7 | import { createAcpConnection, createAcpGateway } from "./translator.test-helpers.js"; |
8 | 8 | |
9 | | -export type PendingPromptHarness = { |
| 9 | +type PendingPromptHarness = { |
10 | 10 | agent: AcpGatewayAgent; |
11 | 11 | promptPromise: ReturnType<AcpGatewayAgent["prompt"]>; |
12 | 12 | runId: string; |
13 | 13 | }; |
14 | 14 | |
15 | | -export const DEFAULT_SESSION_ID = "session-1"; |
| 15 | +const DEFAULT_SESSION_ID = "session-1"; |
16 | 16 | export const DEFAULT_SESSION_KEY = "agent:main:main"; |
17 | | -export const DEFAULT_PROMPT_TEXT = "hello"; |
| 17 | +const DEFAULT_PROMPT_TEXT = "hello"; |
18 | 18 | |
19 | 19 | export function createSessionAgentHarness( |
20 | 20 | request: GatewayClient["request"], |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import type { AgentSideConnection } from "@agentclientprotocol/sdk";
|
2 | 2 | import { vi } from "vitest"; |
3 | 3 | import type { GatewayClient } from "../gateway/client.js"; |
4 | 4 | |
5 | | -export type TestAcpConnection = AgentSideConnection & { |
| 5 | +type TestAcpConnection = AgentSideConnection & { |
6 | 6 | __sessionUpdateMock: ReturnType<typeof vi.fn>; |
7 | 7 | }; |
8 | 8 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ const require = createRequire(import.meta.url);
|
9 | 9 | const SDK_CLIENT_INDEX_PATH = require.resolve("@modelcontextprotocol/sdk/client/index.js"); |
10 | 10 | const SDK_CLIENT_STDIO_PATH = require.resolve("@modelcontextprotocol/sdk/client/stdio.js"); |
11 | 11 | |
12 | | -export { writeBundleProbeMcpServer, writeClaudeBundle, writeExecutable }; |
| 12 | +export { writeBundleProbeMcpServer, writeClaudeBundle }; |
13 | 13 | |
14 | 14 | export async function writeFakeClaudeLiveCli(params: { |
15 | 15 | filePath: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,7 @@ import type { MockFn } from "../test-utils/vitest-mock-fn.js";
|
5 | 5 | import { __testing as subagentAnnounceTesting } from "./subagent-announce.js"; |
6 | 6 | import { __testing as subagentControlTesting } from "./subagent-control.js"; |
7 | 7 | |
8 | | -export type LoadedConfig = ReturnType<(typeof import("../config/config.js"))["getRuntimeConfig"]>; |
| 8 | +type LoadedConfig = ReturnType<(typeof import("../config/config.js"))["getRuntimeConfig"]>; |
9 | 9 | |
10 | 10 | export const callGatewayMock: MockFn = vi.fn(); |
11 | 11 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。