Commit Graph

89 Commits

Author SHA1 Message Date
Jamie Pine
f43d2456da (chore): CI fix 2025-10-14 23:02:13 -07:00
Jamie Pine
e07c28c484 (chore): update tasks 2025-10-14 20:39:56 -07:00
Jamie Pine
0f5b8ef649 feat: add reqwest dependency, config management, and CLI workflows 2025-10-14 19:13:17 -07:00
Jamie Pine
4d0c92fa04 chore: integrate DaemonCmd and rename daemon to sd-daemon 2025-10-14 05:55:05 -07:00
Jamie Pine
f2199574ae feat: implement OffloadPolicy and OffloadConfig 2025-10-14 05:55:05 -07:00
Jamie Pine
566d9c6a6a feat: add VolumeEvent enum and implement ApfsContainer 2025-10-14 03:00:50 -07:00
Jamie Pine
56fcf9be22 feat: add cloud volume handling 2025-10-14 01:23:11 -07:00
Jamie Pine
91310317ef feat: implement interactive cloud storage setup 2025-10-13 23:13:01 -07:00
Jamie Pine
dc20ff0e69 feat: add cloud module in CLI domain 2025-10-13 23:13:00 -07:00
Jamie Pine
7e0ab59d12 feat: add interactive selection and text input functions 2025-10-13 23:12:59 -07:00
Jamie Pine
2679ab8cba feat: create Volume list query module 2025-10-13 22:25:19 -07:00
Jamie Pine
edf60394bc Add cloud volume management operations
- Introduced VolumeCmd for handling cloud volume operations in the CLI.
- Implemented VolumeAddCloudArgs and VolumeRemoveCloudArgs for adding and removing cloud storage volumes.
- Created VolumeAddCloudAction and VolumeRemoveCloudAction for managing cloud volume actions.
- Updated directory listing and file query operations to support cloud paths.
- Enhanced volume backend integration to accommodate cloud storage services.
2025-10-13 20:34:56 -07:00
Jamie Pine
e0076e56b9 Implement handling for cloud paths in file operations
- Added checks to prevent copy operations to cloud paths in various modules.
- Updated serialization logic to handle cloud paths appropriately.
- Enhanced error handling for directory listing and file queries involving cloud paths.
- Documented limitations regarding cloud storage operations in relevant areas.
2025-10-13 12:12:59 -07:00
Jamie Pine
94a52dd2df cleanup 2025-10-11 08:48:11 -07:00
Jamie Pine
6266c5f081 feat: Deprecate leader device argument and enhance sync service with backfill manager
- Marked the `leader` argument in `SetupArgs` as deprecated, clarifying its usage.
- Introduced a `backfill_manager` to the `SyncService`, enabling automatic orchestration of initial sync processes.
- Enhanced the `run_sync_loop` method to manage backfill attempts and periodic maintenance tasks, improving overall sync reliability.
- Updated the `MockTransportPeer` to support request/response handling for backfill operations, ensuring seamless data retrieval during synchronization.
2025-10-10 00:06:36 -07:00
Jamie Pine
4ef5d59ebe feat: Add library validation and selection logic to Context
- Implemented `validate_and_fix_library` method in the Context struct to ensure the current library selection is valid.
- If the stored library ID is not found, the method selects the first available library.
- Updated the main execution flow to call this new method, enhancing library management during command execution.
2025-10-09 05:45:47 -07:00
Jamie Pine
0f0471b978 feat: Add index integrity verification command to CLI
- Introduced `index verify` command to perform comprehensive integrity checks on the Spacedrive index.
- Implemented functionality to compare filesystem state with database entries, reporting discrepancies such as missing files, stale entries, and metadata mismatches.
- Added detailed output options for verification results, including a summary report of findings.
- Created associated input and output types for verification actions, enhancing the overall integrity management of the indexing system.
- Documented usage and examples in the CLI documentation for user guidance.
2025-10-08 03:50:38 -07:00
Jamie Pine
d2a2f15e1d refactor: Reorganize query infrastructure and update imports
- Moved query-related traits and structures from `cqrs` to `infra/query` for better symmetry with actions.
- Updated import paths across various modules to reflect the new structure, ensuring consistent access to `CoreQuery` and `LibraryQuery`.
- Introduced new `infra/wire` module for handling wire protocol and type extraction, enhancing code organization and discoverability.
- Cleaned up obsolete references to the old `cqrs` module, improving maintainability.
2025-10-07 02:09:46 -07:00
Jamie Pine
29509636e1 feat: Enhance device pairing with QR code support and relay integration
- Added QR code generation for remote pairing, allowing users to scan codes for easier device connection.
- Updated CLI to include QR code display and manual entry options for pairing.
- Enhanced PairingCoordinator to handle QR code JSON, including NodeId and relay URL for improved connectivity.
- Implemented camera permission handling in iOS for QR code scanning functionality.
- Refactored networking service to support relay-based pairing, ensuring reliable connections across different networks.
- Added tests for relay-only pairing scenarios to validate functionality and reliability.
2025-10-07 01:49:11 -07:00
Jamie Pine
910dce67f5 feat: Add new documentation and enhance CLI functionality
- Introduced three new markdown files: CLI_LIBRARY_SYNC_COMPLETE.md, IMPLEMENTATION_COMPLETE.md, and LIBRARY_SYNC_SETUP_IMPLEMENTATION.md for comprehensive documentation.
- Updated various CLI domain modules to improve argument handling and output formatting.
- Enhanced device, index, job, library, location, network, and search modules for better integration and user experience.
- Refactored code across multiple domains to improve maintainability and clarity.
2025-10-04 21:31:47 -07:00
Jamie Pine
f9238545a3 feat: Add device management commands and enhance device listing functionality
- Introduced `DevicesCmd` for managing device operations within the CLI, allowing users to list devices from the library database.
- Implemented `DevicesListArgs` to support detailed device information retrieval, including offline status and capabilities.
- Updated the command handling logic to integrate device operations seamlessly with existing commands.
- Refactored device-related queries and outputs to improve data handling and presentation in the CLI.
- Enhanced the overall structure of device management code for better maintainability and clarity.
2025-10-04 20:18:03 -07:00
Jamie Pine
6576d06f53 feat: Add Directory Listing Functionality to File Management
- Introduced `FileListArgs` struct to handle directory listing arguments, including path, limit, hidden files inclusion, and sort order.
- Enhanced `FileCmd` enum to support a new `List` command for listing directory contents.
- Implemented `list_directory` function to query and display directory contents, integrating sorting and filtering options.
- Updated `run` function to handle the new directory listing command, providing a user-friendly output format with a table display.
- Improved error handling for invalid sort options during directory listing.
2025-09-26 22:08:04 -07:00
Jamie Pine
5be8b54c0b feat: Enhance CLI and macOS App with New Features and Improvements
- Introduced a `format_bytes` function in the CLI to improve byte size formatting for better readability in output.
- Updated the `run_client_command` function to display library sizes using the new formatting function, enhancing user experience.
- Added a new test target in `Package.swift` for improved testing capabilities of the Spacedrive macOS app.
- Refactored various SwiftUI components to improve code clarity and maintainability, including adjustments to view modifiers and layout.
- Enhanced the `ConnectivityCard` and `JobRowView` components with better state management and UI improvements for a more cohesive user experience.
- Improved logging and error handling in the `DaemonConnector` and `InspectorViewModel` for better traceability and debugging.
2025-09-24 17:50:37 -07:00
Jamie Pine
ccda02d95e feat: Add File Information Retrieval and Device ID Initialization
- Implemented functionality to retrieve file information using a new `FileInfoArgs` struct and `FileCmd::Info` command in the CLI.
- Enhanced the `run_client_command` function to initialize the device ID from a `device.json` file if it exists, improving device management.
- Updated the `FileCmd` enum to include the new `Info` command for better command handling in the file domain.
2025-09-24 04:29:33 -07:00
Jamie Pine
c1fff9b27b feat: Implement CLI Configuration Management for Library ID
- Introduced a new `CliConfig` struct for managing CLI-specific configurations, including the current library ID.
- Added methods to load, save, set, and clear the current library ID within the CLI context.
- Updated the `Context` struct to integrate `CliConfig`, ensuring library ID management is consistent across the application.
- Enhanced command implementations to utilize the new CLI configuration features, improving user experience and functionality.
2025-09-23 22:17:10 -07:00
Jamie Pine
c53fb871ea refactor: Clean up Job Command Structure and Improve Progress Monitoring
- Refactored the job command structure for improved readability and consistency in the `run` function.
- Enhanced the job monitoring functionality by streamlining event handling and progress bar updates.
- Updated the `to_input` method in `LibraryInfoArgs` to improve clarity and maintainability.
- Ensured consistent formatting and organization of code across job-related functionalities.
2025-09-23 21:09:59 -07:00
Jamie Pine
74e9732e37 feat: Expand Library Management Functionality in Context and CLI
- Added methods for managing the current library in the `Context` struct, including `get_current_library_id`, `set_current_library`, `clear_current_library`, and `switch_to_library_named`.
- Enhanced the CLI commands to support switching libraries by ID or name, retrieving current library info, and listing available libraries.
- Updated query execution macros to improve consistency and error handling across library-related operations.
- Introduced a new `LibrarySwitchArgs` struct for command-line arguments related to library switching, enhancing usability.
- Refactored existing commands to utilize the new library management features, improving overall functionality and user experience.
2025-09-23 21:08:36 -07:00
Jamie Pine
2cee15a399 feat: Enhance Context and Query Handling with Library ID Support
- Added `library_id` field to the `Context` struct to manage library-specific operations.
- Introduced `with_library_id` and `set_library_id` methods for setting the library ID in the `Context`.
- Updated various command implementations to utilize the new library ID handling, improving the accuracy of library-related queries.
- Refactored query and action calls to use input structs instead of query structs, enhancing type safety and clarity across the application.
- Improved error handling and response deserialization in query execution macros, ensuring robust interaction with the core API.
2025-09-23 21:08:29 -07:00
Jamie Pine
c4f667b8a2 refactor: Clean up Swift client and remove obsolete files
- Added a warning suppression directive in the Rust CLI main file to reduce noise during compilation.
- Deleted several Swift files related to job management and UI components, streamlining the codebase and focusing on essential functionality.
- Updated the main application structure to enhance window management and user experience.
- Improved the organization of action context handling in the Rust core, facilitating better job dispatching with action context awareness.
2025-09-22 18:17:58 -07:00
Jamie Pine
b4dd9a9454 refactor: Update event handling and type definitions in Swift client
- Removed manual type definitions in favor of generated types from SpacedriveClient, enhancing type safety.
- Refactored event handling in DaemonConnector to utilize a new type-safe Event enum for better clarity and maintainability.
- Updated job management logic to align with the new event structure, improving real-time job tracking and state management.
- Enhanced serialization and deserialization processes for various data structures to ensure compatibility with the Rust daemon output.
- Removed obsolete schema generation binary and updated Cargo.toml to reflect changes in dependencies and project structure.
2025-09-22 00:06:06 -07:00
Jamie Pine
dbb3c56d30 feat: Add build timestamp to core status and CLI output
- Introduced a new `built_at` field in the `CoreStatus` struct to capture the build timestamp.
- Updated the `Cargo.toml` to include the `chrono` crate for handling date and time.
- Emitted the build timestamp during the build process in `build.rs`.
- Enhanced the CLI output to display the build timestamp alongside the core version and data directory.
2025-09-20 16:48:08 -07:00
Jamie Pine
bc7091768d feat: Update CLI and core dependencies, enhance daemon shutdown process
- Updated `Cargo.toml` for the CLI to include `comfy-table` for improved output formatting.
- Enhanced the daemon's shutdown process to provide clearer logging during shutdown initiation and completion.
- Refactored the logo display function to use a colored ASCII representation, improving visual appeal.
- Removed unnecessary CLI dependency on `clap` in the core, simplifying the dependency structure.
2025-09-19 21:45:35 -07:00
Jamie Pine
1c2f336075 feat: Improve daemon startup process and instance handling in CLI
- Updated the CLI to construct the daemon command with a specific path and pass necessary arguments such as data directory and instance name.
- Enhanced foreground mode to provide better logging and error handling during daemon execution.
- Refactored the daemon to calculate instance-specific data directories and socket paths, ensuring proper isolation for multiple instances.
- Improved overall user experience by clarifying daemon operation status and error messages.
2025-09-19 20:07:56 -07:00
Jamie Pine
8465b50885 refactor: Remove networking flag from CLI commands and documentation
- Eliminated the `--enable-networking` flag from the `start` and `restart` commands in the CLI, simplifying the command structure.
- Updated related documentation to reflect the removal of the networking option, ensuring consistency across usage examples.
- Adjusted the daemon to always enable networking, streamlining the startup process for users.
2025-09-19 19:28:21 -07:00
Jamie Pine
b52e307e33 feat: Implement instance name validation and refactor daemon handling
- Added a new function `validate_instance_name` to ensure instance names are secure and conform to specified criteria, preventing path traversal attacks.
- Updated the CLI and daemon to utilize the new validation function when processing instance names.
- Refactored the `RpcServer` to replace the `CoreInstanceManager` with a direct `Core` instance, simplifying the architecture.
- Removed the `instance.rs` file as its functionality has been integrated into the main daemon logic.
2025-09-19 19:14:55 -07:00
Jamie Pine
294952bb54 feat: Implement destination path resolution for file copy operations
- Added a new function `resolve_final_destination_path` to determine the correct destination path based on whether the destination is a directory or a file.
- Updated the `check_for_simple_conflicts` function to utilize the new path resolution logic, improving conflict detection for file copy operations.
- Refactored the `run_copy_with_confirmation` function to simplify action creation by removing unnecessary mutability.
2025-09-19 18:52:23 -07:00
Jamie Pine
f83ac9f829 refactor: Clean up emoji handling in Rust files and improve output formatting
- Refactored `remove_emojis.sh` to enhance the emoji removal process by using a more efficient Python script for detecting and removing 3D/colorful emojis followed by spaces.
- Updated various Rust files to remove emoji characters from log messages and print statements, resulting in a cleaner output.
- Improved user experience with color-coded progress and results during the emoji removal process.
- Ensured that the script counts processed files and reports modifications accurately.
2025-09-19 18:40:19 -07:00
Jamie Pine
75faba76da feat: Add script to remove 3D/colorful emojis from Rust files
- Introduced `remove_emojis.sh`, a Bash script designed to identify and remove 3D/colorful emojis followed by a space in Rust files while preserving simple symbols.
- The script counts the number of Rust files processed and reports modifications made.
- Updated various Rust files to remove emoji characters from log messages and print statements for a cleaner output.
- Enhanced user experience by providing color-coded output for progress and results during the emoji removal process.
2025-09-19 18:28:42 -07:00
Jamie Pine
d8d8a53d64 feat: Implement conflict resolution for file copy operations
- Added support for handling file conflicts during copy operations by introducing an `on_conflict` field in `FileCopyInput`.
- Updated the `run_copy_with_confirmation` function to prompt users for conflict resolution choices (overwrite, rename, abort).
- Enhanced the `FileCopyAction` to apply conflict resolution strategies based on user input.
- Refactored related validation and execution logic to accommodate new conflict handling features.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-19 17:46:13 -07:00
Cursor Agent
573a69bed3 feat: Add file copy confirmation and conflict resolution
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-19 23:03:10 +00:00
Jamie Pine
7bd11a9439 Implement reset functionality for Spacedrive v2 data in CLI
- Added `reset_spacedrive_v2_data` function to safely remove specific Spacedrive v2 files and directories while preserving user data.
- Updated `Stop` and `Restart` commands to include a `reset` option, prompting user confirmation before data deletion.
- Enhanced logging to provide feedback on the reset process, including success and error messages.
- Modified documentation to reflect the new `restart` command usage for testing the CLI.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-19 14:10:07 -07:00
Jamie Pine
aa1a8d8c00 Enhance file copy operations with new copy method options and CLI support
- Updated `CopyMethod` enum to include `Atomic` and `Streaming` variants, replacing the previous `AtomicMove` and `StreamingCopy` options for clarity.
- Refactored the `select_strategy` method to respect user preferences for copy methods, improving the logic for same-volume operations.
- Added CLI support for the new copy methods in `args.rs`, allowing users to specify their preferred method during file copy operations.
- Updated relevant tests to reflect changes in copy method naming and functionality.
- Enhanced documentation to include new copy method options and their usage.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-19 13:05:18 -07:00
Jamie Pine
ecdcf04066 Refactor logging output to remove emojis and improve consistency
- Updated various print statements across the codebase to remove emoji indicators, ensuring a more uniform logging style.
- Adjusted output messages in CLI, job handling, and event processing to enhance clarity and maintainability.
- Refactored job-related logging to provide clearer status updates without emoji clutter.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 22:44:10 -07:00
Jamie Pine
6593b88ad0 Remove obsolete files and documentation related to architecture, Cargo configuration, and integration summaries
- Deleted `ARCHITECTURE.md`, `Cargo.toml.bak`, and various integration summary files to streamline the codebase.
- Removed outdated demo files and testing guides that are no longer relevant.
- Cleaned up the repository by eliminating unnecessary documentation and binary files, ensuring a more maintainable project structure.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 20:44:55 -07:00
Jamie Pine
10c5da0fed feat: Add Library Info command and refactor library argument handling
- Introduced `LibraryInfoArgs` struct for querying library information, allowing optional library ID input.
- Implemented `to_query` method for `LibraryInfoArgs` to facilitate query creation.
- Updated `LibraryCmd` enum to include `Info` variant for handling library information requests.
- Refactored argument handling in `args.rs` for improved readability and consistency.
- Enhanced `run` function in `mod.rs` to process the new `Info` command and display detailed library information.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 18:10:37 -07:00
Jamie Pine
4c00502511 Update dependencies and refactor error handling in CLI
- Upgraded `bincode` to version `2.0.0-rc.3` with `serde` feature enabled in `Cargo.toml`.
- Refactored error handling to accommodate changes in `bincode` by updating the error conversion implementation in `error.rs`.
- Modified deserialization logic in macros to align with the new `bincode` API.
- Removed outdated metrics test file from the core examples.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 17:57:14 -07:00
Jamie Pine
b330807c0e Implement FS Event Pipeline Testing Guide and update Cargo.toml for CLI name change
- Added a comprehensive testing guide for the FS Event Pipeline, detailing metrics collection, logging, and troubleshooting steps.
- Updated the CLI package name from "spacedrive-cli" to "sd-cli" in Cargo.toml for consistency.
- Modified various files to reflect the new package structure and improve logging and metrics handling.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 15:31:25 -07:00
Jamie Pine
56a5c6f0af feat: Update search functionality with new tests and dependencies
- Added a new end-to-end search test with real data to validate the complete search workflow, including file indexing and search result display.
- Removed the outdated search integration test to streamline testing efforts.
- Introduced the `chrono` dependency in the CLI for enhanced date handling in search operations.
- Updated the search output structure to include matched content and improved pagination handling.

These changes enhance the robustness of the search feature and ensure better integration with real-world data scenarios.
2025-09-17 00:28:45 -07:00
Jamie Pine
ad75815e4e refactor: Clean up search command and query structure
- Improved formatting and consistency in the search command implementation.
- Enhanced the file search query logic by adding total count retrieval for pagination.
- Refactored the path construction and filtering methods for better clarity and maintainability.
- Updated the output handling to ensure proper display of search results and suggestions.

This refactor sets the stage for future enhancements in the search functionality.
2025-09-16 23:37:52 -07:00
Cursor Agent
f6ff22a322 feat: Add SD path search scope and improve path resolution
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-17 03:46:44 +00:00