Commit graph

3934 commits

Author SHA1 Message Date
35fafad088 chore: Force CI rebuild with updated i18n
All checks were successful
BotServer CI / build (push) Successful in 8m33s
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 19:04:47 +00:00
23c93cbb3d feat: Restore .env file creation for local Vault bootstrap
All checks were successful
BotServer CI / build (push) Successful in 9m6s
- 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>
2026-02-14 16:35:24 +00:00
bd92ff7bfd fix(bootstrap): bootstrap_completed only checks file existence, not content
All checks were successful
BotServer CI / build (push) Successful in 8m50s
2026-02-14 13:49:15 +00:00
0c44f7784d Debug: Add logging for missing translation keys
All checks were successful
BotServer CI / build (push) Successful in 10m8s
2026-02-14 12:25:46 +00:00
4b44602d39 Update bootstrap and core modules
All checks were successful
BotServer CI / build (push) Successful in 10m27s
2026-02-14 09:54:14 +00:00
17cb4ef147 Fix: Update source files and fix notify dependency reference
All checks were successful
BotServer CI / build (push) Successful in 11m35s
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13 22:30:57 +00:00
5ea171d126 Refactor: Split large files into modular subdirectories
Some checks failed
BotServer CI / build (push) Failing after 1m34s
Split 20+ files over 1000 lines into focused subdirectories for better
maintainability and code organization. All changes maintain backward
compatibility through re-export wrappers.

Major splits:
- attendance/llm_assist.rs (2074→7 modules)
- basic/keywords/face_api.rs → face_api/ (7 modules)
- basic/keywords/file_operations.rs → file_ops/ (8 modules)
- basic/keywords/hear_talk.rs → hearing/ (6 modules)
- channels/wechat.rs → wechat/ (10 modules)
- channels/youtube.rs → youtube/ (5 modules)
- contacts/mod.rs → contacts_api/ (6 modules)
- core/bootstrap/mod.rs → bootstrap/ (5 modules)
- core/shared/admin.rs → admin_*.rs (5 modules)
- designer/canvas.rs → canvas_api/ (6 modules)
- designer/mod.rs → designer_api/ (6 modules)
- docs/handlers.rs → handlers_api/ (11 modules)
- drive/mod.rs → drive_handlers.rs, drive_types.rs
- learn/mod.rs → types.rs
- main.rs → main_module/ (7 modules)
- meet/webinar.rs → webinar_api/ (8 modules)
- paper/mod.rs → (10 modules)
- security/auth.rs → auth_api/ (7 modules)
- security/passkey.rs → (4 modules)
- sources/mod.rs → sources_api/ (5 modules)
- tasks/mod.rs → task_api/ (5 modules)

Stats: 38,040 deletions, 1,315 additions across 318 files

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 21:09:30 +00:00
3566a8c87f Fix batismo tool natural language processing
- 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>
2026-02-10 20:17:49 +00:00
76abcea5e9 Fix start.bas repeated execution and add tool calling system
- 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>
2026-02-10 13:49:54 +00:00
6215908536 Add ConfigWatcher and fix model routing
New features:
- Add ConfigWatcher for hot-reloading config.csv from ~/data
- Add LocalFileMonitor for watching ~/data/*.gbai directories
- Add GLM LLM provider implementation
- Add tool context for LLM tool calling

Bug fixes:
- Fix model routing to respect session → bot → default hierarchy
- Fix ConfigWatcher to handle local embedded (llm-server=true)
- Skip DriveMonitor for default bot (managed via ConfigWatcher)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 15:10:27 +00:00
Rodrigo Rodriguez
fc0926ffff WIP: Multiple code improvements from previous session
- Fix various compiler warnings
- Update analytics, auto_task, and basic keywords
- Improve security, channels, and core modules
- Update designer, directory, and drive modules
- Fix embedded UI and LLM modules

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 12:25:37 +00:00
Claude Sonnet 4.5
e8ce642b81 Update default port from 8088 to 9000
- Update .env.embedded PORT variable
- Update README.md documentation
- Update deploy/README.md port references
- Update scripts/deploy-embedded.sh kiosk URLs
- Update src/directory/bootstrap.rs login URLs
- Update src/core/package_manager/setup/directory_setup.rs auth callback URLs

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 12:13:42 +00:00
84458b2a69 feat: Add BOTSERVER_PORT environment variable override
All checks were successful
BotServer CI / build (push) Successful in 12m37s
- 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
2026-02-06 12:56:52 -03:00
125b9d4389 Remove embed-ui from default features, fix embedded UI path
All checks were successful
BotServer CI / build (push) Successful in 12m5s
- 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
2026-02-06 09:40:37 -03:00
e8a400d86d Remove Kubernetes deployment, add embed-ui deployment documentation
Some checks failed
BotServer CI / build (push) Failing after 12m5s
- Removed Kubernetes deployment files (focus on embed-ui feature instead)
- Added deploy-ui.sh script for manual UI file deployment
- Added deploy/README.md with comprehensive deployment guide
- Updated README.md with embed-ui feature explanation
- Simplified deployment: embed-ui feature creates self-contained binary
2026-02-06 09:26:44 -03:00
373957cb25 Fix: Add embed-ui to default features
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.
2026-02-05 22:52:12 -03:00
5cedd9c379 Fix: Remove mold linker from cargo config
Some checks failed
BotServer CI / build (push) Failing after 17m29s
Mold linker is not available on the system and was causing build failures.
Removed rustflags setting to use default lld linker instead.
2026-02-05 22:43:26 -03:00
7da1442c91 Fix PostgreSQL readiness check timeout in bootstrap
All checks were successful
BotServer CI / build (push) Successful in 13m13s
- 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
2026-02-05 22:23:04 -03:00
07ff7a6297 Fix PostgreSQL health check - remove database-specific check
All checks were successful
BotServer CI / build (push) Successful in 12m18s
- 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
2026-02-05 21:55:47 -03:00
de3e5c4fec Fix PostgreSQL ready check for already-running instances
All checks were successful
BotServer CI / build (push) Successful in 14m23s
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.
2026-02-05 21:09:23 -03:00
3258f3ef85 Fix PostgreSQL startup failure for non-interactive users
All checks were successful
BotServer CI / build (push) Successful in 11m58s
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).
2026-02-05 20:40:52 -03:00
87931e930c ci: adjust CARGO_BUILD_JOBS to 2
All checks were successful
BotServer CI / build (push) Successful in 22m11s
2026-02-05 20:01:15 -03:00
cdb1197920 ci: increase CARGO_BUILD_JOBS to 6 for faster builds
Some checks are pending
BotServer CI / build (push) Waiting to run
2026-02-05 19:54:31 -03:00
717ca8c35b Fix: Remove undefined db_password variable in database creation
Some checks failed
BotServer CI / build (push) Failing after 11m39s
2026-02-05 19:06:59 -03:00
309c5bc55a Fix: Ensure botserver database exists before running migrations
Some checks are pending
BotServer CI / build (push) Waiting to run
2026-02-05 19:02:01 -03:00
6cfbf013e2 Fix missing Router import in non-embed-ui block
All checks were successful
BotServer CI / build (push) Successful in 9m54s
2026-02-05 18:41:34 -03:00
35af28a041 Fix compilation errors: duplicate imports, feature-gated functions, type mismatch
Some checks failed
BotServer CI / build (push) Failing after 7m28s
2026-02-05 18:31:14 -03:00
52bccf0551 Adjust CARGO_BUILD_JOBS to 3
Some checks failed
BotServer CI / build (push) Failing after 11m25s
2026-02-05 18:12:41 -03:00
1a2d65c531 Fix: Remove path filters and cache for Forgejo compatibility
Some checks failed
BotServer CI / build (push) Has been cancelled
2026-02-05 18:08:30 -03:00
d4a7d1246b Fix build.rs: only watch botui/ui/suite if exists (CI compatibility) 2026-02-05 15:28:27 -03:00
9b9015bfa1 Keep 3rdparty.toml embedded in binary (already using include_str!) 2026-02-05 14:59:57 -03:00
24b516406a Add automatic log dump when component fails to start 2026-02-05 14:53:37 -03:00
86eb3d2160 Fix migration error - remove invalid session_kb_associations DROP 2026-02-05 14:48:08 -03:00
dfb18f75e6 Fix bootstrap database creation - use BOOTSTRAP_DB_PASSWORD env var 2026-02-05 14:42:13 -03:00
5d5be5546f Fix migration: Remove orphaned COMMENT statements for session_kb_associations table 2026-02-05 14:28:20 -03:00
025e6fe823 Improve error messages: show PostgreSQL log contents on startup failure 2026-02-05 14:13:31 -03:00
d19b6083b4 [CI] Trigger new build to test compilation fixes 2026-02-05 12:28:52 -03:00
8e9c4c5c76 Revert shared module change to fix duplicate definition error 2026-02-05 11:50:32 -03:00
8d405e6926 Fix compilation errors for CI: Make embed-ui optional, fix HTML strings, shared module, email syntax 2026-02-05 11:46:32 -03:00
e4b785d7b1 Optimize CI build: Reduce jobs to 4 and remove incremental setting
Some checks failed
BotServer CI / build (push) Failing after 8m23s
2026-02-05 11:28:36 -03:00
30345c66e2 Split CI workflow: Make botserver.yaml botserver-only
Some checks failed
BotServer CI / build (push) Failing after 6m25s
- 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
2026-02-05 08:44:21 -03:00
64d5e2a1bd Update workflow and remove test cron file 2026-02-04 21:25:39 -03:00
8d3f9339ee Fix: add /api/auth/me to public routes in RBAC 2026-02-04 14:25:14 -03:00
1fb1feff56 Fix: /api/auth/me now returns anonymous user instead of 401 2026-02-04 14:10:05 -03:00
e7fbf0ce46 Fix: generate GB-specific access token with gb_ prefix 2026-02-04 14:02:01 -03:00
e717f90cee Fix auth routes - simplify to use in-memory cache only 2026-02-04 13:47:02 -03:00
355215c2a2 Update: refactor migrations, update source files, and add new features 2026-02-04 13:29:29 -03:00
f311a438cd Fix /api/auth/me to validate tokens from database
- 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
2026-02-04 13:28:37 -03:00
d26f0652e5 fix(website-crawler): Add missing crawl_status column to SELECT query
Some checks failed
GBCI / build (push) Failing after 14m19s
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.
2026-02-02 20:10:20 -03:00
841b59affd fix(website-crawler): Add missing next_crawl column to SELECT query
Some checks failed
GBCI / build (push) Failing after 12m2s
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.
2026-02-02 19:58:11 -03:00