Commit graph

965 commits

Author SHA1 Message Date
b83b4ffc4d fix: Remove server_epoch() from start_bas_executed Redis key
All checks were successful
BotServer CI / build (push) Successful in 2m49s
The epoch caused a new key to be created every second, bypassing
the 'already executed' check and running start.bas multiple times,
resulting in triplicated suggestions.
2026-03-21 20:40:25 -03:00
1132983064 feat(kb): add with_bot_config to load embedding from bot config
All checks were successful
BotServer CI / build (push) Successful in 3m50s
- Adds KnowledgeBaseManager::with_default_config() as alias to new()
- Adds KnowledgeBaseManager::with_bot_config() to load embedding_url,
  embedding_model, and qdrant config from bot's config.csv
- Updates bootstrap to use with_bot_config with default_bot_id
- Enables per-bot embedding configuration instead of global env vars
2026-03-21 18:55:36 -03:00
622f1222dc fix(websocket): force start.bas execution on connection to restore chat on page reload while preventing duplicate execution
All checks were successful
BotServer CI / build (push) Successful in 4m14s
2026-03-21 16:38:03 -03:00
363c056bab fix(bootstrap): add strict timeout to Redis connection initialization to prevent hanging on dropped tcp packets
All checks were successful
BotServer CI / build (push) Successful in 3m53s
2026-03-21 14:37:04 -03:00
adb26330d2 fix: Simple 50ms timeout for Redis connection
All checks were successful
BotServer CI / build (push) Successful in 2m47s
2026-03-21 10:48:47 -03:00
9d6c2686f1 fix: Remove connection caching (no Clone)
Some checks failed
BotServer CI / build (push) Failing after 41s
2026-03-21 10:37:49 -03:00
b3ce293487 fix: Clean up duplicate Redis code and fix WebSocket log level
Some checks failed
BotServer CI / build (push) Failing after 2m2s
2026-03-21 10:30:19 -03:00
cfe6453d1e perf: Add shared Redis connection pool with 50ms timeout
Some checks failed
BotServer CI / build (push) Failing after 4m44s
2026-03-21 10:14:10 -03:00
43fd40aed9 fix: Add timeout to Redis get_connection to prevent blocking
All checks were successful
BotServer CI / build (push) Successful in 3m39s
- Added get_redis_connection() helper with 2s timeout
- All cache operations now fail fast if Valkey is not ready
- Prevents start.bas from blocking for minutes waiting for cache
- Changes: add_suggestion.rs
2026-03-21 09:34:41 -03:00
e5f3380469 perf: Fix USE TOOL thread contention by removing runtime creation
All checks were successful
BotServer CI / build (push) Successful in 2m31s
- Replace thread spawn + tokio runtime creation with block_in_place
- Eliminates 10+ runtime creations per start.bas execution
- Reduces USE TOOL execution from ~2min to milliseconds
- Fixes suggestions not appearing due to start.bas timeout
2026-03-20 22:54:19 -03:00
705d925947 fix: Allow anonymous access to /api/suggestions for bot chat
Some checks failed
BotServer CI / build (push) Failing after 11m15s
2026-03-20 18:44:08 -03:00
d19984fa07 feat: Improve KB keywords and package manager installer
All checks were successful
BotServer CI / build (push) Successful in 14m28s
2026-03-20 17:38:47 -03:00
57a8b7f8f0 Fix: use pgrep to check valkey/qdrant running state
- valkey check_cmd: replaced valkey-cli ping (network) with pgrep -x valkey-server
- qdrant check_cmd: replaced curl https check (TLS error 35) with pgrep -x qdrant
- Prevents duplicate instances on each botserver restart
2026-03-20 15:40:22 -03:00
3bb115266b feat: Add GUID prefix to Qdrant collection names for KB security isolation
Some checks failed
BotServer CI / build (push) Failing after 1s
2026-03-19 19:51:28 -03:00
d6ebd0cf6e fix: send suggestions separately from TALK, clear Redis keys for refresh
- Remove suggestions fetching from TALK function
- WebSocket handler now fetches and sends suggestions after start.bas executes
- Clear suggestions and start_bas_executed keys to allow re-run on refresh
- Decouple TALK from suggestions handling
2026-03-19 09:53:39 -03:00
2fcfb05fd6 fix: USE_WEBSITE non-blocking - timeout 3s, never blocks start.bas 2026-03-18 19:41:23 -03:00
6e594d68dd Fix: Wait for send_task to be ready before executing start.bas 2026-03-18 14:38:46 -03:00
8f073a15fd Fix: Wait for send_task to be ready before executing start.bas so TALK messages work 2026-03-18 14:18:05 -03:00
1a9208b88e Fix: Use bot_id instead of user_id in TALK suggestions Redis key 2026-03-18 11:05:56 -03:00
ec4fcc094a Fix: Use bot_id instead of user_id in suggestion Redis keys
- Changed all suggestion key formats from suggestions:user_id:session_id to suggestions:bot_id:session_id
- Fixes bug where suggestions were stored under wrong key, preventing frontend from retrieving them
- Affects: CLEAR SUGGESTIONS, ADD SUGGESTION, ADD SUGGESTION TEXT, ADD_SUGGESTION_TOOL
- Impact: Suggestions now correctly associated with bot, not user
2026-03-18 10:39:27 -03:00
346c83871a Fix Vault TLS certificate to include Subject Alternative Name for modern client compatibility 2026-03-18 09:30:27 -03:00
ed2a1d83f0 fix: include server epoch in start_bas_executed key to invalidate after restart
All checks were successful
BotServer CI / build (push) Successful in 17m16s
2026-03-17 15:45:02 -03:00
492530ee77 Fix panic: Cannot start a runtime from within a runtime in secrets module
Removed tokio::runtime::Handle::block_on() calls that were causing panics
when called from within async contexts. Now uses direct fallback to
environment variables instead.
2026-03-17 15:04:40 -03:00
af7441ebcb fix: generate mcp.json for tools without PARAM declarations
Some checks failed
BotServer CI / build (push) Failing after 3m45s
Tools using only USE KB or other keywords without PARAM were not
getting .mcp.json generated, causing USE TOOL to silently skip them.
2026-03-17 12:20:47 -03:00
7906a9bf32 security: add CoreDNS ACL hardening and fail2ban proxy jail
Some checks failed
BotServer CI / build (push) Failing after 4m55s
- dns_hardener.rs: apply ACL (anti-amplification) + errors plugin to Corefile via lxc
- fail2ban.rs: add apply_proxy() for caddy-http-flood jail in pragmatismo-proxy container
- security_fix.rs: integrate dns and fail2ban_proxy steps into run_security_fix/status
- mod.rs: export dns_hardener module
2026-03-17 11:18:19 -03:00
c340f95da1 security: bind MinIO and Valkey to 127.0.0.1 only
Some checks failed
BotServer CI / build (push) Failing after 6m44s
2026-03-17 01:32:21 -03:00
9fc38b80d3 Fix clippy type complexity warnings 2026-03-17 01:12:05 -03:00
ab1f2df476 Read Drive config from Vault at runtime with fallback defaults
Some checks failed
BotServer CI / build (push) Failing after 7m26s
2026-03-17 00:00:36 -03:00
b57c53e2ff Remove WORKFLOW_PLAN.md (moved to gb/prompts)
Some checks failed
BotServer CI / build (push) Failing after 7m22s
2026-03-16 23:40:56 -03:00
7849031ffe Move WORKFLOW_PLAN.md to src/basic/
Some checks failed
BotServer CI / build (push) Has been cancelled
2026-03-16 23:38:35 -03:00
ec1e203859 HEAR: add configurable timeout (hear-timeout-secs, default 1h)
Some checks failed
BotServer CI / build (push) Has been cancelled
2026-03-16 23:12:45 -03:00
dae78479d2 Fix HEAR: block thread on channel instead of throw+re-run from top
Some checks failed
BotServer CI / build (push) Failing after 6m54s
- Add hear_channels: HashMap<Uuid, SyncSender<String>> to AppState
- HEAR now blocks the spawn_blocking thread via sync_channel recv()
- deliver_hear_input() called at top of stream_response() to unblock
- Script continues from exact HEAR position, no side-effect re-execution
- All three HEAR variants (basic, AS TYPE, AS MENU) use same mechanism
2026-03-16 23:00:17 -03:00
35b793d29c Add interactive vault put - prompt for secrets instead of CLI args
All checks were successful
BotServer CI / build (push) Successful in 10m50s
2026-03-16 22:27:06 -03:00
c0b619b58f Fix: add FromRequestParts impl for security AuthenticatedUser extractor
All checks were successful
BotServer CI / build (push) Successful in 11m32s
2026-03-16 22:04:59 -03:00
49e9f419f3 Fix: export observability module from llm/mod.rs
Some checks failed
BotServer CI / build (push) Has been cancelled
2026-03-16 22:00:55 -03:00
5ca5e98f8b Fix: add missing async_trait on AuthenticatedUser extractor, type annotation on analytics router, import ObservabilityManager
Some checks failed
BotServer CI / build (push) Has been cancelled
2026-03-16 21:54:29 -03:00
16394aef01 Fix LXD IPv4: retry DHCP 30s, fallback to static IP for privileged containers
Some checks failed
BotServer CI / build (push) Failing after 6m46s
2026-03-16 21:34:59 -03:00
03fe5bc94d Fix LXD container install: PATH, socket proxy, DNS
Some checks failed
BotServer CI / build (push) Failing after 7m36s
2026-03-16 21:24:04 -03:00
6c139fdf63 fix: suggestion and talk keyword improvements
All checks were successful
BotServer CI / build (push) Successful in 13m59s
2026-03-16 13:29:14 -03:00
0db08fbf39 fix: fallback to get_or_create_user_session when session_id not found in start.bas 2026-03-16 13:25:45 -03:00
c87536d24a fix: reuse existing user/session in auth_handler via user_id param 2026-03-16 13:15:48 -03:00
f062cc4a3e Add THINK KB keyword for explicit knowledge base reasoning
- Implement think_kb.rs with structured search results
- Add keyword registration in mod.rs files
- Include confidence scoring and multi-KB support
2026-03-16 08:15:21 -03:00
7ef1efa047 feat: add setup-env command to generate .env from vault container 2026-03-15 21:15:48 -03:00
dfe5162f66 feat(install): add --container-only flag to install command
- Add --container-only flag to create container without completing full installation
- Exit immediately after container creation
- Useful for manual setup or debugging installation issues
2026-03-15 20:49:08 -03:00
d1cb6b758c Fix LXD container mode: PATH, socket proxy, exec
All checks were successful
BotServer CI / build (push) Successful in 10m54s
2026-03-15 20:00:06 -03:00
ba53a0c178 Fix LXD socket handling in container mode
All checks were successful
BotServer CI / build (push) Successful in 11m6s
2026-03-15 18:58:21 -03:00
bf5ee0bef2 Remove botui SVG dependency - use None for svg_content
All checks were successful
BotServer CI / build (push) Successful in 15m48s
2026-03-15 16:20:41 -03:00
ef426b7a50 LXD proxy and container improvements
Some checks failed
BotServer CI / build (push) Failing after 7m5s
2026-03-15 15:50:02 -03:00
eb586cf4f9 refactor(secrets): add tenant/org hierarchy with fallback support 2026-03-15 11:38:50 -03:00
7fb73e683f feat: add campaigns, attendance SLA, and marketing modules 2026-03-14 16:35:42 -03:00