2025-12-23 18:40:58 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
|
2025-11-22 22:55:35 -03:00
|
|
|
pub mod admin;
|
|
|
|
|
pub mod analytics;
|
Add billion-scale database redesign with enums and sharding
Database Schema v7.0.0:
- Create new 'gb' schema with PostgreSQL ENUMs instead of VARCHAR for all domain values
- Add sharding infrastructure (shard_config, tenant_shard_map tables)
- Implement partitioned tables for sessions, messages, and analytics (monthly partitions)
- Add Snowflake-like ID generation for distributed systems
- Design for billion-user scale with proper indexing strategies
Rust Enums:
- Add comprehensive enum types in core/shared/enums.rs
- Implement ToSql/FromSql for Diesel ORM integration
- Include: ChannelType, MessageRole, MessageType, LlmProvider, ContextProvider
- Include: TaskStatus, TaskPriority, ExecutionMode, RiskLevel, ApprovalStatus, IntentType
- All enums stored as SMALLINT for efficiency
Other fixes:
- Fix hardcoded gpt-4 model in auto_task modules to use bot config
- Add vector_db to required bootstrap components
- Add Qdrant health check before KB indexing
- Change verbose START messages to trace level
- Fix episodic memory role handling in Claude client
- Disable auth for /api routes during development
This is a DESTRUCTIVE migration - only for fresh installations.
2025-12-29 11:27:13 -03:00
|
|
|
pub mod enums;
|
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
|
|
|
pub mod memory_monitor;
|
2025-11-22 22:55:35 -03:00
|
|
|
pub mod models;
|
2025-12-03 19:59:27 -03:00
|
|
|
pub mod schema;
|
2025-11-22 22:55:35 -03:00
|
|
|
pub mod state;
|
2025-12-05 16:43:14 -03:00
|
|
|
#[cfg(test)]
|
|
|
|
|
pub mod test_utils;
|
2025-11-22 22:55:35 -03:00
|
|
|
pub mod utils;
|
2025-11-30 12:20:48 -03:00
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
Add billion-scale database redesign with enums and sharding
Database Schema v7.0.0:
- Create new 'gb' schema with PostgreSQL ENUMs instead of VARCHAR for all domain values
- Add sharding infrastructure (shard_config, tenant_shard_map tables)
- Implement partitioned tables for sessions, messages, and analytics (monthly partitions)
- Add Snowflake-like ID generation for distributed systems
- Design for billion-user scale with proper indexing strategies
Rust Enums:
- Add comprehensive enum types in core/shared/enums.rs
- Implement ToSql/FromSql for Diesel ORM integration
- Include: ChannelType, MessageRole, MessageType, LlmProvider, ContextProvider
- Include: TaskStatus, TaskPriority, ExecutionMode, RiskLevel, ApprovalStatus, IntentType
- All enums stored as SMALLINT for efficiency
Other fixes:
- Fix hardcoded gpt-4 model in auto_task modules to use bot config
- Add vector_db to required bootstrap components
- Add Qdrant health check before KB indexing
- Change verbose START messages to trace level
- Fix episodic memory role handling in Claude client
- Disable auth for /api routes during development
This is a DESTRUCTIVE migration - only for fresh installations.
2025-12-29 11:27:13 -03:00
|
|
|
pub use enums::*;
|
2025-12-03 19:59:27 -03:00
|
|
|
pub use schema::*;
|
|
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
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::{
|
2025-11-30 12:20:48 -03:00
|
|
|
get_botserver_version, init_version_registry, register_component, version_string,
|
2025-12-03 19:59:27 -03:00
|
|
|
ComponentSource, ComponentStatus, ComponentVersion, VersionRegistry, BOTSERVER_NAME,
|
|
|
|
|
BOTSERVER_VERSION,
|
2025-11-30 12:20:48 -03:00
|
|
|
};
|
2025-12-03 19:59:27 -03:00
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
pub use botlib::models::{ApiResponse, Attachment, Suggestion};
|
|
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
pub use botlib::models::BotResponse;
|
|
|
|
|
pub use botlib::models::Session;
|
|
|
|
|
pub use botlib::models::UserMessage;
|
|
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
pub use models::{
|
|
|
|
|
Automation, Bot, BotConfiguration, BotMemory, Click, MessageHistory, NewTask, Organization,
|
|
|
|
|
Task, TriggerKind, User, UserLoginToken, UserPreference, UserSession,
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-28 15:32:48 -03:00
|
|
|
pub use utils::{
|
|
|
|
|
create_conn, get_content_type, sanitize_identifier, sanitize_path_component,
|
|
|
|
|
sanitize_path_for_filename, sanitize_sql_value, DbPool,
|
|
|
|
|
};
|
2025-12-03 19:59:27 -03:00
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
|
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
pub mod prelude {
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
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,
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
pub use diesel::prelude::*;
|
|
|
|
|
pub use diesel::{ExpressionMethods, QueryDsl, RunQueryDsl};
|
|
|
|
|
|
2025-12-23 18:40:58 -03:00
|
|
|
|
2025-12-03 19:59:27 -03:00
|
|
|
pub use chrono::{DateTime, Utc};
|
|
|
|
|
pub use serde::{Deserialize, Serialize};
|
|
|
|
|
pub use uuid::Uuid;
|
|
|
|
|
}
|