aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* fix: Make the ActionContext passed to on_proc_begin mutable魏曹先生2025-10-273-8/+8
|
* feat: Add Server Lock魏曹先生2025-10-271-0/+43
|
* Add some debug logs魏曹先生2025-10-272-16/+61
|
* Fix some spelling issues.魏曹先生2025-10-243-4/+21
|
* Re-export subcrate `action_system` to `just_enough_vcs`魏曹先生2025-10-243-5/+17
|
* Update `config.rs`魏曹先生2025-10-181-1/+4
| | | | - If config file not exist, now return Error
* Fix Clippy warnings and optimize code魏曹先生2025-10-138-47/+51
| | | | | | | | | - Fix let_underscore_future warning by properly awaiting async functions - Make accept_import function async to match add_mapping usage - Propagate errors properly with ? operator instead of ignoring them - Replace manual Default implementation with derive attribute - Replace vec! with array literal to avoid useless_vec warning - All tests pass and code is now Clippy clean
* feat: implement asynchronous action call system魏曹先生2025-10-137-38/+109
| | | | | | | | | | - Add async callback support with proper argument passing - Implement remote action invocation via TCP connection - Add hello_world_action example demonstrating async communication - Improve ActionPool with type-safe async processing - Update client registry for remote action handling - Enhance ActionContext with better instance management - Support both local and remote action execution modes
* feat: Implement JSON-based type-erased action invocation魏曹先生2025-10-138-23/+166
| | | | | | | | | - Add process_json method to ActionPool for type-agnostic calls using JSON serialization - Extend ActionContext with action_name and action_args fields and setter methods - Update action_gen macro to use process_json instead of typed process method - Implement remote action invocation framework in client_registry and action_service - Add protocol definitions for remote action communication - Enable flexible action execution without explicit type specifications
* feat: Add JSON-based action invocation to ActionPool魏曹先生2025-10-136-20/+31
| | | | | | | | - Extend action_gen macro to generate JSON serialization logic - Implement generic action processing using JSON text for type-agnostic calls - Add callback mechanism with action name and arguments in ActionPool - Update client and server registries to use new callback system - Improve action system flexibility at the cost of serialization overhead
* feat: Add connection infrastructure and documentation魏曹先生2025-10-124-0/+176
| | | | | | - Implement action service for connection handling - Add error types for connection operations - Create todo.md for project tracking
* feat: Update data configuration structures魏曹先生2025-10-123-40/+99
| | | | | - Add new configuration fields for local and vault data - Remove outdated todo.txt file
* refactor: Update action macros and error types魏曹先生2025-10-122-4/+7
| | | | | - Enhance action_gen macro functionality - Add new error variants for TCP connection
* chore: Update dependencies and module exports魏曹先生2025-10-123-0/+17
| | | | | - Add required dependencies for action system - Export registry modules in vcs_actions library
* feat: Implement SetUpstreamVaultAction魏曹先生2025-10-121-0/+17
| | | | | | - Add local action for setting upstream vault - Use action_gen macro for automatic registration - Validate action is executed locally
* feat: Add server action registry魏曹先生2025-10-121-0/+9
| | | | | - Create server_action_pool function - Register SetUpstreamVaultAction for server use
* feat: Add callback mechanism to ActionPool魏曹先生2025-10-121-6/+53
| | | | | | | - Add ProcBeginCallback and ProcEndCallback types - Implement set_on_proc_begin and set_on_proc_end methods - Add callback execution in process method - Update trait bounds for better type safety
* fix: Resolve callback type mismatch in client_registry魏曹先生2025-10-121-0/+39
| | | | | | - Fix lifetime issue in on_proc_begin callback registration - Use cloned context in async closure to avoid lifetime conflicts - Rename unused variable to suppress warning
* feat: Add Clone implementation for ActionContext魏曹先生2025-10-121-2/+20
| | | | | This enables ActionContext to be cloned when setting up process begin callbacks, resolving lifetime issues in callback registration.
* chore: update workspace configuration and dependencies魏曹先生2025-10-061-0/+4
| | | | | | - Add examples to workspace members - Update vcs_data dependencies structure - Fix library re-export paths in main lib.rs
* feat: add new error variants to TcpTargetError魏曹先生2025-10-061-0/+6
| | | | | - Add NotLocal error for actions requiring local execution - Add NotRemote error for actions requiring remote execution
* feat: add default implementation and convenience methods to ActionContext魏曹先生2025-10-061-2/+19
| | | | | | - Implement Default trait for ActionContext - Add local() and remote() constructor methods - Make instance field optional for better flexibility
* refactor: optimize procedural macros in action_system魏曹先生2025-10-061-3/+31
| | | | | | - Add register_to_pool and process_at_pool helper methods to generated structs - Improve documentation with usage examples - Enhance macro-generated code structure
* Fix macro to properly extract and use parameter names from function signature魏曹先生2025-10-061-8/+26
| | | | | | | - Extract actual parameter names (ctx, upstream) from function signature - Use extracted parameter names in generated process method - Remove workaround that manually assigned context to ctx variable - Ensure generated code matches the original function parameter names exactly
* Fix macro expansion type errors in action_system macros魏曹先生2025-10-061-2/+2
| | | | | | | - Update macro-generated code to use correct action_system crate name - Replace vcs_service references with action_system in generated implementations - Ensure Action trait implementations reference the correct module path - Fix ActionContext type references in generated process methods
* Remove old vcs directory after migration to vcs_data魏曹先生2025-10-0624-2900/+0
| | | | | | - Delete entire crates/vcs directory and its contents - Remove test files and configuration from old structure - Complete transition to new vcs_data and vcs_actions architecture
* Create vcs_actions crate for client-server interaction logic魏曹先生2025-10-0611-0/+24
| | | | | | - Add new crate to combine action_system and vcs_data functionality - Define dependencies on both action_system and vcs_data crates - Prepare structure for implementing client-server communication logic
* Move vcs crate to vcs_data for better separation of concerns魏曹先生2025-10-0624-0/+2900
| | | | | | | - Rename vcs crate to vcs_data to clearly define data layer - Maintain all existing data structures and functionality - Update dependencies to include action_system integration - Preserve test structure in vcs_data_test directory
* Remove old service directory and move todo.txt to vcs crate魏曹先生2025-10-067-326/+0
| | | | | | - Delete entire crates/service directory with old vcs_service implementation - Move todo.txt to crates/vcs for better organization - Keep action list in main vcs crate where it belongs
* Rename vcs_service to action_system for better naming clarity魏曹先生2025-10-067-1/+327
| | | | | | | - Create new action_system crate with action framework - Create action_system_macros crate for procedural macros - Update vcs crate dependencies to use action_system - Maintain same functionality with improved naming
* Remove unused behaviour.rs file from tcp_connection魏曹先生2025-10-061-1/+0
| | | | - Delete empty behaviour.rs file that was not being used
* Remove old service module and refactor lib structure魏曹先生2025-10-064-5/+0
| | | | | | - Delete legacy service.rs and its submodules - Remove service module from lib.rs exports - Clean up unused service-related code
* Enhance VaultConfig with server configuration魏曹先生2025-10-061-1/+32
| | | | | | | - Add VaultServerConfig struct with server settings - Include local bind address, port, LAN discovery, and auth strength - Add default server configuration with localhost binding and advanced auth - Update constants usage for port configuration
* Update dependencies and workspace configuration魏曹先生2025-10-061-0/+1
| | | | | | - Add vcs_service to workspace members in Cargo.toml - Update Cargo.lock with new vcs_service dependencies - Add vcs_service dependency to vcs crate
* Add service module with macros and action framework魏曹先生2025-10-068-0/+373
| | | | | | | - Create new vcs_service crate for handling service actions - Add vcs_service_macros crate for procedural macros - Add vcs_test module with action framework integration - Implement Action and ActionPool traits for service operations
* Fix test failures in sheet creation and management tests魏曹先生2025-09-291-11/+26
| | | | | | | - Add .await to all add_mapping async method calls - Adjust test logic to not check remove_mapping return value when virtual files don't exist - Clean up unused variable warnings - All 10 vcs_test integration tests now pass successfully
* Update test files: remove obsolete test_incremental_transfer.rs and modify ↵魏曹先生2025-09-293-289/+2
| | | | test suites
* Add incremental transfer functionality and update core components魏曹先生2025-09-295-1232/+147
| | | | | | | | - Implement instance_incremental_transfer module for efficient file synchronization - Add support for chunk-based file transfer with hash comparison - Update TCP connection utilities to support incremental transfer protocol - Enhance error handling and version management for file synchronization - Update dependencies and integrate new functionality into main library
* Add incremental transfer functionality and update TCP connection utilities魏曹先生2025-09-295-0/+1499
| | | | | | | | - Add instance_incremental_transfer module for handling incremental data transfers - Add test_incremental_transfer module for testing incremental transfer functionality - Update TCP connection library to support new incremental transfer features - Update Cargo.toml dependencies for TCP connection utilities - Update main library to integrate new TCP connection functionality
* Refactor TCP connection authentication into separate module魏曹先生2025-09-283-284/+300
| | | | | | - Extract challenge-response authentication code from instance.rs to new instance_challenge.rs - Add instance_challenge module declaration to lib.rs - Maintain all cryptographic functionality while improving code organization
* refactor: downgrade tcp_connection functionality to test utilities魏曹先生2025-09-2615-49/+44
| | | | | | | | - Remove handle, target, target_configure, target_connection modules from main library - Create test_utils module in test project to contain temporary connection functionality - Update import paths in test files - Keep instance and error modules as core functionality - Adjust vcs_test configurations to adapt to new test structure
* feat(tcp_connection): add MessagePack serialization support魏曹先生2025-09-2613-28/+305
| | | | | | | | | | | | - Add rmp-serde dependency for MessagePack serialization - Implement write_msgpack and read_msgpack methods for basic MessagePack support - Add write_large_msgpack and read_large_msgpack methods for chunked transmission - Add error conversions for rmp-serde errors - Add comprehensive tests for MessagePack functionality - Fix code formatting and improve readability - Make stream field pub(crate) for better access control All tests pass successfully, ensuring backward compatibility.
* docs: Add module-level documentation comments魏曹先生2025-09-263-0/+3
| | | | | - Add documentation comments to VaultConfig, Sheets, and VirtualFile modules - Improve code documentation for better maintainability
* refactor: Update sheet input handling and fix tests魏曹先生2025-09-267-59/+186
| | | | | | | | - Modify Sheet::add_input to accept InputPackage instead of separate parameters - Use output_mappings method to generate InputPackage in tests - Update test assertions to match new path transformation logic - Fix mapping count assertions after adding multiple mappings - Clean up string_proc module structure
* refactor: Simplify error handling in vault setup魏曹先生2025-09-261-2/+1
| | | | Replace std::io::Error::new with std::io::Error::other for cleaner code
* feat: Automatically create host member and ref sheet during vault setup魏曹先生2025-09-264-20/+60
| | | | | | | - Add VAULT_HOST_NAME constant for 'host' member - Modify setup_vault to automatically register host member and create ref sheet - Update test assertions to account for the additional ref sheet - Fix code formatting in sheets.rs
* Fixed by clippy魏曹先生2025-09-262-8/+6
|
* test: add comprehensive sheet management test suite魏曹先生2025-09-262-0/+263
| | | | | | | | | | | | | | | | - Add test_sheet_creation_management_and_persistence with 3 test functions: - Main test covering sheet creation, input/mapping management, persistence, and deletion - Error condition testing for invalid operations - Serialization testing through vault operations - Test coverage includes: - Sheet creation with member validation - Input package addition and removal - Mapping entry management - File persistence and reloading - Safe deletion to trash and restoration - Permanent deletion - Error handling for invalid operations - Follows existing test patterns and uses proper getter methods for private fields
* refactor: convert InputPackage from tuple to named struct魏曹先生2025-09-262-8/+18
| | | | | | | | - Replace tuple-based InputPackage with named struct for better type safety - Add proper field names and documentation - Fix typo in InputRelativePathBuf type name - Update add_input and remove_input methods to work with new struct - Maintain serialization compatibility with derive attributes
* feat: add sheet management system for vaults魏曹先生2025-09-2611-9/+379
| | | | | | | | | | | | | | - Add Sheet struct with holder, inputs, and mapping functionality - Implement SheetData with serialization support - Add sheets.rs with vault sheet management methods: - Load all sheets in vault - Search for sheet names - Read individual sheets - Create new sheets with validation - Delete sheets (both permanently and safely to trash) - Restore sheets from trash - Update data module to include sheet submodule - Minor fixes and improvements to related modules