Commit Graph

73 Commits

Author SHA1 Message Date
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
Cursor Agent
9f9696c3ba Changes made by Agent
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-17 02:25:33 +00:00
Cursor Agent
a5036ad9fe feat: Implement file search functionality
This commit introduces the file search functionality, including core logic, CLI integration, and necessary data structures.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-17 02:00:52 +00:00
Jamie Pine
a0fb91cfb1 refactor: Update tag command arguments and migration structure
- Refactored the tag command arguments in the CLI to improve clarity and consistency in the codebase.
- Updated the migration script for the tag system to enhance the database schema, including the creation of new tables and indexes.
- Adjusted foreign key constraints and triggers to maintain data integrity and support full-text search capabilities.

This refactor streamlines the tagging system's command structure and database interactions, setting the foundation for future enhancements.
2025-09-16 18:34:22 -07:00
Cursor Agent
85cfbca7e5 feat: Add tag domain commands to CLI
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-16 20:04:49 +00:00
Jamie Pine
7b9e2d8dd6 chore: Update dependencies and enhance error handling in CLI
- Updated `bincode` dependency to version 1.3.3 for improved performance and security.
- Refactored error handling in `error.rs` to use `bincode::Error` instead of `bincode::ErrorKind`, ensuring better error management.
- Enhanced macro definitions in `macros.rs` to utilize the updated error handling structure.
- Improved error reporting in `manager.rs` when creating directories, providing clearer context for IO errors.
- Added a new design document for Sync Conduits, detailing the architecture and implementation plan for file synchronization in Spacedrive.
2025-09-15 11:45:21 -07:00
Jamie Pine
2ed328af79 refactor: Update argument handling and imports across CLI domains
- Refactored argument handling in the job and library domains to improve clarity and consistency.
- Updated imports to use the correct input types for actions in the library and location modules.
- Enhanced type annotations for better readability and maintainability in the codebase.
2025-09-13 17:26:06 -07:00
Jamie Pine
e8d28bf7eb merge: incorporate confirm_or_abort utility from main while keeping modular CLI structure
- Added confirm_or_abort utility for dangerous operations
- Added confirmation prompts to:
  - location remove
  - library delete (new command)
  - network revoke
- Kept our modular CLI structure with domains/ subdirectories
- Removed old flat .rs files that were moved to modular structure
2025-09-13 17:17:43 -07:00
Jamie Pine
2574ad7bff refactor: Remove unused domain modules from CLI
- Deleted several domain modules including file, index, job, library, location, and network, which were no longer needed in the CLI structure.
- Cleaned up the codebase to improve maintainability and reduce complexity by removing obsolete functionality.
- Updated the module structure in `util/mod.rs` to reflect these changes.
2025-09-13 17:03:01 -07:00
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
Cursor Agent
4b43120deb Checkpoint before follow-up message
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 22:54:55 +00:00
Cursor Agent
0be286d152 Refactor: Move command logic to domain modules
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:59:33 +00:00
Cursor Agent
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 Agent
e26ead654b feat: Add job commands and list locations
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 21:05:09 +00:00
Cursor Agent
470ff03bd6 Add location and library commands, improve instance handling
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 20:00:48 +00:00