@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 33 lines 1.23 KB
Raw
1 import type { ProviderReplayTranscript } from "@t3tools/contracts";
2
3 import type { OrchestratorV2ScenarioResult } from "../../OrchestratorScenario.ts";
4 import {
5 assertAssistantTextIncludes,
6 assertBaseProjection,
7 assertConversationMessageRoles,
8 assertExecutionNodeKinds,
9 assertRunOrdinals,
10 assertSemanticProjectionIntegrity,
11 assertTurnItemTypes,
12 assertUserMessagesInclude,
13 assertVisibleTurnItemsMirrorLocalTurnItems,
14 projectionFor,
15 SIMPLE_PROMPT,
16 } from "../shared.ts";
17
18 export function assertSimpleOutput(
19 result: OrchestratorV2ScenarioResult,
20 transcript: ProviderReplayTranscript,
21 ) {
22 assertBaseProjection({ result, transcript, runCount: 1, runStatuses: ["completed"] });
23
24 const projection = projectionFor(result, transcript.scenario);
25 assertSemanticProjectionIntegrity(projection);
26 assertVisibleTurnItemsMirrorLocalTurnItems(projection);
27 assertRunOrdinals(projection, [1]);
28 assertExecutionNodeKinds(projection, ["root_turn", "assistant_message"]);
29 assertConversationMessageRoles(projection, ["user", "assistant"]);
30 assertTurnItemTypes(projection, ["user_message", "assistant_message"]);
31 assertUserMessagesInclude(projection, [SIMPLE_PROMPT]);
32 assertAssistantTextIncludes(projection, "fixture simple ok");
33 }