Files
openhuman/src/lib.rs
T
Steven EnamakelandGitHub 8757bb9f15 Feat/docs (#331)
* Enhance documentation and structure across core modules

- Added comprehensive module-level documentation for `lib.rs`, `main.rs`, `cli.rs`, `jsonrpc.rs`, `mod.rs`, `config.rs`, and `skills.rs`, detailing their functionalities and responsibilities within the OpenHuman platform.
- Improved function-level documentation to clarify arguments, return types, and error handling for key functions such as `run_core_from_args`, `rpc_handler`, and `run_from_cli_args`.
- Enhanced comments throughout the code to improve readability and maintainability, ensuring a clearer understanding of the codebase for future development.

* Enhance documentation for RuntimeEngine and SkillRegistry

- Improved struct and function-level documentation in `qjs_engine.rs` to clarify the lifecycle management of JavaScript-based skills, including skill discovery, startup, and shutdown processes.
- Updated comments in `skill_registry.rs` to provide clearer descriptions of the registry's role in managing active skills and their communication channels.
- Added detailed explanations for key methods, enhancing understanding of their functionality and usage within the OpenHuman platform.

* Enhance documentation across skill modules

- Improved module-level and struct-level documentation in `manifest.rs`, `ops.rs`, `socket_manager.rs`, and `types.rs` to clarify the purpose and functionality of various components within the skills system.
- Added detailed comments for key structs and functions, including `SkillSetup`, `Skill`, and `SocketManager`, enhancing understanding of their roles in skill management and communication.
- Updated descriptions for enums and message types to provide clearer context for their usage in the skill lifecycle and internal messaging.

* Enhance documentation across skills modules

- Added comprehensive module-level documentation for `registry_ops.rs`, `registry_types.rs`, `schemas.rs`, and `qjs_skill_instance` modules, detailing their functionalities and responsibilities within the OpenHuman skills system.
- Improved function-level comments to clarify the purpose and usage of key functions, including `registry_fetch`, `registry_search`, and `skill_install`.
- Enhanced descriptions for structs and enums, providing clearer context for their roles in skill management and execution.
- Updated comments throughout the code to improve readability and maintainability, ensuring a clearer understanding of the codebase for future development.

* Enhance documentation for QuickJS and IndexedDB modules

- Improved module-level documentation in `quickjs_libs/mod.rs` to clarify the purpose and functionality of the QuickJS runtime support.
- Enhanced comments in `storage.rs` to provide detailed descriptions of the IndexedDB storage layer, including its features and compatibility with the browser's IndexedDB API.
- Updated function-level comments to improve clarity on database connection management and object store operations, ensuring better understanding for future development.

* Enhance documentation across memory modules

- Added comprehensive module-level documentation for `mod.rs`, `ops.rs`, `rpc_models.rs`, `schemas.rs`, and `traits.rs`, detailing their functionalities within the OpenHuman memory system.
- Improved function-level comments to clarify the purpose and usage of key functions, enhancing understanding of memory operations, RPC handling, and data structures.
- Updated comments throughout the code to improve readability and maintainability, ensuring a clearer understanding of the memory system for future development.

* Enhance documentation for memory modules

- Updated module-level documentation in `chunker.rs`, `embeddings.rs`, and `relex.rs` to provide clear descriptions of their functionalities within the OpenHuman memory system.
- Improved function-level comments to clarify the purpose and usage of key functions, enhancing understanding of markdown chunking, embedding providers, and relation extraction processes.
- Added detailed explanations for structs and enums, ensuring better context for their roles in memory operations and data handling.

* Enhance documentation across memory modules

- Updated module-level documentation in `ingestion_queue.rs`, `ingestion.rs`, `response_cache.rs`, `client.rs`, and `mod.rs` to provide clearer descriptions of their functionalities within the OpenHuman memory system.
- Improved function-level comments to clarify the purpose and usage of key functions, enhancing understanding of document ingestion, caching mechanisms, and memory client interactions.
- Added detailed explanations for structs and enums, ensuring better context for their roles in memory operations and data handling.

* Enhance documentation for memory store modules

- Added comprehensive module-level documentation for `factories.rs` and `memory_trait.rs`, detailing their functionalities within the OpenHuman memory system.
- Improved function-level comments to clarify the purpose and usage of key functions, enhancing understanding of memory instance creation and management.
- Included detailed explanations for the `UnifiedMemory` implementation, ensuring better context for its role as a generic memory backend.

* Refactor and enhance documentation across various modules

- Removed unnecessary blank lines in `main.rs`, `chunker.rs`, `embeddings.rs`, `ingestion.rs`, `relex.rs`, `rpc_models.rs`, `memory_trait.rs`, `manifest.rs`, `mod.rs`, `ops.rs`, `qjs_engine.rs`, `socket_manager.rs`, and other files to improve code readability.
- Improved comments and documentation in several modules to clarify the purpose and functionality of key components, enhancing overall understanding of the codebase.
- Ensured consistent formatting and organization of comments throughout the code, contributing to better maintainability and clarity for future development.

* fix import

* format
2026-04-05 22:14:29 -07:00

31 lines
955 B
Rust

//! Core library for the OpenHuman platform.
//!
//! This crate provides the central logic for the OpenHuman core binary, including:
//! - API and RPC handlers for external interactions.
//! - Core system services (CLI, configuration, monitoring).
//! - Domain-specific logic for the OpenHuman agent runtime.
pub mod api;
pub mod core;
pub mod openhuman;
pub mod rpc;
pub use openhuman::config::DaemonConfig;
pub use openhuman::memory::{MemoryClient, MemoryState};
/// Runs the core logic based on the provided command-line arguments.
///
/// This is the primary entry point for the OpenHuman binary, delegating to the
/// CLI module for argument parsing and command dispatch.
///
/// # Arguments
///
/// * `args` - A slice of strings containing the command-line arguments.
///
/// # Errors
///
/// Returns an error if command execution fails.
pub fn run_core_from_args(args: &[String]) -> anyhow::Result<()> {
core::cli::run_from_cli_args(args)
}