Commit Graph

27 Commits

Author SHA1 Message Date
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
Cursor Agent
e3e50194b0 feat: Add network and pairing commands to CLI
Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-11 19:41:34 +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
Cursor Agent
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 Agent
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 Agent
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
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
Vítor Vasconcellos
c0540b343d Clean up and update rust dependencies (#2544)
* Clean up and update rust dependencies

* Attempt to fix Windows Error
2024-06-10 19:44:00 +00:00
jake
7abc116d0f [ENG-440] Crypto Refactor (#2115)
* rebase: `crates/crypto` into current `main`

* refactor: remove `mnemonic` module

* feat: disable secure erase temporarily

* fix: tsc

* fix: tsc due to unused import

* fix: remove `cli` crypto info

* deps: update

* chore: remove dead comment

* refactor: remove `bincode` feature

* refactor: give `keyring` a dedicated feature so it's not reliant on `sys` as well

* fix: remove `aes-gcm` as it's no longer supported

* refactor: remove dead comment

* fix: update `keyring` imports

* refactor: change tests to `aes-256-gcm`

* feat: make `Key` a `Box<>` internally to ensure it's heap allocated (and fix tests)

* chore: clippy

* fix: hashing tests now that `const` keys aren't available

this will be cleaned up with test vectors and `include_bytes!()`

* chore: clippy

* refactor: remove dead code

* test: bring back `encrypt_with_invalid_nonce` test

* fix: secret service keyring

* fix: `zbus` build issues

* doc: update comment for clearer reasoning

* fix: cargo fmt

* fix: use bytes directly

* deps: update lockfile

* fix: secret service keyring

* fix: comment out windows keyring for now

* fix: use session keyring if no keyring backend

* fix: completely remove keyring module if no keyring is available for that OS

* fix: clippy

* fix: move iimport to correct conditional compilation

* fix: fmt
2024-03-07 08:00:37 +00:00
jake
e5b45d8f49 [ENG-355] Keychain integration (and some typesafety) (#558)
* update crypto MSRV

* rename `keychain` to `keyring`

* make a start on the keymanager unlock refactor/keychain integration

* update routes

* update bindings

* add const identifiers

* add UI/front-end support for unlocking KM with OS keychains

* remove SK from lib creation dialog

* update query name

* add keyring functions

* attempt to update `change_master_password()` to use the keychain

* cleanup, fix master password change ui, better secret key in keyring detection

* cleanup TS a little

* add route for getting secret key from keyring

* update bindings

* update var names + show secret key in keys settings

* add `react-qr-code` and option to view the secret key (if it's in the OS keyring)

* allow copying SK to clipboard

* add `key_type` so we're not reliant on specific UUIDs for root/verification key handling

* clippy

* fix mobile typecheck

* fix typecheck, fix typo and tweak balloon hash parameters

* minor cleanup + typo fix

* use newtype structs

* WIP type refactoring (major readability boost!)

* update `use`

* add tokio `sync` feature

* too many structs? idk

* more cleanup

* add `generate` and `Nonce`

* `Nonce` and `Key` typesafety (beautiful)

* clippy + cleanup

* update code & examples

* fix bug & remove `ProtectedVec` as it looked out of place

* use `Key`

* add a query invalidation to make the UI extremely responsive

* ci pls work

* remove `keyringHasSk` route
2023-02-07 12:03:12 +00:00
brxken128
0baf2f1928 update cli to use async crypto 2023-01-24 16:19:30 +00:00
jake
30a52f62d2 [ENG-319] Balloon hashing (#489)
* add key attribute to `Key` in `ListOfKeys`

* add balloon hashing function with untailored parameters

* add ser/de rules for blake3-balloon (and change argon2id's)

* fix benchmark

* use `to_bytes`, `from_bytes` and `from_reader`

* cleanup code

* add blake3-balloon options to the UI and fix library sync/automount enable bug

* cleanup some serialization code

* fix hashing algorithm deserialization

* clean up header serialization + more idiomatic master key decryption

* clippy

* add generic ser/de error to crypto crate

* fix `Display` and crypto cli

* move crypto cli to cli app

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-01-04 09:57:02 +00:00