Commit Graph
3495 Commits
Author SHA1 Message Date
Jamie Pine d439d69590 feat: Finalize Spacedrive refactor and enhance session management
- Added a new documentation file outlining the finalization plan for the Spacedrive refactor, detailing remaining tasks and objectives for migrating to a CQRS architecture.
- Implemented session state management to track the current library context across operations, improving the overall architecture's modularity and maintainability.
- Refactored CLI commands and core components to utilize the new session state service, ensuring a more consistent and error-free user experience.
- Enhanced error handling and logging in various modules to facilitate debugging and improve reliability.
2025-09-13 16:08:07 -07:00
Jamie Pine bf7d618cd8 feat: Add comprehensive architecture documentation and enhance CLI daemon management
- Introduced a new `ARCHITECTURE.md` file detailing the system overview, core architecture, daemon infrastructure, operations system, CLI client, data flow, key design decisions, implementation details, and future improvements.
- Enhanced CLI commands to validate instance names for security and check if the daemon is already running before starting a new instance.
- Updated the daemon's RPC server to handle requests concurrently and improved error handling with structured error types.
- Refactored action and query execution to support async operations more effectively.
2025-09-13 16:08:00 -07:00
Jamie Pine 50b15bbc1c feat: Implement CLI daemon management and library commands 2025-09-11 20:30:09 -04:00
Jamie Pine ce7ada15f0 Merge pull request #10 from jamiepine/api-boilerplate 2025-09-11 18:34:51 -04:00
Cursor Agentandijamespine 0be286d152 Refactor: Move command logic to domain modules
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:59:33 +00:00
Jamie Pine db02f8e18f Merge pull request #9 from jamiepine/api-boilerplate 2025-09-11 17:27:57 -04:00
Cursor Agentandijamespine 1d4b7e929f Fix: Ensure library directory is deleted on shutdown
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:25:56 +00:00
Jamie Pine 80d8714202 Merge pull request #3 from jamiepine/promote-core-to-root 2025-09-11 17:17:22 -04:00
Jamie Pine 5534f28c31 Merge pull request #4 from jamiepine/api-boilerplate 2025-09-11 17:17:10 -04:00
Jamie Pine 298c311e1a Merge pull request #8 from jamiepine/cursor/design-spacedrive-cli-structure-6334 2025-09-11 17:16:32 -04:00
Cursor Agentandijamespine aea1120292 feat: Implement job listing and info commands
Adds functionality to list and retrieve details about jobs.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:13:59 +00:00
Cursor Agentandijamespine e022dcb75c Refactor: Use PairingState directly in PairingSessionSummary
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:08:40 +00:00
Cursor Agentandijamespine e26ead654b feat: Add job commands and list locations
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:05:09 +00:00
Cursor Agentandijamespine 470ff03bd6 Add location and library commands, improve instance handling
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 20:00:48 +00:00
Cursor Agentandijamespine e3e50194b0 feat: Add network and pairing commands to CLI
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 19:41:34 +00:00
Cursor Agentandijamespine f109d8ba90 Remove unused network init action and module
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 19:37:53 +00:00
Cursor Agentandijamespine d62b6fa9f5 Refactor: Remove password from network init input and action
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 19:35:45 +00:00
Cursor Agentandijamespine d43f7dd64b Refactor network init and revoke actions
Initialize networking service and register protocols.
Revoke action now removes device from persistence.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 19:31:46 +00:00
Cursor Agentandijamespine ac169b3916 feat: Add network operations module
This commit introduces a comprehensive set of network operations, including initialization, starting, stopping, pairing, revoking devices, and querying network status.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 19:26:37 +00:00
Jamie Pine d4013dae8a Merge pull request #7 from jamiepine/cursor/add-cli-commands-using-action-query-system-7419 2025-09-11 15:01:34 -04:00
Jamie Pine 91a5610837 Merge pull request #6 from jamiepine/cursor/return-action-output-from-core-client-6a33 2025-09-11 14:59:24 -04:00
Cursor Agentandijamespine 21de5e0e8c Refactor: Accept SdPath URIs and local paths for file operations
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 01:21:52 +00:00
Cursor Agentandijamespine dc66b34de1 feat: Add file and index commands to CLI
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 01:14:10 +00:00
Cursor Agentandijamespine afe5e3e063 Remove unused workspace member pattern
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 00:26:59 +00:00
Cursor Agentandijamespine de2d53f18f Refactor: Return bytes from core client action
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 00:06:25 +00:00
Jamie Pine 050b2a7e8e Merge pull request #5 from jamiepine/cursor/fix-library-action-naming-inconsistency-3036 2025-09-10 20:01:58 -04:00
Cursor Agentandijamespine 0dc3995f74 Refactor: Pluralize action kinds for consistency
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 00:00:44 +00:00
Jamie Pine f6edb570c4 fix: update subproject commit and enhance action registration
- Updated the subproject commit to indicate a dirty state.
- Commented out the unused import of `PathBuf` in `daemon.rs` for clarity.
- Added a test module in `registry.rs` to list registered operations and ensure at least one action or query is registered.
- Registered core actions for library creation, deletion, export, renaming, and location management, improving modularity and consistency in action handling.

These changes enhance the reliability of the operation registration process and improve code clarity.
2025-09-10 19:48:11 -04:00
Jamie Pine 13df73bef0 refactor: streamline action and query structures
- Removed unnecessary whitespace in `cqrs.rs` to enhance code cleanliness.
- Reorganized imports in `addressing.rs` for better clarity and consistency.
- Introduced new input types for actions, including `Input` associated types in `CoreAction` and `LibraryAction`, promoting a more modular design.
- Updated action implementations to utilize the new input structures, improving maintainability and reducing redundancy.
- Enhanced event handling in `event.rs` to ensure proper library ID filtering.

These changes improve the overall structure and maintainability of the action and query systems while ensuring a consistent API surface.
2025-09-10 17:34:11 -04:00
Jamie Pine 25db936675 feat: introduce unified op! macro for operation registration
- Added the `op!` macro to streamline the registration of library actions, core actions, and queries, reducing boilerplate and promoting consistency across the codebase.
- Implemented helper macros for generating method strings for actions and queries, enhancing clarity in operation declarations.
- Updated existing file operations (copy, delete, duplicate detection) to utilize the new macro, simplifying their input and action structures.
- Introduced comprehensive documentation for the operations initialization API, outlining usage patterns and conversion mechanisms.

These changes significantly enhance the modularity and maintainability of the operation registration process while ensuring a consistent API surface.
2025-09-10 15:40:13 -04:00
Jamie Pine a25caddd41 refactor: streamline action manager and input structures
- Refactored the `ActionManager` to improve the dispatching of core and library-scoped actions, enhancing clarity and maintainability.
- Updated action input structures to remove unnecessary library ID fields, promoting a cleaner API and reducing redundancy.
- Enhanced the `dispatch_library` method to accept library ID as a parameter, simplifying the action execution process.
- Improved validation and error handling across various action implementations, ensuring consistent feedback and robustness.

These changes significantly enhance the modularity and maintainability of the action system while ensuring a consistent API surface.
2025-09-10 15:10:29 -04:00
Jamie Pine 5c6735ea28 refactor: rename action registration macros for clarity
- Updated the action registration macros from `register_action_input!` to `register_library_action_input!` to better reflect their purpose and improve clarity in the codebase.
- Adjusted related documentation and input structures to ensure consistency with the new naming convention.
- Enhanced the organization of input types for file operations and library management, promoting better modularity and maintainability.

These changes improve the clarity and consistency of the action registration process across the codebase.
2025-09-10 13:14:30 -04:00
Jamie Pine c29c93f130 fix: update subproject commit and add tests for operation registration
- Updated the subproject commit to indicate a dirty state.
- Added a suite of tests for verifying the registration of queries and actions, ensuring proper naming conventions and the absence of duplicates.
- Implemented debugging output to list registered operations, enhancing traceability and verification of the inventory system.

These changes improve the reliability of the operation registration process and facilitate easier debugging.
2025-09-10 13:00:02 -04:00
Jamie Pine 3566fa7838 refactor: enhance action and query handling with dynamic registry
- Introduced a dynamic registry for actions and queries, allowing for self-registration and improved modularity.
- Updated the `Core` struct to support new methods for executing actions and queries by method string, enhancing flexibility.
- Refactored the `CoreClient` to utilize a `METHOD` constant for action dispatching, improving clarity.
- Removed legacy action handling code and streamlined the `RpcServer` for better request management.
- Enhanced input structures for file operations and library management, ensuring type safety and consistency.

These changes significantly improve the modularity and maintainability of the action system while ensuring a consistent API surface.
2025-09-10 12:59:55 -04:00
Jamie Pine 940ddead3e refactor: enhance core action handling and modularity
- Introduced new methods for executing actions and queries by method string, improving the flexibility of the core API.
- Refactored the `CoreClient` to utilize a `METHOD` constant instead of `TYPE_ID`, enhancing clarity in action dispatching.
- Removed the legacy `ActionHandler` trait and associated registry, streamlining action execution through the unified `LibraryAction` trait.
- Updated the `RpcServer` to handle action and query requests more efficiently, improving error handling and response management.
- Enhanced the `FileCopyAction` and related tests to support modular action construction, ensuring better validation and type safety.

These changes significantly improve the modularity and maintainability of the action system while ensuring a consistent API surface.
2025-09-10 12:46:37 -04:00
Jamie Pine 1f2c38b440 refactor: introduce CLI application structure and enhance command handling
- Added a new `apps/cli` module to encapsulate the CLI application logic, improving organization and modularity.
- Updated `Cargo.toml` to include dependencies for the CLI, such as `clap` for command-line argument parsing.
- Implemented a `Context` struct to manage application state and core client interactions.
- Created command handling for file operations and library management, enhancing user experience and functionality.
- Introduced utility functions for output formatting, supporting both human-readable and JSON outputs.

These changes significantly enhance the structure and maintainability of the CLI application while providing a more robust user interface.
2025-09-09 20:04:20 -04:00
Jamie Pine e4b463d78e refactor: add client module and implement Wire trait for input structures
- Introduced a new `client` module to enhance the modularity of the codebase.
- Implemented the `Wire` trait for `FileCopyInput` and `ListLibrariesQuery`, providing type IDs for better integration with the system.
- Updated the `lib.rs` and `mod.rs` files to include the new `client` module, ensuring proper organization and accessibility.

These changes improve the structure and maintainability of the codebase while enhancing type safety in data handling.
2025-09-09 16:53:44 -04:00
Jamie Pine 80c2fff76e refactor: enhance command handling for file operations and indexing
- Updated the `DaemonCommand` structure to support typed input for file copy and indexing operations, improving clarity and type safety.
- Refactored the `FileHandler` to directly execute commands using the new input structures, streamlining the action execution process.
- Removed legacy browse command handling in favor of a unified indexing approach, enhancing maintainability and consistency.
- Improved error handling and validation across command executions to ensure robust feedback and user experience.

These changes significantly enhance the modularity and maintainability of the command handling system while ensuring a consistent API surface.
2025-09-09 15:21:43 -04:00
Jamie Pine 45d24b8c83 refactor: update indexing actions to use unified input structure
- Refactored the `IndexingAction` to utilize a new `IndexInput` structure, enhancing clarity and modularity in action parameters.
- Removed legacy fields from `IndexingAction`, streamlining the job configuration process.
- Updated the `execute` method to handle multiple paths and job configurations more efficiently, improving error handling and validation.
- Adjusted related action handlers to align with the new input structure, ensuring consistency across the action system.

These changes improve the maintainability and extensibility of the indexing actions while ensuring a consistent API surface.
2025-09-09 14:01:46 -04:00
Jamie Pine fef30be6bd refactor: update action handling to use LibraryAction trait
- Refactored multiple action handlers to implement the new `LibraryAction` trait, enhancing modularity and clarity in action execution.
- Removed legacy action handling code, streamlining the action dispatch process.
- Updated the `FileCopy`, `LocationRescan`, `DeviceRevoke`, and `VolumeTrack` actions to utilize the new structure, improving type safety and reducing redundancy.
- Enhanced error handling and validation across actions to ensure consistent feedback and maintainability.

These changes significantly improve the maintainability and extensibility of the action system while ensuring a consistent API surface.
2025-09-09 14:01:40 -04:00
Jamie Pine 56782b237b refactor: update action system to modular structure with CoreAction and LibraryAction
- Refactored the action system to implement distinct `CoreAction` and `LibraryAction` traits, enhancing modularity and clarity.
- Removed the old `ActionTrait` and associated boilerplate, streamlining action implementations.
- Updated multiple actions to utilize the new traits, ensuring type safety and reducing redundancy in library validation.
- Enhanced the `ActionManager` to support generic dispatch for both core and library actions, preserving existing validation and logging infrastructure.

These changes significantly improve the maintainability and extensibility of the action system while ensuring a consistent API surface.
2025-09-09 11:10:33 -04:00
Jamie Pine 469fc7cbe2 refactor: complete migration to modular action system and remove ActionOutput enum
- Eliminated the centralized `ActionOutput` enum, achieving true modularity in action handling.
- Introduced the `ActionType` trait, allowing each action to define its own output type directly.
- Updated multiple actions to utilize native output types, enhancing type safety and reducing complexity.
- Enhanced the `ActionManager` with a generic `dispatch_action` method for improved action execution.
- Preserved existing infrastructure for validation, audit logging, and error handling throughout the migration.

These changes significantly improve the modularity and maintainability of the action system while ensuring a consistent API surface.
2025-09-09 02:03:17 -04:00
Jamie Pine 478f3136c5 refactor: enhance CQRS implementation with modular command and query traits
- Updated the `Command` trait to support modular output types, eliminating the need for a centralized `ActionOutput` enum.
- Refactored the `execute_command` function for direct command execution, improving type safety and performance by avoiding unnecessary JSON serialization.
- Implemented the new `ListLibrariesQuery` and associated output types for library listing operations, enhancing the query capabilities of the API.
- Updated existing actions like `LibraryCreateAction` and `VolumeTrackAction` to utilize the new modular command structure, simplifying their implementations.

These changes improve the modularity and maintainability of the action system while preserving existing functionality.
2025-09-08 20:08:44 -04:00
Jamie Pine 5f68a0d697 refactor: implement CQRS pattern with Command and Query traits
- Introduced a new `Command` trait to streamline action execution, reducing boilerplate and enhancing type safety.
- Updated the `Core` API to include `execute_command` and `execute_query` methods, providing a unified interface for command and query operations.
- Implemented the `Command` trait for `LibraryCreateAction`, ensuring compatibility with existing ActionManager functionality.
- Enhanced the API design documentation to reflect the new CQRS structure and its benefits.

These changes improve the clarity and maintainability of the action system while preserving existing functionality.
2025-09-08 19:36:37 -04:00
Jamie Pine e129a90e3a refactor: remove API design document and update cloud submodule
- Deleted the `API_DESIGN_DOC.md` file, which contained the proposed architecture for the Spacedrive CLI and daemon refactoring.
- Updated the cloud submodule to reflect a dirty state, indicating local changes.

These changes streamline the project by removing outdated documentation and ensuring the cloud submodule is accurately represented.
2025-09-08 19:15:49 -04:00
Jamie Pine d90b486865 refactor: update project dependencies and remove unused components
- Removed the `prisma-client-rust` and `prisma-client-rust-sdk` dependencies from `Cargo.toml` to streamline the project.
- Deleted the `spacedrive-jobs-derive` crate, consolidating job registration functionality into the main job system.
- Updated the `.gitattributes` file to reflect changes in generated code tracking.
- Adjusted the `package.json` scripts for improved build processes and removed unnecessary commands.
- Enhanced the `combine.sh` script to correctly reference documentation paths.

These changes aim to simplify the project structure and improve maintainability.
2025-09-08 17:26:31 -04:00
Jamie Pine 70a69e1bdc refactor: streamline volume tracking and untracking actions
- Removed the VolumeTrackHandler and VolumeUntrackHandler implementations, consolidating their logic into the respective action structs for better maintainability.
- Updated the VolumeTrackAction and VolumeUntrackAction to directly handle their execution logic, improving clarity and reducing redundancy.
- Enhanced error handling during volume tracking and untracking processes to provide more informative feedback.

These changes aim to simplify the action handling for volume operations and improve code organization.
2025-09-07 12:35:46 -04:00
Jamie Pine aa7ccacea8 sorting 2025-09-07 01:56:50 -04:00
Jamie Pine ed7e101d71 more 2025-09-07 01:51:35 -04:00
Jamie Pine 1a0a293700 again 2025-09-07 01:44:02 -04:00