/** * AnalyticsEmitter — analytics イベント発行専用モジュール * * WorkflowEngine のイベントを受け取り、analytics イベントへ変換して書き出す責務を担う。 * NDJSON ログや UI 出力は担当しない。 */ import type { CompanionReviewRoundAnalyticsPayload } from '../../analytics/index.js'; import type { WorkflowStep, AgentResponse } from '../../../core/models/index.js'; import type { StepProviderInfo } from '../../../core/workflow/types.js'; export declare class AnalyticsEmitter { private readonly interactive; private readonly runSlug; private readonly routingRunId; constructor(runSlug: string, interactive: boolean, routingRunId?: string); /** step:complete 時に StepResultEvent と FixAction/Rebuttal を発行する */ onStepComplete(step: WorkflowStep, response: AgentResponse, context: AnalyticsStepContext): void; onRoutingDecision(step: WorkflowStep, response: AgentResponse, instruction: string, providerInfo: StepProviderInfo, stepType: 'normal' | 'parallel' | 'agent', durationMs: number, iteration: number, workflowName: string): void; private emitRoutingDecisionEvent; /** step:report 時に ReviewFindingEvent を発行する */ onStepReport(step: WorkflowStep, filePath: string, context: AnalyticsStepContext): void; onCompanionEvent(...args: CompanionEventArgs): void; } export interface AnalyticsStepContext { readonly iteration: number; readonly workflowName: string; readonly scopeIdentity: string; readonly provider: string; readonly model: string; } type CompanionEventName = 'companion:start' | 'companion:pool_selected' | 'companion:finding' | 'companion:fix_round' | 'companion:complete' | 'companion:review_round' | 'companion:queue_coalesced'; type CompanionEventArgs = [eventName: 'companion:start', payload: CompanionStartAnalyticsPayload] | [eventName: 'companion:review_round', payload: CompanionReviewRoundAnalyticsPayload] | [ eventName: Exclude, payload: Record & { step: string; } ]; type CompanionStartAnalyticsPayload = Record & { step: string; companion: string; reviewMode: 'completion' | 'live'; }; export {}; //# sourceMappingURL=analyticsEmitter.d.ts.map