src/main/core/lifecycle/README.md
IoC container + service lifecycle management with phased bootstrap and parallel initialization.
Full documentation has moved to docs/references/lifecycle/. This file is a quick-reference pointer.
| Topic | Reference Doc |
|---|---|
| Decision: lifecycle vs singleton? | Decision Guide |
| Architecture: phases, hooks, states | Lifecycle Overview |
| Application: bootstrap, shutdown, registry | Application Overview |
| Usage: decorators, error handling, platform | Usage Guide |
| Migrating old services | Migration Guide |
lifecycle/
├── types.ts # Phase, LifecycleState, ServiceMetadata, Pausable, errors
├── decorators.ts # @Injectable, @ServicePhase, @DependsOn, @Priority, etc.
├── BaseService.ts # Abstract base class with lifecycle hooks
├── event.ts # Emitter<T>, Event<T>, Disposable — typed inter-service events
├── signal.ts # Signal<T> — one-shot deferred value (PromiseLike)
├── ServiceContainer.ts # IoC container with DI and conditional activation
├── DependencyResolver.ts # Topological sort, layered parallel resolution
├── LifecycleManager.ts # Phased bootstrap, shutdown, pause/resume/stop/start
├── index.ts # Barrel export
└── __tests__/ # Unit tests for all components