import type { AgentResponse, WorkflowStep } from '../models/types.js'; import type { RunAgentOptions } from '../../agents/runner.js'; import type { StepProviderInfo } from './types.js'; import type { ReportPhaseRunnerContext } from './phase-runner.js'; /** Result when Phase 2 encounters a blocked status */ export type ReportPhaseBlockedResult = { blocked: true; response: AgentResponse; providerInfo: StepProviderInfo; }; export type ReportPhaseRateLimitedResult = { rateLimited: true; response: AgentResponse; providerInfo: StepProviderInfo; }; export interface GeneratedReport { readonly reportName: string; readonly reportContent: string; readonly response: AgentResponse; readonly attemptIdentity: ReportAttemptIdentity; } export interface GeneratedReportPhaseResult { readonly reports: readonly GeneratedReport[]; } export type ReportContentValidationResult = { readonly valid: true; } | { readonly valid: false; }; export type ReportContentValidator = (reportContent: string) => ReportContentValidationResult; export interface ReportPhaseGenerationOptions { readonly validateReportContent?: ReportContentValidator; readonly retryMode?: 'standard' | 'single-attempt'; readonly nextPhaseSequence?: () => number; } export interface ReportPhaseRecoveryMetadata { readonly requiresFreshPhase1: boolean; readonly failureReasons: readonly ReportRetryFailureReason[]; } export interface ReportAttemptIdentity { readonly providerInfo: StepProviderInfo; readonly sessionKey: string; readonly sessionId: string | undefined; /** Phase 2 の実試行に渡した capability-sensitive options の完全なスナップショット。 */ readonly agentOptions: Readonly; } export declare class ReportPhaseGenerationError extends Error { readonly failureReason: ReportRetryFailureReason; readonly recovery: ReportPhaseRecoveryMetadata; readonly failureCategory?: AgentResponse['failureCategory']; readonly failureMessage?: string | undefined; constructor(message: string, failureReason: ReportRetryFailureReason, recovery: ReportPhaseRecoveryMetadata, failureCategory?: AgentResponse['failureCategory'], failureMessage?: string | undefined); } /** * Phase 2: Report output. * Resumes the agent session with no tools to request report content. * Each report file is generated individually in a loop. * レポート本文は plain text として扱う。 */ export declare function runReportPhase(step: WorkflowStep, stepIteration: number, ctx: ReportPhaseRunnerContext): Promise; export declare function generateReportPhase(step: WorkflowStep, stepIteration: number, ctx: ReportPhaseRunnerContext, options?: ReportPhaseGenerationOptions): Promise; export type ReportRetryFailureReason = 'tool_call' | 'empty_output' | 'provider_error' | 'invalid_output'; //# sourceMappingURL=report-phase-runner.d.ts.map