import type { Profile } from '../profiles/types.js'; export type ProductRoleFusionResult = { /** * roleId -> extra content blocks to append to that role's own generated ruleContent(), * contributed by every selected product profile that fuses into it. One entry per * contributing product (already joined into a single multi-line block); absent for a * role with no fused contributions. */ fusedSectionsByRole: Map; /** * Product profiles that must still generate their own standalone file/subagent this * run — either because no role profile was selected alongside them, or because they * declare no fragment for any role actually selected. */ standaloneProducts: Profile[]; }; export declare function resolveProductRoleFusion(selectedProfiles: Profile[]): ProductRoleFusionResult; /** * Returns a copy of `profile` whose `ruleContent()` appends `fusedBlocks` (if any) after * the profile's own content. A no-op (returns `profile` unchanged) when there is nothing * to fuse, so callers can apply this unconditionally to every role profile. */ export declare function applyFusedContent(profile: Profile, fusedBlocks: string[] | undefined): Profile; export type ProductRoleFusionEmission = { /** * The profile list every runtime setup function should use for per-profile file / * subagent / routing-table emission instead of the raw selection: role profiles * (with fused content appended) plus any product that must remain standalone. Fused * products are excluded entirely — they get no rule file, no subagent stub, and no * routing-table entry of their own; their content already landed in the role(s) it * fused into. */ emissionProfiles: Profile[]; fusion: ProductRoleFusionResult; }; /** * Single choke point every runtime setup function calls once, at the top, before doing * ANY per-profile file/subagent generation. Replaces every subsequent use of the raw * `profiles` argument with `emissionProfiles` so a fused product never gets its own * standalone artifact (or a dangling reference to one) anywhere in that target's output. */ export declare function applyProductRoleFusion(profiles: Profile[]): ProductRoleFusionEmission;