/** * StageRunner — single-stage executor (arc42 §5.3). * * Assembles StageContext (input artifacts + principles + gate rules), * injects role knowledge via RoleKnowledgeInjector, triggers execution * through the HostAdapter, and evaluates exit conditions via GateEngine. */ import type { ArtifactRef, StageId, StageResult, RuleVerdict } from '../types/index.js'; import type { SevoHostAdapter } from '../adapter/host-adapter.js'; import type { GateRule } from '../gate/gate-rule.js'; import { GateEngine } from '../gate/gate-engine.js'; import { RoleKnowledgeInjector } from '../knowledge/role-knowledge-injector.js'; import type { RoleStageValidator, RoleMismatchEvent } from '../role-registry/index.js'; export interface StageContext { pipelineId: string; stageId: StageId; inputArtifacts: ArtifactRef[]; principles: string; gateRules: GateRule[]; agentHint?: string; } export interface StageRunnerOptions { adapter: SevoHostAdapter; knowledgeInjector?: RoleKnowledgeInjector; gateEngine?: GateEngine; /** Additional gate rules to register beyond defaults. */ additionalRules?: GateRule[]; /** Role-stage validator for dispatch constraints (FR-22). */ roleStageValidator?: RoleStageValidator; /** Callback for role mismatch audit events (AC-22.3). */ onRoleMismatch?: (event: RoleMismatchEvent) => void; } export interface GateEvaluationResult { passed: boolean; verdict: RuleVerdict; issues: string[]; } export declare class StageRunner { private readonly adapter; private readonly knowledgeInjector; private readonly gateEngine; private readonly roleStageValidator?; private readonly onRoleMismatch?; constructor(options: StageRunnerOptions); /** * Execute a single pipeline stage. * * 1. Assemble StageContext (input artifacts + principles + gate rules) * 2. Inject role knowledge via RoleKnowledgeInjector * 3. Dispatch execution through HostAdapter * 4. Collect output artifacts * 5. Evaluate exit gate conditions * * @returns StageResult with outcome and artifacts */ run(pipelineId: string, stageId: StageId, inputArtifacts?: ArtifactRef[]): Promise; /** * Evaluate exit gate conditions for a stage. * Uses GateEngine's rule-based evaluation against output artifacts. */ evaluateGate(stageId: StageId, artifacts: ArtifactRef[]): GateEvaluationResult; /** * Get the assembled StageContext without executing. * Useful for inspection/debugging. */ buildContext(pipelineId: string, stageId: StageId, inputArtifacts?: ArtifactRef[]): StageContext; /** Access the underlying GateEngine for rule registration. */ getGateEngine(): GateEngine; /** Access the underlying RoleKnowledgeInjector. */ getKnowledgeInjector(): RoleKnowledgeInjector; private resolveAgentHint; } //# sourceMappingURL=stage-runner.d.ts.map