import type { TClass } from '@venizia/ignis-helpers/common'; import { BaseHelper } from '@venizia/ignis-helpers/core'; import type { IArtifactIndex, TArtifactIndexInput } from './common'; /** Turns a `configs.artifacts` input into the classes to register: flattens nested indexes, drops the classes whose `when` says no, orders the rest. It never touches the container - `registerArtifacts` does the binding. */ export declare class ArtifactIndexHelper extends BaseHelper { static readonly SINGLETON_REALM_KEY = "artifact-index-helper"; private constructor(); static getInstance(): ArtifactIndexHelper; /** Maps an artifact type to the index field that carries it. `ArtifactTypes.MODEL` is deliberately absent: a model has a binding namespace but no index field, because its repository registers it. */ private static readonly INDEX_FIELD_BY_TYPE; /** The index a decorator-only application has: every class a stereotype saw at import time, bucketed by its type. `when` and `order` still apply - `resolve` does that, exactly as it does for a declared index. */ buildDiscoveredIndex(): IArtifactIndex; /** Every kind of the input, each already filtered by `when` and sorted by `order`, keyed the way `IArtifactIndex` is. */ resolve(opts: { input: TArtifactIndexInput; application: unknown; }): Promise>; /** * Topologically sort configurations based on `after` dependencies. * Siblings with no dependency relation are sorted deterministically by class name. * Throws if an unknown `after` dependency is referenced or if a dependency cycle is detected. */ sortConfigurationsTopologically(opts: { classes: ReadonlyArray>; }): TClass[]; /** Every entry of a kind must be a class. `undefined` is what an import cycle leaves - the index was read before a class's module finished loading - so it gets a message that names the cause instead of a crash on `.name`. */ private assertClasses; /** One index, or arrays nested to any depth, as a flat list in input order; a conditional entry contributes its subtree only when its `when` answers true. */ flatten(opts: { input: TArtifactIndexInput; application: unknown; }): Promise; /** A group's classes: inlined at build time, else the resolver `@venizia/ignis-boot/auto` installs. Never empty - a group that names nothing is a typo or a moved folder. */ private contentOf; /** Positional on purpose: a type predicate narrows its own parameter, and an options object would narrow the wrapper instead of `input`. */ private isConditional; /** The classes of one kind across every index, minus those whose `when` says no, sorted by `order` (stable). The `when` conditions run concurrently: each reads config and environment, never another artifact. */ select(opts: { indexes: IArtifactIndex[]; field: Field; application: unknown; }): Promise[number][]>; private isSelected; } //# sourceMappingURL=artifact-index.d.ts.map