import type { AssetPack, Blueprint, Profile, SourceAdapterContext } from "../schema.js"; /** §5.6 错误类型:use 目标 Profile 不存在。 */ export declare class UseTargetNotFound extends Error { readonly useRef: string; readonly resolvedKey: string; readonly loadedPacks: AssetPack[]; constructor(useRef: string, resolvedKey: string, loadedPacks: AssetPack[]); } /** §5.6 错误类型:use 链循环。 */ export declare class UseChainCycle extends Error { readonly chain: string[]; constructor(chain: string[]); } /** §5.6 错误类型:Blueprint group 越权(use 场景,error 阻断激活)。 */ export declare class BlueprintGroupOutOfScope extends Error { readonly profileName: string; readonly outOfScopeGroups: string[]; readonly blueprintName: string; readonly allowedSlots: string[]; constructor(profileName: string, outOfScopeGroups: string[], blueprintName: string, allowedSlots: string[]); } /** * §5.3.2 expandProfile——递归展开 use 链。 * * @param self 当前 Profile(已带 sourcePack) * @param profileByQualifiedName key="pack/name" 的 Profile 视图(= workingSet.profiles 转换) * @param blueprintByQualifiedName key="pack/name" 的 Blueprint 视图(越权校验用) * @param loadedPacks 错误信息展示用 * @param visited 路径 visited(循环检测)——每层递归 new Set(visited),菱形不误报 * @param ctx adapterCtx(错误信息可走 notify 三通道 fallback——errors 已 throw,此参数备用) * @returns 展开后的 Profile(合并 use 链结果,self 优先) */ export declare function expandProfile(self: Profile, profileByQualifiedName: Map, blueprintByQualifiedName: Map, loadedPacks: AssetPack[], visited?: Set, _ctx?: SourceAdapterContext): Profile;