test(agent): prompt eval with fake model and real-model comparison harness
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
21b7e8ff23
commit
425415b3ba
5 files changed
+705
No files matched your search
@@ -20,6 +20,7 @@ import { type Bootstrapped, bootstrap } from "../../src/context.ts";
|
||||
import { createApp } from "../../src/http/app.ts";
|
||||
import { EventBus } from "../../src/http/sse.ts";
|
||||
import { createLogger } from "../../src/logger.ts";
|
||||
import type { AgentModuleOptions } from "../../src/modules/agent/runner.ts";
|
||||
import type { BrowserModuleOptions } from "../../src/modules/browser/service.ts";
|
||||
import { setDefaultUpstream } from "../../src/modules/pi/store.ts";
|
||||
import type { ServerModule } from "../../src/modules/types.ts";
|
||||
@@ -84,6 +85,8 @@ export interface E2EOptions {
|
||||
webSearch?: WebSearchModuleOptions;
|
||||
/** 浏览器模块注入(E14) */
|
||||
browser?: BrowserModuleOptions;
|
||||
/** 智能体模块的额外参数(E16:替换 / 捕获系统提示) */
|
||||
agent?: Pick<AgentModuleOptions, "systemPrompt">;
|
||||
}
|
||||
|
||||
export async function waitFor<T>(
|
||||
@@ -140,6 +143,7 @@ export async function createE2E(name: string, opts: E2EOptions = {}): Promise<E2
|
||||
...(opts.fakeScripts ? { fakeScripts: opts.fakeScripts } : {}),
|
||||
...(opts.webSearch ? { webSearch: opts.webSearch } : {}),
|
||||
...(opts.browser ? { browser: opts.browser } : {}),
|
||||
...(opts.agent ? { agent: opts.agent } : {}),
|
||||
});
|
||||
const booted = await bootstrap({
|
||||
role: "all",
|
||||
|
||||
Reference in new issue
Block a user