diff --git a/src/test/harness.ts b/src/test/harness.ts index 3299034..60da30e 100644 --- a/src/test/harness.ts +++ b/src/test/harness.ts @@ -197,13 +197,24 @@ export interface TestHarness { setAgentDone(agentName: string, result?: string): void; /** - * Convenience: Set agent to ask questions. + * Convenience: Set agent to ask questions (array form). */ setAgentQuestions( agentName: string, questions: QuestionItem[] ): void; + /** + * Convenience: Set agent to ask a single question. + * Wraps the question in an array internally. + */ + setAgentQuestion( + agentName: string, + questionId: string, + question: string, + options?: Array<{ label: string; description?: string }> + ): void; + /** * Convenience: Set agent to fail with unrecoverable error. */ @@ -311,6 +322,18 @@ export function createTestHarness(): TestHarness { agentManager.setScenario(agentName, { status: 'questions', questions }); }, + setAgentQuestion: ( + agentName: string, + questionId: string, + question: string, + options?: Array<{ label: string; description?: string }> + ) => { + agentManager.setScenario(agentName, { + status: 'questions', + questions: [{ id: questionId, question, options }], + }); + }, + setAgentError: (agentName: string, error: string) => { agentManager.setScenario(agentName, { status: 'unrecoverable_error', error }); },