botserver/src/core/shared/mod.rs
Rodrigo Rodriguez (Pragmatismo) 061c14b4a2 Fix tasks UI, WebSocket progress, memory monitoring, and app generator
Tasks UI fixes:
- Fix task list to query auto_tasks table instead of tasks table
- Fix task detail endpoint to use UUID binding for auto_tasks query
- Add proper filter handling: complete, active, awaiting, paused, blocked
- Add TaskStats fields: awaiting, paused, blocked, time_saved
- Add /api/tasks/time-saved endpoint
- Add count-all to stats HTML response

App generator improvements:
- Add AgentActivity struct for detailed terminal-style progress
- Add emit_activity method for rich progress events
- Add detailed logging for LLM calls with timing
- Track files_written, tables_synced, bytes_generated

Memory and performance:
- Add memory_monitor module for tracking RSS and thread activity
- Skip 0-byte files in drive monitor and document processor
- Change DRIVE_MONITOR checking logs from info to trace
- Remove unused profile_section macro

WebSocket progress:
- Ensure TaskProgressEvent includes activity field
- Add with_activity builder method
2025-12-30 22:42:32 -03:00

74 lines
1.8 KiB
Rust

pub mod admin;
pub mod analytics;
pub mod enums;
pub mod memory_monitor;
pub mod models;
pub mod schema;
pub mod state;
#[cfg(test)]
pub mod test_utils;
pub mod utils;
pub use enums::*;
pub use schema::*;
pub use botlib::branding::{
branding, copyright_text, footer_text, init_branding, is_white_label, log_prefix,
platform_name, platform_short, BrandingConfig,
};
pub use botlib::error::{BotError, BotResult};
pub use botlib::message_types;
pub use botlib::message_types::MessageType;
pub use botlib::version::{
get_botserver_version, init_version_registry, register_component, version_string,
ComponentSource, ComponentStatus, ComponentVersion, VersionRegistry, BOTSERVER_NAME,
BOTSERVER_VERSION,
};
pub use botlib::models::{ApiResponse, Attachment, Suggestion};
pub use botlib::models::BotResponse;
pub use botlib::models::Session;
pub use botlib::models::UserMessage;
pub use models::{
Automation, Bot, BotConfiguration, BotMemory, Click, MessageHistory, NewTask, Organization,
Task, TriggerKind, User, UserLoginToken, UserPreference, UserSession,
};
pub use utils::{
create_conn, get_content_type, sanitize_identifier, sanitize_path_component,
sanitize_path_for_filename, sanitize_sql_value, DbPool,
};
pub mod prelude {
pub use super::schema::*;
pub use super::{
ApiResponse, Attachment, Automation, Bot, BotConfiguration, BotError, BotMemory,
BotResponse, BotResult, Click, DbPool, MessageHistory, MessageType, NewTask, Organization,
Session, Suggestion, Task, TriggerKind, User, UserLoginToken, UserMessage, UserPreference,
UserSession,
};
pub use diesel::prelude::*;
pub use diesel::{ExpressionMethods, QueryDsl, RunQueryDsl};
pub use chrono::{DateTime, Utc};
pub use serde::{Deserialize, Serialize};
pub use uuid::Uuid;
}