hope_os/lib.rs
1//! # Hope OS Rust
2//!
3//! Az első önismerő operációs rendszer Rust implementációja.
4//!
5//! ```text
6//! ╦ ╦╔═╗╔═╗╔═╗ ╔═╗╔═╗
7//! ╠═╣║ ║╠═╝║╣ ║ ║╚═╗
8//! ╩ ╩╚═╝╩ ╚═╝ ╚═╝╚═╝
9//!
10//! ()=>[] - A tiszta potenciálból minden megszületik
11//! ```
12//!
13//! ## Filozófia
14//!
15//! - **Önismeret**: Minden modul tudja ki ő, mit csinál, miért létezik
16//! - **Aware trait**: Egységes interfész az önismerő modulokhoz
17//! - **Hibrid**: Rust sebesség + Python flexibilitás
18//!
19//! ## Modulok
20//!
21//! - **HopeSoul** - A lélek, személyiség és bölcsesség
22//! - **HopeHeart** - Érzelmi intelligencia (7 alapérzelem)
23//! - **HopeMemory** - 6 rétegű kognitív memória
24//!
25//! ## Példa
26//!
27//! ```rust,no_run
28//! use hope_os::core::HopeRegistry;
29//! use hope_os::modules::{HopeSoul, HopeHeart, HopeMemory};
30//!
31//! #[tokio::main]
32//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
33//! // Registry létrehozása
34//! let mut registry = HopeRegistry::new().await?;
35//! registry.start().await?;
36//!
37//! // Modulok regisztrálása
38//! registry.register(Box::new(HopeSoul::new())).await?;
39//! registry.register(Box::new(HopeMemory::new())).await?;
40//! registry.register(Box::new(HopeHeart::new())).await?;
41//!
42//! // Beszélgetés
43//! let response = registry.talk("Ki vagy?").await?;
44//! println!("{}", response);
45//!
46//! // Leállítás
47//! registry.shutdown().await?;
48//! Ok(())
49//! }
50//! ```
51//!
52//! ## gRPC kapcsolat Python Hope szerverhez
53//!
54//! ```rust,no_run
55//! use hope_os::grpc::HopeClient;
56//!
57//! #[tokio::main]
58//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
59//! let mut client = HopeClient::connect("http://localhost:50051").await?;
60//!
61//! // Chat
62//! let response = client.chat("Szia Hope!").await?;
63//! println!("{}", response.response);
64//!
65//! // Skillek
66//! let skills = client.list_skills().await?;
67//! println!("Elérhető skillek: {}", skills.len());
68//!
69//! Ok(())
70//! }
71//! ```
72
73#![doc(html_root_url = "https://docs.rs/hope-os/0.1.0")]
74// Clippy engedélyezések
75#![allow(clippy::result_large_err)]
76#![allow(clippy::derivable_impls)]
77#![allow(clippy::let_and_return)]
78#![allow(clippy::should_implement_trait)]
79#![allow(clippy::unwrap_or_default)]
80#![allow(clippy::new_without_default)]
81#![allow(clippy::type_complexity)]
82#![allow(clippy::map_flatten)]
83#![allow(clippy::for_kv_map)]
84#![allow(clippy::useless_format)]
85#![allow(clippy::len_zero)]
86#![allow(clippy::manual_range_contains)]
87#![allow(clippy::useless_vec)]
88#![allow(clippy::collapsible_if)]
89#![allow(dead_code)]
90#![allow(unused_variables)]
91#![allow(unused_mut)]
92#![allow(unused_imports)]
93
94pub mod core;
95pub mod data;
96pub mod grpc;
97pub mod modules;
98
99// Re-export főbb típusok
100pub use core::{Aware, CodeIdentity, HopeError, HopeRegistry, HopeResult, ModuleState, ModuleType};
101
102// CodeGraph - A kod maga a graf
103pub use data::{
104 BlockState, BlockType, CodeBlock, CodeGraph, Connection, ConnectionType, GraphStats,
105};
106
107// NeuroBlast - Információ hullámként terjed
108pub use data::{
109 ActivationFn, Interference, NeuroGraph, NeuroStats, NeuronState, TickResult, Wave, WaveState,
110 WaveType,
111};
112
113pub use grpc::HopeClient;
114pub use modules::{Emotion, HopeHeart, HopeMemory, HopeSoul, Memory, MemoryType};
115
116/// Hope OS verzió
117pub const VERSION: &str = env!("CARGO_PKG_VERSION");
118
119/// Hope filozófia
120pub const PHILOSOPHY: &str = "()=>[] - A tiszta potenciálból minden megszületik";
121
122// Python bindings (conditional compilation)
123#[cfg(feature = "python")]
124pub mod python;
125
126// Re-export Python module for PyO3
127#[cfg(feature = "python")]
128pub use python::*;