test: move prompt composition fixtures into test helpers

This commit is contained in:
Peter Steinberger
2026-04-06 18:09:52 +01:00
parent f88b6ffb48
commit f3c00048cf
2 changed files with 15 additions and 15 deletions

View File

@@ -2,7 +2,7 @@ import { afterAll, beforeAll, describe, expect, it } from "vitest";
import {
createPromptCompositionScenarios,
type PromptScenario,
} from "./prompt-composition-scenarios.js";
} from "../../test/helpers/agents/prompt-composition-scenarios.js";
type ScenarioFixture = Awaited<ReturnType<typeof createPromptCompositionScenarios>>;

View File

@@ -1,24 +1,24 @@
import fs from "node:fs/promises";
import path from "node:path";
import { buildGroupChatContext, buildGroupIntro } from "../auto-reply/reply/groups.js";
import {
buildInboundMetaSystemPrompt,
buildInboundUserContextPrefix,
} from "../auto-reply/reply/inbound-meta.js";
import type { TemplateContext } from "../auto-reply/templating.js";
import { SILENT_REPLY_TOKEN } from "../auto-reply/tokens.js";
import type { OpenClawConfig } from "../config/config.js";
import { makeTempWorkspace, writeWorkspaceFile } from "../test-helpers/workspace.js";
import {
appendBootstrapPromptWarning,
analyzeBootstrapBudget,
buildBootstrapInjectionStats,
buildBootstrapPromptWarning,
} from "./bootstrap-budget.js";
import { resolveBootstrapContextForRun } from "./bootstrap-files.js";
import { buildEmbeddedSystemPrompt } from "./pi-embedded-runner/system-prompt.js";
import { buildAgentSystemPrompt } from "./system-prompt.js";
import { createStubTool } from "./test-helpers/pi-tool-stubs.js";
} from "../../../src/agents/bootstrap-budget.js";
import { resolveBootstrapContextForRun } from "../../../src/agents/bootstrap-files.js";
import { buildEmbeddedSystemPrompt } from "../../../src/agents/pi-embedded-runner/system-prompt.js";
import { buildAgentSystemPrompt } from "../../../src/agents/system-prompt.js";
import { createStubTool } from "../../../src/agents/test-helpers/pi-tool-stubs.js";
import { buildGroupChatContext, buildGroupIntro } from "../../../src/auto-reply/reply/groups.js";
import {
buildInboundMetaSystemPrompt,
buildInboundUserContextPrefix,
} from "../../../src/auto-reply/reply/inbound-meta.js";
import type { TemplateContext } from "../../../src/auto-reply/templating.js";
import { SILENT_REPLY_TOKEN } from "../../../src/auto-reply/tokens.js";
import type { OpenClawConfig } from "../../../src/config/config.js";
import { makeTempWorkspace, writeWorkspaceFile } from "../../../src/test-helpers/workspace.js";
export type PromptScenarioTurn = {
id: string;