import type { ProfileId } from '../profiles/index.js'; import type { PhaseInstructions, PhaseOverride, SetupAgentsTaskRoles, WorkflowPhase } from '../types/index.js'; export declare const PHASE_SEQUENCE: WorkflowPhase[]; export declare const ALWAYS_INCLUDED: WorkflowPhase[]; export declare const PROFILE_PHASE_MAP: Partial>; export declare const PHASE_TO_PROFILE: Record; export declare const PHASE_GATES: Set; export declare const PHASE_PLAYBOOKS: Record; export declare function resolvePhaseSequence(profiles: string[], taskRoles?: SetupAgentsTaskRoles, phaseOverrides?: PhaseOverride[], declaredPhases?: WorkflowPhase[]): WorkflowPhase[]; /** The subset of a task record `resolveImplementorProfile` needs — its own routing decision and declared roles. */ export type ImplementorProfileTaskContext = { routing?: { selectedProfile?: ProfileId | null; }; roles?: SetupAgentsTaskRoles; }; /** * Resolve which profile should act as the implementor for the developer phase. * * Every other phase resolves its role from the static `PHASE_TO_PROFILE` * mapping — the developer phase is the one exception, because a task's * *domain* (e.g. `cgcloud`) should drive which flavor of "developer" runs it, * not the plain registry default. That domain must come from the task's own * assignment (`routing.selectedProfile`, falling back to a non-orchestration * role in `roles.required`) — never from `activeProfiles`, the *workspace's* * full list of enabled profiles, which can contain several unrelated domain * profiles (e.g. `cgcloud`, `mulesoft`, `data360` all enabled at once) with no * signal about which one this specific task belongs to (GH-715). * * `activeProfiles` is kept only as the last-resort fallback for a task with no * explicit profile assignment, preserving prior behavior for that case. */ export declare function resolveImplementorProfile(activeProfiles: ProfileId[], task?: ImplementorProfileTaskContext): ProfileId; export declare const DEFAULT_INSTRUCTIONS_DIR = ".setup-agents/playbooks"; export declare function resolvePhaseInstructions(cwd: string, phase: WorkflowPhase, instructionsDir?: string): PhaseInstructions; export declare function resolveAllPhaseInstructions(cwd: string, instructionsDir?: string): PhaseInstructions[]; export { phaseToProfile, phaseDeliversTo, phaseValidatesWith, getPhaseDefinition } from '../phases/registry.js';