Commit graph

17 commits

Author SHA1 Message Date
b20544d1a0 Merge branch 'main' of github.com:generalbots/generalbots into main
Some checks failed
Botlib CI / build (push) Failing after 2s
Bottest CI / build (push) Failing after 1s
BotServer CI / build (push) Failing after 3m40s
BotUI CI / build (push) Failing after 22s
2026-04-22 21:31:52 -03:00
61c8f709c4 fix(stage): fix message type collision and switcher logic in chat ui 2026-04-22 21:30:26 -03:00
fd56e401f4 fix: allow multiple chunks per document in KB search deduplication
All checks were successful
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Successful in 4m5s
Bottest CI / build (push) Successful in 23s
BotUI CI / build (push) Successful in 12s
- Previous logic strictly limited results to 1 chunk per document
- This caused large documents (like ramais PDFs) to lose 90% of their
  content since only the single highest-scoring chunk was kept
- Now we allow up to 10 chunks per document, while still sorting
  by relevance and letting filter_by_tokens cap the overall size
2026-04-22 20:20:51 +00:00
60e3b1d83b fix: lowercase AS keyword in BASIC preprocessor for Rhai custom syntax
All checks were successful
Botlib CI / build (push) Successful in 6s
BotServer CI / build (push) Successful in 3m49s
Bottest CI / build (push) Successful in 27s
BotUI CI / build (push) Successful in 12s
The ADD_SUGGESTION_TOOL, ADD_SUGGESTION_TEXT, ADD_SUGGESTION, and
ADD_SWITCHER Rhai custom syntaxes expect lowercase 'as' but the
preprocessor was outputting uppercase 'AS'. This caused start.bas
to fail with 'Syntax error: Expecting as for ADD_SUGGESTION_TOOL',
which prevented KB context (USE KB) from being registered for the
session — so queries like 'ramal da Andressa' had no KB data.

Also fix: re-export CHECK_INTERVAL_SECS from drive_monitor module
to fix pre-existing private module access error.
2026-04-22 19:45:36 +00:00
a86238b132 feat: DriveMonitor com intervalo de 1s e protecao de reentrancia
Some checks failed
Botlib CI / build (push) Successful in 5s
BotServer CI / build (push) Failing after 4m36s
Bottest CI / build (push) Successful in 27s
BotUI CI / build (push) Successful in 12s
- CHECK_INTERVAL_SECS: constante compartilhada (1 segundo)
- Protecao contra reentrancia usando is_processing
- Logging de tempo de scan para debugging
- DriveCompiler agora usa mesma constante
- Ideal para PDFs longos e .bas grandes
2026-04-22 19:21:32 +00:00
6bf879a78a fix: Skip health check for remote HTTPS embedding APIs and wait for server in single-file indexing
All checks were successful
Botlib CI / build (push) Successful in 6s
BotServer CI / build (push) Successful in 5m26s
Bottest CI / build (push) Successful in 24s
BotUI CI / build (push) Successful in 11s
Two fixes for KB indexing failures with Cloudflare Workers AI:
1. check_health() now short-circuits for HTTPS URLs (remote APIs like
   Cloudflare don't have /health endpoints and return 401/301/403 on
   probes, which were incorrectly treated as 'unreachable')
2. index_single_file_with_id() now calls wait_for_server(30) instead
   of immediately failing, giving the embedding server time to become
   ready

Root cause: EMBEDDING_SERVER_READY is a global flag. When the default
bot's local embedding server check fails, it blocks ALL bots including
those using remote HTTPS APIs that don't need a local health check.
2026-04-22 17:06:03 +00:00
248165c3cb fix: Recognize 301/401/403 as reachable in embedding health check
All checks were successful
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Successful in 3m57s
Bottest CI / build (push) Successful in 24s
BotUI CI / build (push) Successful in 12s
Remote APIs like Cloudflare Workers AI return 401 on /health and
301 on HEAD requests. These indicate the server IS reachable,
not down. Previously only 404/405 were treated as reachable,
causing all KB indexing to fail with 'Embedding server not available'.
2026-04-22 16:40:53 +00:00
eea9b24ef0 fix: CI failures - shutdown hang, bottest compile errors, botui deploy
Some checks failed
Botlib CI / build (push) Successful in 9s
BotServer CI / build (push) Successful in 3m52s
Bottest CI / build (push) Failing after 8s
- Add shutdown tracing and 15s forced exit to prevent SIGTERM hangs
- Fix E0583: remove self-referential mod declarations in bottest integration files
- Fix E0599: correct .status() call on Result in performance.rs
- Fix botui CI deploy: use systemctl stop/start instead of pkill+nohup
- Update PROD.md with DB-driven CI log retrieval method
2026-04-22 11:25:05 +00:00
5ab886e6e3 ci: Update botserver workflow for single-repo, remove duplicate .forgejo from subdirs
Some checks failed
Botapp CI / build (push) Failing after 0s
Botbook CI / build (push) Failing after 0s
Botdevice CI / build (push) Failing after 0s
Botmodels CI / build (push) Failing after 0s
Botplugin CI / build (push) Failing after 0s
BotServer CI / build (push) Failing after 0s
Bottest CI / build (push) Failing after 0s
BotUI CI / build (push) Failing after 0s
2026-04-21 23:04:27 +00:00
e6cd0ff02b fix: Drop stream_tx after LLM spawn + ADD_SUGGESTION single-arg + lowercase fix + sync_bas_to_work
- drop(stream_tx) after spawning LLM task so stream_rx.recv() loop ends
  when LLM finishes. Without this, the streaming loop hung forever and
  is_complete:true + suggestions were never sent to WebSocket clients.
- Add single-arg ADD_SUGGESTION "text" syntax (registered LAST for
  highest Rhai priority so it matches before 2-arg form).
- convert_keywords_to_lowercase() now only lowercases Rhai built-in
  keywords (IF, ELSE, WHILE, etc.), not custom syntax keywords (TALK,
  HEAR, ADD_SUGGESTION) which are case-sensitive in Rhai.
- sync_bas_to_work() downloads changed .bas files from S3 to work dir
  when etag changes, preventing stale local copies used by compiler.
2026-04-21 22:01:17 +00:00
1ae0ad7051 fix: DriveMonitor skips unchanged files on rescan, skips directory entries
- Only upsert drive_files when ETag actually changed (was re-processing all files every 60s cycle)
- Skip S3 directory entries (keys ending with '/') to avoid storing stale directory markers
- Add debug-level logging for unchanged file skips
- Fixes noisy 'Added/updated drive_files' spam on every scan cycle
2026-04-21 16:16:39 +00:00
c70fbba099 refactor: Remove ooxmlsdk from default build, split document_processor, fix DriveMonitor sync
- Replace docs/sheet/slides with kb-extraction in default features (~4-6min compile time savings, ~300MB less disk)
- Add kb-extraction feature using zip+quick-xml+calamine for lightweight KB extraction
- Split document_processor.rs (829 lines) into mod.rs+types.rs+ooxml_extract.rs+rtf.rs
- Move DOCX/PPTX ZIP-based extraction to document_processor::ooxml_extract (no ooxmlsdk needed)
- Remove dead code: save_docx_preserving(), save_pptx_preserving() (zero callers)
- Fix dep: prefix for optional dependencies in feature definitions
- DriveMonitor: full S3 sync, ETag change detection, KB incremental indexing, config.csv sync
- ConfigManager: real DB reads from bot_configuration table
- 0 warnings, 0 errors on both default and full feature builds
2026-04-21 14:54:41 +00:00
b2c5e912b3 fix: Use correct Zitadel port 8300 and get URL from Vault
- Fixed hardcoded port 9000 to 8300 (Zitadel default)
- Added base_url default with fallback to Vault URL
- Allows external Zitadel server configuration via Vault
- facade.rs: Updated help message with correct port
2026-04-21 14:45:22 +00:00
8222ef68be Fixing repo integration 2026-04-19 21:22:53 -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