refactor: consolidate Require API and split lifecycle files
Add RequireOpts, RequireWithOpts, and GetModule. Move helpers to lifecycle_internal.go and errors to errors.go. Remove unused GenericModule. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in: