/** * TraitBinder.ts * * Maps trait names from parsed AST directives to runtime TraitHandler instances. * This is the registry that connects "@grabbable", "@audio", "@particles", etc. * to their actual runtime implementations. * * Sprint 2 addition: registerComposed() builds merged handlers from composition * syntax (`@turret = @physics + @ai_npc`) and registers them here so they are * available to all downstream systems as normal trait lookups. */ import type { TraitHandler } from '@holoscript/core'; export declare class TraitBinder { private handlers; /** Register a trait handler by name. */ register(name: string, handler: TraitHandler): void; /** Register multiple handlers at once. */ registerAll(entries: Array<[string, TraitHandler]>): void; /** Resolve a trait name to a handler. */ resolve(name: string): TraitHandler | undefined; /** Check if a trait is registered. */ has(name: string): boolean; /** Get all registered trait names. */ listTraits(): string[]; /** Get count of registered handlers. */ get count(): number; /** Merge config from directive with handler defaults. */ mergeConfig(name: string, directiveConfig: Record): any; /** * Compose multiple registered trait handlers into a new named handler. * * Sprint 2: Called after parsing `@turret = @physics + @ai_npc + @targeting`. * * - Resolves each source name from this registry. * - Delegates to TraitComposer.compose() for config merging + lifecycle wiring. * - Registers the resulting composed handler under `name`. * * @param name New trait name (without @ prefix) * @param sourceNames Ordered source trait names (left = lower priority) * @param graph Optional TraitDependencyGraph for conflict detection * @returns Composition warnings (empty array = clean) */ registerComposed(name: string, sourceNames: string[], graph?: import('@holoscript/core').TraitDependencyGraph): string[]; } //# sourceMappingURL=TraitBinder.d.ts.map