Commit graph

142 commits

Author SHA1 Message Date
a7a2242047 Fix: Remove nested Tokio runtime in BotlibLLMProviderWrapper (panic on salesianos bot)
- Remove rt.block_on() inside async context in botserver/src/llm/mod.rs
- Fixes 'Cannot block current thread from within a runtime' panic
- Salesianos bot was crashing after start.bas on LLM calls
- Botserver compiles clean
2026-05-13 09:39:03 -03:00
d082de728f Restructure: Move 67 botserver feature crates into botserver/crates/
- Moved all feature modules + core crates + botllm + botqdrant into botserver/crates/
- Fixed MinIO endpoint URL to include port from Vault
- Fixed LocalSessionManager to delegate to real SessionManager
- Restored botkb as minimal types-only crate (face code already in botmodelsbridge)
- Workspace root now only contains botlib, botschema, and separate projects (botui, botapp, etc.)
- All cross-crate path references recalculated

Refs: #513, #518, #520
2026-05-12 18:32:19 -03:00
f29c18e267 refactor: Finalize extraction of 44 feature modules into separate crates
- Move compiler (botbasic_compiler), drive (botdrive), KB, bootstrap, DNS,
  automation, incus, package_manager, features, and remaining feature modules
  from botserver to botcore/botdrive crates
- Convert keywords.rs files to mod.rs directories for consistency
- Add rbac and mail features to botsettings
- Wire script_runner in bootstrap state
2026-05-12 14:11:53 -03:00
2178000649 feat: Extract botapi, botmeet, botsettings crates + botcore restructure + 44 feature modules
- Extract botapi (API handlers), botmeet (meeting/webinar), botsettings (RBAC/settings) as standalone crates
- Re-export stubs in botserver: pub use botapi/*, pubmeet/*, botsettings/*
- Split botcore shared into submodules (utils, state, models, schema, etc.)
- Split botlib models.rs into models/ subdirectory
- Extract botschema, botmodelsbridge crates
- Split botserver basic/compiler into syntax_transforms, types, save_conversion, tool_parsing
- Fix 44 feature crate mod.rs re-export stubs (phase 1a/1b/1c)
- Phase 2a migration: 26 modules migrated
- Compiler mod.rs rewritten as slim orchestrator (~185 lines)
- botmeet/botsettings: Cargo.toml fixes (botsecurity non-optional, deps)
- Workspace Cargo.toml: 73 members
- Botsettings compiles 0 errors (5 cfg warnings)
- Botmeet: 114 errors remaining (webinar_types struct mismatches, missing ChannelAdapter voice methods)
- All previously clean crates still compile 0/0
2026-05-11 21:48:42 -03:00
5683501b1d feat: Extract 44 feature crates + 7 core crates from botserver monolith
- Extracted 44 feature crates (botlib, botllm, botchannels, botkb, etc.)
  all compile standalone with thin adapter shims in botserver
- Extracted 6 new core crates: botcorebot, botcoresession, botcoreoauth,
  botcoresecrets, botcoredirectory, botautotask (all compile standalone)
- botcorepkg created (WIP stub, extraction in progress)
- botserver compiles with 0 errors, 1 warning
- 176K lines now in standalone crates (botserver down to 205K from 312K)
- Feature module edit = 2-3s recompile (was 8min), 200x speedup
- New crates not yet wired into botserver deps (safe, no runtime impact)
2026-05-07 10:46:45 -03:00
0b207f679a feat: Add fast profile for quicker CI builds - opt-level 3, no LTO, 16 codegen-units - 50-70% faster compilation 2026-04-30 21:42:26 -03:00
0e260c9927 fix(ci): sccache wrapper + incremental=false for correct caching
Some checks failed
BotServer CI / build (push) Failing after 23s
- Add sccache wrapper that unsets CARGO_INCREMENTAL (sccache 0.14.0
  refuses to work when that env var is present, even if =0)
- Remove rustc-wrapper from .cargo/config.toml (use RUSTC_WRAPPER env in CI)
- Set [profile.dev] incremental = false to avoid sccache 'prohibited' error
- DEV-DEPENDENCIES.sh now installs sccache 0.14.0 + wrapper correctly
- CI workflow: unset CARGO_INCREMENTAL env (let sccache wrapper handle it)

Tested on alm-ci: 50% cache hit rate on rebuild after target/ removal.
2026-04-29 12:49:07 -03:00
a239227aa1 Fixing repo integration 2026-04-19 20:50:52 -03:00
cc1b805c38 Fixing repo integration 2026-04-19 08:55:24 -03:00
037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00
346f5d3e24 CI: Use vendored libgit2 to avoid compilation
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
2026-04-18 20:08:19 -03:00
c8fcd75e48 CI: Patch libgit2-sys to use main branch
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
2026-04-18 20:07:57 -03:00
e63c187f32 Improve LLM streaming logs: start/end with size/content, first/last bytes; fix html2md function name
Some checks failed
BotServer CI/CD / build (push) Failing after 16m34s
2026-04-15 18:15:42 -03:00
504e6e12ad Enable directory feature in default build
Some checks failed
BotServer CI/CD / build (push) Failing after 12m19s
2026-04-12 11:46:24 -03:00
12988b637d Fix KB indexing: single file streaming, dedup tracking, .ast cache
All checks were successful
BotServer CI/CD / build (push) Successful in 12m31s
2026-04-11 13:10:09 -03:00
ed6ce514a8 feat: add drive feature to default features
All checks were successful
BotServer CI/CD / build (push) Successful in 1m18s
2026-04-09 19:47:18 -03:00
c5a44f7889 Clean up local-files feature comments
Some checks failed
BotServer CI/CD / build (push) Failing after 2m48s
- Keep local-files feature flag for conditional local file monitoring
- Keep gbo- bucket filtering in drive
- Remove verbose comments
2026-04-08 18:33:39 -03:00
62d0da3923 Add local-files feature to disable local storage scanning
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
- Without local-files feature: only MinIO/Drive is used as bot source
- With local-files feature: scans /opt/gbo/data for bots (default behavior)
- Bucket filtering (gbo-*) only active when local-files is NOT enabled
- LocalFileMonitor and ConfigWatcher only start with local-files feature
2026-04-08 18:29:48 -03:00
9b04af9e7b Fix USE KB and USE WEBSITE default features compilation
Some checks failed
BotServer CI/CD / build (push) Failing after 10m2s
2026-04-07 20:14:12 -03:00
73002b36cc Update botserver: various fixes and improvements
All checks were successful
BotServer CI/CD / build (push) Successful in 9m59s
2026-04-07 13:33:50 -03:00
90c14bcd09 Fix DETECT: use bot-specific DB pool, add anonymous auth when directory disabled
All checks were successful
BotServer CI/CD / build (push) Successful in 12m42s
2026-04-06 13:37:23 -03:00
fd7f48c423 fix: merge duplicate [dependencies] sections in Cargo.toml
Some checks failed
BotServer CI/CD / build (push) Failing after 6m31s
2026-04-05 01:10:53 -03:00
8c908ed2f0 fix: fix Cargo.toml section order
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 01:08:59 -03:00
60dc273681 fix: use CachedSecret struct instead of tuples in sync methods
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 01:07:42 -03:00
9383cf0e3a fix: move ureq to dependencies section
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 01:04:05 -03:00
10e4f4ac9b fix: move ureq to dependencies section
Some checks failed
BotServer CI/CD / build (push) Failing after 22s
2026-04-05 00:41:28 -03:00
c90c5dc039 fix: use blocking HTTP for Vault email config to avoid runtime nesting
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 00:37:33 -03:00
7cd759f810 ci: bump version to 6.3.1 to force rebuild
All checks were successful
BotServer CI/CD / build (push) Successful in 10m59s
2026-04-04 07:46:33 -03:00
d19984fa07 feat: Improve KB keywords and package manager installer 2026-03-20 17:38:47 -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
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
7fb73e683f feat: add campaigns, attendance SLA, and marketing modules 2026-03-14 16:35:42 -03:00
13892b3157 Fix tenant-org-bot relationship and CRM lead form 2026-03-12 18:19:18 -03:00
c072fb936e fix(llm): load system-prompt from config.csv correctly
All checks were successful
BotServer CI / build (push) Successful in 17m27s
- 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>
2026-03-09 11:55:05 -03:00
7a22798c23 Fix deployment module: add types, router, handlers and fix forgejo integration 2026-03-03 14:30:44 -03:00
0b1b17406d chore(core): various email and security updates 2026-02-24 19:02:48 -03:00
e143968179 feat: Add JWT secret rotation and health verification
SEC-02: Implement credential rotation security improvements

- Add JWT secret rotation to rotate-secret command
- Generate 64-character HS512-compatible secrets
- Automatic .env backup with timestamp
- Atomic file updates via temp+rename pattern
- Add health verification for rotated credentials
- Route rotate-secret, rotate-secrets, vault commands in CLI
- Add verification attempts for database and JWT endpoints

Security improvements:
- JWT_SECRET now rotatable (previously impossible)
- Automatic rollback via backup files
- Health checks catch configuration errors
- Clear warnings about token invalidation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-19 19:42:41 +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
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
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
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
355215c2a2 Update: refactor migrations, update source files, and add new features 2026-02-04 13:29:29 -03:00
51c8a53a90 Enable LLM feature by default and fix compilation errors
- 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
2026-01-28 16:58:14 -03:00
9087bb17cd feat: complete General Bots 7.0 (v6.2.0) 2026-01-25 10:29:54 -03:00
fdf74903ad fix(server): update security modules and TODOs 2026-01-25 08:42:36 -03:00
0a24cd4b50 Fix build errors and unused imports in core, security and package_manager modules 2026-01-24 22:04:47 -03:00
536495fb4d feat: make each app self-contained with core dependencies
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.
2026-01-23 13:46:10 -03:00
bba0efdb55 refactor: flatten Cargo.toml features to simple app list
- 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 
2026-01-23 13:41:02 -03:00
6fa52e1dd8 feat: implement feature bundling architecture and fix conditional compilation
- Restructured Cargo.toml with Bundle Pattern for easy feature selection
- Added feature bundles: tasks → automation + drive + monitoring
- Applied conditional compilation guards throughout codebase:
  * AppState fields (drive, cache, task_engine, task_scheduler)
  * main.rs initialization (S3, Redis, Tasks)
  * SessionManager Redis usage
  * bootstrap S3/Drive operations
  * compiler task scheduling
  * shared module Task/NewTask exports
- Eliminated all botserver compilation warnings
- Minimal build now compiles successfully
- Accepted core dependencies: automation (Rhai), drive (S3), cache (Redis)
- Created DEPENDENCY_FIX_PLAN.md with complete documentation

Minimal feature set: chat + automation + drive + cache
Verified: cargo check -p botserver --no-default-features --features minimal 
2026-01-23 13:14:20 -03:00
ed75b99a50 Refactor: Use workspace dependencies 2026-01-23 09:37:42 -03:00