Commit Graph

10 Commits

Author SHA1 Message Date
Timur Gordon
2e88bf33ba Update OsirisClient to use unified JobBuilder for both native and WASM
- Use hero_supervisor_openrpc_client::JobBuilder for both native and WASM builds
- Simplified execute_script method by removing duplicate job building code
- JobBuilder now works consistently across platforms
- Removed separate WasmJobBuilder usage
2025-11-04 17:09:11 +01:00
Timur Gordon
5d82959457 Restructure Osiris: separate core, client, and server crates to avoid circular dependencies 2025-11-04 13:08:43 +01:00
Timur Gordon
ae846ea734 Start CQRS refactoring: Create Osiris client crate
- Added workspace structure to Osiris Cargo.toml
- Created osiris-client crate for query operations (GET requests)
- Implemented generic get(), list(), query() methods
- Added KYC, payment, and communication query modules
- Created comprehensive refactoring plan document

CQRS Pattern:
- Commands (writes) → Supervisor client → Rhai scripts
- Queries (reads) → Osiris client → REST API

Next steps:
- Implement Osiris server with Axum
- Restructure SDK client by category (kyc/, payment/, etc.)
- Update FreezoneClient to use both supervisor and osiris clients
2025-11-04 10:26:33 +01:00
Timur Gordon
7633f14db1 Update OSIRIS engine with signatory access control and Freezone examples 2025-10-31 02:29:39 +01:00
Timur Gordon
973c36c703 wip 2025-10-29 16:56:16 +01:00
Timur Gordon
87c556df7a wip 2025-10-29 16:52:33 +01:00
Timur Gordon
03e5615541 Move package registration functions to respective rhai modules
- Moved register_note_functions to objects/note/rhai.rs
- Moved register_event_functions to objects/event/rhai.rs
- Updated engine.rs to import these functions from their modules
- Better code organization with functions co-located with their types
2025-10-28 12:34:11 +01:00
Timur Gordon
e760a184b1 Refactor to use Rhai packages for efficient engine creation
- Created OsirisPackage with all OSIRIS types and functions registered in the package
- Functions now registered directly in package module (Note, Event, get_context)
- Created ZdfzPackage extending OsirisPackage
- Engine factory pattern: creates Engine::new_raw() + registers package (very cheap)
- Removed TypeRegistry (unused code)
- Simplified runner to use factory functions instead of passing packages
- Package is created once, then factory efficiently creates engines on demand
2025-10-28 12:20:17 +01:00
Timur Gordon
e04012c8c0 Refactor Rhai integration with context-based execution and type registry
Major Changes:
- Moved Rhai support from rhai_support/ to rhai/ module
- Implemented context-based execution with signatory access control
- Added TypeRegistry for dynamic type registration and object creation
- Refactored engine to use context (Vec<String>) instead of instance
- Removed old runner binary (moved to runner_rust crate)

Rhai Module:
- engine.rs: Core Rhai engine with context-based get_context()
- functions.rs: Rhai function bindings (create_note, create_event, etc.)
- mod.rs: Module exports and organization

Store Improvements:
- TypeRegistry for registering object types and creators
- Generic store uses type registry for dynamic object creation
- Improved error handling and type safety

Documentation:
- RHAI_REFACTOR_COMPLETE.md: Refactoring details
- SIGNATORY_ACCESS_CONTROL.md: Context-based access control
- TYPE_REGISTRY_DESIGN.md: Type registry architecture
- REFACTORING_COMPLETE.md: Overall refactoring summary
- TESTS_COMPLETE.md: Testing documentation

Build Status:  Compiles successfully with minor warnings
2025-10-28 03:33:39 +01:00
Timur Gordon
097360ad12 first commit 2025-10-20 22:24:25 +02:00