import { type Declarable } from "../declarable.js"; /** * Collects all declarable entities from imported modules. * CompositeInstance exports are expanded into individual entities * with `{exportName}_{memberName}` naming. * LexiconOutput exports are also collected so that build() can * extract them and pass them to the serializer. * * A bare entity name must be unique *within a single stack directory*, not * across the whole project. A multi-stack project (independently-deployed * sibling stacks under one root — e.g. `src/loom-backend/`, `src/loom-agents/`) * legitimately reuses conventional cross-stack `Parameter` names like * `pArtifactBucket`/`pImageUri` across siblings, because each directory is its * own CloudFormation template where that name is the real, deployed logical id. * When the same bare name is declared (as distinct objects) in two different * directories, each is disambiguated by a stack prefix derived from its * directory ({@link stackPrefix}) rather than throwing — so an unscoped * whole-project build / `chant lifecycle snapshot|diff` no longer collides * (#932). A per-stack scoped build (`chant build