2026-01-16 11:29:22 -03:00
use crate ::core ::config ::ConfigManager ;
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
use crate ::core ::kb ::embedding_generator ::set_embedding_server_ready ;
use crate ::core ::shared ::memory_monitor ::{ log_jemalloc_stats , MemoryStats } ;
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
use crate ::security ::command_guard ::SafeCommand ;
2025-11-12 08:19:21 -03:00
use crate ::shared ::models ::schema ::bots ::dsl ::* ;
use crate ::shared ::state ::AppState ;
2025-11-02 18:36:21 -03:00
use diesel ::prelude ::* ;
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
use log ::{ error , info , trace , warn } ;
2025-11-12 08:19:21 -03:00
use reqwest ;
2025-12-26 08:59:25 -03:00
use std ::fmt ::Write ;
2025-11-02 18:36:21 -03:00
use std ::sync ::Arc ;
use tokio ;
2025-11-20 13:28:35 -03:00
2025-11-02 18:36:21 -03:00
pub async fn ensure_llama_servers_running (
2025-11-12 08:19:21 -03:00
app_state : Arc < AppState > ,
2025-11-02 18:36:21 -03:00
) -> Result < ( ) , Box < dyn std ::error ::Error + Send + Sync > > {
2026-01-06 22:56:35 -03:00
trace! ( " ensure_llama_servers_running ENTER " ) ;
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
let start_mem = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] ensure_llama_servers_running START, RSS={} " ,
MemoryStats ::format_bytes ( start_mem . rss_bytes ) ) ;
log_jemalloc_stats ( ) ;
2025-12-14 15:58:54 -03:00
if std ::env ::var ( " SKIP_LLM_SERVER " ) . is_ok ( ) {
2026-01-06 22:56:35 -03:00
trace! ( " SKIP_LLM_SERVER set, returning early " ) ;
2025-12-14 15:58:54 -03:00
info! ( " SKIP_LLM_SERVER set - skipping local LLM server startup (using mock/external LLM) " ) ;
return Ok ( ( ) ) ;
}
2025-11-12 08:19:21 -03:00
let config_values = {
let conn_arc = app_state . conn . clone ( ) ;
let default_bot_id = tokio ::task ::spawn_blocking ( move | | {
2026-01-23 13:14:20 -03:00
let mut conn = conn_arc . get ( ) . map_err ( | e | format! ( " failed to get db connection: {e} " ) ) ? ;
2025-11-12 08:19:21 -03:00
bots . filter ( name . eq ( " default " ) )
. select ( id )
. first ::< uuid ::Uuid > ( & mut * conn )
. unwrap_or_else ( | _ | uuid ::Uuid ::nil ( ) )
} )
. await ? ;
let config_manager = ConfigManager ::new ( app_state . conn . clone ( ) ) ;
(
default_bot_id ,
2025-12-08 23:39:01 -03:00
config_manager
2025-12-15 16:33:13 -03:00
. get_config ( & default_bot_id , " llm-server " , Some ( " true " ) )
. unwrap_or_else ( | _ | " true " . to_string ( ) ) ,
2025-11-12 08:19:21 -03:00
config_manager
. get_config ( & default_bot_id , " llm-url " , None )
. unwrap_or_default ( ) ,
config_manager
. get_config ( & default_bot_id , " llm-model " , None )
. unwrap_or_default ( ) ,
config_manager
. get_config ( & default_bot_id , " embedding-url " , None )
. unwrap_or_default ( ) ,
config_manager
. get_config ( & default_bot_id , " embedding-model " , None )
. unwrap_or_default ( ) ,
config_manager
. get_config ( & default_bot_id , " llm-server-path " , None )
. unwrap_or_default ( ) ,
)
} ;
2025-12-08 23:39:01 -03:00
let (
_default_bot_id ,
llm_server_enabled ,
llm_url ,
llm_model ,
embedding_url ,
embedding_model ,
llm_server_path ,
) = config_values ;
let llm_server_enabled = llm_server_enabled . to_lowercase ( ) = = " true " ;
if ! llm_server_enabled {
info! ( " Local LLM server management disabled (llm-server=false). Using external endpoints. " ) ;
2025-12-26 08:59:25 -03:00
info! ( " LLM URL: {llm_url} " ) ;
info! ( " Embedding URL: {embedding_url} " ) ;
2025-12-08 23:39:01 -03:00
return Ok ( ( ) ) ;
}
2025-11-02 18:36:21 -03:00
info! ( " Starting LLM servers... " ) ;
info! ( " Configuration: " ) ;
2025-12-26 08:59:25 -03:00
info! ( " LLM URL: {llm_url} " ) ;
info! ( " Embedding URL: {embedding_url} " ) ;
info! ( " LLM Model: {llm_model} " ) ;
info! ( " Embedding Model: {embedding_model} " ) ;
info! ( " LLM Server Path: {llm_server_path} " ) ;
2025-11-02 18:36:21 -03:00
info! ( " Restarting any existing llama-server processes... " ) ;
2026-01-06 22:56:35 -03:00
trace! ( " About to pkill llama-server... " ) ;
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
let before_pkill = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] Before pkill, RSS={} " , MemoryStats ::format_bytes ( before_pkill . rss_bytes ) ) ;
2025-11-20 13:28:35 -03:00
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let pkill_result = SafeCommand ::new ( " sh " )
. and_then ( | c | c . arg ( " -c " ) )
2026-01-09 12:13:35 -03:00
. and_then ( | c | c . trusted_shell_script_arg ( " pkill llama-server -9; true " ) ) ;
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
match pkill_result {
Ok ( cmd ) = > {
if let Err ( e ) = cmd . execute ( ) {
error! ( " Failed to execute pkill for llama-server: {e} " ) ;
} else {
tokio ::time ::sleep ( tokio ::time ::Duration ::from_secs ( 2 ) ) . await ;
info! ( " Existing llama-server processes terminated (if any) " ) ;
}
}
Err ( e ) = > error! ( " Failed to build pkill command: {e} " ) ,
2025-11-02 18:36:21 -03:00
}
2026-01-06 22:56:35 -03:00
trace! ( " pkill done " ) ;
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
let after_pkill = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] After pkill, RSS={} (delta={}) " ,
MemoryStats ::format_bytes ( after_pkill . rss_bytes ) ,
MemoryStats ::format_bytes ( after_pkill . rss_bytes . saturating_sub ( before_pkill . rss_bytes ) ) ) ;
2025-11-12 08:19:21 -03:00
let llm_running = if llm_url . starts_with ( " https:// " ) {
info! ( " Using external HTTPS LLM server, skipping local startup " ) ;
true
} else {
is_server_running ( & llm_url ) . await
} ;
let embedding_running = if embedding_url . starts_with ( " https:// " ) {
info! ( " Using external HTTPS embedding server, skipping local startup " ) ;
true
} else {
is_server_running ( & embedding_url ) . await
} ;
2025-11-02 18:36:21 -03:00
if llm_running & & embedding_running {
info! ( " Both LLM and Embedding servers are already running " ) ;
return Ok ( ( ) ) ;
}
let mut tasks = vec! [ ] ;
if ! llm_running & & ! llm_model . is_empty ( ) {
info! ( " Starting LLM server... " ) ;
feat(autotask): Implement AutoTask system with intent classification and app generation
- Add IntentClassifier with 7 intent types (APP_CREATE, TODO, MONITOR, ACTION, SCHEDULE, GOAL, TOOL)
- Add AppGenerator with LLM-powered app structure analysis
- Add DesignerAI for modifying apps through conversation
- Add app_server for serving generated apps with clean URLs
- Add db_api for CRUD operations on bot database tables
- Add ask_later keyword for pending info collection
- Add migration 6.1.1 with tables: pending_info, auto_tasks, execution_plans, task_approvals, task_decisions, safety_audit_log, generated_apps, intent_classifications, designer_changes
- Write apps to S3 drive and sync to SITE_ROOT for serving
- Clean URL structure: /apps/{app_name}/
- Integrate with DriveMonitor for file sync
Based on Chapter 17 - Autonomous Tasks specification
2025-12-27 21:10:09 -03:00
let app_state_clone = Arc ::clone ( & app_state ) ;
let llm_server_path_clone = llm_server_path . clone ( ) ;
let llm_model_clone = llm_model . clone ( ) ;
let llm_url_clone = llm_url . clone ( ) ;
tasks . push ( tokio ::spawn ( async move {
start_llm_server (
app_state_clone ,
llm_server_path_clone ,
llm_model_clone ,
llm_url_clone ,
)
} ) ) ;
2025-11-02 18:36:21 -03:00
} else if llm_model . is_empty ( ) {
info! ( " LLM_MODEL not set, skipping LLM server " ) ;
}
if ! embedding_running & & ! embedding_model . is_empty ( ) {
info! ( " Starting Embedding server... " ) ;
tasks . push ( tokio ::spawn ( start_embedding_server (
llm_server_path . clone ( ) ,
embedding_model . clone ( ) ,
embedding_url . clone ( ) ,
) ) ) ;
} else if embedding_model . is_empty ( ) {
info! ( " EMBEDDING_MODEL not set, skipping Embedding server " ) ;
}
for task in tasks {
task . await ? ? ;
}
info! ( " Waiting for servers to become ready... " ) ;
2026-01-06 22:56:35 -03:00
trace! ( " Starting wait loop for servers... " ) ;
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
let before_wait = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] Before wait loop, RSS={} " , MemoryStats ::format_bytes ( before_wait . rss_bytes ) ) ;
2025-11-02 18:36:21 -03:00
let mut llm_ready = llm_running | | llm_model . is_empty ( ) ;
let mut embedding_ready = embedding_running | | embedding_model . is_empty ( ) ;
let mut attempts = 0 ;
2025-12-23 18:40:58 -03:00
let max_attempts = 120 ;
2025-11-02 18:36:21 -03:00
while attempts < max_attempts & & ( ! llm_ready | | ! embedding_ready ) {
2026-01-06 22:56:35 -03:00
trace! ( " Wait loop iteration {} " , attempts ) ;
2025-11-02 18:36:21 -03:00
tokio ::time ::sleep ( tokio ::time ::Duration ::from_secs ( 2 ) ) . await ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
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
if attempts % 5 = = 0 {
let loop_mem = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] Wait loop attempt {}, RSS={} (delta from start={}) " ,
attempts ,
MemoryStats ::format_bytes ( loop_mem . rss_bytes ) ,
MemoryStats ::format_bytes ( loop_mem . rss_bytes . saturating_sub ( before_wait . rss_bytes ) ) ) ;
log_jemalloc_stats ( ) ;
}
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
if attempts % 5 = = 0 {
info! (
2025-12-26 08:59:25 -03:00
" Checking server health (attempt {}/{max_attempts})... " ,
attempts + 1
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
) ;
}
2025-11-02 18:36:21 -03:00
if ! llm_ready & & ! llm_model . is_empty ( ) {
if is_server_running ( & llm_url ) . await {
2025-12-26 08:59:25 -03:00
info! ( " LLM server ready at {llm_url} " ) ;
2025-11-02 18:36:21 -03:00
llm_ready = true ;
} else {
info! ( " LLM server not ready yet " ) ;
}
}
if ! embedding_ready & & ! embedding_model . is_empty ( ) {
if is_server_running ( & embedding_url ) . await {
2025-12-26 08:59:25 -03:00
info! ( " Embedding server ready at {embedding_url} " ) ;
2025-11-02 18:36:21 -03:00
embedding_ready = true ;
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
set_embedding_server_ready ( true ) ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
} else if attempts % 10 = = 0 {
2025-12-26 08:59:25 -03:00
warn! ( " Embedding server not ready yet at {embedding_url} " ) ;
2025-12-23 18:40:58 -03:00
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
if let Ok ( log_content ) =
2025-12-26 08:59:25 -03:00
std ::fs ::read_to_string ( format! ( " {llm_server_path} /llmembd-stdout.log " ) )
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
{
let last_lines : Vec < & str > = log_content . lines ( ) . rev ( ) . take ( 5 ) . collect ( ) ;
if ! last_lines . is_empty ( ) {
info! ( " Embedding server log (last 5 lines): " ) ;
for line in last_lines . iter ( ) . rev ( ) {
2025-12-26 08:59:25 -03:00
info! ( " {line} " ) ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
}
}
}
2025-11-02 18:36:21 -03:00
}
}
attempts + = 1 ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
if attempts % 20 = = 0 {
warn! (
2025-12-26 08:59:25 -03:00
" Still waiting for servers... (attempt {attempts}/{max_attempts}) - this may take a while for large models "
2025-11-12 08:19:21 -03:00
) ;
2025-11-02 18:36:21 -03:00
}
}
if llm_ready & & embedding_ready {
info! ( " All llama.cpp servers are ready and responding! " ) ;
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
if ! embedding_model . is_empty ( ) {
set_embedding_server_ready ( true ) ;
}
2026-01-06 22:56:35 -03:00
trace! ( " Servers ready! " ) ;
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
let after_ready = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] Servers ready, RSS={} (delta from start={}) " ,
MemoryStats ::format_bytes ( after_ready . rss_bytes ) ,
MemoryStats ::format_bytes ( after_ready . rss_bytes . saturating_sub ( start_mem . rss_bytes ) ) ) ;
log_jemalloc_stats ( ) ;
2025-11-20 13:28:35 -03:00
2025-11-12 12:48:06 -03:00
let _llm_provider1 = Arc ::new ( crate ::llm ::OpenAIClient ::new (
2025-11-12 08:19:21 -03:00
llm_model . clone ( ) ,
Some ( llm_url . clone ( ) ) ,
) ) ;
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
let end_mem = MemoryStats ::current ( ) ;
trace! ( " [LLM_LOCAL] ensure_llama_servers_running END, RSS={} (total delta={}) " ,
MemoryStats ::format_bytes ( end_mem . rss_bytes ) ,
MemoryStats ::format_bytes ( end_mem . rss_bytes . saturating_sub ( start_mem . rss_bytes ) ) ) ;
log_jemalloc_stats ( ) ;
2026-01-06 22:56:35 -03:00
trace! ( " ensure_llama_servers_running EXIT OK " ) ;
2025-11-02 18:36:21 -03:00
Ok ( ( ) )
} else {
let mut error_msg = " Servers failed to start within timeout: " . to_string ( ) ;
if ! llm_ready & & ! llm_model . is_empty ( ) {
2025-12-26 08:59:25 -03:00
let _ = write! ( error_msg , " \n - LLM server at {llm_url} " ) ;
2025-11-02 18:36:21 -03:00
}
if ! embedding_ready & & ! embedding_model . is_empty ( ) {
2025-12-26 08:59:25 -03:00
let _ = write! ( error_msg , " \n - Embedding server at {embedding_url} " ) ;
2025-11-02 18:36:21 -03:00
}
Err ( error_msg . into ( ) )
}
}
pub async fn is_server_running ( url : & str ) -> bool {
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
let client = reqwest ::Client ::builder ( )
. timeout ( std ::time ::Duration ::from_secs ( 5 ) )
. build ( )
. unwrap_or_default ( ) ;
2025-12-26 08:59:25 -03:00
match client . get ( format! ( " {url} /health " ) ) . send ( ) . await {
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
Ok ( response ) = > {
if response . status ( ) . is_success ( ) {
return true ;
}
2025-12-23 18:40:58 -03:00
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
info! ( " Health check returned status: {} " , response . status ( ) ) ;
false
}
2025-12-26 08:59:25 -03:00
Err ( e ) = > match client . get ( url ) . send ( ) . await {
Ok ( response ) = > response . status ( ) . is_success ( ) ,
Err ( _ ) = > {
if ! e . is_connect ( ) {
warn! ( " Health check error for {url}: {e} " ) ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
}
2025-12-26 08:59:25 -03:00
false
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
}
2025-12-26 08:59:25 -03:00
} ,
2025-11-02 18:36:21 -03:00
}
}
feat(autotask): Implement AutoTask system with intent classification and app generation
- Add IntentClassifier with 7 intent types (APP_CREATE, TODO, MONITOR, ACTION, SCHEDULE, GOAL, TOOL)
- Add AppGenerator with LLM-powered app structure analysis
- Add DesignerAI for modifying apps through conversation
- Add app_server for serving generated apps with clean URLs
- Add db_api for CRUD operations on bot database tables
- Add ask_later keyword for pending info collection
- Add migration 6.1.1 with tables: pending_info, auto_tasks, execution_plans, task_approvals, task_decisions, safety_audit_log, generated_apps, intent_classifications, designer_changes
- Write apps to S3 drive and sync to SITE_ROOT for serving
- Clean URL structure: /apps/{app_name}/
- Integrate with DriveMonitor for file sync
Based on Chapter 17 - Autonomous Tasks specification
2025-12-27 21:10:09 -03:00
pub fn start_llm_server (
2025-11-02 18:36:21 -03:00
app_state : Arc < AppState > ,
llama_cpp_path : String ,
model_path : String ,
url : String ,
) -> Result < ( ) , Box < dyn std ::error ::Error + Send + Sync > > {
2025-12-26 08:59:25 -03:00
let port = extract_port ( & url ) ;
2025-11-02 18:36:21 -03:00
std ::env ::set_var ( " OMP_NUM_THREADS " , " 20 " ) ;
std ::env ::set_var ( " OMP_PLACES " , " cores " ) ;
std ::env ::set_var ( " OMP_PROC_BIND " , " close " ) ;
let conn = app_state . conn . clone ( ) ;
let config_manager = ConfigManager ::new ( conn . clone ( ) ) ;
2026-01-23 13:14:20 -03:00
let mut conn = conn . get ( )
. map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , format! ( " failed to get db connection: {e} " ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
2025-11-12 08:19:21 -03:00
let default_bot_id = bots
. filter ( name . eq ( " default " ) )
. select ( id )
. first ::< uuid ::Uuid > ( & mut * conn )
. unwrap_or_else ( | _ | uuid ::Uuid ::nil ( ) ) ;
let n_moe = config_manager
. get_config ( & default_bot_id , " llm-server-n-moe " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " 4 " . to_string ( ) ) ;
2025-11-12 08:19:21 -03:00
let parallel = config_manager
. get_config ( & default_bot_id , " llm-server-parallel " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " 1 " . to_string ( ) ) ;
2025-11-12 08:19:21 -03:00
let cont_batching = config_manager
. get_config ( & default_bot_id , " llm-server-cont-batching " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " true " . to_string ( ) ) ;
2025-11-12 08:19:21 -03:00
let mlock = config_manager
. get_config ( & default_bot_id , " llm-server-mlock " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " true " . to_string ( ) ) ;
2025-11-12 08:19:21 -03:00
let no_mmap = config_manager
. get_config ( & default_bot_id , " llm-server-no-mmap " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " true " . to_string ( ) ) ;
2025-11-12 08:19:21 -03:00
let gpu_layers = config_manager
. get_config ( & default_bot_id , " llm-server-gpu-layers " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " 20 " . to_string ( ) ) ;
2025-11-12 08:19:21 -03:00
let reasoning_format = config_manager
. get_config ( & default_bot_id , " llm-server-reasoning-format " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | String ::new ( ) ) ;
2025-11-12 08:19:21 -03:00
let n_predict = config_manager
. get_config ( & default_bot_id , " llm-server-n-predict " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " 50 " . to_string ( ) ) ;
2025-11-12 17:22:33 -03:00
2025-11-20 13:28:35 -03:00
let n_ctx_size = config_manager
2025-11-12 17:27:32 -03:00
. get_config ( & default_bot_id , " llm-server-ctx-size " , None )
2025-12-26 08:59:25 -03:00
. unwrap_or_else ( | _ | " 4096 " . to_string ( ) ) ;
2025-11-20 13:28:35 -03:00
let mut args = format! (
2025-12-26 08:59:25 -03:00
" -m {model_path} --host 0.0.0.0 --port {port} --top_p 0.95 --temp 0.6 --repeat-penalty 1.2 --n-gpu-layers {gpu_layers} "
2025-11-02 18:36:21 -03:00
) ;
2025-11-07 17:04:33 -03:00
if ! reasoning_format . is_empty ( ) {
2025-12-26 08:59:25 -03:00
let _ = write! ( args , " --reasoning-format {reasoning_format} " ) ;
2025-11-07 17:04:33 -03:00
}
2025-11-12 18:37:01 -03:00
2025-11-15 19:08:26 -03:00
if n_moe ! = " 0 " {
2025-12-26 08:59:25 -03:00
let _ = write! ( args , " --n-cpu-moe {n_moe} " ) ;
2025-11-15 19:08:26 -03:00
}
if parallel ! = " 1 " {
2025-12-26 08:59:25 -03:00
let _ = write! ( args , " --parallel {parallel} " ) ;
2025-11-15 19:08:26 -03:00
}
if cont_batching = = " true " {
args . push_str ( " --cont-batching " ) ;
}
if mlock = = " true " {
args . push_str ( " --mlock " ) ;
}
if no_mmap = = " true " {
args . push_str ( " --no-mmap " ) ;
}
if n_predict ! = " 0 " {
2025-12-26 08:59:25 -03:00
let _ = write! ( args , " --n-predict {n_predict} " ) ;
2025-11-15 19:08:26 -03:00
}
2025-12-26 08:59:25 -03:00
let _ = write! ( args , " --ctx-size {n_ctx_size} " ) ;
2025-11-20 13:28:35 -03:00
2025-11-02 18:36:21 -03:00
if cfg! ( windows ) {
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd_arg = format! ( " cd {llama_cpp_path} && . \\ llama-server.exe {args} " ) ;
2025-11-12 08:19:21 -03:00
info! (
2025-12-26 08:59:25 -03:00
" Executing LLM server command: cd {llama_cpp_path} && . \\ llama-server.exe {args} --verbose "
2025-11-12 08:19:21 -03:00
) ;
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd = SafeCommand ::new ( " cmd " )
. and_then ( | c | c . arg ( " /C " ) )
2026-01-09 12:13:35 -03:00
. and_then ( | c | c . trusted_shell_script_arg ( & cmd_arg ) )
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
. map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
cmd . execute ( ) . map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
2025-11-02 18:36:21 -03:00
} else {
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd_arg = format! (
2025-12-26 08:59:25 -03:00
" cd {llama_cpp_path} && ./llama-server {args} --verbose >llm-stdout.log 2>&1 & "
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
) ;
2025-11-12 08:19:21 -03:00
info! (
2025-12-26 08:59:25 -03:00
" Executing LLM server command: cd {llama_cpp_path} && ./llama-server {args} --verbose "
2025-11-12 08:19:21 -03:00
) ;
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd = SafeCommand ::new ( " sh " )
. and_then ( | c | c . arg ( " -c " ) )
2026-01-09 12:13:35 -03:00
. and_then ( | c | c . trusted_shell_script_arg ( & cmd_arg ) )
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
. map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
cmd . execute ( ) . map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
2025-11-02 18:36:21 -03:00
}
Ok ( ( ) )
}
pub async fn start_embedding_server (
llama_cpp_path : String ,
model_path : String ,
url : String ,
) -> Result < ( ) , Box < dyn std ::error ::Error + Send + Sync > > {
2025-12-26 08:59:25 -03:00
let port = extract_port ( & url ) ;
2025-12-23 18:40:58 -03:00
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
let full_model_path = if model_path . starts_with ( '/' ) {
model_path . clone ( )
} else {
2025-12-26 08:59:25 -03:00
format! ( " {llama_cpp_path} / {model_path} " )
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
} ;
if ! std ::path ::Path ::new ( & full_model_path ) . exists ( ) {
2025-12-26 08:59:25 -03:00
error! ( " Embedding model file not found: {full_model_path} " ) ;
return Err ( format! ( " Embedding model file not found: {full_model_path} " ) . into ( ) ) ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
}
2025-12-26 08:59:25 -03:00
info! ( " Starting embedding server on port {port} with model: {model_path} " ) ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
2025-11-02 18:36:21 -03:00
if cfg! ( windows ) {
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd_arg = format! (
2025-12-26 08:59:25 -03:00
" cd {llama_cpp_path} && . \\ llama-server.exe -m {model_path} --verbose --host 0.0.0.0 --port {port} --embedding --n-gpu-layers 99 >stdout.log 2>&1 "
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
) ;
let cmd = SafeCommand ::new ( " cmd " )
. and_then ( | c | c . arg ( " /c " ) )
2026-01-09 12:13:35 -03:00
. and_then ( | c | c . trusted_shell_script_arg ( & cmd_arg ) )
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
. map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
cmd . execute ( ) . map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
2025-11-02 18:36:21 -03:00
} else {
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd_arg = format! (
2025-12-26 08:59:25 -03:00
" cd {llama_cpp_path} && ./llama-server -m {model_path} --verbose --host 0.0.0.0 --port {port} --embedding --n-gpu-layers 99 >llmembd-stdout.log 2>&1 & "
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
) ;
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
info! (
2025-12-26 08:59:25 -03:00
" Executing embedding server command: cd {llama_cpp_path} && ./llama-server -m {model_path} --host 0.0.0.0 --port {port} --embedding "
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
) ;
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
let cmd = SafeCommand ::new ( " sh " )
. and_then ( | c | c . arg ( " -c " ) )
2026-01-09 12:13:35 -03:00
. and_then ( | c | c . trusted_shell_script_arg ( & cmd_arg ) )
Add video module, RBAC, security features, billing, contacts, dashboards, learn, social, and multiple new modules
Major additions:
- Video editing engine with AI features (transcription, captions, TTS, scene detection)
- RBAC middleware and organization management
- Security enhancements (MFA, passkey, DLP, encryption, audit)
- Billing and subscription management
- Contacts management
- Dashboards module
- Learn/LMS module
- Social features
- Compliance (SOC2, SOP middleware, vulnerability scanner)
- New migrations for RBAC, learn, and video tables
2026-01-08 13:16:17 -03:00
. map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
cmd . execute ( ) . map_err ( | e | Box ::new ( std ::io ::Error ::new ( std ::io ::ErrorKind ::Other , e . to_string ( ) ) ) as Box < dyn std ::error ::Error + Send + Sync > ) ? ;
2025-11-02 18:36:21 -03:00
}
Bootstrap started! 6.1.0
- Add rss and scraper dependencies for web data keywords
- Add SMS keyword with priority support (low, normal, high, urgent)
- Add web_data keywords: RSS, SCRAPE, SCRAPE_ALL, SCRAPE_TABLE, SCRAPE_LINKS, SCRAPE_IMAGES
- Add ai_tools keywords: TRANSLATE, OCR, SENTIMENT, CLASSIFY
- Improve LLM server health check with better diagnostics and increased timeout
- Fix compilation errors and warnings
- Register SMS keywords in BASIC engine
2025-12-10 18:22:02 -03:00
tokio ::time ::sleep ( tokio ::time ::Duration ::from_secs ( 1 ) ) . await ;
2025-11-02 18:36:21 -03:00
Ok ( ( ) )
}
2025-12-26 08:59:25 -03:00
fn extract_port ( url : & str ) -> & str {
url . rsplit ( ':' ) . next ( ) . unwrap_or ( " 8081 " )
}