Expand description
§ExtensionRegistry Module (ApplicationState)
§RESPONSIBILITIES
Manages extension registry including command registry and provider handle management. Tracks extension scan paths and enabled proposed APIs.
§ARCHITECTURAL ROLE
ExtensionRegistry is part of the ExtensionState module, representing the command registry and provider handle management.
§KEY COMPONENTS
- Registry: Main struct containing command registry and provider state
- Default: Initialization implementation
- Helper methods: Registry manipulation utilities
§ERROR HANDLING
- Thread-safe access via
Arc<Mutex<...>> - Proper lock error handling with
MapLockErrorhelpers
§LOGGING
State changes are logged at appropriate levels (debug, info, warn, error).
§PERFORMANCE CONSIDERATIONS
- Lock mutexes briefly and release immediately
- Avoid nested locks to prevent deadlocks
- Use Arc for shared ownership across threads
- Use AtomicU32 for unique provider handles
§TODO
- Add command validation invariants
- Implement command discovery events
- Add command metrics collection
Structs§
- Registry
- Extension registry containing command registry and provider handle state.