Back to Spacedrive

Action Manager and Handler Registry

.tasks/core/ACT-001-action-manager-registry.md

0.4.3872 B
Original Source

Description

The core of the Action System is the ActionManager, which serves as a central router for all incoming actions. It uses a dynamic registry powered by the inventory crate to discover and dispatch to the appropriate ActionHandler at runtime.

Implementation Notes

  • The ActionManager will be implemented in src/infrastructure/actions/manager.rs.
  • The dynamic registry ActionRegistry is in src/infrastructure/actions/registry.rs.
  • Handlers are registered using the register_action_handler! macro.
  • The manager is responsible for validation, creating audit log entries, execution, and finalizing the audit log.

Acceptance Criteria

  • An ActionManager can be initialized.
  • The ActionRegistry automatically discovers handlers at startup.
  • The dispatch method correctly routes an Action enum to the correct handler.