- Store last_sent timestamp in Redis (whatsapp:last_sent:<phone>)
- Always wait 6 seconds between messages to same recipient
- Persists across restarts
- Add Redis-backed message queue with per-recipient tracking
- Enforce 1 message per 6 seconds per recipient (0.17 msg/s)
- Support burst mode: up to 45 messages in 6-second window
- Implement proportional cooldown after burst
- Add exponential backoff retry on error 131056 (4^X seconds)
- Update botbook with official Meta rate limits
- Add unit tests for burst mode and rate limiting
- Fix config inheritance bug: delete all keys before sync
- Add resolve_bot_by_phone_number_id function for automatic routing
- Webhooks now route to correct bot based on whatsapp-phone-number-id
- Enables multiple WhatsApp numbers to use single webhook URL
- Falls back to default bot if no match found
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move system_prompt retrieval inside spawn_blocking closure
- Include system_prompt in the return tuple to fix scope issue
- Add trace logging for debugging system-prompt loading
- GLM-5 and other LLM providers now correctly receive custom system prompts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Split list detection into numbered and bullet list items
- Add looks_like_list_start() to detect when list is beginning
- Add looks_like_list_end() to detect when list has ended
- Add split_text_before_list() to separate text before list
- Add split_list_from_text() to separate list from text after
- Update streaming logic to send lists as isolated messages
- Add code block removal (triple backticks and inline backticks)
- Add comprehensive unit tests for list detection functions
Resolves: Lists being mixed with other text in WhatsApp messages
Resolves: JavaScript/C# code leaking into WhatsApp messages
- Add /clear command handler to allow users to clear their conversation history
- Implement clear_session_history() function using diesel delete
- Remove dead code (unused list processing functions)
- Add message deduplication using Redis cache
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Accumulate all content before sending (no chunking)
- Only send when is_final = true
- Fixes list (li/ul) handling - lists sent as one complete message
- Improves WhatsApp user experience by sending complete formatted responses
- Removes complex chunked logic in favor of simplicity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Lower score_threshold in kb_indexer.rs from 0.5 to 0.3
- Lower website search threshold in kb_context.rs from 0.6 to 0.4
- Lower KB search threshold in kb_context.rs from 0.7 to 0.5
- Add Cloudflare AI (/ai/run/) URL detection in cache.rs
- Add Cloudflare AI request format ({"text": ...}) in cache.rs
- Add Cloudflare AI response parsing (result.data) in cache.rs
This fixes the issue where KB search returned 0 results even with
114 chunks indexed. The high thresholds were filtering out all results.
- Lower score_threshold in kb_indexer.rs from 0.5 to 0.3
- Lower website search threshold in kb_context.rs from 0.6 to 0.4
- Lower KB search threshold in kb_context.rs from 0.7 to 0.5
- Add Cloudflare AI (/ai/run/) URL detection in cache.rs
- Add Cloudflare AI request format ({"text": ...}) in cache.rs
- Add Cloudflare AI response parsing (result.data) in cache.rs
This fixes the issue where KB search returned 0 results even with
114 chunks indexed. The high thresholds were filtering out all results.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added api_key field to LocalEmbeddingService for authentication
- Added embedding-key config parameter support in bootstrap
- Smart URL handling: doesn't append /embedding for full URLs (HuggingFace, OpenAI, etc.)
- Detects HuggingFace URLs and uses correct request format (inputs instead of input/model)
- Handles multiple response formats:
- HuggingFace: direct array [0.1, 0.2, ...]
- Standard/OpenAI: {"data": [{"embedding": [...]}]}
- Added Authorization header with Bearer token when api_key is provided
- Improved error messages with full response details
Fixes embedding errors when using HuggingFace Inference API
- Enhanced error messages in LocalEmbeddingService to show actual HTTP status and response
- Added semantic-cache-enabled config parameter to disable semantic matching when embedding service unavailable
- Improved error logging with full response details for debugging production issues
- Prevents 'Invalid embedding response' errors by allowing graceful fallback
- Updated get_tool_bas_path to look in /opt/gbo/data (source) first
- Then check botserver-stack/data/system/work (compiled) second
- Removed incorrect $HOME/data and $HOME/gb/work paths
- Fixes 'Tool file not found' error when executing inscricao tool
According to AGENTS.md architecture:
- Bots are in /opt/gbo/data primary
- They are compiled into work directory by local_file_monitor
- tool_executor was looking in wrong directories
- Add API endpoints to deployment/mod.rs:
- GET /api/deployment/targets - List available deployment targets
- POST /api/deployment/deploy - Deploy application to selected target
- Register deployment routes in main application router
- Support for internal GB Platform and external Forgejo deployments
- Proper error handling with ErrorSanitizer
- SQL injection protection with sql_guard
Phase 0: Deployment Infrastructure - COMPLETE ✅
Phase 1: Code Editor Integration
- Add Monaco Editor to vendor directory
- Create editor.html component with full Monaco integration
- Create API endpoints for file operations (editor.rs)
- GET /api/editor/file/:file_path - Read file
- POST /api/editor/file/:file_path - Save file
- GET /api/editor/files - List files
- Features:
- File tree sidebar
- Multi-file tabs
- Syntax highlighting for 10+ languages
- Auto-save with WebSocket sync preparation
- Keyboard shortcuts (Ctrl+S, Ctrl+P)
- Status bar with language, encoding, cursor position
- Custom GB dark theme
- Publish integration with deployment modal
- Add detailed logging for all 5 pipeline stages (PLAN, BUILD, REVIEW, DEPLOY, MONITOR)
- Log stage start/complete events with agent IDs and progress details
- Add resource creation/deletion logging in drive_handlers
- Improve pipeline summary logging with task ID, nodes, resources, and URL
This addresses the requirement for textual progress in console logs.
- Fix PAT extraction timing with retry loop (waits up to 60s for PAT in logs)
- Add sync command to flush filesystem buffers before extraction
- Improve logging with progress messages and PAT verification
- Refactor setup code into consolidated setup.rs module
- Fix YAML indentation for PatPath and MachineKeyPath
- Change Zitadel init parameter from --config to --steps
The timing issue occurred because:
1. Zitadel writes PAT to logs at startup (~18:08:59)
2. Post-install extraction ran too early (~18:09:35)
3. PAT file wasn't created until ~18:10:38 (63s after installation)
4. OAuth client creation failed because PAT file didn't exist yet
With the retry loop:
- Waits for PAT to appear in logs with sync+grep check
- Extracts PAT immediately when found
- OAuth client creation succeeds
- directory_config.json saved with valid credentials
- Login flow works end-to-end
Tested: Full reset.sh and login verification successful
- Updated error message to explain when credentials are found but invalid
- Clarified that credentials might be from a previous installation
- Added step-by-step solution for resetting credentials
- Removed misleading 'No admin credentials found' message
The error now accurately reflects the actual problem: authentication
failure rather than missing credentials.
- Added OAuth client creation to the 'already running' branch
- Previously, OAuth client was only created when Zitadel was started
- This fixes the issue where OAuth client wasn't created on subsequent runs
Fixes the OAuth client creation issue discovered during testing.
- Updated setup_directory() to read credentials from saved file
- Added read_saved_credentials() to parse ~/.gb-setup-credentials
- Added get_admin_credentials() to try multiple sources
- Removed default credentials approach (doesn't work)
- Improved error messages with solution steps
This matches the working approach from commit 86cfccc2 where
credentials were saved during first bootstrap and reused for
OAuth client creation on subsequent runs.
Fixed compilation errors by adding .await to all ensure_admin_token() calls:
- create_organization()
- create_user()
- save_config()
The method was made async but the calls weren't updated.
- Add password grant authentication support in DirectorySetup
- Extract initial admin credentials from Zitadel log file
- Fix race condition in Zitadel startup (wait for health check before starting)
- Create parent directories before saving config
- Add retry logic for OAuth client creation
- Improve error handling with detailed messages
Fixes authentication service not configured error after bootstrap.
Updated all hardcoded work/ directory references to use the correct
relative path from the current working directory:
- botserver-stack/data/system/work
This ensures consistent file location resolution regardless of where
botserver is run from (/home/rodriguez/src/gb/ or /opt/gbo/bin/).
Changes:
- local_file_monitor.rs: Use std::env::current_dir() for work_root
- drive_monitor/mod.rs: Use work_root PathBuf for tool compilation
- website_crawler_service.rs: Use std::env::current_dir() for work_path
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added logic to create botserver-stack/data/system/work directory
if it doesn't exist. This ensures production deployments work
without manual directory setup.
Changes:
- Added fs::create_dir_all() in use_tool.rs
- Added fs::create_dir_all() in tool_context.rs
- Logs when directory is created
- Fixes production deployment where /system/work may not exist
This ensures the tool loading works in fresh production environments
where the work folder hasn't been populated yet.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed tool loading to use relative path from current directory instead
of hardcoded HOME/gb path. This makes the code portable across different
deployment environments.
- Updated use_tool.rs to use std::env::current_dir()
- Updated tool_context.rs to use std::env::current_dir()
- Added PathBuf import to both files
- Tools now load from botserver-stack/data/system/work/
Fixes issue where tools weren't being loaded because .mcp.json files
were in a different location than expected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed RCE vulnerability in trusted_shell_script_arg execution
- Fixed SSRF vulnerability in GET command with internal IP blocking
- Updated SafeCommand to use explicit positional arguments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Track tool_was_executed flag in stream_response
- Send empty content in final is_complete message when tool already sent results
- Prevents the LLM's pre-tool text from appearing twice in the chat UI
- DB message saving is unaffected (uses full_response_clone before the check)
- Support # as comment marker like ' in BASIC preprocessor
- Remove hardcoded column lists from get_table_field_names()
- Let runtime use database schema dynamically via get_table_columns()
- Fix SELECT/CASE conversion to add semicolons to body statements
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change BOTSERVER_PORT to PORT for consistency with .env.embedded
- Update default port from 8080 to 9000 in config
- Fix service port references in security integration
- Update directory setup ExternalPort to 9000
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add tool_call_buffer to accumulate JSON chunks across multiple LLM responses
- Handle incomplete tool call JSON that spans multiple chunks
- Convert SELECT...CASE/END SELECT to Rhai match expressions
- Fix NOT IN operator conversion to !in for IF conditions
Fixed issue where LLM tool calls returned as JSON arrays were not being
detected and were displayed as raw JSON in the chat instead of being executed.
The parse_tool_call method now handles:
- Single tool call objects
- Arrays of tool calls (OpenAI standard format)
This prevents tool call JSON from appearing in the chat window and ensures
tools are executed properly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add error and warning logs to help diagnose why session tools are not
working in production. Logs now show:
- Number of tools loaded successfully
- Detailed error messages when tool loading fails
- Bot name lookup failures
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove actions/checkout with custom path that causes multiple workspace
roots error. Clone botserver repository directly in Setup Workspace step
instead of using checkout action.
Fixes error: "multiple workspace roots found in the same workspace"
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This loads and sends the available tools to the client when establishing
a WebSocket connection. Tools are loaded based on the bot configuration
and sent in the initial welcome message.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
DeepSeek R1 model outputs reasoning_content first, then content.
With n_predict=50, responses were truncated during reasoning phase.
Increased to 512 to allow full reasoning + response.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed default model from 'gpt-3.5-turbo' to 'DeepSeek-R1-Distill-Qwen-1.5B-Q3_K_M.gguf'
in bot message handler. This ensures the local llama-server receives the correct model
name and can process requests properly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change model paths to use ./data/llm/ instead of relative paths from build dir
- Remove cd command when starting llama-server to keep botserver root as cwd
- This fixes model loading when servers are started from different directories
- Both LLM and embedding servers now start successfully
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Modified get_bot_pool() to automatically create the database for a bot
if it doesn't exist, instead of failing with "No database configured" error.
This fixes the issue where bots created after the initial sync don't have
a database_name set in the bots table, causing table creation to fail.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add vector_db_health_check() function to verify Qdrant availability
- Add wait loop for vector_db startup in bootstrap (15 seconds)
- Fallback to local LLM when external URL configured but no API key provided
- Prevent external LLM (api.z.ai) usage without authentication key
This fixes the production issues:
- Qdrant vector database not available at https://localhost:6333
- External LLM being used instead of local when no key is configured
- Ensures vector_db is properly started and ready before use
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The config_manager.get_config() can return Ok("") for empty config values,
which would pass through unwrap_or_else() without using the default.
Added checks after config retrieval to use defaults when config values
are empty strings:
- gpu_layers: "20" (default for GPU layers)
- n_moe: "4" (default for MoE)
- parallel: "1" (default for parallel)
- n_predict: "50" (default for predict)
- n_ctx_size: "32000" (default for context size)
This fixes the error: "error while handling argument --n-gpu-layers: stoi"
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When no default.gbai/config.csv exists, the system now:
- Sets default llm_server_path to ./botserver-stack/bin/llm/build/bin
- Uses correct relative paths to model files: ../../../../data/llm/
- Uses actual model filenames from 3rdparty.toml
This fixes the issue where LLM/embedding servers couldn't find model files
because the paths were constructed incorrectly.
Model filenames:
- LLM: DeepSeek-R1-Distill-Qwen-1.5B-Q3_K_M.gguf
- Embedding: bge-small-en-v1.5-f32.gguf
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed the default LLM model from glm-4 to deepseek-small to match
the model defined in 3rdparty.toml ([models.deepseek_small]).
This ensures that when no default.gbai/config.csv exists, the system
uses the correct default local model.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When no default.gbai/config.csv exists or when llm-model/embedding-model
config is empty, the system now uses default local models instead of
skipping server startup.
Changes:
- Default LLM model: glm-4
- Default Embedding model: bge-small-en-v1.5
- Logs when using defaults
This fixes the issue where the "default" bot would fail to load LLM
and Embedding services when no config.csv was present, causing the
error: "not loading embedding neither llm local for default bot"
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The init_redis() function was using synchronous blocking calls
(redis::Client::get_connection()) inside an async function, which
blocked the entire tokio runtime and caused botserver to freeze.
Changes:
- Wrap Redis connection calls in tokio::task::spawn_blocking()
- Runs blocking operations in separate thread pool
- Prevents tokio runtime from freezing during cache connection
This fixes the issue where botserver would hang indefinitely
when connecting to Valkey/Redis cache.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The previous /dev/tcp test was giving false positives, reporting that
Valkey was running when it was actually down. This caused bootstrap to
skip starting Valkey, leading to botserver hanging on cache connection.
Changes:
- Use nc (netcat) with -z flag for reliable port checking
- Final fallback: /dev/tcp with actual PING/PONG verification
- Only returns true if port is open AND responds correctly
This ensures cache_health_check() accurately reports Valkey status.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Try valkey-cli first (preferred for Valkey installations)
- Fall back to redis-cli (for Redis installations)
- Fall back to TCP connection test (works for both)
This fixes environments that only have Valkey installed without
Redis symlinks or redis-cli.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix component name mismatch: "redis" -> "cache" in bootstrap_manager
- Add cache_health_check() function to verify Valkey is responding
- Add health check loop after starting cache (12s wait with PING test)
- Ensures cache is ready before proceeding with bootstrap
This fixes the issue where botserver would hang waiting for cache
connection because the cache component was never started.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Binaries at cache/bin/valkey-server (correct production path)
- Use --strip-components=1 for extraction
- Matches /opt/gbo/bin/botserver-stack/bin/cache/bin/
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use --strip-components=2 to flatten tarball structure
- Binaries go to cache/valkey-server (not cache/bin/valkey-server)
- Matches production path: /opt/gbo/bin/botserver-stack/bin/cache/
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Binary is at cache/bin/bin/valkey-server after extraction
- Update exec_cmd and check_cmd to use bin/ subdirectory
- Create symlinks at parent level for convenience
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use valkey-server and valkey-cli directly
- No redis compatibility symlinks needed
- Simplifies installation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- noble version requires GLIBC 2.38 (Ubuntu 24.04)
- jammy version works with GLIBC 2.36 (Ubuntu 22.04)
- System has GLIBC 2.36, needs compatible binary
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use valkey-8.1.5-noble-x86_64.tar.gz instead of 9.0.2-jammy
- More stable version for production use
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change retry interval from 1s to 5s between attempts
- Reduce attempts from 30 to 12 (still 60s total wait time)
- Gives Valkey more time to stabilize between connection attempts
- Helps with slow-to-start services during bootstrap
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Wait up to 30 seconds for cache to be ready
- Retry every 1 second with progress logging
- Prevents race condition during service startup
- Ensures suggestions feature works when Valkey starts after botserver
Fixes issue where cache connection failed during bootstrap if
Valkey wasn't immediately ready.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add connection verification for Redis/Valkey cache with PING test
- Support CACHE_URL, REDIS_URL, and VALKEY_URL environment variables
- Add better error messages when cache is unavailable
- Add LLM_URL and LLM_MODEL environment variable support
- LLM configuration now checks env vars first, then database, then defaults
- This ensures local LLM (http://localhost:8081) is used as proper fallback
Fixes suggestions button not working when valkey is unavailable
and improves LLM configuration when no bot config.csv exists.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Escape format placeholders in designer_ai.rs ({{botname}})
- Remove undefined 'prefix' filter in drive_monitor
- Fix type mismatch in use_tool.rs (str vs &String)
- Remove unused TextExpressionMethods import
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add TLS certificate generation to Vault post-install commands (CA, server, client, PostgreSQL)
- Add initialize_vault_local() function to handle Vault initialization for local installs
- Add ensure_env_file_exists() function to create .env when Vault already initialized
- Modify start() method to call Vault initialization after successful start (local mode)
- Fix Vault CLI flags: use -tls-skip-verify (not -skip-verify or -skip-tls-verify)
This restores the behavior where .env is automatically created with VAULT_ADDR,
VAULT_TOKEN, and VAULT_CACERT during local bootstrap, matching the LXC container
deployment behavior in facade.rs.
Fixes issue where .env file was only created for LXC deployments but not for
local installations.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Enhanced conversational input handling for batismo tool
- Improved keyword extraction and format recognition
- Fixed field extraction from informal user messages
- Better natural language understanding
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add Redis-based tracking to prevent start.bas from running repeatedly
when clicking suggestion buttons. start.bas now executes only once per
session with a 24-hour expiration on the tracking key.
- Add generic tool executor (ToolExecutor) for parsing and executing
tool calls from any LLM provider. Works with Claude, OpenAI, and
other providers that use standard tool calling formats.
- Update both start.bas execution paths (WebSocket handler and LLM
message handler) to check Redis before executing.
- Fix suggestion duplication by clearing suggestions from Redis after
fetching them.
- Add rate limiter for LLM API calls.
- Improve error handling and logging throughout.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Check BOTSERVER_PORT env var before database config
- Override server_port from database if BOTSERVER_PORT is set
- Apply to both from_database() and from_env() config paths
- Allows easy port configuration via environment variable
- Removed embed-ui from default features (botserver is backend API only)
- UI embedding is botui's responsibility, not botserver's
- Fixed rust-embed folder path in embedded_ui.rs
- Resolves CI compilation errors
Production binaries should embed UI assets by default to avoid
requiring external ui/suite folder in deployment.
This ensures botserver binary contains all HTMX, HTML, CSS, and JS
assets needed for the web interface.
- Use local pg_isready path when available (./botserver-stack/bin/tables/bin/pg_isready)
- Fall back to system pg_isready if local binary not found
- Prevents 30-second timeout during bootstrap when PostgreSQL is actually running
- Applied to both readiness checks in start_all() method
- Removed -d 'postgres' parameter from pg_isready health checks
- Health check now only verifies server connection on port 5432
- Fixes false positive failures when PostgreSQL is running but specific database has issues
- PostgreSQL logs showed 'database system is ready' but health check was failing
Add pg_isready health check to the 'already running' branch to ensure
PostgreSQL is properly detected as ready, even when running as a
non-interactive user (sudo -u gbuser).
This complements the previous fix for fresh PostgreSQL starts.
Changed pg_isready checks from '-U gbuser' to '-d postgres' to properly
detect PostgreSQL readiness during bootstrap. The gbuser database doesn't
exist yet during startup, causing pg_isready to fail and bootstrap to timeout.
This fixes the issue when running botserver as a non-interactive user
(e.g., sudo -u gbuser).
- Remove botui build/deploy from botserver workflow
- Trigger only on botserver/**, botlib/** changes
- Build only botserver package
- Deploy only botserver binary
- Restart only system service
- Separate cache key to avoid conflicts
- Save login tokens to user_login_tokens table on successful login
- Modify get_current_user to check database when cache miss occurs
- Query Zitadel directory to get user details from token
- Update last_used timestamp for token tracking
- Tokens now persist across server restarts
Fix the SQL query in check_and_crawl_websites() to also include crawl_status
in the SELECT clause. The WebsiteCrawlRecord struct expects this field but it was
only present in the WHERE clause, causing Diesel to fail with
'Column crawl_status was not present in query'.
This resolves the second website crawler service error.
Fix the SQL query in check_and_crawl_websites() to include next_crawl in the
SELECT clause. The WebsiteCrawlRecord struct expects this field but it was
missing, causing Diesel to fail with 'Column next_crawl was not present in query'.
This resolves the website crawler service error that was preventing websites
from being properly queried and recrawled.
- Fix ConfigManager to treat 'none', 'null', 'n/a', and empty values as placeholders
and fall back to default bot's configuration instead of using these as literal values
- Fix ConfigManager to detect local file paths (e.g., .gguf, .bin, ../) and fall back
to default bot's model when using remote API, allowing bots to keep local model
config for local LLM server while automatically using remote model for API calls
- Fix get_default_bot() to return the bot actually named 'default' instead of
the first active bot by ID, ensuring consistent fallback behavior
- Add comprehensive debug logging to trace LLM configuration from database to API call
This fixes the issue where bots with incomplete or local LLM configuration would
fail with 401/400 errors when trying to use remote API, instead of automatically
falling back to the default bot's configuration from config.csv.
Closes: #llm-config-fallback
- Modify bootstrap to read .valid file and validate templates before loading
- Templates not in .valid file are skipped during bootstrap
- Backward compatible: if .valid file missing, all templates are loaded
- Enables controlled template loading during bootstrap
- Add search_enabled field to ProductConfig to control omnibox visibility (defaults to false)
- Add menu_launcher_enabled field to ProductConfig to control apps menu button visibility (defaults to false)
- Update .product file to set both directives to false by default
- Update get_product_config_json to include new fields in API response
- Parse search_enabled and menu_launcher_enabled from .product file with support for true/false, 1/0, yes/no values
This allows disabling the suite search mechanism and hiding the menu launcher when empty,
providing a cleaner UI for deployments that don't need these features.
- Wrapped Windows security configuration code blocks in #[cfg(windows)] attributes
- Removed nested cfg attributes that were causing compilation errors
- Properly separated Windows and Linux code paths using compile-time attributes
- Fixed calls to configure_windows_security() and update_windows_signatures()
- Extract bot_name from WebSocket query parameters
- Look up bot_id from bot_name using database
- Pass bot_id to WebSocket message handler
- Use session's bot_id for LLM configuration instead of client-provided bot_id
- Fixes issue where client sends 'default' bot_id when accessing /edu
- Add llm to default features in Cargo.toml
- Fix duplicate smart_router module declaration
- Remove unused LLMProvider import and fix unused variable warnings
- Fix move error in enhanced_llm.rs by cloning state separately for each closure
- Improve code formatting and consistency
- Fixed 'relation session_kb_associations does not exist' error in core consolidated migration.
- Renamed migration directories from timestamp-based to version-based (6.0.x, 6.1.x, 6.2.x).
- Reorganized migrations into dedicated feature folders (products, dashboards, learn, video).
- Updated migration execution order in core/shared/utils.rs.
- Moves legacy migrations to 6.0.x/6.1.x and workflow to 6.2.0.
Now you can do:
- cargo build --features sheet → gets automation+drive+cache+sheet deps
- cargo build --features mail → gets automation+drive+cache+mail deps
- cargo build --features tasks → gets automation+drive+cache+tasks deps
Each app automatically includes what it needs from core infrastructure.
No need to manually specify automation, drive, cache anymore.
Added test_all_apps.sh to test each app independently and measure
compilation times.
- Removed complex nested feature dependencies
- Each app now lists only its direct crate dependencies
- Apps can be tested independently without inter-dependencies
- Simplified structure: Core Infrastructure + Flat App List + Bundles
- Core: automation, drive, cache, directory (always needed)
- Apps: chat, mail, tasks, docs, etc. (independent)
- Bundles: minimal, lightweight, full (convenience)
This makes it easy to test each app individually and matches
the app launcher menu structure.
Verified: cargo check with chat+automation+drive+cache ✅
- Created comprehensive apps-manifest.json mapping Cargo features to UI
- Organized apps into categories: Communication, Productivity, Documents, etc.
- Includes app metadata: name, description, icon, dependencies
- Defines bundles: minimal, lightweight, full, communications, etc.
- Documents core dependencies and their reasons
- Ready for botui app launcher integration
- Add crm_ui.rs with stub handlers for pipeline, leads, contacts, accounts, stats
- Add billing_ui.rs with stub handlers for invoices, payments, quotes, stats
- Add products module with stub handlers for items, services, pricelists, stats
- Register routes in main.rs
These stubs return empty data/HTML to prevent 404 errors in UI.
Full CRUD implementation to follow.
- Add umya-spreadsheet v2.3 dependency (preserves charts, styles, images, formulas, macros, comments)
- Rewrite storage.rs to use umya-spreadsheet for read/write
- Keep original workbook in memory during edit session
- On cell edit: modify only that cell via update_xlsx_cell()
- On save: write full workbook via save_workbook_to_drive()
- Preserve all Excel features: merged cells, frozen panes, comments, styles
- Extract cell styles (font, color, background, alignment)
- Parse and preserve merge ranges
- Support formula preservation with = prefix handling
- Add rust_xlsxwriter for Excel export with formatting support
- Add docx-rs for Word document import/export with HTML conversion
- Add PPTX export support with slides, shapes, and text elements
- Refactor sheet module into 7 files (types, formulas, handlers, etc)
- Refactor docs module into 6 files (types, handlers, storage, etc)
- Refactor slides module into 6 files (types, handlers, storage, etc)
- Fix collaboration modules (borrow issues, rand compatibility)
- Add ooxmlsdk dependency for future Office 2021 features
- Fix type mismatches in slides storage
- Update security protection API router type
Features:
- Excel: Read xlsx/xlsm/xls, write xlsx with styles
- Word: Read/write docx with formatting preservation
- PowerPoint: Write pptx with slides, shapes, text
- Real-time collaboration via WebSocket (already working)
- Theme-aware UI with --sentient-* CSS variables
Add security_protection.rs with 8 new BASIC keywords:
- SECURITY TOOL STATUS - Check if tool is installed/running
- SECURITY RUN SCAN - Execute security scan
- SECURITY GET REPORT - Get latest scan report
- SECURITY UPDATE DEFINITIONS - Update signatures
- SECURITY START SERVICE - Start security service
- SECURITY STOP SERVICE - Stop security service
- SECURITY INSTALL TOOL - Install security tool
- SECURITY HARDENING SCORE - Get Lynis hardening index
Also:
- Registered protection routes in main.rs
- Added Security Protection category to keywords list
- All functions use proper error handling (no unwrap/expect)
In Axum, layers are applied bottom-to-top (last added runs first).
So Auth middleware must be added AFTER RBAC in the chain to run BEFORE it.
Previous order (wrong): RBAC -> Auth -> Handler
New order (correct): Auth -> RBAC -> Handler
- Treat non-JWT bearer tokens as Zitadel session IDs
- Grant Admin role to valid sessions (temporary until proper role lookup)
- Add is_jwt_format helper to distinguish JWTs from session IDs
- Update RBAC to allow authenticated users access to UI monitoring routes
- Create installer.rs for 'botserver install protection' command
- Requires root to install packages and create sudoers config
- Sudoers uses exact commands (no wildcards) for security
- Update all tool files (lynis, rkhunter, chkrootkit, suricata, lmd) to use sudo
- Update manager.rs service management to use sudo
- Add 'sudo' and 'visudo' to command_guard.rs whitelist
- Update CLI with install/remove/status protection commands
Security model:
- Installation requires root (sudo botserver install protection)
- Runtime uses sudoers NOPASSWD for specific commands only
- No wildcards in sudoers - exact command specifications
- Tools run on host system, not in containers
- Set change_required=false when creating admin password in Zitadel
- Admin can now login directly at /suite/login without forced password change
- Create security reminder file for admin to change password later
- Update console and credential file messages to reflect direct login
- Password change is recommended but not enforced on first login
- shell_script_arg blocks $( and backticks for user input safety
- trusted_shell_script_arg allows these for internal installer scripts
- Internal scripts need shell features like command substitution
- Updated bootstrap, installer, facade, and llm modules
- Allow &, ?, = in URL arguments (http:// or https://)
- Allow // pattern in URLs (needed for protocol)
- These are safe since Command::new().args() doesn't use shell
- Fixes Vault health check with query parameters
- Add debug logging to safe_curl and vault_health_check
- Add vault_health_check() function that checks if client certs exist
- If certs exist: use mTLS (secure, post-installation)
- If certs don't exist yet: use plain TLS (during initial bootstrap)
- This allows bootstrap to complete while maintaining mTLS security after setup
- No security hole: mTLS is enforced once certs are generated
- Remove tls_client_ca_file from vault config templates
- Remove --cert/--key from health checks
- TLS still enabled for encryption, just no client cert required
- TODO: Re-enable mTLS when binary with cert health checks is compiled
- large_org_optimizer.rs: Remove unused fields (cached_at, roles, organization_id from structs)
Add partition_manager() getter to use the field
- middleware.rs: Implement Display for AuthError to use InvalidToken message
- organization_rbac.rs: Remove unused user_groups and user_direct_permissions fields
- passkey.rs: Remove unused first_attempt_at field
- opencv.rs: Remove unused format field and ImageFormat enum
- rekognition.rs: Remove unused liveness_sessions field
No #[allow(dead_code)] - code is properly fixed or deleted
- Keep mTLS enabled for security (even in dev)
- Add --cert and --key to all curl commands for Vault health checks
- Fix fetch_vault_credentials to use https and mTLS
- Fix Zitadel commands to use https with VAULT_CACERT
- All Vault communications now use proper mutual TLS
- Remove tls_client_ca_file from vault config in installer.rs (Linux and macOS)
- Remove tls_client_ca_file from vault config in bootstrap/mod.rs
- TLS encryption still enabled, just no client certificate required
- Health checks now work with simple -sk curl flags
- Add ExportBounds and ExportError in whiteboard_export.rs
- Add RekognitionError in rekognition.rs
- Fix duplicate derive attributes on RefundResult and FallbackAttemptTracker
- Fix Recording -> WebinarRecording type references
- Complete engine.rs with all AI-powered video operations
- Complete handlers.rs with 28+ HTTP API endpoints
- Add analytics.rs for video engagement tracking
- Add mcp_tools.rs for AI agent integration (6 tools)
- Add render.rs with FFmpeg worker and .gbdrive storage
- Add websocket.rs for real-time export progress
- Wire up all submodules and routes in mod.rs
AI features: transcription, auto-captions, TTS, scene detection,
auto-reframe, background removal, enhancement, beat sync, waveforms
Follows PROMPT.md: SafeCommand, SafeErrorResponse, no unwrap/comments
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
- Add generate_secure_password() for OTP generation during admin bootstrap
- Display admin credentials (username/password) in console on first run
- Save credentials to ~/.gb-setup-credentials file
- Fix Zitadel client to support PAT token authentication
- Replace OAuth2 password grant with Zitadel Session API for login
- Fix get_current_user to fetch user data from Zitadel session
- Return session_id as access_token for proper authentication
- Set email as verified on user creation to skip verification
- Add password grant type to OAuth application config
- Update directory_setup to include proper redirect URIs
- Creates database_name column in bots table
- Creates tenant_id column for multi-tenant support
- Adds indexes for both columns
- Migration runs automatically on server start
- Added database_name field to bots schema
- Bot creation now creates a dedicated PostgreSQL database (bot_{name})
- Updated add_bot.rs to create database and store database_name
- Added create_bot_database() function with safe name validation
- Added dynamic table check to all db_api handlers
- Added clean_file_content() to strip markdown fences from LLM responses
- For HTML: extracts content from <!DOCTYPE> to </html>
- For CSS/JS: filters out explanation lines (Here, This, Note:, etc)
- Fixes malformed HTML output from LLM
- Added serve_vendor_file() to serve from {bot}.gblib/vendor/ in MinIO
- Added /js/vendor/* route to app_server
- Removed local ServeDir for /js/vendor from main.rs
- Added ensure_vendor_files_in_minio() to upload htmx.min.js on startup
- Uses include_bytes! to embed htmx.min.js in binary
- Added table_exists_in_database() to check if table exists in PostgreSQL
- Updated validate_table_name() to allow valid identifiers (not just whitelist)
- Added validate_table_name_with_conn() for full validation with DB check
- Added is_table_allowed_with_conn() for handlers to verify table existence
- Updated list_records_handler and count_records_handler to use dynamic check
- Uses parameterized query for table existence check (SQL injection safe)
- Added rewrite_cdn_urls() to replace HTMX CDN URLs with /js/vendor/htmx.min.js
- Applied to both MinIO and filesystem serving paths
- Supports unpkg.com, jsdelivr, cdnjs variants
- Ensures old apps with CDN references work with local files
- Added /js/vendor route to serve local vendor JS files
- Downloaded htmx.min.js v1.9.10 to botserver-stack/static/js/vendor/
- Reverted CSP to strict 'self' only (no external CDN)
- Updated APP_GENERATOR_PROMPT to use /js/vendor/htmx.min.js
- Updated designer prompt to use local HTMX path
- Designer now uses state.bucket_name (like app_generator) instead of DB lookup
- Fixed local file path to match app_server fallback: {site_path}/{bot}.gbai/{bot}.gbapp/{app}/{file}
- Fixed S3 path to match app_server: {bot}.gbapp/{app}/{file} in bucket {bot}.gbai
- Added S3 bucket creation retry logic (like app_generator)
- Updated CSP to allow unpkg.com, cdnjs.cloudflare.com, cdn.jsdelivr.net for scripts/styles
- Added fonts.googleapis.com and fonts.gstatic.com for web fonts
- Updated APP_GENERATOR_PROMPT to use HTMX CDN instead of non-existent /js/vendor path
- Added designer prompt guidelines for relative asset paths
- Remove checkbox text [x]/[>]/[ ] from HTML, use CSS dots only
- Add View Details links to sections
- Add status-indicator (pulsing dot) and status-gear icon
- Auto-expand running sections/children
- Format runtime and estimated time properly
- Fix decision point display
- Fix MIME type for app files by preserving directory structure in sanitize_file_path()
- Add with_event_type() to TaskProgressEvent for correct WebSocket event types
- broadcast_manifest_update() now sends 'manifest_update' type correctly
- update_item_status() broadcasts automatically for real-time file progress
- Update step_results in DB with real file list during generation
- Show app URL in completion event and notification
- Update task progress/current_step/total_steps as files are written
- Mark task as completed with app_url when done
- Fix MinIO health check to use HTTPS instead of HTTP
- Add Vault connectivity check before fetching credentials
- Add CA cert configuration for S3 client
- Add Qdrant vector_db setup with TLS configuration
- Fix Qdrant default URL to use HTTPS
- Always sync templates to S3 buckets (not just on create)
- Skip .gbkb root files, only index files in subfolders
- Merge all 6.0.x through 6.1.x migrations into one file
- All 129 CREATE TABLE statements preserved
- 3661 lines of SQL in consolidated up.sql
- No tables removed, just combined into single migration
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.
- Change from error to warn when bucket creation fails
- Continue bootstrap without drive if MinIO not available
- Prevents startup failure when S3 not configured
- Move app_generator, intent_classifier, intent_compiler, autotask_api, designer_ai, ask_later, auto_task, safety_layer to src/auto_task/
- Create auto_task/mod.rs with exports and route configuration
- Update imports in moved files
- Update main.rs to use auto_task::configure_autotask_routes
- Keep table_definition in keywords (shared utility)
- Add execute_task_handler for POST /api/autotask/:task_id/execute
- Add get_task_logs_handler for GET /api/autotask/:task_id/logs
- Add apply_recommendation_handler for POST /api/autotask/recommendations/:rec_id/apply
- Update route configuration in mod.rs
- Fix match arms with identical bodies by consolidating patterns
- Fix case-insensitive file extension comparisons using eq_ignore_ascii_case
- Fix unnecessary Debug formatting in log/format macros
- Fix clone_from usage instead of clone assignment
- Fix let...else patterns where appropriate
- Fix format! append to String using write! macro
- Fix unwrap_or with function calls to use unwrap_or_else
- Add missing fields to manual Debug implementations
- Fix duplicate code in if blocks
- Add type aliases for complex types
- Rename struct fields to avoid common prefixes
- Various other clippy warning fixes
Note: Some 'unused async' warnings remain for functions that are
called with .await but don't contain await internally - these are
kept async for API compatibility.
- Vault is automatically initialized with 5 keys, threshold 3
- Creates /opt/gbo/secrets/vault-unseal-keys with chmod 600
- Creates or appends to .env with VAULT_ADDR, VAULT_TOKEN, VAULT_UNSEAL_KEYS_FILE
- Vault is automatically unsealed after init
- No manual steps required for initial setup
- VAULT_UNSEAL_KEYS_FILE points to /opt/gbo/secrets/vault-unseal-keys
- Unseal keys stored in separate file with chmod 600
- Not in .env (which might be in git, logs, etc.)
- Output shows step-by-step setup instructions
- Wait for network before getting IP
- Try hostname -I as fallback for IP detection
- Add VAULT_UNSEAL_KEY_1/2/3 to .env output for auto-unseal
- botserver can auto-unseal Vault on startup using these keys
- Only Vault returns .env variables (VAULT_ADDR, VAULT_TOKEN)
- All other components show 'botserver vault put' commands to store credentials
- Added proper vault init/unseal instructions
- CLI now prints InstallResult with IP, ports, and connection info
- Vault download was failing because unzip was not installed
- Now all containers get wget, unzip, curl, ca-certificates as base packages
- Also added vault config.hcl generation in pre-install commands
- Make create_container_service work without DATABASE_URL from Vault
- Components like vault, vector_db that don't need DB can now install first
- DB_PASSWORD defaults to empty string when Vault is not available
- Try ubuntu:24.04, ubuntu:22.04, images:debian/12, images:debian/11 in order
- Clean up failed container attempts before trying next image
- Add install-dependencies.sh script for runtime library installation
- Fixes 404 error when LXD image server has outdated cached images
- Add masterkey field to gbo/directory secret in Vault during bootstrap
- Generate random 32-char masterkey if not exists
- Update Zitadel exec_cmd to read masterkey from Vault
- Remove hardcoded masterkey values
- Add BOTSERVER_INSTALLERS_PATH env var to use local installers without downloading
- Replace hardcoded ./botserver-stack paths with configurable stack_path
- Add stack_dir() and vault_bin() helper methods in BootstrapManager
- Add Port: 8300 to Zitadel config to fix port binding issue
- Start Directory service before setup_directory() call
- Add SKIP_LLM_SERVER env var to skip local LLM in tests
- Update template loading to check ../bottemplates and botserver-templates paths
- New mcp_directory.rs: McpCsvLoader to load MCP servers from mcp.csv
- CSV format: name,type,command,args,description,enabled,auth_type,auth_env
- Support for stdio, http, websocket, tcp connection types
- Support for api_key and bearer authentication
- Updated sources/mod.rs with MCP management API endpoints
- New sources/mcp.rs with helper functions
- MCP tools available to Tasks like BASIC keywords
- intent_compiler.rs: LLM-to-BASIC translation engine
- auto_task.rs: Auto-executing task data structures
- mcp_client.rs: Model Context Protocol server integration
- safety_layer.rs: Constraints, simulation, audit trail
- autotask_api.rs: HTTP API handlers for Auto Task UI
- Updated mod.rs with new modules and keyword list
- Serve suite UI from botui (dev) or botserver-stack (installed)
- SPA fallback to index.html for client-side routing
- Search paths: ../botui/ui/suite, ./botserver-stack/ui/suite, ./ui/suite
- When Vault unseal fails, only restart Vault - NOT full bootstrap
- Preserve PostgreSQL, Redis, MinIO, etc. when Vault needs re-init
- Simplify shutdown message to 3 lines with pragmatismo.com.br
- Never kill all stack processes just for Vault issues
- Display 'Thank you for using General Bots!' message
- Show version, links, and farewell
- Handle both SIGTERM and SIGINT (Ctrl+C)
- Graceful 10 second timeout for in-flight requests
- Call kill_stack_processes() at the beginning of bootstrap()
- Add port-based killing using fuser for ports 8200, 5432, 9000, etc.
- Use -f (pattern match) instead of -x (exact) for process names
- Fix process names: 'vault server', 'llama-server' instead of 'vault', 'ollama'
- Increase wait time to 1 second for processes to terminate
This fixes issues on dev machines where old processes from a deleted
stack are still running and blocking ports.
Instead of downloading pre-built binaries (which may require AVX2),
compile llama.cpp from source during installation. This ensures:
- Works on older CPUs (Sandy Bridge, Haswell, etc.)
- Uses GGML_NATIVE=ON to optimize for the current CPU
- Binary path updated to build/bin/llama-server
Reverts the AVX2 detection that was incorrectly disabling LLM.
- Add cpu_supports_avx2() function to check /proc/cpuinfo for AVX2 flag
- Skip LLM binary download on CPUs without AVX2 (pre-built llama.cpp requires it)
- Add runtime check for llama-server binary compatibility (catches 'Illegal instruction')
- Provide helpful error messages about alternatives (compile from source or use external API)
- Sandy Bridge (2nd gen i7) and older CPUs now gracefully skip local LLM
- Fix create_conn/establish_pg_connection to return Result instead of panicking
- Fix AppConfig::from_env to not require database access (circular dependency)
- Add #[cfg(test)] to AppState Default impl to prevent accidental panic
- Add extensive debug logging for Vault startup troubleshooting
- Remove Stdio::null() from start() to allow shell redirections to work
- Add direct vault start test in bootstrap for debugging
- Make Vault setup failure fatal (was silently continuing)
When start_all() detects Vault init.json is missing (unseal fails),
it now:
1. Kills all stack processes
2. Cleans the stack directory
3. Runs full bootstrap()
4. Returns (bootstrap starts all services)
Also made SecretsManager init failure in start_all() a hard error
instead of a warning - if Vault is supposed to be working but
SecretsManager can't connect, that's a fatal error.
The core issue was that .env was written at the END of setup_vault(),
but other components needed Vault credentials BEFORE that.
Now:
1. Unseal Vault
2. Write .env with VAULT_ADDR and VAULT_TOKEN immediately
3. Re-initialize SecretsManager so it connects to Vault
4. THEN store secrets in Vault
This ensures SecretsManager is properly configured before any
code tries to use create_conn() or other Vault-dependent functions.
System Logs:
- Add scroll_offset tracking with auto-scroll to bottom on new logs
- Up/Down/j/k keys to scroll line by line
- PageUp/PageDown for page scrolling
- Home/End to jump to top/bottom
- Show scroll indicators in title: [^v], [SCROLL] when not auto-scrolling
- Display log count in title
Editor:
- Fix scroll_offset to follow cursor when moving up/down
- Add PageUp/PageDown for faster navigation
- Add Ctrl+Home/Ctrl+End to jump to start/end of file
- ensure_cursor_visible() keeps cursor in view
Tab Navigation:
- FileTree -> Editor (if open) or Logs -> Chat -> back to start
- Consistent cycling through all panels
When services are already configured (bootstrap completed), the code
calls start_all() or ensure_services_running() which starts Vault
but didn't initialize SecretsManager. This caused create_conn() to
fail with 'Vault not configured' even though Vault was running.
Now both functions initialize SecretsManager after Vault is unsealed,
ensuring database connections can retrieve credentials from Vault.
Replace emoji icons with plain text/ASCII equivalents to prevent
encoding issues and improve console compatibility:
- Replace checkmarks with *
- Replace x marks with x
- Replace status indicators with text [OK], [ERR], etc.
- Remove decorative emojis from info/debug log messages
- Keep functional emojis in user-facing chat/sentiment features
The bootstrap order is vault -> tables -> directory. When tables
component was processed, it tried to call establish_pg_connection()
which requires Vault, but Vault setup only happens when processing
the vault component (which is earlier in the loop but the if-block
for tables runs for the tables component, not vault).
Fix: Run migrations directly with the generated password during the
tables component setup, before Vault is configured. This avoids the
dependency on Vault being set up.
- Redirect Vault exec_cmd output to logs/vault.log
- Add stdout/stderr null pipes to component spawn in installer.rs
- Suppress output in run_commands() in facade.rs
- All component output now goes to respective log files in logs/
When llm-server=false in bot_configuration, the code now skips
attempting to start local llama-server processes. This prevents
the 60-attempt timeout error when using external LLM endpoints
or when local LLM serving is intentionally disabled.
- Add state_channel field to XtreeUI for receiving AppState updates
- Add set_state_channel() method to enable async state communication
- Poll for AppState in event loop to initialize panels when ready
- UI now shows loading state instantly, logs stream in real-time
- Transitions to full interactive mode when AppState is received
- Don't delete archive files from cache after tar/zip extraction
- Copy binaries from cache instead of moving them
- Cached files are now preserved for offline installation reuse
- Disable TLS on Vault for local development (HTTP instead of HTTPS)
- Fix bot_configuration id column type mismatch (TEXT -> UUID)
- Add migration 6.1.1 to convert config table id columns to UUID
- Fix sync_config_csv_to_db to use UUID binding for id column
- Make start_all async with proper Vault startup sequence
- Sync default.gbai config.csv to existing 'Default Bot' from migrations
- Add diagnostic logging for config loading
- Change default LLM/embedding URLs from https to http for local dev
- Rename service names to component names:
- postgres -> tables
- minio -> drive
- redis -> cache
- qdrant -> vectordb
- mail -> email
- Update bootstrap certificate generation with new hostnames
- Update CoreDNS zone file with component-based DNS entries
- Update CA service certificates to use component names
- Update CA directory creation to use component names
All certificates include 127.0.0.1 as SAN for IP-based mTLS access
- Add create_vault_config() function to generate config.hcl with mTLS settings
- Configure Vault to require client certificate verification
- Generate client certificate for botserver in bootstrap
- Update .env to include mTLS paths (VAULT_CACERT, VAULT_CLIENT_CERT, VAULT_CLIENT_KEY)
- Remove unused import in tls.rs
- Add Default impl for AppState with mock services for testing
- Add MockLLMProvider for tests that need LLM without real API
- Add create_mock_auth_service() for Zitadel testing
- Add test_utils.rs with TestAppStateBuilder, MockChannelAdapter
- Enable rhai 'sync' feature to fix Send+Sync for Dynamic types
- Fix attendance.rs tests to use pure functions (no DB required)
- Fix on_error.rs tests to use String instead of i32
- Remove unused imports in attendance.rs
All tests pass, 0 warnings, 0 errors.
- Add email, teams, google columns to attendant.csv
- Add find_attendant_by_identifier() for multi-channel lookup
- Add find_attendants_by_channel() and find_attendants_by_department()
- Implement handle_status_command with database persistence
- Implement handle_transfer_command with actual transfer logic
- Update AttendantCSV struct with all new fields
- /files/sync/status now returns is_desktop=false for web users
- /files/sync/start|stop return helpful message about desktop app requirement
- Add detailed docstrings pointing to botapp/src/desktop/sync.rs
- SyncStatus struct extended with is_desktop and message fields
- Create core/oauth module with OAuthProvider enum and shared types
- Implement providers.rs with auth URLs, token exchange, user info endpoints
- Add routes for /auth/oauth/providers, /auth/oauth/{provider}, and callbacks
- Update login.html with OAuth button grid and dynamic provider loading
- Add OAuth config settings to config.csv with setup documentation and links
- Uses HTMX for login form, minimal JS for OAuth provider visibility
- Add email-read-pixel config parameter to enable/disable tracking
- Implement tracking pixel injection in HTML emails
- Add sent_email_tracking table with migration
- Create 4 new API endpoints:
- GET /api/email/tracking/pixel/{id} - serve pixel & record read
- GET /api/email/tracking/status/{id} - get email read status
- GET /api/email/tracking/list - list all tracked emails
- GET /api/email/tracking/stats - get aggregate statistics
- Store tracking data: read_at, read_count, IP, user_agent
- Integrate with send_email() to auto-inject pixel when enabled
New rules added:
- Two LLM work modes: Execution (fazer) vs Review (conferir)
- Rust code only in architecture.md (gbapp chapter)
- Scan and delete misplaced ALL_CAPS.md files
- HTMX-first: minimize JS, delegate to server
- Local assets only: no CDN references
- Documentation validation process for chapters
- No dead code: implement real code, never use _ prefix
- cargo audit must pass with 0 warnings
- diesel only, remove sqlx references
- Library consolidation guidance
- CRM Lead Scoring: Implement get_lead_score_from_db and update_lead_score_in_db
using bot_memories table with diesel queries
- Bot Manager: Implement real org lookup from database and template loading from filesystem
- KB Manager: Implement get_collection_info to query Qdrant for real statistics
- Analytics: Replace placeholder metrics with actual database queries for users,
sessions, and storage stats
- Email Setup: Implement Stalwart admin account creation via management API
- Add CollectionInfo struct for Qdrant collection metadata
All implementations use diesel for database operations, no sqlx.
modules
Add detailed README documentation for 15+ bot templates including:
- Platform analytics, BI reporting, and web crawler templates
- CRM, contacts, and marketing automation templates
- Legal document processing and office productivity templates
- LLM tools, LLM server, and API client integration templates
- Reminder management and meta-template for creating new templates
Add new Rust configuration modules:
- BM25 config for Tantivy-based sparse
Drop image (with ravif/paste), sqlx, zitadel, and related dependencies
that were causing compilation issues. Replace image processing with
direct png crate usage. Update rcgen to 0.14 with new API changes.
Refactor CA certificate generation to use Issuer pattern.
Introduce an interactive SVG-based monitoring dashboard that displays:
- Central BotServer node with animated status indicators
- Service nodes for PostgreSQL, Qdrant, MinIO, BotModels, Cache, and
Vault
- Animated data flow connections between services
- Real-time metrics panels (sessions, messages, response time)
- Resource utilization bars (CPU, memory, GPU, disk)
- Live activity ticker
The HTML version includes
Replace static grid layout with interactive live system view featuring:
- Animated data packets flowing between service nodes
- Real-time metrics panels with HTMX polling
- Service status dots with pulse animations
- Resource utilization bars
- Live activity ticker
- Toggle between Live and Grid views (V key)
Documentation updated to reflect new visualization and API endpoints.
- Add template-samples.md with ready-to-use bot examples and sample
conversations for CRM, FAQ, calendar, HR, sales, IT helpdesk,
compliance, broadcast, and analytics templates
- Add compliance-api.md with full REST API reference for data subject
requests, consent management, scanning
- Add comprehensive user manual covering all Suite applications
- Document HTMX architecture patterns used throughout the UI
- Complete designer.html JavaScript implementation
- Complete sources/index.html with remaining UI and event handlers
- Update SUMMARY.md with new documentation entries
- Implement code sandbox for Python/JS/Bash execution
- Implement agent reflection for self-improvement
- Implement SSE streaming for real-time responses
- Add episodic memory, knowledge graph, and approval modules
- Add LLM observability with metrics and cost tracking
- Update documentation with new keywords and features
This commit introduces comprehensive documentation and implementation
for multi-agent orchestration capabilities:
- Add IMPLEMENTATION-PLAN.md with 4-phase roadmap
- Add Kubernetes deployment manifests (deployment.yaml, hpa.yaml)
- Add database migrations for multi-agent tables (6.1.1, 6.1.2)
- Implement A2A protocol for agent-to-agent communication
- Implement user memory keywords for cross-session persistence
- Implement model routing for dynamic L
- ADD SUGGESTION TOOL "name" WITH params AS "text" for pre-filled
params
- Add secrets module for Vault integration with minimal .env approach
- Update LLM providers documentation with model recommendations
- Refactor template dialogs for consistency:
- Use PARAM with proper types and DESCRIPTION
- Use WITH blocks for structured data
- Simplify TALK messages (remove emoji prefixes)
- Add RETURN statements to tools
- Add proper CLEAR SUGGESTIONS and ADD TOOL patterns
- Add analytics-dashboard template demonstrating KB Statistics usage ```
and code changes:
``` Add natural language scheduling, docs, wizard, and branding
- Add SET SCHEDULE natural language parser supporting patterns like
"every hour", "at 9am", "weekdays at 8am", "business
update and code refactoring focused on:
1. Adding new documentation pages to the table of contents
2. Restructuring the bot templates documentation
3. Changing keyword syntax from underscore format to space format (e.g.,
`SET_BOT_MEMORY` → `SET BOT MEMORY`)
4. Updating compiler and keyword registration to support the new
space-based syntax
5. Adding new keyword modules (social media, lead scoring, templates,
etc.)
Refactor BASIC keywords to use spaces instead of underscores
Change keyword syntax from underscore format (SET_BOT_MEMORY) to more
natural space-separated format (SET BOT MEMORY) throughout the codebase.
Key changes:
- Update Rhai custom syntax registration to use space tokens
- Simplify compiler preprocessing (fewer replacements needed)
- Update all template .bas files to use new syntax
- Expand documentation with consolidated examples and new sections
- Add new keyword modules: social_media, lead_scoring, send_template,
core_functions, qrcode, sms, procedures, import_export, llm_macros,
on_form_submit
Add flate2 and tar dependencies for archive extraction support in file
operations. Update documentation with:
- New BASIC keywords: SWITCH/CASE, WEBHOOK, INSTR, IS_NUMERIC
- HTTP operations: POST, PUT, PATCH, DELETE_HTTP, GRAPHQL, SOAP
- Data operations: SAVE, INSERT, UPDATE, DELETE, MERGE, FILTER, etc.
- File operations: READ, WRITE, COMPRESS, EXTRACT, GENERATE_PDF, etc.
Simplify README and add appendices for external services and environment
variables. Add monitoring dashboard and player UI docs.
- Add desktop tools module with drive cleaner, Windows optimizer, and
Brave browser installer
- Add antivirus module with ClamAV integration and Windows Defender
management
- Add tools.html template for settings page integration
- Add standalone editor.html for file editing
- Re-export new types from desktop and security
Introduces IMAGE, VIDEO, AUDIO, and SEE keywords for BASIC scripts that
connect to the botmodels service for AI-powered media generation and
vision/captioning capabilities.
- Add BotModelsClient for HTTP communication with botmodels service
- Implement BASIC keywords: IMAGE, VIDEO, AUDIO (generation), SEE
(captioning)
- Support configuration via config.csv for models
- Add 14 new capabilities to the feature table including calendar, task
automation, whiteboard, video conferencing, analytics, and more
- Expand SaaS replacement comparison with 7 additional products
- Update annual savings calculation from $1,500 to $3,000 per user
- Add technical infrastructure details for new components
- Fix BASIC script example formatting and syntax
- Correct installation command from general-bots to botserver
- Add DeepSeek to supported LLM list
- Minor text refinements for clarity
Introduce a shared enum-based system for categorizing message types
across the Rust backend and JavaScript frontend. This replaces magic
numbers with named constants for improved type safety, readability, and
maintainability.
The implementation includes:
- Rust MessageType enum with serialization support
- JavaScript constants matching the Rust enum values
- Helper
This commit replaces all hardcoded message type integers (0, 1, 2, 3, 4,
5) with named constants from a new MessageType module, improving code
readability and maintainability across the codebase.
- Database migrations run automatically on startup
- New QUICK_START.md with usage examples and troubleshooting
- Better handling of already-running services
Replaces ui-server with console in default features, adds comprehensive
quick start documentation, implements automatic database migrations at
startup, and ensures critical services (PostgreSQL and MinIO) are
started automatically.
Key changes:
- Console UI now enable
The commit adds a complete example environment configuration file
documenting all available settings for BotServer, including logging,
database, server, drive, LLM, Redis, email, and feature flags.
Also removes hardcoded environment variable usage throughout the
codebase, replacing them with configuration via config.csv or
appropriate defaults. This includes:
- WhatsApp, Teams, Instagram adapter configurations
- Weather API key handling
- Email and directory service configurations
- Console feature conditionally compiles monitoring code
- Improved logging configuration with library suppression
The sqlx database library has been removed from the project along with
associated database-specific code that was no longer being used. This
includes removal of various sqlx-related dependencies from Cargo.lock
and cleanup of database connection pool references.
The InstagramAdapter constructor is simplified to remove unused
parameters, and the send_instagram_file function is fully implemented
with S3 upload and message sending capabilities.
- Add route configuration and handlers to calendar module
- Add route configuration and handlers to task module
- Update main.rs to build router from module configurations
- Fix various compiler warnings (dead code, unused variables)
This improves code organization by keeping routes co-located with their
implementation logic.
file and distributes its functionality to individual modules. The
calendar and task modules now have their own route configuration and API
handlers.
Remove centralized API router in favor of module-based routing
Decentralizes API route configuration by moving route definitions and
handlers to their respective modules. Each module now exports its own
`configure_*_routes()` function that is merged in main.rs.
- Delete api_router.rs with its mon
- Remove unused imports and comment them for potential future use
- Add missing .send() to HTTP request chain
- Fix integer type suffixes for JSON values
- Simplify async execution by using tokio::block_in_place
- Remove unused function parameters to eliminate warnings
- Extract temporary variables to avoid borrowing issues
- Add placeholder methods to SessionManager for analytics
- Implement real database operations for admin endpoints
- Remove duplicate or conflicting type definitions
These changes address all compiler warnings while maintaining the
existing functionality and preparing the codebase for future
enhancements in areas like analytics and session management.
Changed incorrect references to .vbs files to .bas and corrected
USE_WEBSITE keyword naming. Also added missing fields to API response
structure and clarified that start.bas is optional for bots.
interface
Implements multi-user authentication system with email account
management, profile settings, drive configuration, and security
controls. Includes database migrations for user accounts, email
credentials, preferences, and session management. Frontend provides
intuitive UI for adding IMAP/SMTP accounts with provider presets and
connection testing. Backend supports per-user vector databases for email
and file indexing with Zitadel SSO integration and automatic workspace
initialization. ```
properly integrate the theme system. Here's what was accomplished:
- ✅ Converted all color variables to HSL format compatible with theme
files
- ✅ Created a two-layer bridge system:
- **Layer 1**: Base HSL variables (from theme files: `--primary: 217
91% 60%`)
- **Layer 2**: Working CSS variables (auto-derived: `--accent-color:
hsl(var(--primary))`)
- ✅ Added support for alpha transparency: `hsla(var(--primary) / 0.1)`
Rewrites chat.css to use centralized CSS variables from app.css instead
of maintaining its own theme definitions. Moves all theme variables
(colors, spacing, shadows, transitions) to app.css as the single source
of truth. Improves chat UI consistency, adds better connection status
indicators, and enhances responsive design.
Switch messages area to fixed positioning with centered transform for
better layout stability. Enhance scrollbar appearance with thin style,
improved colors
- Implement singleton pattern for chatApp to prevent multiple instances
- Gate initialization with isInitialized to skip repeated init calls
- Add guards for auth and WebSocket connections to avoid overlaps
- Filter non-message payloads and only render content messages
- Improve scroll-to-bottom button visibility and interaction
- Update scrollbar styling, including dark theme rules
- Updated Cargo.lock to use newer versions:
- syn 2.0.110 (from 2.0.108)
- actix-web 4.12.0 (from 4.11.0)
- socket2 0.6.1 (from 0.5.10)
- aho-corasick 1.1.4 (from 1.1.3)
- anstyle-query 1.1.5 (from 1.1.4)
- anstyle-wincon 3.0.11 (from 3.0.10)
- windows-sys 0.61.2 (from 0.60.2)
- Added a comment clarifying CLI command handling.
- Simplified the default match arm for unknown CLI arguments.
- Added explanatory comment for UI thread initialization.
- Modified UI startup logic to conditionally spawn the UI thread only when not in `no_ui` and not in desktop mode, returning an `Option` handle.
- Removed stray `o` character after `pendingContextChange` declaration to fix a syntax error in `chat.js`.
- Added safety check before calling `focus()` on the message input element.
- Implemented `preloadChatCSS()` to preload chat styles and prevent flash‑of‑unstyled‑content.
- Added GSAP fade‑in animation when switching sections for smoother visual transition.
- Ensured input field is auto‑focused after a section loads.
- Changed the default initial section from `drive` to `chat` to align with new default behavior.
- Removed the unused `serve_html` handler and its import.
- Added a fallback static file service that serves `index.html` for any unmatched path, enabling proper SPA routing.
- Reordered service registration to place the fallback before the explicit index route.
- Cleaned up redundant blank lines and imports in `mod.rs`.
**Client-side (chat.js) updates**
- Renamed the message input variable from `input` to `messageInputEl` for clarity.
- Introduced `pendingContextChange` placeholder for future context handling.
- Switched initialization event from `document 'ready'` to `window 'load'`.
- Updated DOM element assignments and focus calls to use the new variable name.
- Removed unused sidebar auto‑close logic and obsolete session loading functions (`loadSessions`, `loadSessionHistory`).
- Minor refactoring and comment adjustments to improve readability and eliminate dead code.
Refactor `layout.js` to improve section loading performance:
- Removed unused sections from the `sections` map.
- Introduced `sectionCache` to store loaded sections.
- Created a reusable `#section-container` element for managing section DOM nodes.
- Implemented lazy loading with a loading placeholder and show/hide logic for cached sections.
- Optimized CSS handling by reusing existing stylesheet links instead of removing and recreating them.
- Added safeguards to avoid reloading already‑loaded JS modules.
- Add `*.log` to `.gitignore` to exclude log files from version control.
- Change `auth_handler` to `pub` in `src/auth/mod.rs` to make the endpoint publicly accessible.
- Remove unused `bot_index` import and route; replace direct service registration with `web_server::configure_app` in `src/main.rs`.
- Refactor `src/web_server/mod.rs`:
- Remove the `bot_index` handler.
- Introduce `serve_html` helper for loading HTML pages.
- Simplify static file serving by configuring separate routes for JS and CSS assets.
- Centralize all route and static file configuration in `configure_app`.
- Clean up related imports and improve error handling for missing pages.
- Added a new "Chat" link in the desktop navigation bar with appropriate click handling and active state styling.
- Updated the layout configuration to include the Chat section, mapping it to `chat/chat.html`.
- Enables users to switch to the Chat interface directly from the main navigation.
Removed several unused navigation items (Dashboard, Editor, Player, Paper, Settings, Tables, News) from the desktop version of the application. This cleanup simplifies the UI, reduces dead code, and prevents users from accessing sections that are no longer part of the product.
Changed static file path to a relative path (`./web/desktop`) for better portability across environments and removed the unused `index` import from `main.rs` to tidy up module references.
Revamps editor.css to introduce a modern 3DBevel-inspired visual theme, adds structured variables, and implements new UI components including title bar, ribbon tabs, and quick access toolbar for improved usability and maintainability.
Refactored editor.page.html to use a Vue-style `data()` function for reactive state, adding a new `content` property and cleaning up redundant inline styles. Updated profile-form.html to replace single `error` handling with field-specific `errors.<field>` bindings, improving form validation clarity and user feedback.
Update dashboard CSS to use new color scheme matching visual identity, replacing CSS variables with specific color values. Improved button hover state with background transition instead of opacity.
Expanded layout.js with additional application sections including dashboard, editor, player, and settings to support new navigation structure.
Added new navigation links for Dashboard, Editor, Player, Paper, Settings, Tables, and News sections. Each link includes click handlers to switch sections and active state styling. This expands the application's navigation options for better user access to different features.
Added actix-files and its dependencies (http-range, mime_guess, unicase, v_htmlescape) to enable static file functionality in the botserver. This will allow serving static assets and files through the web server. The change includes all required transitive dependencies for proper file handling and MIME type detection.
- Consolidated CSS and JS assets by moving them to local files (app.css, gsap.min.js, marked.min.js)
- Removed livekit-client CDN dependency as it appears unused
- Moved navbar logic to separate layout.js file for better organization
- Changed navigation links to use hash-based routing (#chat, #drive, etc)
- Removed redundant navbar template fetching in favor of static inclusion
- Simplified HTML structure by removing commented code and redundant elements
These changes improve maintainability and performance by reducing external dependencies and better organizing frontend assets.
- Added HTTP server with CORS support and various endpoints
- Introduced http_tx/http_rx channels for HTTP server control
- Cleaned up build.rs by removing commented code
- Updated .gitignore to use *.rdb pattern instead of .rdb
- Simplified capabilities.json to empty object
- Improved UI initialization with better error handling
- Reorganized module imports in main.rs
- Added worker count configuration for HTTP server
The changes introduce a new HTTP server capability while cleaning up and improving existing code structure. The HTTP server includes authentication, session management, and websocket support.
Changed the default webview URL from 'tables.html' to 'index.html' in main.rs to reflect the new entry point. Updated the frontend distribution path in tauri.conf.json from './web/desktop' to './web/html' to better represent the directory structure. These changes align with recent frontend reorganization.
The path to tables.html in WebviewWindowBuilder was incorrectly set to "../web/desktop/tables.html". This was fixed to use the correct relative path "tables.html" to ensure the webview loads the file from the proper location. The change maintains the same functionality while using the correct path structure.
- Changed default feature to include 'desktop' in Cargo.toml
- Replaced --noui flag with --desktop flag in launch.json
- Added Tauri desktop mode implementation in main.rs
- Simplified command line argument handling
- Cleaned up code formatting in main.rs
The changes introduce a new mode for running the application as a desktop app using Tauri framework, while maintaining the existing server functionality. The desktop mode loads a webview window with a specific HTML interface.
Removed commented-out code for deprecated LLM server arguments (n_moe, parallel, cont_batching, etc.) since these are no longer used. Also cleaned up the model arguments string by removing --jinja and --flash-attn flags which were moved to TODO comments for future config implementation. The change simplifies the server startup code while maintaining core functionality.
- Bump version from 6.0.7 to 6.0.8 in Cargo.toml and Cargo.lock
- Refactor desktop feature to use explicit dependency syntax
- Remove outdated open source tools list from README-6.md
- Changed DOCTYPE to lowercase for HTML5 compliance
- Removed redundant CSS and JavaScript code
- Simplified theme variables and styling
- Improved message processing logic
- Added better event management
- Streamlined UI components
The changes focus on code cleanliness, performance improvements, and maintainability while preserving all functionality. The HTML structure is now more semantic and follows modern web standards.
Added the --jinja flag to the LLM server startup arguments to enable Jinja template support. This allows for more flexible prompt formatting when using the local LLM server. The change maintains all existing functionality while adding the new feature.
Removed the redundant `--verbose` flag from Windows command since it's not needed. Standardized log file names to `llm-stdout.log` and `llmembd-stdout.log` for consistency across platforms. This makes log management simpler and more predictable.
Added the `--flash-attn on` flag to the LLM server startup arguments to enable flash attention optimization. This improves performance while maintaining existing parameters (top_p, temp, repeat-penalty). A TODO was added to move these parameters to config for better maintainability.
Updated the parameter name from 'n-ctx-size' to 'ctx-size' in both config lookup and argument formatting for consistency. This change aligns with the naming convention used elsewhere in the codebase and makes the parameter name more concise while maintaining clarity. The functionality remains unchanged.
Changed the config key 'llm-server-n_ctx_size' to 'llm-server-n-ctx-size' in local.rs to maintain consistent hyphen-separated naming convention across configuration parameters. This improves code readability and aligns with existing naming patterns.
Added support for configuring the context window size (n_ctx_size) when starting the local LLM server. The parameter is read from config with a default value of 4096 if not specified. This allows for better control over the model's memory usage and performance characteristics.
The check_gbot function call in DriveMonitor's run method has been commented out with a TODO note, indicating it's deprecated and should be removed. This is likely part of cleaning up unused or outdated functionality while keeping the codebase functional. The gbdialog changes check remains active.
- Remove trace logs in compact_prompt.rs that were cluttering logs without adding value
- Simplify LLM server args in local.rs by removing redundant --reasoning-format parameter
- Add ID to float menu div in index.html for better DOM targeting
- Clean up code by removing unnecessary debug logging while maintaining functionality
- Increased schedule field size from bpchar(12) to bpchar(20) in database schema
- Reduced task checking interval from 60s to 5s for more responsive automation
- Improved error handling for schedule parsing and execution
- Added proper error logging for automation failures
- Changed automation execution to use bot_id instead of nil UUID
- Enhanced HEAR keyword functionality (partial diff shown)
The change adds `arg("true")` to the shell command to prevent executing an empty shell command when a component is already running. This ensures a valid command is always passed to the shell, avoiding potential issues with empty command execution.
The trace log for successful component installation was removed as it was deemed unnecessary. The success of the installation is already indicated by the Ok(()) return value, making the log redundant. This change simplifies the code while maintaining the same functionality.
Fix incorrect variable reference in package manager installer. The code was using `C&component.env_vars` instead of `&component.env_vars` when iterating through environment variables. This would cause compilation errors. The fix properly references the component's env_vars field when evaluating environment variable references.
Added diesel_migrations crate (v2.3.0) to enable database migration functionality. Updated Cargo.toml and Cargo.lock to include the new dependency along with its required sub-dependencies (migrations_internals and migrations_macros). Also made minor cleanups in the codebase:
- Removed unused UI code from platform README
- Cleaned up LLM server initialization code
- Added additional build dependencies in documentation
Remove hardcoded DRIVE_ACCESSKEY/SECRET env vars and replace with variable references ($DRIVE_USER, $DRIVE_ACCESSKEY). Added logic to evaluate environment variable references in command execution by expanding $VAR references to their actual values from the environment. This makes the configuration more flexible and secure by avoiding hardcoded credentials.
Include retrieval and passing of `llm-key` from configuration to LLM provider methods for secure authentication. Also refine role naming in compact prompts and remove unused logging import.
Include model parameter in LLM provider calls across automation, bot, and keyword modules to ensure correct model selection based on configuration. This improves flexibility and consistency in LLM usage.
Removed the legacy TABLES_SERVER environment variable check and related database connection logic. Simplified the bootstrap process to always generate new credentials and write them to .env file. Also updated drive monitor log message to use "Drive" instead of "S3" for consistency. #464
Refactored the prompt construction in compact_prompt.rs to use a single formatted string instead of multiple JSON messages. The conversation is now built as a single string with clear formatting markers, and the role names are more readable (User/Bot instead of user/bot). Also removed a trailing slash from the OpenAI API endpoint URL in llm/mod.rs for consistency.
The changes improve readability of the prompt structure and ensure consistent API endpoint formatting. The summarization request is more clearly formatted for the LLM while maintaining the same functionality.
- Removed unused token parameters from get_system_metrics function
- Simplified metrics collection in BotOrchestrator by removing initial token check
- Improved StatusPanel by:
- Removing 1-second update throttle
- Refreshing CPU usage more efficiently
- Separating metrics collection from rendering
- Using direct CPU measurement from sysinfo
- Cleaned up unused imports and improved code organization
The changes make the system monitoring more straightforward and efficient while maintaining all functionality.
Refactored the compact_prompt_for_bots function to use structured JSON messages instead of plain text formatting. Removed unused execute_compact_prompt method and related code from automation service as the functionality is now handled elsewhere. The changes include:
- Using serde_json to structure messages for LLM
- Improved error handling and fallback mechanism
- Cleaned up obsolete compact prompt execution code
Added parse_messages method to handle structured prompt input for OpenAI API. The method converts human/bot/compact prefixes to appropriate OpenAI roles (user/assistant/system) and properly formats multi-line messages. This enables more complex conversation structures in prompts while maintaining compatibility with the OpenAI API format.
Removed the direct prompt-to-message conversion in generate and generate_stream methods, replacing it with the new parse_messages utility. Also reorganized the impl blocks for better code organization.
- Remove unused imports and redundant session progress tracking
- Reorder session progress check to after initial validation
- Replace `summarize` with `generate` for LLM interaction
- Add more detailed logging for summarization process
- Improve error handling and fallback behavior
- Move session cleanup guard to end of processing
- Update log levels for better observability (trace -> info for key events)
The changes streamline the prompt compaction flow and improve reliability while maintaining the same core functionality.
- Renamed `execute_compact_prompt` to `compact_prompt_for_bots` and simplified logic
- Removed redundant comments and empty lines in test files
- Consolidated prompt compaction threshold handling
- Cleaned up UI logging implementation by removing unnecessary whitespace
- Improved code organization in ui_tree module
The changes focus on code quality improvements, removing clutter, and making the prompt compaction logic more straightforward. Test files were cleaned up to be more concise.
Modified compact_prompt_for_bot to only include the most recent N messages (messages_since_summary + 1) when building the compacted prompt string. This prevents excessive context from being included and improves performance by
Added a trace-level log statement to output the constructed LLM prompt in BotOrchestrator. This helps with debugging by making the prompt content visible in logs when trace logging is enabled. The change maintains existing functionality while improving observability.
Refactor the compact prompt scheduler to use proper indentation and improve error logging. Added more detailed error messages for prompt compaction failures and included bot_id in error logs. The changes make the code more maintainable and debugging easier while maintaining the same functionality.
Added functionality to generate secure passwords for database and drive server credentials during bootstrap. Removed the PostgreSQL running check and auto-start logic as it's no longer needed. Renamed `create_s3_operator` to more descriptive `get_drive_client`. The bootstrap process now automatically sets up required environment variables in .env file including database URL and drive server credentials.
- Added 30-second timeout for S3 bucket listing operations in DriveMonitor
- Removed unused `use_ssl` flag from DriveConfig and cleaned up imports
- Improved error handling with proper logging for timeout scenarios
- Fixed syntax in AppConfig initialization (added missing commas)
- Added proper spacing between methods in BootstrapManager
- Removed unused `id` and `app_state` fields from `ChatPanel`; updated constructor to accept but ignore the state, reducing memory footprint.
- Switched database access in `ChatPanel` from a raw `Mutex` lock to a connection pool (`app_state.conn.get()`), improving concurrency and error handling.
- Reordered and cleaned up imports in `status_panel.rs` and formatted struct fields for readability.
- Updated VS Code launch configuration to pass `--noui` argument, enabling headless mode for debugging.
- Bumped several crate versions in `Cargo.lock` (e.g., `bitflags` to 2.10.0, `syn` to 2.0.108, `cookie` to 0.16.2) and added the new `ashpd` dependency, aligning the project with latest library releases.
Uncommented bootstrap and package_manager directories in add-req.sh to include them in build process. Refactored bootstrap module for cleaner initialization and improved component handling logic.
The warning log was removed from the error case in has_nvidia_gpu() function
as it was producing false positives. The function now silently returns false
when nvidia-smi is not available or no NVIDIA GPU is detected, which is the
expected behavior for the fallback case.
Extract progress bar rendering and warning message display from BotOrchestrator into a dedicated BotUI module. This improves code organization by separating UI concerns from core bot logic. The UI module handles both progress visualization with system metrics and warning message presentation, providing a cleaner interface for output operations.
Added new dependencies for desktop UI support including color-eyre, crossterm, and ratatui. Updated existing dependencies and modified Cargo.toml to include a new 'desktop' feature flag. Also cleaned up the contributors list and modified the add-req.sh script to focus on core bot functionality.
The desktop UI support enables better terminal-based interfaces while the dependency updates ensure compatibility and security. The script changes reflect a shift in focus areas for the project.
Update the LLM server command construction to include a new `--reasoning-format deepseek` argument, enabling explicit selection of the DeepSeek reasoning format. Replace the short `-ngl` flag with the more descriptive `--n-gpu-layers` to improve readability and consistency with other CLI options. This change enhances configurability for models requiring specific reasoning formats and clarifies GPU layer configuration.
Add `info!` statements that output the exact command used to launch the LLM server on both Windows and Unix platforms. This enhances observability and aids debugging by showing the constructed command line before the process is spawned.
- Added retrieval of `llm-server-reasoning-format` configuration in `src/llm/local.rs`.
- When the config value is non‑empty, the server start command now includes `--reasoning-format <value>`.
- Updated argument construction to conditionally append the new flag.
- Cleaned up `src/automation/mod.rs` by removing an unused `std::sync::Arc` import, simplifying the module and eliminating a dead dependency.
The default LLM service URL was changed from `http://localhost:8081/` to `http://localhost:8081`.
Both the configuration lookup default and the fallback string are updated to omit the trailing slash. This prevents accidental double‑slashes when constructing request paths and aligns the default with expected endpoint formatting.
Changed the fallback LLM service URL from `http://localhost:8081/v1` to `http://localhost:8081/`. This aligns the default endpoint with the updated API that no longer requires the `/v1` path, ensuring the application connects correctly when no custom configuration is provided.
- Reordered imports for clarity (chrono and tokio::time::Instant).
- Fixed comment indentation around compact automation note.
- Refactored session history retrieval to acquire the mutex only briefly, then process compacted message skipping and history limiting outside the lock.
- Added explanatory comments for the new lock handling logic.
- Cleaned up token progress calculation and display formatting, improving readability of GPU/CPU/TOKENS bars.
- Minor formatting adjustments throughout the file.
Updated the 6.0.4 migration to use `http://localhost:8081/v1` for the default OpenAI model configurations (gpt‑4 and gpt‑3.5‑turbo) and the local embed service. Adjusted `OpenAIClient` to default to the same localhost base URL instead of the production OpenAI API.
Reorganized imports and module ordering in `src/main.rs` (moved `mod llm`, `mod nvidia`, and `BotOrchestrator` import), cleaned up formatting, and removed unused imports. These changes streamline development by directing LLM calls to a local server and improve code readability.
Removed the conversation history loading logic in `BotOrchestrator` and replaced it with a placeholder string, commenting out related prompt construction and tracing. This change streamlines prompt generation while debugging and prevents unnecessary history processing.
In the local LLM server setup, eliminated the `llm-server-ctx-size` configuration and its corresponding command‑line argument, as the context size parameter is no longer required. This simplifies server initialization and avoids passing an unused flag.
Adjusted the command strings used to start the LLM and embedding servers on both Windows and Unix.
- Replaced the previous log redirection `../../../../logs/llm/stdout.log` with simpler local files (`llm-stdout.log` and `stdout.log`).
- Updated both normal and embedding server launch commands to use the new paths.
This change simplifies log management, ensures logs are correctly written regardless of the working directory, and resolves issues where the previous relative path could be invalid or inaccessible.
- Updated `execute_compact_prompt` to accept an `Arc<AppState>` instead of creating a new default state, enabling proper state sharing across tasks.
- Adjusted bot orchestration to clone and pass the existing `AppState` to the automation task, ensuring the same connection and configuration are used.
- Removed the `Default` implementation for `AppState`, preventing accidental creation of a default state with hard‑coded DB connections and services.
- Modified `BotOrchestrator::default` to panic, enforcing explicit construction via `BotOrchestrator::new(state)` for clearer dependency injection.
These changes improve testability, avoid hidden side‑effects from default state initialization, and ensure consistent use of the application state throughout the system.
Add logic to save user messages to session history for better traceability and context continuity. Simplify session creation error handling and remove redundant warning on closed response channel. Update README with guidance on maintaining production-ready source code.
Renamed PostgreSQL references to "Tables" for clarity in bootstrap logs, changed config sync logging from info to trace for reduced verbosity, and made session message clearing method private to limit external access.
Use `print!` with stdout flush for smoother in-place GPU/CPU/token progress updates in the bot module. Simplify context indicator logic in the web UI by always removing visibility class to streamline behavior.
Refactored prompt compaction to use a special compacted message type (9) instead of clearing old messages. Added support for forced compaction when threshold is negative and updated history retrieval to skip messages before the last compacted marker. This improves efficiency and preserves summary continuity.
Added a check in `BootstrapManager` to detect if PostgreSQL is running and attempt to start the "tables" component automatically if not. Also prefixed unused variables and struct fields with underscores in compiler, session, and model modules to suppress warnings and improve code clarity.
Added `once_cell` and `scopeguard` dependencies to implement thread-safe compaction lock mechanism. Modified `compact_prompt_for_bot` to:
- Prevent concurrent compaction for the same bot using a global lock
- Add proper tracing and error handling
- Improve summarization with content filtering
- Clean up locks automatically using scopeguard
- Remove redundant threshold check and compact entire history
The changes ensure thread safety during prompt compaction and provide better observability through tracing.
- Added initial 30s delay to compact prompt scheduler
- Implemented async LLM summarization for conversation history
- Reduced lock contention by minimizing critical sections
- Added fallback to original text if summarization fails
- Updated README with guidance for failed requirements
- Added new `summarize` method to LLMProvider trait
- Improved session manager query with proper DSL usage
The changes optimize the prompt compaction process by:
1. Reducing lock contention through better resource management
2. Adding LLM-based summarization for better conversation compression
3. Making the system more resilient with proper error handling
4. Improving documentation for development practices
Added new compact_prompt module and its scheduler initialization in AutomationService.
Refactored code for better readability:
- Improved import organization
- Fixed indentation in schedule checking logic
- Enhanced error handling with more descriptive messages
- Formatted long lines for better readability
- Added comments for clarity
The changes maintain existing functionality while making the code more maintainable.
Expanded README with detailed feature matrix and enterprise capabilities for the self-host AI automation platform. Simplified setup instructions by removing redundant configuration and build steps to improve clarity and onboarding experience.
- Update RUST_LOG configuration in launch.json to include trace level and additional module filters
- Uncomment and enable multiple directories in add-req.sh script
- Add execute_compact_prompt function to automation module
- Extend BasicCompiler comment detection to handle single quotes
- Modify BotOrchestrator system message prefix from "SYSTEM" to "SYS"
- Add placeholder for compact prompt automation in BotOrchestrator initialization
Changes improve debugging capabilities and enable previously commented-out automation features while maintaining existing functionality.
Add the `cron` crate (v0.15.0) to Cargo.toml and Cargo.lock to enable scheduling capabilities.
Introduce a new `broadcast_theme_change` helper in `src/automation/mod.rs` that parses CSV theme data and pushes JSON theme update events to all active response channels.
Clean up unused imports in the automation module and add `ConfigManager` import for future configuration handling.
Update `add-req.sh` to adjust the list of processed directories (comment out `auth`, enable `basic`, `config`, `context`, and `drive_monitor`).
These changes lay groundwork for scheduled tasks and dynamic theme updates across the application.
- Updated botserver version from 6.0.5 to 6.0.7 in Cargo.toml and Cargo.lock
- Removed old Rodrigo Rodriguez entry from authors list
- Added new Rodrigo Rodriguez entry with updated email
- Maintained all other existing authors in the list
Added support for configurable conversation history limits through bot configuration. The bot now reads 'prompt-history' from config (defaulting to -1 for unlimited) and trims the conversation history accordingly before generating prompts. Updated announcements bot template to use history limit of 2 messages instead of the previous compact setting.
Removed `IF NOT EXISTS` from the unique constraint in `system_automations` to ensure proper enforcement, and deleted the unused `floatLogo` click event listener to clean up UI behavior.
Added new configuration options for theme colors (green, yellow) and a custom logo URL to enhance branding and visual customization in announcement templates.
Updated the regex pattern in DeepseekR3Handler to use (?s) flag for dot-matches-newline behavior when removing <think> tags. Added comprehensive test case that verifies the handler correctly processes content with multiline think tags. Also made styling changes to the web interface, though the full diff was truncated.
- Simplified build_llm_prompt by removing redundant formatting
- Added info logging for LLM model and processed content
- Updated README with development philosophy note
- Adjusted announcement schedule timing from 55 to 59 minutes past the hour
Mark current_tokens and max_tokens parameters as unused in get_system_metrics function by prefixing them with underscores. This change clarifies that these parameters are intentionally unused in the function implementation while maintaining the function signature for potential future use.
Removed several unused dependencies from Cargo.lock including:
- auto_generate_cdp
- headless_chrome
- scraper
- cssparser and related crates
- dtoa and dtoa-short
- string_cache and related crates
- tendril
- tungstenite 0.27.0
Also updated ureq dependency to single version (removed duplicate entry). This cleanup reduces the dependency tree and removes unused code.
- Update prompt formatting in BotOrchestrator to use clearer labels (SYSTEM/CONTEXT) with emphasis markers
- Remove unused token_ratio field from SystemMetrics struct
- Increase default context size (2048->4096) and prediction length (512->1024) in config
- Clean up metrics calculation by removing redundant token ratio computation
The changes improve readability of system prompts and simplify metrics collection while increasing default model capacity.
Added the sysinfo crate (v0.37.2) to gather system metrics. This includes:
- New dependencies: sysinfo, ntapi, objc2-core-foundation, objc2-io-kit
- Updated windows-core to specific version 0.62.2
- Initial system metrics integration in bot module
The change enables monitoring system resources which will be used for performance optimization and health monitoring.
- Add 'keyword' to LLM processing log message for better context
- Replace simple string replace with regex for removing <think> tags in DeepseekR3 model
- The changes provide more precise logging and more robust content processing
- Added migration 6.0.6 to enforce a unique constraint on `(bot_id, kind, param)` in `system_automations`, preventing “no unique or exclusion constraint matching the ON CONFLICT specification” errors, and created a supporting index.
- Added migration 6.0.7 to replace the `clicks` table with a correctly defined primary key and a unique `(campaign_id, email)` constraint, satisfying Diesel
Added tracking of previously scheduled scripts using a `HashSet` and initialized it in `BasicCompiler::new`. Updated `compile_file` and `preprocess_basic` to require mutable access, allowing schedule cleanup before processing. Implemented logic to delete existing scheduled automations for a script using Diesel queries, ensuring old schedules are removed when a script is recompiled without a `SET_SCHEDULE`. Added necessary Diesel imports and `TriggerKind` reference. This prevents duplicate or orphaned scheduled tasks.
Changed the set_schedule function to first attempt updating existing records before inserting new ones. This improves efficiency by avoiding unnecessary insert conflicts and subsequent updates. The logic now:
1. Tries to update matching existing schedule first
2. Only performs insert if no matching record was found
3. Maintains same functionality but with better performance
- Extend `system_automations` with a non‑null `bot_id` UUID column, create an index on it, and add a unique constraint on `(bot_id, kind, param)` to support upserts.
- Add a unique constraint on `bot_configuration.config_key` to prevent duplicate configuration keys.
- Include migration guards to ensure the new constraint is only created once.
- Remove automatic writing of drive configuration to a `.env` file, cleaning up side‑effects during config loading.
- Change database connection handling to require `DATABASE_URL` to be set (no fallback), making the environment initialization explicit.
- Introduced `#[cfg(test)] pub mod auth_test;` in `src/auth/mod.rs` to expose authentication tests.
- Added `pub mod tests;` declarations in `src/lib.rs` and `src/main.rs` for centralized test utilities.
- Removed unnecessary blank lines and a placeholder comment in `src/shared/models.rs` and `src/tests/test_util.rs`.
- Minor formatting adjustments to improve code readability and maintainability.
- Simplified auth module by removing unused imports and code
- Cleaned up shared models by removing unused structs (Organization, User, Bot, etc.)
- Updated add-req.sh to comment out unused directories
- Modified LLM fallback strategy in README with additional notes about model behaviors
The changes focus on removing unused code and improving documentation while maintaining existing functionality. The auth module was significantly reduced by removing redundant code, and similar cleanup was applied to shared models. The build script was adjusted to reflect currently used directories.
Removed the test bucket creation code from the main function as it was only used for testing purposes. The production code should not include test functionality in the main execution path. This cleanup improves code quality and separation of concerns.
- Added CLI and IDE prompt files to the add-req.sh script
- Removed unused bucket creation code from BotOrchestrator
- Deleted unused create_bucket module from main.rs
The changes streamline the codebase by removing unused bucket creation functionality while expanding the prompt file inclusion for better LLM context handling.
Updated the directory list in add-req.sh to include previously commented-out directories and added new ones. The changes reflect a more complete set of project modules, including newly added ones like 'bootstrap', 'llm_models', and 'ui'. This ensures the script will process requirements for all current project components.
Added check_cmd field to ComponentConfig struct and implemented health check commands for all services including minio, postgres, valkey, stalwart, caddy, zitadel, forgejo, and forgejo-runner. This allows for proper health monitoring of each service. Also updated IDE guidelines to prohibit magic values and defaults.
- Refine IDE prompt to clarify identifier/character requirements in English
- Add info and debug logging for component startup process in bootstrap
- Fix PostgreSQL command formatting and improve output redirection
- Standardize Valkey command formatting and fix execution command
- Remove LLM server execution command (now handled separately)
- Clean up unused PostgreSQL status check code for tables component
Only upload templates to Drive buckets if the bucket was just created. Skip upload if bucket already exists to avoid overwriting existing content.
- Change from always uploading to conditionally uploading based on bucket existence
- Add info log when skipping upload for existing buckets
- Maintain same upload behavior for newly created buckets
Enable automation, basic, config, context, session, kb, and tools directories while disabling bootstrap, file, and drive_monitor to refine which modules are processed by add-req.sh.
Enhanced Chapter 1 documentation with detailed session architecture, storage layers, and API endpoints. Added new Part XI on authentication and security to SUMMARY.md, introducing chapters on user and bot authentication, password security, and API endpoints. Improves clarity and coverage of system interaction and security concepts.
Added interaction count tracking for sessions with Redis or in-memory fallback. Implemented conversation history replacement functionality to compact and update message history. The changes include:
- New AtomicUsize counter in SessionManager for interaction tracking
- increment_and_get_interaction_count method with Redis support
- replace_conversation_history to update and compact message history
- Maintains existing functionality while adding new features
The large `process_message` function was deleted from `src/bot/mod.rs`. Its responsibilities have been migrated to newer, more modular handlers, eliminating dead code and simplifying the BotOrchestrator. This refactor reduces complexity, improves maintainability, and aligns the codebase with the updated message processing architecture.
- Reformatted `update_session_context` call for better readability.
- Moved context‑change (type 4) handling to a later stage in the processing pipeline and removed early return, ensuring proper flow.
- Adjusted deduplication logic formatting and clarified condition.
- Restored saving of user messages after context handling, preserving message history.
- Added detailed logging of the LLM prompt for debugging.
- Simplified JSON extraction for `message_type` and applied minor whitespace clean‑ups.
- Overall code refactor improves maintainability and corrects context‑change handling behavior.
- Deduplicate consecutive messages with same role in conversation history
- Add n_predict configuration option for LLM server
- Prevent duplicate message storage in session manager
- Update announcement schedule timing from 37 to 55 minutes
- Add default n_predict value in default bot config
- Refactor cron matching to use individual variables for each time component with additional debug logging
- Replace SETEX with atomic SET NX EX for job locking in Redis
- Add better error handling and logging for job execution tracking
- Skip execution if Redis is unavailable or job is already held
- Add verbose flag to LLM server startup command for better logging
- Added duplicate filtering for suggestions in both backend (Rust) and frontend (JavaScript)
- Changed announcement summary schedule from every 15 minutes to hourly at :37
- Simplified LLM prompt for document summarization
- Updated LLM server configuration with reduced GPU layers and increased context size
- Removed memory mapping and lock settings for LLM server
- Improved HTML formatting and added missing newline at EOF
Added SET_SCHEDULE directive to run the update-summary script every 15 minutes. This ensures the announcements summary stays current by regularly fetching and processing the latest news document.
Added support for selecting an LLM model based on configuration and processing the raw response. The execute_llm_generation function now:
1. Fetches the configured model using ConfigManager
2. Gets the appropriate handler for the model
3. Processes the raw response through the handler before returning
This provides more flexibility in model selection and allows for model-specific response handling.
Enhances BotOrchestrator by integrating optional semantic caching via LangCache for faster LLM responses. Also refactors message saving to occur before and after direct mode handling, and simplifies context change logic for better clarity and flow.
- Added `trace!` logging in `bot_memory.rs` to record retrieved memory values for easier debugging.
- Refactored `BotOrchestrator` in `bot/mod.rs`:
- Removed duplicate session save block and consolidated message persistence.
- Replaced low‑level LLM streaming with a structured `UserMessage` and `stream_response` workflow, improving error handling and readability.
- Updated configuration loading in `config/mod.rs`:
- Imported `get_default_bot` and enhanced `get_config` to fall back to the default bot configuration when the primary query fails.
- Established a fresh DB connection for the fallback path to avoid borrowing issues.
- Remove redundant background and filter properties from logo-icon and assistant-avatar
- Remove redundant filter property from light theme logo-icon
- Invert assistant-avatar image in light theme for better visibility
- Move theme-toggle button further right (60px to 160px) to prevent overlap
- Remove `scripts_dir` from `AutomationService` and its constructor, as it was unused.
- Drop LLM and embedding server readiness checks; the service now only schedules periodic tasks.
- Increase the health‑check interval from 5 seconds to 15 seconds for reduced load.
- Streamline the LLM keyword prompt to a concise `"User: {}"` format, removing verbose boilerplate.
- Remove unnecessary logging and LLM cache handling code from the bot orchestrator, cleaning up unused environment variable checks and cache queries.
- Added LLM server readiness check in AutomationService before starting tasks
- Renamed `user` parameter to `user_session` in execute_talk for clarity
- Updated BotResponse fields to use user_session data instead of hardcoded values
- Improved Redis key generation in execute_talk to use user_session fields
- Removed commented Redis code in set_current_context_keyword
The changes ensure proper initialization of automation tasks by checking LLM server availability first, and improve code clarity by using more descriptive variable names for user session data.
- Added UNIQUE constraint on system_automations (bot_id, kind, param) to prevent duplicate automations
- Refactored execute_action to accept full Automation struct instead of just param
- Simplified bot name resolution by using automation.bot_id directly
- Improved error handling in action execution with proper error propagation
- Removed redundant bot name lookup logic by leveraging existing bot_id
- Introduced `bot_id` column in `system_automations` table (migration 6.0.0.sql) and updated the Diesel schema/model to include it.
- Adjusted migrations to remove the hard‑coded “Update Summary” automation and only create an index on the `name` column.
- Extended the `SET_SCHEDULE` keyword:
- Added a second string argument for the script name.
- Passed the invoking user's `bot_id` to the database layer.
- Updated function signature to accept a full `UserSession` instead of discarding it.
- Modified `execute_set_schedule` to store `bot_id`, script name, and activation flag; added conflict handling on `(bot_id, param)` to update schedule and reset trigger state.
- Updated imports and logging to reflect new parameters.
These changes enable per‑bot automation management, allow specifying the script to run, and improve idempotent schedule updates.
- Update RUST_LOG environment variable in launch.json to exclude more verbose crates
- Change automation kind from 3 to 0 in migrations/6.0.5.sql
- Replace debug with trace logging for schedule evaluation in automation service
- Modify script path resolution to use .ast extension instead of .bas
- Improve error message when script reading fails
- Remove MinIO download fallback for scripts (simplifying script handling)
These changes improve logging verbosity control and simplify script handling by removing the MinIO fallback mechanism. The trace-level
- Updated `BootstrapManager` to use `AppConfig::from_env().expect(...)` and `AppConfig::from_database(...).expect(...)` ensuring failures are explicit rather than silently ignored.
- Refactored error propagation in bootstrap flow to use `?` where appropriate, improving reliability of configuration loading.
- Added import of `llm_models` in `bot` module and introduced `ConfigManager` usage to fetch the LLM model identifier at runtime.
- Integrated dynamic LLM model handler selection via `llm_models::get_handler(&model)`.
- Replaced static environment variable retrieval for embedding configuration with runtime
Introduce a new `cancel_job` method in the `LLMProvider` trait to allow cancellation of ongoing LLM tasks. Implement no-op versions for OpenAI, Anthropic, and Mock providers. Update the WebSocket handler to invoke job cancellation when a session closes, ensuring better resource management and preventing orphaned tasks. Also, fix unused variable warning in `add_suggestion.rs`.
Added new CLEAR_SUGGESTIONS keyword command that clears user suggestions from Redis cache. Implemented the command in the announcements dialog start script to prevent duplicate suggestions. The command handles Redis connection errors gracefully and logs appropriate debug information.
Changed debug logging to trace level for Redis suggestion operations and drive monitor object listings. This better reflects the verbosity level of these operations since they are more detailed debugging information. Also updated "Redis client" to "Cache client" in a debug message for consistency with the broader cache abstraction.
- Updated RUST_LOG environment variable in launch.json to include more detailed debug logging configuration
- Changed trace! logs to debug! in AutomationService for better visibility
- Replaced environment variable usage with get_default_bot helper function
- Improved bot path resolution by using bot name from database
- Added error handling for bot name query
- Simplified S3 bucket name generation using get_default_bot
- Removed unused imports and environment variable dependencies
Add `context_length` and `context_max_length` fields to the `BotResponse` struct across the codebase.
Initialize these fields with default values (0) for existing response constructions and populate them using `ConfigManager` to retrieve the configured maximum context size for each bot.
Import `ConfigManager` in `bot/mod.rs` to access configuration.
These changes enable tracking of the current and maximum context sizes in bot responses, supporting future features that rely on context management.
Removed the redundant "I heard: " prefix from the message content in the execute_talk function. The message is now stored as-is without additional formatting, making it more straightforward and consistent with other message handling.
- Replace Orbitron/Inter fonts with Space Grotesk/JetBrains Mono
- Implement new color scheme with primary, secondary, and accent variables
- Add radial gradient background with animated glow effects
- Introduce grain overlay for texture
- Redesign sidebar with improved transitions and blur effects
- Update empty state styling and remove neon effects
- Optimize layout spacing and shadows
- Streamline API call in chat initialization
The changes modernize the UI with a more cohesive design language, better visual hierarchy, and improved readability while maintaining functionality. The new theme features a dark color palette with vibrant accents and subtle textures for depth.
Added new CSS classes for suggestion buttons and container, moving them from message content to footer. Removed inline styles in favor of CSS classes for better maintainability. The suggestions now appear at the top of the footer with consistent styling and hover effects.
Enhanced suggestion handling to include empty state in message selection and improved UX by:
- Clearing input field after selecting a suggestion
- Adding selected suggestion as user message to chat
- Maintaining all existing functionality while simplifying the flow
Changes ensure more intuitive user interaction with suggestions while keeping the chat interface clean.
Changed async Redis operations to synchronous in add_suggestion_keyword function. Removed unnecessary async/await and tokio::spawn since the operations are now blocking. This simplifies the code while maintaining the same functionality of storing suggestions and context state in Redis. Error handling remains robust with proper early returns.
- Remove comments from launch.json configuration
- Simplify Redis key format in set_current_context_keyword by removing context_name
- Remove unused /api/start endpoint and related session start logic
- Change log level from info to trace for config sync messages
- Add trace logging to drive_monitor module
The changes focus on code cleanup and simplification, particularly around session handling and logging. The Redis key format was simplified as the context_name was deemed unnecessary for uniqueness.
Updated references from `redis_client`, `s3_client`, and `custom_conn` to unified names `cache`, `drive`, and `conn` for consistency across modules. Adjusted `add_suggestion_keyword` to use clearer parameter naming and enhanced custom syntax registration for better readability and maintainability.
Implemented a new `bot_from_name` method in `AuthService` to retrieve a bot's UUID by its name, enabling explicit bot selection via a `bot_name` query parameter in the authentication endpoint. Updated `auth_handler` to prioritize this parameter, fall back to the first active bot when necessary, and handle cases where no active bots exist.
Extended `BotOrchestrator` to import the `Suggestion` model and fetch suggestion data from Redis for each user session. Integrated these suggestions into the `BotResponse` payload, ensuring clients receive relevant suggestions alongside bot messages.
These changes improve bot selection flexibility and enrich the response data with contextual suggestions.
- Reordered and deduplicated `use` statements, adding missing imports for `langcache`, `DriveMonitor`, `generate_embeddings`, `Qdrant` client, and `chrono::Utc`.
- Moved Diesel prelude import into the function scope where it is used to limit its visibility.
- Refactored async task spawning to handle errors more clearly and consistently.
- Enhanced string formatting for bucket names and log messages, introducing multiline `warn!` and `error!` calls for better readability.
- Applied consistent code style (spacing, line breaks) across the module to improve maintainability.
Add logic to detect changes in llm-related configuration properties when syncing gbot configs. If any llm- keys differ from stored values, automatically restart LLaMA servers to apply updates. This ensures model servers stay in sync with configuration changes without unnecessary restarts.
Updated `ConfigManager::get_config` to use Diesel query builder instead of raw SQL for improved safety and maintainability. Adjusted parameter naming and integrated schema references. Also refactored `ensure_llama_servers_running` to fetch configuration from the database using `AppState` and `ConfigManager`. Removed unused imports in bootstrap module.
The commit removes the unused bot configuration update functionality from the bootstrap manager. This includes:
1. Removing the fallback logic in component installation that would update bot configs
2. Removing the entire update_bot_config method which was used to insert/update configuration values
The code was likely removed because this functionality is no longer needed or has been moved elsewhere in the codebase. The removal simplifies the bootstrap process by eliminating unused database operations.
- Added bot_id parameter to DriveMonitor::new() and pass it through BotOrchestrator
- Modified DriveMonitor to store bot_id as a field
- Simplified ConfigManager::sync_gbot_config() to accept content directly instead of file path
- Removed file reading logic from sync_gbot_config
- Cleaned up logging messages in config sync
- Improved error handling and logging in DriveMonitor's gbot check
These changes better associate monitoring with specific bots and make the config sync more flexible by accepting content directly rather than requiring a file path.
- Removed database-based config loading from server_configuration table
- Simplified AppConfig::from_database to use empty HashMap since config is now loaded from bot_configuration table via drive_monitor
- Removed unused load_config_from_db function
- Removed config sync hash checking logic from ConfigManager
- Cleaned up config update logic in ConfigManager
The changes reflect the shift to loading configuration from the bot_configuration table instead of server_configuration, removing now-unused code paths and simplifying the configuration loading process.
- Split AIConfig into separate LLMConfig and embedding config structs
- Update create_site.rs to use config.llm instead of config.ai
- Improve config loading comments in bootstrap manager
- Add new LLM-related environment variables with defaults
- Maintain backward compatibility with existing config loading
- Clean up unused AIConfig struct and related code
The change better organizes the AI-related configuration by separating LLM and embedding configurations, making the code more maintainable and flexible for future AI service integrations.
- Remove unused diesel::Connection import
- Rename unused database_url variable to _database_url
- Mark unused config parameter in upload_templates_to_drive with underscore
- Maintain same functionality while cleaning up compiler warnings
- Replace direct database connection establishment with shared `establish_pg_connection` utility
- Add "llm" to required components list in bootstrap manager
- Lower default RUST_LOG level from debug to info in VSCode config
- Clean up imports and connection error messages
- Remove hardcoded database URL strings in favor of centralized connection handling
The changes improve code maintainability by centralizing database connection logic and adding support for the new LLM component in the bootstrap process.
- Added new ADD_SUGGESTION keyword handler to support sending suggestions in responses
- Removed unused env import in hear_talk module
- Simplified bot_id assignment to use static string
- Added suggestions field to BotResponse struct
- Improved SET_CONTEXT keyword to take both name and value parameters
- Fixed whitespace in auth handler
- Enhanced error handling for suggestion sending
The changes improve the suggestion system functionality while cleaning up unused code and standardizing response handling.
Changed the Redis RPUSH command to return the new list length (`Result<i64, RedisError>`) and added a debug log that includes this length. Updated the HSET command to capture its result (`Result<i64, RedisError>`), logging the number of fields added on success and handling errors explicitly. Removed unnecessary `unwrap_or_else` and added comments to clarify behavior, improving observability and error handling for suggestion storage.
- Changed RUST_LOG level from 'trace' to 'debug' in VSCode launch config
- Simplified auth handler by removing direct bot ID lookup logic
- Added HttpRequest parameter to auth handler
- Implemented bot_from_url helper for bot identification
- Updated auth script path to use bot-specific directory structure
- Removed unused warn import
- Improved error handling for auth script reading and execution
The changes streamline the authentication process by:
1. Moving bot identification to a dedicated helper function
2. Making the auth script path dynamic based on bot name
3. Reducing log verbosity in development
4. Cleaning up unused imports and code
- Added RUST_LOG=trace to VSCode debug configurations for better debugging
- Removed unused imports (uuid, Selectable, SelectableHelper) from bootstrap module
- Simplified bot name handling by removing name formatting logic, using raw bot folder names
- Renamed check_default_gbot to check_gbot for consistency
- Improved logging format in drive monitor initialization
- Fixed S3 bucket reference in bootstrap manager (removed 'templates/' prefix)
Introduce bot mounting logic in `BotOrchestrator` to load and manage active bots from the database. Enhance `BootstrapManager` by refining Diesel query usage and connection handling for better reliability and maintainability.
The migration file 6.0.6.sql was deleted as it contained default LLM server configurations that are no longer needed. The file was originally used to set up local LLM server settings including model paths and URLs, but these configurations are now handled differently in the system.
Removed the default server configuration section from migrations as these values should now be managed through environment variables. Updated default database username from 'postgres' to 'gbuser' in bootstrap and changed default database name from 'gbuser' to 'botserver' in config to align with the removed server configuration defaults.
Added functionality to load configuration from CSV files in S3 when available, with fallback to existing methods. The changes include:
1. Added new `load_config_from_csv` method to handle CSV config loading
2. Improved legacy mode handling by attempting CSV load before falling back to database
3. Added new dependencies (uuid, Arc, Mutex) for config management
4. Enhanced error handling and logging for config loading scenarios
The changes maintain backward compatibility while adding the ability to load configurations from CSV files stored in S3, which provides more flexibility in configuration management.
Removed the automatic upload of default config.csv to S3 during bootstrap initialization. This functionality was previously uploading a local config file to the S3 bucket 'default.gbai/default.gbot' if the file existed. The change simplifies the bootstrap process by removing this implicit behavior.
Added functionality to write drive configuration (MinIO settings) to a .env file when the AppConfig is created. The new write_drive_config_to_env function handles the file operations and logs warnings if the write fails. This change ensures drive configuration is persisted for future use while maintaining backward compatibility.
- Renamed unclear function `c` to more descriptive `create_s3_operator`
- Removed duplicate `create_s3_operator` function implementation
- Consolidated imports from aws_sdk_s3 and diesel crates
- Removed unused import `aws_s3_bucket_create`
- Improved code formatting and organization
The changes make the code more maintainable by removing duplication and improving clarity while maintaining the same functionality.
- Added bucket parameter to upload_directory_recursive for explicit bucket specification
- Improved key construction logic to handle path prefixes more robustly
- Removed redundant trace logs and added more informative upload messages
- Fixed potential issue with bucket name extraction from prefix
- Ensured consistent path separator handling in S3 keys
The changes make the S3 upload functionality more reliable and maintainable by:
1. Explicitly passing bucket names instead of extracting from prefixes
2. Properly handling path separators in S3 keys
3. Providing clearer logging for upload operations
- Added AWS SDK S3 dependencies including aws-config, aws-sdk-s3, and related crates
- Removed opendal dependency and replaced with AWS SDK S3 client
- Implemented new get_file_content helper function using AWS SDK
- Updated MinIOHandler to use AWS SDK client instead of opendal Operator
- Modified file change detection to work with AWS SDK's S3 client
The change was made to standardize on AWS's official SDK for S3 operations, which provides better maintenance and feature support compared to the opendal crate. This also aligns with AWS best practices for interacting with S3 services.
Added new `add_suggestion` module to support suggestion handling logic.
Updated `index.html` to include a dynamic suggestions container that fetches and displays context suggestions.
This improves user experience by enabling quick context changes through interactive suggestion buttons.
Enhance the bucket creation process in `BootstrapManager` to handle existing buckets gracefully. Adds logic to reuse the default template when a bucket already exists and ensures proper path formatting before creation. This improves reliability and prevents redundant bucket creation errors.
Add logic to automatically upload an initial `config.csv` to the default S3 bucket during bootstrap. Enhance S3 operator creation by ensuring endpoint formatting, setting default bucket and region, and enabling path style. Improve template upload flow by validating bucket existence and creating it if missing. Also include debug logging for better traceability.
Eliminates the `s3_bucket` field from `AppConfig` and deletes related initialization code in `main.rs`. This simplifies configuration management since S3 bucket handling is no longer required or used in the application.
Introduces an async helper function to verify and create the configured S3 bucket if missing. This ensures the application has a valid storage target before initializing the drive, improving reliability in environments with dynamic bucket provisioning.
Replaces hardcoded alias setup with commands that create and configure a MinIO admin user, ensuring proper authentication and permissions during installation.
Introduce environment existence check to prevent redundant bootstrap runs and ensure smoother startup. Refactor `update_bot_config` to use globally unique config keys and atomic updates for better data consistency.
Reload configuration from environment to ensure latest DATABASE_URL and credentials are used before creating the database connection. This prevents stale config values when environment variables change.
Add logic to retrieve a default bot ID from the database and pass it to `update_bot_config`, ensuring configuration entries are linked to a specific bot. Updated SQL queries to include `bot_id` and `id` fields for consistency and improved data integrity.
- Removed unused Tauri dependencies and replaced aws-sdk-s3 with opendal for S3 services.
- Cleaned up feature flags in Cargo.toml.
- Simplified the welcome message logic in start.bas and removed redundant comments.
- Added `data_download_list` field to `ComponentConfig` struct in `component.rs`.
- Implemented processing of `data_download_list` in the `PackageManager` to download files asynchronously in `facade.rs`.
- Updated `installer.rs` to initialize `data_download_list` for various components.
- Refactored `download_file` function in `utils.rs` to return `anyhow::Error` for better error handling.
- Introduced AWS SDK dependencies for S3 and CSV handling.
- Implemented logic to check and update the default bot configuration in S3 after component installation.
- Added a new configuration CSV template for bot settings.
- Refactored package manager to register cache component with updated download URL and binary name.
- Updated README and Cargo files to reflect new dependencies and configuration options.
- Created a new About page (index.html) detailing the BotServer platform, its features, and technology stack.
- Developed a Login page (login.html) with sign-in and sign-up functionality, including form validation and user feedback messages.
- Removed the empty style.css file as it is no longer needed.
- Created detailed markdown files for keywords such as HEAR, TALK, and SET_USER.
- Added examples and usage notes for each keyword to enhance user understanding.
- Developed templates for common tasks like enrollment and authentication.
- Structured documentation into chapters covering various aspects of the GeneralBots platform, including gbapp, gbkb, and gbtheme.
- Introduced a glossary for key terms and concepts related to GeneralBots.
- Implemented a user-friendly table of contents for easy navigation.
- Replace simple message count with token-based calculation
- Add token estimation function (4 chars ≈ 1 token)
- Set MAX_TOKENS to 5000 and MIN_DISPLAY_PERCENTAGE to 20
- Update context usage display to show token count percentage
- Track tokens for both user and assistant messages
- Handle server-provided context usage as ratio of MAX_TOKENS
Add curl command to download MinIO client for Windows and configure
MinIO client with admin user and policy.
Also add powershell commands to install Valkey on Windows.
Add build command before running cargo Update PostgreSQL installation
commands to use relative paths
Update Linux and macOS installation commands to use `chmod +x ./bin/*`
instead of `chmod +x bin/*`
Implement a new method `start_all` in `BootstrapManager` to start all
components using the `PackageManager`.
This method creates a new `PackageManager` instance and uses it to start
each component in a predefined list.
--- Add remove_local for PackageManager
Remove component specific code
The specific code for component 'tables' has been removed from the
`remove_local` method in `PackageManager`.
The method now simply removes the binary directory for the component.
--- Implement start for PackageManager
Add a new method `start` to `PackageManager` to start a component.
This method takes a component name as an argument and uses the
`exec_cmd` for that component to spawn a new process.
If the component is not found, it returns an error.
Implement core package manager with component configuration, installer
logic, OS detection, and a command‑line interface for install, remove,
list, and status operations.
- Split package manager into separate modules
- Expose only the installer API
- Simplify BootstrapManager to install components and load config
- Pin ureq to 3.1.2 and add ureq‑proto crate
- Clean up configuration code and remove legacy comments
- Update helper scripts and server start command formatting
Replace `thread_rng` with `rng` and use `random_range` for character
selection. Rename the `component` argument to `_component` in
`PackageManager::download_binary` to suppress an unused‑parameter
warning.
- Derive bot_id from BOT_GUID env var
- Guard concurrent runs with Redis
- Read CACHE_URL for Redis connection
- Extend bot memory keyword to accept comma as separator
- Increase LLM timeouts to 180s (local and legacy)
- Update templates to use bot memory (GET_BOT_MEMORY/SET_BOT_MEMORY)
- Fix start script path to announcements.gbai
- Rename script_name to param in automation flow and DB schema
- Add BotMemory model and bot_memories table
- Remove script_name field from automation
- Enable sqlite support via rusqlite and related crates (optional)
- Update prompts and queries to use param instead of script_name
- Remove deprecated annoucements GBai templates and align add-req.sh
- Refactor main to initialize automation service and simplify startup
Remove unnecessary async spawn in TALK handling and use `try_send` on
the WebSocket channel. Acquire `response_channels` with `try_lock` and
spawn an async task only when falling back to the web adapter. Clean up
debug logs and add missing `env` import. Also delete an extra blank line
in the announcement start script.
- Strip content up to the “final<|message|>” token in OpenAI responses.
- Replace the text‑based connection‑status indicator with a small
flashing circle.
- Simplify updateConnectionStatus to take only the status argument.
- Remove special handling of the initial assistant message and
streamline empty‑state removal.
- Clean up stray blank lines in the announcement template.
- Execute GET requests in a dedicated thread with its own Tokio runtime,
add timeout handling and clearer error messages.
- Tighten `is_safe_path` checks and simplify HTTP/S3 logic.
- Change `llm_keyword` to accept `Arc<AppState>`, add prompt builder,
run LLM generation in an isolated thread with timeout.
- Update keyword registration call in `basic/mod.rs`.
- Convert template script to use `let` declarations and return a
boolean.
- Introduce connection‑status indicator in the web UI with styles,
automatic reconnection attempts, and proper WS/WSS handling for voice.
- Replace async task spawning with `block_in_place` to simplify GET
handling
- Add detailed safety checks for file paths and organization prefixes
- Introduce timeout and keep‑alive settings for HTTP client
- Improve S3 bucket access with existence check, timeouts, and richer
logging
- Switch tracing logs to debug and add warning logs where appropriate
- Update announcement template to retrieve a PDF, generate a resume via
LLM, and set context for subsequent queries.
- Extract LLM generation into `execute_llm_generation` and simplify
keyword handling.
- Prepend system prompt and session context to LLM prompts in
`BotOrchestrator`.
- Parse incoming WebSocket messages as JSON and use the `content` field.
- Add async `get_session_context` and stop injecting Redis context into
conversation history.
- Change default LLM URL to `http://48.217.66.81:8080` throughout the
project.
- Use the existing DB pool instead of creating a separate custom
connection.
- Update `start.bas` to call LLM and set a new context string.
- Refactor web client message handling: separate event processing,
improve streaming logic, reset streaming state on thinking end, and
remove unused test functions.
- Use `tokio::spawn` to run Redis SET for `SET_CONTEXT` in a background
task with detailed tracing.
- Move context retrieval from `BotOrchestrator` to `SessionManager`,
inserting it as a system message in conversation history.
- Remove redundant Redis fetch logic from `BotOrchestrator`.
- Update `DEV.md` to install `valkey-cli`, reorder cargo tools, and
adjust apt commands.
- Add a `SET_CONTEXT "azul bolinha"` example to the announcements
template.
- Introduce event-driven streaming with thinking_start, thinking_end,
and warn events; skip sending analysis content to clients
- Add /api/warn endpoint to dispatch warnings for sessions and channels;
web UI displays alerts
- Emit session_start/session_end events over WebSocket and instrument
logging throughout orchestration
- Update web client: show thinking indicator and warning banners; switch
LiveKit client URL to CDN
- Extend BotOrchestrator with send_event and send_warning, expand
session/tool workflow
- Improve REST endpoints for sessions/history with better logging and
error handling
- Update docs and prompts: DEV.md usage note; adjust dev build_prompt
script
- Migrate core services to store Arc<AppState> and use locks
- Centralize state in AppState with Arc-wrapped managers
- Update handlers to pass Arc<AppState> via web::Data
- Add Default for AppState and initialize components in main
- Update debug.json program path from gbserver to botserver
- Load index.html from web/index.html instead of templates/static
- Initialize OpenAIClient with an empty key and local endpoint
- Remove the old static/index.html file
Create organizations table with UUID primary key, unique slug,
timestamps, and indexes on slug and created_at. Add
scripts/dev/build_fix.sh to consolidate prompts and source files for LLM
context. Allow dead_code in main.rs and rename unused org_id parameter
to _org_id.
## [2.0.154](https://github.com/GeneralBots/BotServer/compare/2.0.153...2.0.154) (2022-07-01)
### Bug Fixes
* **all:** /check added. ([7410085](7410085e99))
* **all:** Added MSFT cognitive stack again to test if it is working now on Azure. ([4452a31](4452a311b1))
* **all:** Automated build errors. ([55ff686](55ff686a3f))
* **all:** Automated build errors. ([ce2b484](ce2b484f8e))
* **all:** Building failed as typedoc bugs. ([55bc5ef](55bc5ef382))
* **all:** Building failed as typedoc bugs. ([6778f2e](6778f2eb59))
* **all:** Comparison of strings in FIND operators. ([47d553f](47d553f8f0))
* **all:** Compilation error in MS AZURE (again). ([88a908a](88a908a124))
* **all:** Compilation error in MS AZURE (again). ([227c30a](227c30ac33))
* **all:** Corrected dates o MS EXcel saving. ([1899b1c](1899b1c755))
* **all:** Corrected mobile number to WhatsApp while output md. ([55568e2](55568e2ba8))
* **all:** Corrected mobile number to WhatsApp while output md. ([0fda382](0fda382a43))
* **all:** Corrected mobile number to WhatsApp while output md. ([f0ad1ae](f0ad1aea65))
* **all:** Corrected mobile number to WhatsApp while output md. ([9257ac7](9257ac7271))
* **all:** Corrected mobile number to WhatsApp while output md. ([95524a9](95524a902c))
* **all:** Enable https in place. ([6b05405](6b05405705))
* **all:** Enable https in place. ([722a950](722a950033))
* **all:** Enable https in place. ([4779d49](4779d4968f))
* **all:** Enable https in place. ([41f3f8a](41f3f8a575))
* **all:** Enable https in place. ([1c26466](1c26466a00))
* **all:** Group improvements and isolation. ([dcb1c47](dcb1c47f07))
* **all:** Group improvements, group type in from column. ([55fdcbb](55fdcbb9b5))
* **all:** Migration to Linus. ([d8e950c](d8e950c91d))
* **all:** Migration to Linus. ([820942c](820942c41b))
* **all:** Migration to Linus. ([78ed13b](78ed13bb5e))
* **all:** Migration to Linus. ([d2b2f29](d2b2f29d55))
* **all:** Migration to Linus. ([da881cb](da881cbaaf))
* **all:** Migration to Linus. ([241b572](241b572142))
* **all:** Migration to Linus. ([8586ec5](8586ec55cf))
* **all:** Migration to Linus. ([15f9c61](15f9c61983))
* **all:** Migration to Linus. ([54c4769](54c47694f7))
* **all:** Migration to Linus. ([35a4e4d](35a4e4d1d9))
* **all:** Migration to Linus. ([ef5eb6c](ef5eb6cea6))
* **all:** Migration to Linus. ([8dcea93](8dcea9384d))
* **all:** Migration to Linus. ([905690e](905690e987))
* **all:** Migration to Linus. ([fc0f5ae](fc0f5aefe0))
* **all:** MSTeams fixes. ([d6f8574](d6f8574ecb))
* **all:** SEARCH error in MS AZURE (again). ([fb53be5](fb53be5b64))
* **all:** TS issues. ([4a6917a](4a6917a48d))
* **all:** yarn vs npm on MSFT. ([b116026](b1160260b3))
* **all:** yarn vs npm on MSFT. ([97f5f15](97f5f154c0))
* **azuredeployer.gblib:** Fix MSFT changes. ([64d9884](64d9884b69))
* **azuredeployer.gblib:** Fix MSFT changes. ([b017f32](b017f32b04))
* **basic.gblib:** Get all text from webservice inside SEE TEXT keyword. ([932e131](932e131a50))
* **basic.gblib:** Get all text from webservice inside SEE TEXT keyword. ([8d61ae5](8d61ae5536))
* **basic.gblib:** Hear callback for login only active if ENABLE_AUTH is defined. ([a628948](a628948394))
* **basic.gblib:** TALK TO bug after conversationId update. ([b45f737](b45f7372da))
* **basic.gblib:** TALK TO bug after conversationId update. ([250b332](250b3320a2))
* **basic.gblib:** Username was not being retrived. ([0335b71](0335b715cd))
* **core.gbapp:** Added IBM for TTS and removed MSFT while it does not compile on AZR. ([abe4281](abe4281b73))
* **core.gbapp:** Added IBM for TTS and removed MSFT while it does not compile on AZR. ([12c9bea](12c9bea167))
* **core.gbapp:** Added IBM for TTS and removed MSFT while it does not compile on AZR. ([2a81604](2a816049bc))
* **core.gbapp:** Added IBM for TTS and removed MSFT while it does not compile on AZR. ([bef4fea](bef4fea9de))
* **core.gbapp:** Added IBM for TTS and removed MSFT while it does not compile on AZR. ([596a6eb](596a6ebba3))
* **core.gbapp:** Added IBM for TTS and removed MSFT while it does not compile on AZR. ([4dbc1eb](4dbc1eb6a0))
* **core.gbapp:** Fixed no publish of artifacts. ([c12a7d7](c12a7d736c))
* **core.gbapp:** Just compile what has been changed. ([df6f146](df6f146fd9))
* **security.gbalib:** Transfer issues fixed. ([fefcbb0](fefcbb04bf))
* **security.gbalib:** Transfer issues fixed. ([6ebd38d](6ebd38d3eb))
* **security.gbalib:** Transfer issues fixed. ([660faaf](660faafb53))
## [2.0.120](https://github.com/GeneralBots/BotServer/compare/2.0.119...2.0.120) (2021-06-13)
### Bug Fixes
* **all:** .gblib has Package interface to allow export of services. ([8767d0b](8767d0b5f9))
* **all:** Bot factory creation from command line fixed. ([8de9777](8de9777423))
* **all:** CI now can compile docs again. ([d8b17af](d8b17af9e8))
* **all:** General Bots now can show Office documents on projector. ([21117c2](21117c297c))
* **all:** Packages updated and new DirectLine behaviour fixed. ([517689f](517689fafe))
* **all:** Removed security breach. ([0202ed0](0202ed0ef5))
* **all:** Removed security breach. ([dad67d2](dad67d27ba))
* **all:** Sequelize base members demand declare keyword on timestamp fields. ([42719e7](42719e7ba0))
* **all:** Sequelize base members demand declare keyword on timestamp fields. ([493889b](493889beb2))
* **azuredeployer.gbapp:** New pricing table. ([7f641bd](7f641bd5df))
* **basic.gbapp:** Call to SEND FILE with .md files working OK. ([80b91c4](80b91c4370))
* **basic.gblib:** Autostart bug, more logging. ([3d90bd8](3d90bd872e))
* **basic.gblib:** Dialogs are now ending OK. ([c1fe708](c1fe708aa7))
* **basic.gblib:** FIND now has an in-line not found message option. ([584ed55](584ed55f5c))
* **basic.gblib:** Fix BASIC options set by SET instructions. ([80697cf](80697cf944))
* **basic.gblib:** Fix in free tier. ([660d130](660d1309ef))
* **basic.gblib:** Fix in not translating hear. ([66d33cb](66d33cbe39))
* **basic.gblib:** SET MAX LINES now available to user larger files. ([3e13202](3e13202129))
* **basic.gblib:** Startup duplicated messages removed. ([fcc8ce5](fcc8ce5a8b))
* **core.gbapp:** Auto start fixed for wa, teams and web. ([5021e7f](5021e7fcf1))
* **core.gbapp:** Auto start for whatsapp OK. ([9cb4d11](9cb4d11505))
* **core.gbapp:** Boot process fully tested. ([a6d1f90](a6d1f90bbf))
* **core.gbapp:** Fix bot creation. ([5a7895e](5a7895ecd4))
* **core.gbapp:** Fix for autostart. ([5fda86d](5fda86d1fd))
* **core.gbapp:** Fix in launch of start dialog. ([dd40f32](dd40f32cf3))
* **core.gbapp:** Fix WhatsApp start bug. ([e799524](e799524546))
* **core.gbapp:** Fixes in a blank environment creation. ([b0d45c3](b0d45c3212))
* **core.gbapp:** Logging about auto start. ([3d42ab9](3d42ab91bb))
* **core.gbapp:** NLP is not required in startup. ([b120cf6](b120cf6674))
* **core.gbapp:** Start for WhatsApp fixed. ([5ba9df4](5ba9df4e5f))
* **core.gbapp:** Startup fix still testing. ([4268ea9](4268ea9971))
* **core.gbapp:** Translator hierachy param tree is OK. ([94e791c](94e791ca71))
* **default.gbui:** Removed warnings from code. ([473a160](473a160941))
* **default.gbui:** Removed warnings from code. ([d742c00](d742c00567))
* **kb.gbapp:** Apostrophes correctly processed now. ([da8ee93](da8ee93ba7))
* **kb.gbapp:** Fix in Video of .md. ([30cdef6](30cdef67ee))
* **kb.gbapp:** Full HTTPS address in images. ([53a5d8d](53a5d8d692))
* **kb.gbapp:** Markdown OK again for MSTeams. ([5fa88f0](5fa88f0e7e))
* **kb.gbapp:** MD now can play videos. ([a427566](a427566196))
* **kb.gbapp:** Simple search ignoring now ponctuation. ([657dd0b](657dd0b849))
* **security.gbapp:** E-mail used with no spellchecker turned on. ([d2b0a20](d2b0a2073b))
* **whatsapp.gblib:** Field mobile used instead of id in message. ([ac9d065](ac9d065a61))
* **whatsapp.gblib:** Removal of trash in phone ID. ([819b593](819b5937bb))
# [2.0.0](https://github.com/pragmatismo-io/BotServer/compare/1.7.6...2.0.0) (2020-07-12)
### Bug Fixes
* **admin.gbapp:** /publish can be called with no CUI. ([a469d6d](a469d6da6a))
* **admin.gbapp:** Methods implemented again according to the interface. ([17122c7](17122c79a1))
* **all:** semantic-release fixed. ([67279e2](67279e21aa))
* **all:** CI fix. ([448786a](448786ab37))
* **all:** CI Fix. ([3890460](3890460544))
* **all:** CI fixing. ([8537bc1](8537bc190a))
* **all:** package-lock.json fix. ([651f795](651f7953bd))
* **all): Header for prfix(all:** Header for pragmatismo fixed. ([79cca15](79cca15695))
* **analytics.gblib:** Fixes in database storage. ([22f4250](22f4250831))
* **azuredeployer:** BotExists logic fixed. ([8eff335](8eff335e34))
* **azuredeployer.gbapp:** Fix in wheather bot exists on Azure. ([13fdc5a](13fdc5a3ff))
* **core.gbapp:** /publish command fixed. ([7bc83b8](7bc83b8b60))
* **core.gbapp:** Adjustments to MSGraph. ([9968ff6](9968ff6be6))
* **core.gbapp:** Admin protected again, additional checks and adjustments. ([efea36f](efea36f1cc))
* **core.gbapp:** BASIC and KB improvements. ([1bf23cf](1bf23cf4e4))
* **core.gbapp:** BASIC fixed on WhatsApp channel. ([1d316ef](1d316ef83b))
* **core.gbapp:** Better logging and WhatsApp channel detection fix. ([821842c](821842c317))
* **core.gbapp:** Bot creation can be fully automated after MSFT finished their issues. ([f5e0835](f5e0835cc3))
* **core.gbapp:** Check for bot before creation process. ([094eb0f](094eb0f234))
* **core.gbapp:** Check of previous bot name before creation. ([0d3bea8](0d3bea80e0))
* **core.gbapp:** Custom boot dialog only available to boot bot. ([e1ad711](e1ad711904))
* **core.gbapp:** Custom boot dialog only available to boot bot. ([3512335](3512335e5e))
* **core.gbapp:** Custom boot dialog only available to boot bot. ([946a66b](946a66b692))
* **core.gbapp:** Entire Web stack is optional now. ([9652fcd](9652fcdb0b))
* **core.gbapp:** Faster bot creation, fix on WhatsApp switcher. ([8c68332](8c68332802))
* **core.gbapp:** Fix in Bot Analytics. ([ca2de56](ca2de56b06))
* **core.gbapp:** Fix in deploy. ([6a2556e](6a2556e65b))
* **core.gbapp:** Fix in deploy. ([9d5d754](9d5d754d92))
* **core.gbapp:** Fix in deploy. ([c6d3086](c6d3086fa0))
* **core.gbapp:** Fix in startup code in blank. ([2f3756d](2f3756d0d7))
* **core.gbapp:** Fix in undeploy and markdown processsing. ([b477c46](b477c46d9c))
* **core.gbapp:** Fix on .gbdata default reference. ([54ef60b](54ef60b4af))
* **core.gbapp:** GB Apps can now publish bots and replace root web application. ([eed995e](eed995e460))
* **core.gbapp:** GB Apps can now publish bots and replace root web application. ([675c851](675c8511cb))
* **core.gbapp:** Healthly status fixed for WhatsApp. ([7fbb4cc](7fbb4ccc52))
* **core.gbapp:** New async interfaces for .gbapps. ([35ff62f](35ff62ff48))
* **core.gbapp:** New async interfaces for .gbapps. ([5ff38a4](5ff38a4bd3))
* **core.gbapp:** ngrok fixed and startup log improved. ([7b878a3](7b878a3311))
* **core.gbapp:** No more empty tests; reference errors fixed. ([b6e3611](b6e3611636))
* **core.gbapp:** Now converter will not halt server execution. ([41b7837](41b783775c))
* **core.gbapp:** Operator fixed. ([0b55ad8](0b55ad8b7a))
* **core.gbapp:** Optimization of BASIC loading. ([b268882](b268882225))
* **core.gbapp:** Refactoring in MD and Admin Commands. ([3c717c3](3c717c3f0c))
* **core.gbapp:** Refactoring in MD fix in disabling auto-compiling of .gbapps. ([1b8e6be](1b8e6bec1a))
* **core.gbapp:** Refactoring in MD fix in disabling auto-compiling of .gbapps. ([d9857b9](d9857b9880))
* **core.gbapp:** Refactoring in MD fix in disabling auto-compiling of .gbapps. ([ade960a](ade960ac3e))
* **core.gbapp:** Refactoring in MD fix in disabling auto-compiling of .gbapps. ([ab5d507](ab5d507989))
* **core.gbapp:** Removal of invalid file. ([c6b1997](c6b1997a46))
* **core.gbapp:** Review of async calls, specially on collection loops. ([5d6dacc](5d6dacc910))
* **core.gbapp:** Security enhancements and fixes. ([c51ff7a](c51ff7a78f))
* **core.gbapp:** Several fixes and translator swicher. ([cca1488](cca148818e))
* **core.gbapp:** Switch of bots working by activationCode. ([7b84ee1](7b84ee112d))
* **core.gbapp:** Translator is working with correct backend URL. ([7f3c9fa](7f3c9fa223))
* **core.gbapp:** Translator now can be switched off by using Excel. ([ad1bea1](ad1bea141d))
* **core.gbapp:** Updating package versions. ([597a3bc](597a3bceb9))
* **core.gbapp:** Updating package versions. ([70883b0](70883b024c))
* **core.gbapp:** Use of BOT_URL instead of relying on AZ. ([9e15b03](9e15b03d04))
* **core.gbapp:** WebChat now can be made private. ([99b5a4a](99b5a4a2e9))
* **customer-satisfaction.gbapp:** Improvements on answer. ([db85582](db8558254f))
* **default.gbui:** Logo now showing in any screen. ([288aea8](288aea86ba))
* **default.gbui:** Temp. rem. of fingerprint2 lib. ([414f29c](414f29c1d2))
* **kb.gbapp:** Content plain text to other channels when no projector is avilable. ([283e596](283e596c80))
* **kb.gbapp:** MSFT Translator will not break MD. ([6523134](6523134826))
* **kb.gbapp:** New params from root bot. ([f3a32d0](f3a32d04b4))
* **kb.gbapp:** Search score now is derived from root. ([b68adc3](b68adc3627))
* **whatsapp.gbapp:** Shared root instance with others. ([fee1528](fee152848e))
* **whatsapp.gblib:** await fix. ([4addca4](4addca4dc1))
* **whatsapp.gblib:** await fix. ([5015fb1](5015fb15fb))
* **whatsapp.gblib:** Fix in sendFile. ([c36640e](c36640e519))
* **whatsapp.gblib:** Fix of missing mobile number. ([6306274](6306274db9))
* **whatsapp.gblib:** Fixed symbol erros and added timeout to WhatsApp initialization. ([895fc57](895fc57097))
* **whatsapp.gblib:** Improved error message. ([1ec645f](1ec645f148))
* **whatsapp.gblib:** Improved multibot behavior sharing Whatsapp config. ([fc49707](fc4970760a))
* **whatsapp.gblib:** Send file now working again. ([3abe85c](3abe85ca30))
* **whatsapp.gblib:** Speech is now full duplex. ([6442ebf](6442ebf983))
* **whatsapp.gblib:** Transfer bug fix. ([ed15c85](ed15c856c5))
* FIX: Webchat now receives a private token.
* FIX: OAuth2 now has got revised and included state to avoid CSRF attacks.
* FIX: Now server will only start with a secure administration password.
<!-- File a GitHub issue only for bugs or feature requests related to the code**in this repository**. For other topics you can get more information in the README file. -->
### Observed Results:
<!-- This could be a description, error output, steps to reproduce, a feature missed, etc. -->
"description":"Enables Agents to interact with and retrieve data from Azure Cosmos DB accounts.",
"icon":"azure-cosmos-db",
"type":"Local",
"category":"Database",
"provider":"Microsoft"
},
{
"id":"azure-database-postgresql",
"name":"Azure Database for PostgreSQL",
"description":"Enables Agents to interact with and retrieve data from Azure Database for PostgreSQL resources using natural language prompts.",
"icon":"azure-database-postgresql",
"type":"Local",
"category":"Database",
"provider":"Microsoft"
},
{
"id":"azure-databricks-genie",
"name":"Azure Databricks Genie",
"description":"Azure Databricks Genie MCP server lets AI agents connect to Genie spaces so users can ask natural language questions and get specialized answers from their data easily.",
"icon":"azure-databricks-genie",
"type":"Remote",
"category":"Analytics",
"provider":"Microsoft"
},
{
"id":"azure-managed-redis",
"name":"Azure Managed Redis",
"description":"Azure Managed Redis MCP Server provides a natural language interface for agentic apps to interact with Azure Managed Redis—a high-speed, in-memory datastore that is ideal for low-latency use cases like agent memory, vector data store and semantic caching.",
"icon":"azure-managed-redis",
"type":"Local",
"category":"Database",
"provider":"Microsoft"
},
{
"id":"azure-sql",
"name":"Azure SQL MCP Server",
"description":"A secure, self-hosted MCP for interacting with SQL data (Azure SQL, SQL MI, SQL DW, SQL Server).",
"icon":"azure-sql",
"type":"Local",
"category":"Database",
"provider":"Microsoft"
},
{
"id":"elasticsearch",
"name":"Elasticsearch",
"description":"Search, retrieve, and analyze Elasticsearch data in developer and agentic workflows.",
"icon":"elasticsearch",
"type":"Remote",
"category":"Search",
"provider":"Elastic"
},
{
"id":"mongodb",
"name":"MongoDB MCP Server",
"description":"MongoDB MCP Server allows any MCP-aware LLM to connect to MongoDB Atlas for admin tasks and to MongoDB databases for data operations, all through natural language.",
"icon":"mongodb",
"type":"Local",
"category":"Database",
"provider":"MongoDB"
},
{
"id":"pinecone-assistant",
"name":"Pinecone Assistant MCP Server",
"description":"Pinecone Assistant MCP server helps prototype and deploy assistants that retrieve context-aware answers grounded in proprietary data.",
"icon":"pinecone",
"type":"Remote",
"category":"Vector Database",
"provider":"Pinecone"
},
{
"id":"vercel",
"name":"Vercel",
"description":"With Vercel MCP, you can explore projects, inspect failed deployments, fetch logs, and more right from your AI client.",
"icon":"vercel",
"type":"Remote",
"category":"Deployment",
"provider":"Vercel"
},
{
"id":"amplitude",
"name":"Amplitude MCP Server",
"description":"Search, access, and get insights on your Amplitude product analytics data.",
"icon":"amplitude",
"type":"Remote",
"category":"Analytics",
"provider":"Amplitude"
},
{
"id":"atlan",
"name":"Atlan",
"description":"The Atlan MCP server provides a set of tools that enable AI agents to work directly with Atlan metadata. These tools supply real-time context to AI environments, making it easier to search, explore, and update metadata without leaving your workflow.",
"icon":"atlan",
"type":"Remote",
"category":"Data Catalog",
"provider":"Atlan"
},
{
"id":"atlassian",
"name":"Atlassian",
"description":"Connect to Jira and Confluence for issue tracking and documentation.",
"icon":"atlassian",
"type":"Remote",
"category":"Productivity",
"provider":"Atlassian"
},
{
"id":"azure-language-foundry",
"name":"Azure Language in Foundry Tools",
"description":"The MCP server enables AI agents to access Azure Language in Foundry Tools for accurate, explainable and compliant NLP capabilities.",
"icon":"azure-language",
"type":"Remote",
"category":"AI/ML",
"provider":"Microsoft"
},
{
"id":"azure-speech",
"name":"Azure Speech MCP Server",
"description":"A hosted MCP server that exposes Azure Speech capabilities (speech-to-text, text-to-speech and streaming speech I/O) to agents and LLM workflows.",
"icon":"azure-speech",
"type":"Remote",
"category":"AI/ML",
"provider":"Microsoft"
},
{
"id":"box",
"name":"Box MCP Server",
"description":"Access and manage your Box content with AI-powered tools for file operations, collaboration, and metadata extraction.",
"icon":"box",
"type":"Remote",
"category":"Storage",
"provider":"Box"
},
{
"id":"cast-imaging",
"name":"CAST Imaging MCP Server",
"description":"Deterministic mapping of application architecture and code objects to support discovery, impact analysis, and technical debt remediation.",
"icon":"cast-imaging",
"type":"Remote",
"category":"DevOps",
"provider":"CAST"
},
{
"id":"celonis",
"name":"Celonis PI Graph MCP Server",
"description":"Agent toolkit that provides process intelligence context, action triggering, and write-back capabilities into Celonis.",
"icon":"celonis",
"type":"Remote",
"category":"Process Mining",
"provider":"Celonis"
},
{
"id":"exa",
"name":"Exa Web Search",
"description":"Exa MCP is a powerful web search and web crawling MCP. It lets you do real-time web searches, extract content from any URL, and even run deep research for detailed reports.",
"icon":"exa",
"type":"Remote",
"category":"Search",
"provider":"Exa"
},
{
"id":"factory-rca",
"name":"Factory RCA MCP",
"description":"Toolset for manufacturing root-cause analysis, anomaly detection, and telemetry-driven recommendations.",
"icon":"factory",
"type":"Remote",
"category":"Manufacturing",
"provider":"Factory"
},
{
"id":"github",
"name":"GitHub",
"description":"Access GitHub repositories, issues, and pull requests through secure API integration. If you need the GitHub MCP server to access your private repo, make sure you have installed the GitHub app.",
"icon":"github",
"type":"Remote",
"category":"Development",
"provider":"GitHub"
},
{
"id":"huggingface",
"name":"Hugging Face MCP Server",
"description":"Search through millions of Hugging Face models, datasets, applications and research papers, and use the Spaces applications you've selected.",
"icon":"huggingface",
"type":"Remote",
"category":"AI/ML",
"provider":"Hugging Face"
},
{
"id":"infobip-rcs",
"name":"Infobip RCS MCP server",
"description":"Infobip RCS MCP server enables seamless integration with our communication platform that allows you to reach your customers globally through RCS.",
"icon":"infobip",
"type":"Remote",
"category":"Communication",
"provider":"Infobip"
},
{
"id":"infobip-sms",
"name":"Infobip SMS MCP server",
"description":"The Infobip SMS MCP server enables agentic and developer workflows to send and manage SMS messages through Infobip's platform.",
"icon":"infobip",
"type":"Remote",
"category":"Communication",
"provider":"Infobip"
},
{
"id":"infobip-whatsapp",
"name":"Infobip WhatsApp MCP server",
"description":"Infobip WhatsApp MCP server enables seamless integration with our communication platform that allows you to reach your customers globally through WhatsApp.",
"icon":"infobip",
"type":"Remote",
"category":"Communication",
"provider":"Infobip"
},
{
"id":"intercom",
"name":"Intercom MCP Server",
"description":"Secure, read-only access to Intercom conversations and contacts for MCP-compatible AI tools.",
"icon":"intercom",
"type":"Remote",
"category":"Customer Support",
"provider":"Intercom"
},
{
"id":"marketnode",
"name":"Marketnode MCP Server",
"description":"AI-powered document data extraction, workflow automation, transaction management and tokenization for financial institutions and enterprises.",
"icon":"marketnode",
"type":"Remote",
"category":"Finance",
"provider":"Marketnode"
},
{
"id":"foundry",
"name":"Foundry MCP Server (preview)",
"description":"Foundry MCP Server (preview) offers instant access to model exploration, deployment of models and agents, and performance evaluation. This fully cloud-native MCP server is integrated with Visual Studio Code and Foundry agents, and secured by Microsoft Entra ID, RBAC, and tenant-level conditional access with Azure Policy for enterprise control.",
"icon":"foundry",
"type":"Remote",
"category":"AI/ML",
"provider":"Microsoft"
},
{
"id":"microsoft-enterprise",
"name":"Microsoft MCP Server for Enterprise",
"description":"Official Microsoft MCP Server to query Microsoft Entra data using natural language.",
"icon":"microsoft",
"type":"Remote",
"category":"Enterprise",
"provider":"Microsoft"
},
{
"id":"mihcm",
"name":"MiHCM MCP Server",
"description":"Provides secure access to employee and leave management data from the MiHCM HR platform through standardized MCP server.",
"icon":"mihcm",
"type":"Remote",
"category":"HR",
"provider":"MiHCM"
},
{
"id":"morningstar",
"name":"Morningstar MCP Server",
"description":"Access Morningstar data, research, and capabilities through specialized MCP tools for global securities.",
"icon":"morningstar",
"type":"Remote",
"category":"Finance",
"provider":"Morningstar"
},
{
"id":"microsoft-sentinel",
"name":"Microsoft Sentinel Data Exploration",
"description":"The data exploration tool collection in the Microsoft Sentinel MCP server lets you search for relevant tables and retrieve data from Microsoft Sentinel's data lake using natural language.",
"icon":"microsoft-sentinel",
"type":"Remote",
"category":"Security",
"provider":"Microsoft"
},
{
"id":"microsoft-learn",
"name":"Microsoft Learn",
"description":"AI assistant with real-time access to official Microsoft documentation.",
"icon":"microsoft-learn",
"type":"Remote",
"category":"Documentation",
"provider":"Microsoft"
},
{
"id":"neon",
"name":"Neon",
"description":"Manage and query Neon Postgres databases with natural language.",
"icon":"neon",
"type":"Remote",
"category":"Database",
"provider":"Neon"
},
{
"id":"netlify",
"name":"Netlify",
"description":"Deploy, secure, and manage websites with Netlify.",
"icon":"netlify",
"type":"Remote",
"category":"Deployment",
"provider":"Netlify"
},
{
"id":"pipedream",
"name":"Pipedream",
"description":"Securely connect to 10,000+ tools from 3,000+ APIs with Pipedream MCP.",
"icon":"pipedream",
"type":"Remote",
"category":"Integration",
"provider":"Pipedream"
},
{
"id":"postman",
"name":"Postman",
"description":"Postman's remote MCP server connects AI agents, assistants, and chatbots directly to your APIs on Postman.",
"icon":"postman",
"type":"Remote",
"category":"API",
"provider":"Postman"
},
{
"id":"sophos-intelix",
"name":"Sophos Intelix MCP Server",
"description":"Sophos Intelix delivers threat intelligence into analyst workflows, enabling agents to access file, URL, and IP reputation and threat analysis.",
"icon":"sophos",
"type":"Remote",
"category":"Security",
"provider":"Sophos"
},
{
"id":"stripe",
"name":"Stripe",
"description":"Payment processing and financial infrastructure tools.",
"icon":"stripe",
"type":"Remote",
"category":"Payments",
"provider":"Stripe"
},
{
"id":"supabase",
"name":"Supabase",
"description":"Connect your Supabase projects to AI agents: design tables and migrations; create database branches; build custom APIs with Edge Functions; retrieve logs and more.",
"icon":"supabase",
"type":"Remote",
"category":"Database",
"provider":"Supabase"
},
{
"id":"tavily",
"name":"Tavily MCP",
"description":"Real-time web search, extraction, crawling and mapping tools for agentic workflows with source citations.",
"icon":"tavily",
"type":"Remote",
"category":"Search",
"provider":"Tavily"
},
{
"id":"tomtom",
"name":"TomTom Maps",
"description":"Give your application real-time geospatial context from TomTom — including maps, routing, search, geocoding and traffic.",
"icon":"tomtom",
"type":"Remote",
"category":"Maps",
"provider":"TomTom"
},
{
"id":"wix",
"name":"Wix MCP",
"description":"Unified access to Wix's development ecosystem for documentation, implementation, and site management.",
"icon":"wix",
"type":"Remote",
"category":"Web Development",
"provider":"Wix"
},
{
"id":"10to8",
"name":"10to8 Appointment Scheduling",
"description":"10to8 is a powerful appointment management, communications & online booking system.",
"icon":"10to8",
"type":"Custom",
"category":"Scheduling",
"provider":"10to8"
},
{
"id":"1docstop",
"name":"1DocStop",
"description":"The best document management system for your web & mobile apps. Store, Manage, and Access all your documents whenever and wherever you are.",
"icon":"1docstop",
"type":"Custom",
"category":"Document Management",
"provider":"1DocStop"
},
{
"id":"1me-corporate",
"name":"1Me Corporate",
"description":"1Me is the easiest and fastest way to share your contact information. With 1Me, you can have an unlimited number of contact cards.",
"icon":"1me",
"type":"Custom",
"category":"Contact Management",
"provider":"1Me"
},
{
"id":"1pt",
"name":"1pt (Independent Publisher)",
"description":"1pt is a URL shortening service and hosts over 15,000+ redirects with 200,000+ visits.",
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Writing general pieces of code so it can be widely used.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Call a person other name than that declared by the person
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Pragmatismo.io security team at security@pragmatismo.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[Search the existing issues](https://github.com/pragmatismo-io/BotServer/issues) before logging a new one.
## 2. Do you have a question?
Please use the issue tracker for bugs and suggestions.
If you have a *question*, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/botserver)
## 3. Did you find a bug?
We are not surprised, we're still in early preview so there are plenty of them right now.
When logging a bug, please be sure to include the following:
* The platform you were using
* If at all possible, an *isolated* way to reproduce the behavior
* The behavior you expect to see, and the actual behavior
## 4. Do you have a suggestion?
We also accept suggestions in the issue tracker.
In general, things we find useful when reviewing suggestions are:
* A description of the problem you're trying to solve
* An overview of the suggested solution
* Examples of how the suggestion would work in various places
# Instructions for Contributing Code
## Contributing bug fixes
General Bots is current in early preview. We're still accepting contributions in the form of bug fixes.
A bug must have an issue tracking it in the issue tracker that has been approved by the Pragmatismo.io team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.
## Contributing features
Please open an issue with the `Schema` label to get a discussion started.
## Legal
We appreciate community contributions to code repositories open sourced by Pragmatismo.io. By signing a contributor license agreement, we ensure that the community is free to use your contributions.
## Housekeeping
Your pull request should:
* Include a description of what your change intends to do
* Be a child commit of a reasonably recent commit in the **master** branch
* Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR)
* Have clear commit messages
* e.g. "Refactor feature", "Fix issue", "Add tests for issue"
General Bots is a **self-hosted AI automation platform** and strongly-typed LLM conversational platform focused on convention over configuration and code-less approaches. It serves as the core API server handling LLM orchestration, business logic, database operations, and multi-channel communication.
For comprehensive documentation, see **[docs.pragmatismo.com.br](https://docs.pragmatismo.com.br)** or the **[BotBook](../botbook)** for detailed guides, API references, and tutorials.
General Bot is a package based chat bot server focused in convention over configuration and code-less approaches, which brings software packages and application server concepts to help parallel bot development.
- **Rust** (1.75+) - [Install from rustup.rs](https://rustup.rs/)
- **Git** - [Download from git-scm.com](https://git-scm.com/downloads)
- **Mold** - `sudo apt-get install mold`
* See how easy is to use 'hear' and 'talk' to build Microsoft BOT Framework v4 logic with plain BASIC * published on December 3rd, 2018.
### Installation
[](https://www.youtube.com/watch?v=yX1sF9n9628)
cargo run -- --noconsole # Background service mode
cargo run -- --desktop # Desktop application (Tauri)
cargo run -- --tenant <name> # Specify tenant
cargo run -- --container # LXC container mode
```
Custom dialogs for reseting user password in Azure Active Directory, Office 365, Dynamics 365 or any app published through Azure AD. See also [IntranetBotQuickStart.gbai](https://github.com/pragmatismo-io/IntranetBotQuickStart.gbai) and related MSDN article **[Applied AI – Using a Bot for Password Reset](https://blogs.msdn.microsoft.com/buckwoody/2018/09/25/applied-ai-using-a-bot-for-password-reset)** by *Rodrigo Souza*.
---
## ✨ Key Features
### Bot Administrator - Setup Security
### Multi-Vendor LLM API
Unified interface for OpenAI, Groq, Claude, Anthropic, and local models.
So the Bot provides an **admin** mode allowing the user having the Directory.AccessAsUser.All permission to be logged on Administrative interface to obtain and save its token into the database.
### MCP + LLM Tools Generation
Instant tool creation from code and functions - no complex configurations.
USE KB "kb-name" ' Load knowledge base into vector database
CLEAR KB "kb-name" ' Remove KB from session
USE TOOL "tool-name" ' Make tool available to LLM
CLEAR TOOLS ' Remove all tools from session
```
general-bots-reset-ad-password.gif
### Example Bot
#### Reset password via Skype
```basic
' customer-support.bas
USE KB "support-docs"
USE TOOL "create-ticket"
USE TOOL "check-order"
This is the case when user does not have the password to login on Skype for Business or Teams, and they need to reset their password, so the right tool is Skype.
SET CONTEXT "support" AS "You are a helpful customer support agent."

GeneralBots aims to delivery bots in azure in a very easy and fast fashion. Use Office tools like Word or Excel to edit your Bot - using code (JavaScript or TypeScript) just to empower custom requirements.
### Error Responses - Use ErrorSanitizer
```rust
// ❌ WRONG
Json(json!({ "error": e.to_string() }))
format!("Database error: {}", e)
// ✅ CORRECT
use crate::security::error_sanitizer::log_and_sanitize;
let sanitized = log_and_sanitize(&e, "context", None);
(StatusCode::INTERNAL_SERVER_ERROR, sanitized)
```
---
#### Use Excel for (Hierarchical) Knowledge Base Editing
## ✅ Mandatory Code Patterns

### Format Strings - Inline Variables
#### Use Visual Studio for a complete .gbai package building system
```rust
// ❌ WRONG
format!("Hello {}", name)

// ✅ CORRECT
format!("Hello {name}")
```
### Self Usage in Impl Blocks
How To
------
```rust
// ❌ WRONG
impl MyStruct {
fn new() -> MyStruct { MyStruct { } }
}
### Run the server locally
// ✅ CORRECT
impl MyStruct {
fn new() -> Self { Self { } }
}
```
1. Install [Node.js](https://www.npmjs.com/get-npm) the current generation General Bot code execution platform;
2. Open a **Terminal** on Linux and Mac or a **Command Prompt** window on Windows;
3. Type `npm install -g botserver` and press *ENTER*;
4. Type `gbot` to run the server core.
### Derive Eq with PartialEq
Notes:
```rust
// ❌ WRONG
#[derive(PartialEq)]
struct MyStruct { }
* [*nodejs.install* Chocolatey Package](https://chocolatey.org/packages/nodejs.install) is also available.
* The zip source code of General Bot is also available for [Download](https://codeload.github.com/pragmatismo-io/BotServer/zip/master);
// ✅ CORRECT
#[derive(PartialEq, Eq)]
struct MyStruct { }
```
### Configure the server to deploy specific directory
### Option Handling
1. Create/Edit the .env file and add the ADDITIONAL_DEPLOY_PATH key pointing to the .gbai local parent folder of .gbapp, .gbot, .gbtheme, .gbkb package directories.
2. Specify STORAGE_SYNC to TRUE so database sync is run when the server is run.
3. In case of Microsoft SQL Server add the following keys: STORAGE_SERVER, STORAGE_NAME, STORAGE_USERNAME, STORAGE_PASSWORD, STORAGE_DIALECT to `mssql`.
```rust
// ✅ CORRECT
opt.unwrap_or(default)
opt.unwrap_or_else(|| compute_default())
opt.map_or(default, |x| transform(x))
```
Note:
### Chrono DateTime
* You can specify several bots separated by semicolon, the BotServer will serve all of them at once.
4. Install [Visual Studio Code](https://chocolatey.org/packages/nodejs.install), Brackets or Atom as an editor of your choice;
5. [Fork](https://en.wikipedia.org/wiki/Fork_(software_development)) by visiting https://github.com/pragmatismo-io/BotServer/fork
6. Clone the just forked repository by running `git clone <your-forked-repository-url>/BotServer.git` ;
7. Run `npm install -g typescript`;
8. Run `npm install` on Command Prompt or PowerShell on the General Bot source-code folder;
9. Enter './packages/default.gbui' folder;
10. Run `npm install` folled by `npm run build` (To build default Bot UI);
11. Enter the On the downloaded folder (../..);
12. Compile the bot server by `tsc`.
13. Run the bot server by `npm start`.
---
Note:
## 📏 File Size Limits - MANDATORY
* Whenever you are ready to turn your open-source bot ideas in form of .gbapp (source-code) and artifacts like .gbkb, .gbtheme, .gbot or the .gbai full package read [CONTRIBUTING.md](https://github.com/pragmatismo-io/BotServer/blob/master/CONTRIBUTING.md) about performing Pull Requests (PR) and creating other public custom packages repositories of your own personal or organization General Bot Community Edition powered packages.
### Maximum 450 Lines Per File
### Running unit tests
When a file grows beyond this limit:
1. Enter the BotServer root folder.
2. Run tests by `npm test`.
1. **Identify logical groups** - Find related functions
The subjects.json file contains all information related to the subject tree and can be used to build the menu carrousel as well give a set of words to be used as subject catcher in the conversation. A hierarchy can be specified.
### Creating a new Theme folder (.gbtheme folder)
A theme is composed of some CSS files and images. That set of files can change
everything in the General Bot UI. Use them extensively before going to change
the UI application itself (HTML & JS).
---
Package Types
-------------
## 🗄️ Database Standards
### .gbai
- **TABLES AND INDEXES ONLY** (no stored procedures, nothing, no views, no triggers, no functions)
- **JSON columns:** use TEXT with `_json` suffix
- **ORM:** Use diesel - no sqlx
- **Migrations:** Located in `botserver/migrations/`
Embraces all packages types (content, logic & conversation) into a pluggable bot
directory. [A sample .gbai is available](https://github.com/pragmatismo-io/IntranetBotQuickStart.gbai).
---
### .gbapp
## 🎨 Frontend Rules
The artificial intelligence extensions in form of pluggable apps. Dialogs,
Services and all model related to data. A set of interactions, use cases,
integrations in form of conversationals dialogs.
The .gbapp adds the General Bot base library (botlib) for building Node.js TypeScript Apps packages.
- **Use HTMX** - minimize JavaScript
- **NO external CDN** - all assets local
- **Server-side rendering** with Askama templates
---
Four components builds up a General Bot App:
## 📦 Key Dependencies
* dialogs
* models
* services
* tests
| Library | Version | Purpose |
|---------|---------|---------|
| axum | 0.7.5 | Web framework |
| diesel | 2.1 | PostgreSQL ORM |
| tokio | 1.41 | Async runtime |
| rhai | git | BASIC scripting |
| reqwest | 0.12 | HTTP client |
| serde | 1.0 | Serialization |
| askama | 0.12 | HTML Templates |
#### Dialogs
---
All code contained in a dialog builds the flow to custom conversations in
built-in and additional packages .
## 🚀 CI/CD Workflow
When configuring CI/CD pipelines (e.g., Forgejo Actions):
#### Models
- **Minimal Checkout**: Clone only the root `gb` and the `botlib` submodule. Do NOT recursively clone everything.
- **BotServer Context**: Replace the empty `botserver` directory with the current set of files being tested.
Models builds the foundation of data relationships in form of entities.
**Example Step:**
```yaml
- name: Setup Workspace
run: |
# 1. Clone only the root workspace configuration
git clone --depth 1 <your-git-repo-url> workspace
# 2. Setup only the necessary dependencies (botlib)
cd workspace
git submodule update --init --depth 1 botlib
cd ..
# 3. Inject current BotServer code
rm -rf workspace/botserver
mv botserver workspace/botserver
```
#### Services
---
Services are a façade for bot back-end logic and other custom processing.
## 📚 Documentation
#### Tests
### Documentation Structure
Tests try to automate code execution validation before crashing in production.
```
docs/
├── api/ # API documentation
│ ├── README.md # API overview
│ ├── rest-endpoints.md # HTTP endpoints
│ └── websocket.md # Real-time communication
├── guides/ # How-to guides
│ ├── getting-started.md # Quick start
│ ├── deployment.md # Production setup
│ └── templates.md # Using templates
└── reference/ # Technical reference
├── basic-language.md # BASIC keywords
├── configuration.md # Config options
└── architecture.md # System design
```
### Additional Resources
### .gbot
- **[docs.pragmatismo.com.br](https://docs.pragmatismo.com.br)** - Full online documentation
- **[BotBook](../botbook)** - Local comprehensive guide with tutorials and examples
- **[API Reference](docs/api/README.md)** - REST and WebSocket endpoints
| [bottemplates](https://github.com/GeneralBots/bottemplates) | Templates and examples |
### .gbkb
---
A set of subjects that bot knows in a form of hierarchical menu-based QnA. [A sample .gbkb is available](https://github.com/pragmatismo-io/ProjectOnline.gbkb).
## 🛡️ Security
### .gblib
- **AGPL-3.0 License** - True open source with contribution requirements
- **Self-hosted** - Your data stays on your infrastructure
- **Enterprise-grade** - 5+ years of stability
- **No vendor lock-in** - Open protocols and standards
Shared code that can be used across bot apps.
Report security issues to: **security@pragmatismo.com.br**
Reference
---------
---
### GeneralBots admin commands
## 🤝 Contributing
General Bot can be controlled by the same chat window people talk to, so
here is a list of admin commands related to deploying .gb* files.
We welcome contributions! Please read our contributing guidelines before submitting PRs.
- **PARAMETERIZED SQL** - Never format! for queries
- **VALIDATE COMMANDS** - Never pass raw user input
- **INLINE FORMAT ARGS** - `format!("{name}")` not `format!("{}", name)`
- **USE SELF** - In impl blocks, use Self not type name
- **FILE SIZE LIMIT** - Max 450 lines per file, refactor at 350 lines
- **Version 6.2.0** - Do not change without approval
- **GIT WORKFLOW** - ALWAYS push to ALL repositories (github, pragmatismo)
Powered by Microsoft [BOT Framework](https://dev.botframework.com/) and [Azure](http://www.azure.com).
---
General Bot Code Name is [Guaribas](https://en.wikipedia.org/wiki/Guaribas), the name of a city in Brasil, state of Piaui.
[Roberto Mangabeira Unger](http://www.robertounger.com/en/): "No one should have to do work that can be done by a machine".
## 🚨 Immediate Action Required
## Contributing
1. **Replace 955 unwrap()/expect() calls** with proper error handling
2. **Optimize 12,973 clone()/to_string() calls** for performance
3. **Refactor 5 large files** following refactoring plan
4. **Add missing error handling** in critical paths
5. **Implement proper logging** instead of panicking
This project welcomes contributions and suggestions.
See our [Contribution Guidelines](https://github.com/pragmatismo-io/BotServer/blob/master/CONTRIBUTING.md) for more details.
---
## Reporting Security Issues
## 📄 License
Security issues and bugs should be reported privately, via email, to the Pragmatismo.io Security
team at [security@pragmatismo.io](mailto:security@pragmatismo.io). You should
receive a response within 24 hours. If for some reason you do not, please follow up via
email to ensure we received your original message.
General Bot Copyright (c) pragmatismo.com.br. All rights reserved.
Licensed under the **AGPL-3.0**.
## License & Warranty
According to our dual licensing model, this program can be used either under the terms of the GNU Affero General Public License, version 3, or under a proprietary license.
General Bot Copyright (c) Pragmatismo.io. All rights reserved.
Licensed under the AGPL-3.0.
According to our dual licensing model, this program can be used either
under the terms of the GNU Affero General Public License, version 3,
or under a proprietary license.
The texts of the GNU Affero General Public License with an additional
permission and of our proprietary license can be found at and
in the LICENSE file you have received along with this program.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
"General Bot" is a registered trademark of Pragmatismo.io.
The licensing of the program under the AGPLv3 does not imply a
trademark license. Therefore any rights, title and interest in
our trademarks remain entirely with us.
---
## 🔗 Links
<ahref="https://stackoverflow.com/questions/ask?tags=generalbots">:speech_balloon: Ask a question</a> <ahref="/docs">:book: Read the Docs</a>
| [IntranetBotQuickStart-gbai](https://github.com/pragmatismo-io/IntranetBotQuickStart.gbai) | Free modules from General Bots Intranet based bot. |
| [AzureADPasswordReset-gbapp](https://github.com/pragmatismo-io/AzureADPasswordReset.gbapp) | Custom General Bot App (gbapp) for resetting an user password in Azure Active Directory, Office 365, Dynamics 365 or any app published through Azure AD. |
| [ProjectOnline.gbkb](https://github.com/pragmatismo-io/ProjectOnline.gbkb) | The .gbkb file demonstring a Knowledge Base for Pragmatismo.io KBot for Microsoft Project. |
decision = ASK BOT "content-moderator" ABOUT "Review this user comment for policy violations"
```
### Bot Capabilities
✅ **Can:**
- Analyze complex situations
- Remember conversation history
- Use multiple tools internally
- Provide detailed explanations
- Handle edge cases
## Real-World Example: Order Processing
### Scenario
Customer contacts support: *"My laptop order #12345 arrived broken. I need this fixed immediately as I have a presentation tomorrow."*
### Tool-Only Approach (Limited)
```basic
' Simple but inflexible
USE TOOL "check-order"
order = CALL TOOL "check-order" WITH order_id="12345"
USE TOOL "check-warranty"
warranty = CALL TOOL "check-warranty" WITH order_id="12345"
IF order.status = "delivered" AND warranty.valid = true THEN
TALK "You're eligible for replacement"
ELSE
TALK "Please contact manager"
END IF
```
**Problems:**
- No understanding of urgency ("presentation tomorrow")
- No consideration of customer history
- Rigid, rule-based responses
- Cannot handle edge cases
### Bot Approach (Intelligent)
```basic
' Intelligent and flexible
ADD BOT "support-specialist"
response = ASK BOT "support-specialist" ABOUT "Customer says laptop order #12345 arrived broken. They have presentation tomorrow and need immediate help."
```
**Bot's internal reasoning:**
1. Uses `check-order` tool → Order delivered 2 days ago, $1,299 laptop
5. **Considers options** → Replacement (2-day shipping) vs immediate refund for local purchase
6. **Makes recommendation** → "Given urgency and VIP status, authorize immediate refund so customer can buy locally, plus expedited replacement as backup"
## Hybrid Approach: Best of Both Worlds
**Recommended pattern: Bots use Tools internally**
```basic
' support-specialist.bas - Bot implementation
USE TOOL "check-order"
USE TOOL "check-warranty"
USE TOOL "customer-history"
USE TOOL "inventory-check"
USE KB "support-policies"
WHEN ASKED ABOUT order_issue DO
' Gather data using tools (fast, cheap)
order = CALL TOOL "check-order" WITH order_id
warranty = CALL TOOL "check-warranty" WITH order_id
customer = CALL TOOL "customer-history" WITH customer_id
' Apply AI reasoning (intelligent, contextual)
urgency = ANALYZE urgency FROM user_message
customer_value = CALCULATE value FROM customer.total_orders
IF urgency = "high" AND customer_value = "vip" THEN
recommendation = "Expedited resolution with manager approval"
ELSE IF warranty.type = "premium" THEN
recommendation = "Standard replacement process"
ELSE
recommendation = "Store credit or repair option"
END IF
RETURN detailed_response WITH reasoning AND next_steps
END WHEN
```
## Performance Guidelines
### Tool Performance
- **Latency:** 10-100ms
- **Cost:** $0 (no LLM calls)
- **Throughput:** 1000+ operations/second
- **Use for:** High-frequency, simple operations
### Bot Performance
- **Latency:** 1-5 seconds
- **Cost:** $0.001-0.01 per interaction
- **Throughput:** 10-100 interactions/second
- **Use for:** Complex, high-value decisions
## Decision Framework
### Use TOOL when:
1. **Operation is deterministic** - Same input always produces same output
2. **Speed is critical** - Real-time responses needed
3. **Cost matters** - High-frequency operations
4. **Data is structured** - Clear input/output format
decision = ASK BOT "refund-specialist" ABOUT "Customer wants refund but policy expired, they're threatening bad review"
```
### 2. Cache Bot Responses
```basic
' Expensive bot call
ADD BOT "product-recommender"
recommendations = ASK BOT "product-recommender" ABOUT "Best laptop for gaming under $1000"
' Cache result for similar queries
REMEMBER "gaming-laptop-under-1000" AS recommendations
```
### 3. Fallback Patterns
```basic
' Try bot first, fallback to tool
TRY
response = ASK BOT "smart-assistant" ABOUT user_query
CATCH bot_error
' Fallback to simple tool
response = CALL TOOL "keyword-search" WITH query=user_query
END TRY
```
## Summary
**Tools** are your **workhorses** - fast, reliable, cost-effective for data operations.
**Bots** are your **brain trust** - intelligent, contextual, perfect for complex decisions.
**Hybrid approach** gives you the best of both: use tools for speed and bots for intelligence.
Choose based on your specific needs:
- Need speed? → Tool
- Need intelligence? → Bot
- Need both? → Bot that uses tools
The key is understanding that **tools and bots complement each other** - they're not competing solutions, but different tools for different jobs in your AI automation toolkit.
---
**Next:** [Chapter 5: Building Multi-Agent Workflows](workflows.md)
/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */
audio:not([controls]){display:none;height:0;}
/** Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. Known issue: no IE 6 support. */
[hidden]{display:none;}
/* ========================================================================== Base ========================================================================== */
/** 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using `em` units. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */
/** Address font sizes and margins set differently in IE 6/7. Address font sizes within `section` and `article` in Firefox 4+, Safari 5, and Chrome. */
/** Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */
figure,form{margin:0;}
/* ========================================================================== Forms ========================================================================== */
/** Correct margin displayed oddly in IE 6/7. */
/** Define consistent border, margin, and padding. */
/** 1. Correct font size not being inherited in all browsers. 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, and Chrome. 3. Improve appearance and consistency in all browsers. */
/** Address Firefox 3+ setting `line-height` on `input` using `!important` in the UA stylesheet. */
button,input{line-height:normal;}
/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. Correct `select` style inheritance in Firefox 4+ and Opera. */
button,select{text-transform:none;}
/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. 4. Remove inner spacing in IE 7 without affecting normal text inputs. Known issue: inner spacing remains in IE 6. */
/** 1. Address box sizing set to content-box in IE 8/9. 2. Remove excess padding in IE 8/9. 3. Remove excess padding in IE 7. Known issue: excess padding remains in IE 6. */
/** 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome (include `-moz` to future-proof). */
/** Remove inner padding and search cancel button in Safari 5 and Chrome on OS X. */
/** Remove inner padding and border in Firefox 3+. */
<td><ahref="https://gitHub.com/pragmatismo-io/BotServer/graphs/commit-activity"><imgsrc="https://img.shields.io/badge/Maintained%3F-yes-green.svg"alt="Maintenance"></a><ahref="https://waffle.io/pragmatismo-io/BotServer"><imgsrc="https://badge.waffle.io/pragmatismo-io/BotServer.svg?columns=all"alt="Waffle.io - Columns and their card count"></a></td>
<td><imgsrc="https://img.shields.io/docker/automated/lpicanco/botserver.svg"alt="Docker Automated build"><imgsrc="https://img.shields.io/docker/build/lpicanco/botserver.svg"alt="Docker Build Status"><imgsrc="https://img.shields.io/microbadger/image-size/lpicanco/botserver.svg"alt="MicroBadger Size"><imgsrc="https://img.shields.io/microbadger/layers/lpicanco/botserver.svg"alt="MicroBadger Layers"><imgsrc="https://img.shields.io/docker/pulls/lpicanco/botserver.svg"alt="Docker Pulls"><br/><em>Provided by <ahref="https://github.com/lpicanco/docker-botserver">@lpicanco</a></em></td>
</tr>
</tbody></table>
<h4id="watch-a-video-about-easeness-authoring-of-bot-packages-development-environment-and-self-deployment">Watch a video about easeness authoring of bot packages, development environment and self-deployment</h4>
<ul>
<li>Now with General Bots you can press F5 on Visual Studio to get a bot factory on your environment* published on November 10th, 2018.</li>
<p>General Bot is a package based chat bot server focused in convention over configuration and code-less approaches, which brings software packages and application server concepts to help parallel bot development.</p>
<li>See how easy is to use 'hear' and 'talk' to build Microsoft BOT Framework v4 logic with plain BASIC * published on December 3rd, 2018.</li>
</ul>
<p><ahref="https://www.youtube.com/watch?v=yX1sF9n9628"><imgsrc="https://raw.githubusercontent.com/pragmatismo-io/BotServer/master/docs/images/video-02-thumb.jpg"alt="See how easy is to use 'hear' and 'talk' to build Microsoft BOT Framework v4 logic with plain BASIC"></a></p>
<p>Custom dialogs for reseting user password in Azure Active Directory, Office 365, Dynamics 365 or any app published through Azure AD. See also <ahref="https://github.com/pragmatismo-io/IntranetBotQuickStart.gbai">IntranetBotQuickStart.gbai</a> and related MSDN article <strong><ahref="https://blogs.msdn.microsoft.com/buckwoody/2018/09/25/applied-ai-using-a-bot-for-password-reset">Applied AI – Using a Bot for Password Reset</a></strong> by <em>Rodrigo Souza</em>.</p>
<p>So the Bot provides an <strong>admin</strong> mode allowing the user having the Directory.AccessAsUser.All permission to be logged on Administrative interface to obtain and save its token into the database.</p>
<h3id="bot-user-reset-password">Bot User - Reset Password</h3>
<p>With the access token stored in the database, any user can access anonymously the
bot and through a combination of e-mail and mobile received code, the user will be able to reset her or his password.</p>
<h4id="reset-password-via-web">Reset password via Web</h4>
<p>Any user can use a web address to talk to a reset password bot. Just provide credentials that are confronted with Microsoft Graph to ensure security.</p>
<h4id="reset-password-via-skype">Reset password via Skype</h4>
<p>This is the case when user does not have the password to login on Skype for Business or Teams, and they need to reset their password, so the right tool is Skype.</p>
<h2id="what-is-a-bot-server-">What is a Bot Server?</h2>
<p><imgsrc="https://github.com/pragmatismo-io/BotServer/blob/master/docs/images/generalbots-open-core-starting-from-scratch.gif"alt="General Bots Starting From Scrach"></p>
<p>Bot Server accelerates the process of developing a bot. It provisions all code
base, resources and deployment to the cloud, and gives you templates you can
choose from whenever you need a new bot. The server has a database and service
backend allowing you to further modify your bot package directly by downloading
a zip file, editing and uploading it back to the server (deploying process) with
no code. The Bot Server also provides a framework to develop bot packages in a more
advanced fashion writing custom code in editors like Visual Studio Code, Atom or Brackets.</p>
<p>Everyone can create bots by just copying and pasting some files and using their
favorite tools like Excel (or any text editor) or Photoshop (or any image
<p>GeneralBots aims to delivery bots in azure in a very easy and fast fashion. Use Office tools like Word or Excel to edit your Bot - using code (JavaScript or TypeScript) just to empower custom requirements.</p>
<h4id="use-excel-for-hierarchical-knowledge-base-editing">Use Excel for (Hierarchical) Knowledge Base Editing</h4>
<p><imgsrc="https://github.com/pragmatismo-io/BotServer/blob/master/docs/images/general-bots-composing-subjects-json-and-excel.gif"alt="General Bots Inside Excel can enable bot production the masses"></p>
<h4id="use-visual-studio-for-a-complete-gbai-package-building-system">Use Visual Studio for a complete .gbai package building system</h4>
<p><imgsrc="https://raw.githubusercontent.com/pragmatismo-io/BotServer/master/docs/images/general-bots-inside-visual-studio-code-provides-a-complete-artificial-intelligence-based-conversational-platform.png"alt="General Bots Inside Visual Studio Code provides a complete artificial intelligence based conversational platform"></p>
<h2id="how-to">How To</h2>
<h3id="run-the-server-locally">Run the server locally</h3>
<ol>
<li>Install <ahref="https://www.npmjs.com/get-npm">Node.js</a> the current generation General Bot code execution platform;</li>
<li>Open a <strong>Terminal</strong> on Linux and Mac or a <strong>Command Prompt</strong> window on Windows;</li>
<li>Type <code>npm install -g botserver</code> and press <em>ENTER</em>;</li>
<li>Type <code>gbot</code> to run the server core.</li>
</ol>
<p>Notes:</p>
<ul>
<li><ahref="https://chocolatey.org/packages/nodejs.install"><em>nodejs.install</em> Chocolatey Package</a> is also available.</li>
<li>The zip source code of General Bot is also available for <ahref="https://codeload.github.com/pragmatismo-io/BotServer/zip/master">Download</a>;</li>
</ul>
<h3id="configure-the-server-to-deploy-specific-directory">Configure the server to deploy specific directory</h3>
<ol>
<li>Create/Edit the .env file and add the ADDITIONAL_DEPLOY_PATH key pointing to the .gbai local parent folder of .gbapp, .gbot, .gbtheme, .gbkb package directories.</li>
<li>Specify STORAGE_SYNC to TRUE so database sync is run when the server is run.</li>
<li>In case of Microsoft SQL Server add the following keys: STORAGE_SERVER, STORAGE_NAME, STORAGE_USERNAME, STORAGE_PASSWORD, STORAGE_DIALECT to <code>mssql</code>.</li>
</ol>
<p>Note:</p>
<ul>
<li>You can specify several bots separated by semicolon, the BotServer will serve all of them at once.</li>
</ul>
<h2id="setup-development-environment-windows-">Setup development environment (Windows)</h2>
<ol>
<li>[Optional] Install <ahref="https://chocolatey.org/install">Chocolatey</a>, a Windows Package Manager;</li>
<li>Install <ahref="%60https://git-scm.com/%60">git</a>, a Software Configuration Management (SCM).;</li>
<li>Install <ahref="npmjs.com/get-npm">Node.js</a>, a <ahref="https://en.wikipedia.org/wiki/Runtime_system">Runtime system</a>.
<li>Install <ahref="https://chocolatey.org/packages/nodejs.install">Visual Studio Code</a>, Brackets or Atom as an editor of your choice;</li>
<li><ahref="https://en.wikipedia.org/wiki/Fork_(software_development)">Fork</a> by visiting <ahref="https://github.com/pragmatismo-io/BotServer/fork">https://github.com/pragmatismo-io/BotServer/fork</a></li>
<li>Clone the just forked repository by running <code>git clone <your-forked-repository-url>/BotServer.git</code> ;</li>
<li>Run <code>npm install</code> folled by <code>npm run build</code> (To build default Bot UI);</li>
<li>Enter the On the downloaded folder (../..);</li>
<li>Compile the bot server by <code>tsc</code>.</li>
<li>Run the bot server by <code>npm start</code>.</li>
</ol>
<p>Note:</p>
<ul>
<li>Whenever you are ready to turn your open-source bot ideas in form of .gbapp (source-code) and artifacts like .gbkb, .gbtheme, .gbot or the .gbai full package read <ahref="https://github.com/pragmatismo-io/BotServer/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a> about performing Pull Requests (PR) and creating other public custom packages repositories of your own personal or organization General Bot Community Edition powered packages.</li>
</ul>
<h3id="running-unit-tests">Running unit tests</h3>
<ol>
<li>Enter the BotServer root folder.</li>
<li>Run tests by <code>npm test</code>.</li>
</ol>
<h3id="just-copy-the-source-code-to-your-machine">Just copy the source code to your machine</h3>
<ol>
<li>[Download] the Zip file of (<ahref="https://codeload.github.com/pragmatismo-io/BotServer/zip/master">https://codeload.github.com/pragmatismo-io/BotServer/zip/master</a>)</li>
</ol>
<h3id="updating-the-bot-knoledge-base-gbkb-folder-">Updating the Bot Knoledge Base (.gbkb folder)</h3>
<p>The subjects.json file contains all information related to the subject tree and can be used to build the menu carrousel as well give a set of words to be used as subject catcher in the conversation. A hierarchy can be specified.</p>
<h3id="creating-a-new-theme-folder-gbtheme-folder-">Creating a new Theme folder (.gbtheme folder)</h3>
<p>A theme is composed of some CSS files and images. That set of files can change
everything in the General Bot UI. Use them extensively before going to change
the UI application itself (HTML & JS).</p>
<h2id="package-types">Package Types</h2>
<h3id="-gbai">.gbai</h3>
<p>Embraces all packages types (content, logic & conversation) into a pluggable bot
directory. <ahref="https://github.com/pragmatismo-io/IntranetBotQuickStart.gbai">A sample .gbai is available</a>.</p>
<h3id="-gbapp">.gbapp</h3>
<p>The artificial intelligence extensions in form of pluggable apps. Dialogs,
Services and all model related to data. A set of interactions, use cases,
integrations in form of conversationals dialogs.
The .gbapp adds the General Bot base library (botlib) for building Node.js TypeScript Apps packages.</p>
<p>Four components builds up a General Bot App:</p>
<ul>
<li>dialogs</li>
<li>models</li>
<li>services</li>
<li>tests</li>
</ul>
<h4id="dialogs">Dialogs</h4>
<p>All code contained in a dialog builds the flow to custom conversations in
built-in and additional packages .</p>
<h4id="models">Models</h4>
<p>Models builds the foundation of data relationships in form of entities.</p>
<h4id="services">Services</h4>
<p>Services are a façade for bot back-end logic and other custom processing.</p>
<h4id="tests">Tests</h4>
<p>Tests try to automate code execution validation before crashing in production.</p>
<h3id="-gbot">.gbot</h3>
<p>An expression of an artificial inteligence entity. A .gbot file defines
all bots dependencies related to services and other resources.</p>
<h3id="-gbtheme">.gbtheme</h3>
<p>A theme of a bot at a given time. CSS files & images that can compose all UI
presentation and using it a branding can be done. <ahref="https://github.com/pragmatismo-io/Office365.gbtheme">A sample .gbtheme is available</a></p>
<h3id="-gbkb">.gbkb</h3>
<p>A set of subjects that bot knows in a form of hierarchical menu-based QnA. <ahref="https://github.com/pragmatismo-io/ProjectOnline.gbkb">A sample .gbkb is available</a>.</p>
<h3id="-gblib">.gblib</h3>
<p>Shared code that can be used across bot apps.</p>
<p>Security issues and bugs should be reported privately, via email, to the Pragmatismo.io Security
team at <ahref="mailto:security@pragmatismo.io">security@pragmatismo.io</a>. You should
receive a response within 24 hours. If for some reason you do not, please follow up via
email to ensure we received your original message. </p>
<h2id="license-warranty">License & Warranty</h2>
<p>General Bot Copyright (c) Pragmatismo.io. All rights reserved.
Licensed under the AGPL-3.0. </p>
<p>According to our dual licensing model, this program can be used either
under the terms of the GNU Affero General Public License, version 3,
or under a proprietary license. </p>
<p>The texts of the GNU Affero General Public License with an additional
permission and of our proprietary license can be found at and
in the LICENSE file you have received along with this program.</p>
<p>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.</p>
<p>"General Bot" is a registered trademark of Pragmatismo.io.
The licensing of the program under the AGPLv3 does not imply a
trademark license. Therefore any rights, title and interest in
our trademarks remain entirely with us.</p>
<p><ahref="https://stackoverflow.com/questions/ask?tags=generalbots">:speech_balloon: Ask a question</a> <ahref="/docs">:book: Read the Docs</a></p>