/**
 * Workflow Testing Fixtures
 *
 * Provides reusable fixtures for workflow testing with reduced mock usage
 * and better type safety. Addresses P0 mock overuse issues from test review plan.
 */
import { mock } from 'bun:test';
import type { BaseWorkflowContext } from '@polka-codes/core';
import type { CliToolRegistry } from '../workflow-tools';
/**
 * Creates a properly typed workflow context with minimal mocking
 * Only mocks what's necessary for testing, using concrete implementations where possible
 */
export interface WorkflowTestContext {
    context: BaseWorkflowContext<CliToolRegistry>;
    tools: {
        executeCommand: ReturnType<typeof mock>;
        input: ReturnType<typeof mock>;
        generateText: ReturnType<typeof mock>;
        taskEvent: ReturnType<typeof mock>;
        getMemoryContext: ReturnType<typeof mock>;
        updateMemory: ReturnType<typeof mock>;
        printChangeFile: ReturnType<typeof mock>;
        createCommit: ReturnType<typeof mock>;
        confirm: ReturnType<typeof mock>;
        select: ReturnType<typeof mock>;
        readFile: ReturnType<typeof mock>;
        writeToFile: ReturnType<typeof mock>;
        createPullRequest: ReturnType<typeof mock>;
        invokeTool: ReturnType<typeof mock>;
    };
    step: ReturnType<typeof mock>;
    logger: {
        info: ReturnType<typeof mock>;
        error: ReturnType<typeof mock>;
        warn: ReturnType<typeof mock>;
        debug: ReturnType<typeof mock>;
    };
}
/**
 * Create a workflow test context with properly typed mocks
 *
 * This is a minimal fixture - only mocks what cannot be tested with real implementations.
 * Following the test review plan's guidance:
 * - Prefer real implementations over mocks
 * - Use typed mocks, not 'any'
 * - Maximum 3-5 mocks per test (enforced by this fixture's API)
 */
export declare function createWorkflowTestContext(): WorkflowTestContext;
/**
 * Helper to set up successful command execution
 * @param tools - Tools object from createWorkflowTestContext
 * @param stdout - Standard output to return
 * @param stderr - Standard error to return (default: '')
 * @param exitCode - Exit code to return (default: 0)
 */
export declare function mockSuccessfulCommand(tools: WorkflowTestContext['tools'], stdout: string, stderr?: string, exitCode?: number): void;
/**
 * Helper to set up failed command execution
 * @param tools - Tools object from createWorkflowTestContext
 * @param stdout - Standard output to return (default: 'FAIL')
 * @param stderr - Standard error to return (default: 'Error')
 */
export declare function mockFailedCommand(tools: WorkflowTestContext['tools'], stdout?: string, stderr?: string): void;
/**
 * Helper to set up agent response
 * @param tools - Tools object from createWorkflowTestContext
 * @param summary - Summary text from agent
 * @param bailReason - Optional bail reason
 */
export declare function mockAgentResponse(tools: WorkflowTestContext['tools'], summary: string | null, bailReason?: string): void;
/**
 * Helper to set up multiple command attempts (e.g., for retry logic)
 * @param tools - Tools object from createWorkflowTestContext
 * @param attempts - Array of exit codes for each attempt
 */
export declare function mockCommandAttempts(tools: WorkflowTestContext['tools'], attempts: number[]): void;
/**
 * Helper to verify exact number of tool calls (deprecated - use expect() directly)
 * @param tools - Tools object from createWorkflowTestContext
 * @param expectations - Object mapping tool names to expected call counts
 */
//# sourceMappingURL=workflow-fixtures.d.ts.map