Commit graph

4575 commits

Author SHA1 Message Date
c960461eb5 fix(ci): remove UI sync from botui workflow
Some checks failed
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Failing after 4m29s
Bottest CI / build (push) Successful in 19s
BotUI CI / build (push) Successful in 10s
2026-04-24 01:31:28 +00:00
1e96b18c81 fix(ci): build with embed-ui feature instead of syncing files
Some checks failed
Bottest CI / build (push) Waiting to run
BotUI CI / build (push) Waiting to run
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Has been cancelled
2026-04-24 01:30:49 +00:00
0f7fe82523 fix(ci): sync UI to /opt/gbo/bin/ui/ path for STAGE-GBO project
Some checks failed
Botlib CI / build (push) Successful in 8s
BotServer CI / build (push) Failing after 25s
Bottest CI / build (push) Successful in 21s
BotUI CI / build (push) Failing after 11s
2026-04-24 01:28:50 +00:00
ef949885c7 fix(ci): add defaults.working-directory and prepare-workspace to both workflows
Some checks failed
Botlib CI / build (push) Successful in 6s
BotServer CI / build (push) Failing after 27s
Bottest CI / build (push) Successful in 26s
BotUI CI / build (push) Failing after 13s
2026-04-24 00:58:00 +00:00
3a1e4b9507 feat(ci): add UI file sync to stage in botui workflow
Some checks failed
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Failing after 29s
Bottest CI / build (push) Successful in 25s
BotUI CI / build (push) Failing after 15s
2026-04-24 00:35:01 +00:00
1090f92926 fix(ci): add prepare-workspace step to create dirs and clone if missing
Some checks failed
Botlib CI / build (push) Successful in 10s
BotServer CI / build (push) Failing after 39s
Bottest CI / build (push) Successful in 35s
BotUI CI / build (push) Successful in 15s
2026-04-24 00:17:45 +00:00
b4ab133dd8 fix(ci): debug UI sync paths and botserver CWD on stage
Some checks failed
Botlib CI / build (push) Successful in 12s
BotServer CI / build (push) Failing after 39s
Bottest CI / build (push) Successful in 35s
BotUI CI / build (push) Successful in 20s
2026-04-23 23:59:56 +00:00
f51532722b fix(ci): sync botui UI to both /opt/gbo/botui/ui and /opt/gbo/bin/botui/ui paths
Some checks failed
Botlib CI / build (push) Successful in 5s
BotServer CI / build (push) Failing after 27s
Bottest CI / build (push) Successful in 26s
BotUI CI / build (push) Successful in 15s
2026-04-23 23:40:40 +00:00
b1f537a433 fix: Use management v1 API for Zitadel user search (PAT token compat)
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 5m17s
Bottest CI / build (push) Successful in 36s
BotUI CI / build (push) Successful in 16s
The v2 user search API rejects PAT tokens (returns Token.Invalid).
The management v1 API accepts PAT tokens correctly.
Also adds fallback for user ID field (id vs userId) in login response.
2026-04-23 23:14:03 +00:00
929de40eac fix(ci): sync botui UI to /opt/gbo/botui/ui/ (relative to botserver at /opt/gbo/bin/)
Some checks failed
Botlib CI / build (push) Successful in 12s
BotServer CI / build (push) Failing after 38s
Bottest CI / build (push) Successful in 34s
BotUI CI / build (push) Successful in 15s
2026-04-23 23:10:59 +00:00
2669288f80 fix(ci): use /opt/gbo/work/generalbots workspace path
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 10m2s
Bottest CI / build (push) Successful in 27s
BotUI CI / build (push) Successful in 12s
2026-04-23 22:30:14 +00:00
e8ef6c838f fix(ci): use generalbots parent repo for UI sync path
Some checks failed
Botlib CI / build (push) Successful in 5s
BotServer CI / build (push) Failing after 0s
Bottest CI / build (push) Successful in 22s
BotUI CI / build (push) Successful in 13s
2026-04-23 22:18:05 +00:00
01de744bcd feat(ci): sync botui UI files to stage on deploy
Some checks failed
Botlib CI / build (push) Successful in 5s
BotServer CI / build (push) Failing after 1s
Bottest CI / build (push) Successful in 23s
BotUI CI / build (push) Successful in 13s
2026-04-23 22:07:57 +00:00
cf00a51245 feat: Separate switchers from suggestions - server-side prompt resolution
Some checks failed
Botlib CI / build (push) Successful in 22s
BotServer CI / build (push) Failing after 0s
Bottest CI / build (push) Successful in 31s
BotUI CI / build (push) Successful in 52s
- Add Switcher struct to botlib (id, label, prompt, color, icon)
- Separate Redis key switchers:{bot_id}:{session_id} from suggestions
- Server-side SWITCHER_PROMPT_MAP resolves prompts (not frontend)
- Frontend sends active_switchers array in USER WS message
- Remove SYSTEM message dispatch (type 7 deprecated)
- Remove hardcoded promptMap from chat.html
- Render switchers from BotResponse.switchers (backend-driven)
- Support custom switchers via ADD_SWITCHER keyword
- Filter switcher-type items from get_suggestions()
- Add switchers field to all BotResponse construction sites
2026-04-23 21:36:09 +00:00
7a5cbf9e8f fix(botui): dynamic switchers styling and custom prompt injection 2026-04-23 21:32:34 +00:00
3a05600b78 fix(ci): use gbuser@SYSTEM_HOST in deploy ssh/scp commands 2026-04-23 21:28:40 +00:00
ff4bc0f3de fix(stage): fix message type collision and switcher logic in chat ui 2026-04-23 21:12:34 +00:00
42c22cfcab fix(botui): ensure heuristic switchers are correctly identified
All checks were successful
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Successful in 2m19s
Bottest CI / build (push) Successful in 20s
BotUI CI / build (push) Successful in 20s
2026-04-22 22:56:10 -03:00
47412722fe fix(ci): add SYSTEM_USER to botui deploy commands
All checks were successful
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Successful in 23s
Bottest CI / build (push) Successful in 22s
BotUI CI / build (push) Successful in 10s
2026-04-22 22:46:06 -03:00
380ad10177 fix(botui): dynamic switchers styling and custom prompt injection
All checks were successful
Botlib CI / build (push) Successful in 5s
BotServer CI / build (push) Successful in 2m17s
Bottest CI / build (push) Successful in 26s
BotUI CI / build (push) Successful in 27s
2026-04-22 22:37:46 -03:00
af2b118f86 docs: respect STAGE-GBO using 10.0.3.x on 10.0.0.1 to test chat.stage.pragmatismo.com.br 2026-04-22 22:28:14 -03:00
71b0731461 fix(ci): use gbuser@SYSTEM_HOST in deploy ssh/scp commands
All checks were successful
Botlib CI / build (push) Successful in 8s
BotServer CI / build (push) Successful in 22s
Bottest CI / build (push) Successful in 25s
BotUI CI / build (push) Successful in 11s
2026-04-22 21:51:00 -03:00
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
8069fbab28 fix(botui): improve HTML streaming rendering to avoid loading dots lock 2026-04-22 20:45:40 +00: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
c8a02b65be fix: HTML rendering in chat + improved PROMPT.md for ramal queries
All checks were successful
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Successful in 23s
Bottest CI / build (push) Successful in 19s
BotUI CI / build (push) Successful in 26s
- Detect HTML content (starts with <) in streaming messages and
  bypass marked.parse() to render directly as innerHTML
- marked.parse() was corrupting the LLM's raw HTML output by
  treating it as Markdown (escaping tags, wrapping in <p>, etc.)
- Updated PROMPT.md for Salesianos to be more explicit about
  returning ramal data directly from KB context without asking
  for unnecessary clarification
- Fixed ramais.bas tool (removed invalid BEGIN/END syntax)
2026-04-22 20:15:21 +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
a923ab2db1 fix(ci): Deploy via temp file + mv to avoid locked binary overwrite
All checks were successful
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Successful in 21s
Bottest CI / build (push) Successful in 19s
BotUI CI / build (push) Successful in 11s
- SCP to botui-new/botserver-new first, then mv into place
- Avoids 'dest open: Failure' when overwriting running binary
- pkill + systemctl stop before deploy, enable + start after
2026-04-22 14:30:37 +00:00
21659340a0 fix(ci): Kill process before scp, enable+start service after deploy
Some checks failed
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Successful in 21s
Bottest CI / build (push) Successful in 21s
BotUI CI / build (push) Failing after 5s
- botui was running outside systemd, so systemctl stop did nothing
- Add pkill -x as fallback after systemctl stop
- Enable service before starting so it persists across reboots
- Same pattern for both botui and botserver
2026-04-22 14:13:49 +00:00
8533e9659c chore: trigger CI with org-level SYSTEM_HOST variable
Some checks failed
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Successful in 22s
Bottest CI / build (push) Successful in 21s
BotUI CI / build (push) Failing after 5s
2026-04-22 14:07:53 +00:00
aa8a6b8bea fix(ci): Add SYSTEM_HOST from vars context to botui and botserver workflows
Some checks failed
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Failing after 2s
Bottest CI / build (push) Successful in 21s
BotUI CI / build (push) Failing after 3s
2026-04-22 13:58:08 +00:00
2a5332060b fix(ci): Fix YAML indentation and remove hardcoded IPs from workflows
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 3s
Bottest CI / build (push) Successful in 19s
BotUI CI / build (push) Failing after 1s
- Proper YAML indentation for env blocks under jobs
- Remove SYSTEM_HOST from env (use repo variable instead)
- Fix botlib path typo
- All 4 workflows: botlib, botserver, bottest, botui
2026-04-22 13:47:23 +00:00
6e822356ac fix(ci): Move env to job level, use vars for SYSTEM_HOST
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 3s
Bottest CI / build (push) Successful in 1m23s
- Move env block from workflow root to job level (Forgejo requirement)
- Replace hardcoded IP with ${{ vars.SYSTEM_HOST }} variable
- Fixes 'yaml: line 11: did not find expected key' error
- Applies to all 4 workflows: botlib, botserver, bottest, botui
2026-04-22 13:32:54 +00:00
319a704f0b fix(bottest): skip integration and e2e tests in CI
All checks were successful
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Successful in 24s
Bottest CI / build (push) Successful in 42s
- Add SKIP_INTEGRATION_TESTS and SKIP_E2E_TESTS env vars to bottest CI
- Add #[ignore] to email_integration_test.rs tests (need localhost:8080)
- Add #[ignore] to e2e/mod.rs tests that call TestHarness::full()
- Most integration tests already respect SKIP_INTEGRATION_TESTS env var
- Most e2e tests already respect SKIP_E2E_TESTS env var
2026-04-22 12:44:40 +00:00
750c5907d0 fix(bottest): set bot in test_process_message before starting session
Some checks failed
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Successful in 22s
Bottest CI / build (push) Failing after 1m0s
The test was creating BotRunner::new() without setting a bot, causing
execute_bot_logic to fail with 'No bot configured' and return
response: None. Now calls set_bot(Bot::default()) before the session.
2026-04-22 12:08:31 +00:00
51a0e71f2c fix: Use pattern matching for double-Result filter in bottest
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Successful in 24s
Bottest CI / build (push) Failing after 30s
2026-04-22 11:41:41 +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
1b25559a1b fix: Use systemctl for botserver deploy to system container
Some checks failed
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Successful in 21s
Bottest CI / build (push) Failing after 7s
BotUI CI / build (push) Failing after 6s
- Stop botserver via 'sudo systemctl stop' before SCP
- Start botserver via 'sudo systemctl start' after copy
- Use health check endpoint to verify deployment
2026-04-22 03:02:17 +00:00
6a45629ed3 fix: Deploy binaries to system container via SSH
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 5s
Bottest CI / build (push) Failing after 7s
BotUI CI / build (push) Failing after 5s
- CI runner runs on alm-ci container but must deploy to system container
- Use scp to transfer binary from alm-ci to system (10.157.134.196)
- SSH to system container to stop old process, copy binary, restart
2026-04-22 02:48:52 +00:00
a4834081b8 fix: Explicitly disable sccache in CI workflows
Some checks failed
Botlib CI / build (push) Successful in 4s
Bottest CI / build (push) Failing after 9s
BotUI CI / build (push) Successful in 4s
BotServer CI / build (push) Failing after 20m5s
The forgejo-runner service inherits RUSTC_WRAPPER=sccache from
systemd environment. Set RUSTC_WRAPPER="" in workflow env to
override and prevent permission denied errors.
2026-04-22 02:20:44 +00:00
4380b39ac5 fix: Remove sccache from CI (permission issues), fix deploy binary paths
Some checks failed
Bottest CI / build (push) Waiting to run
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Has been cancelled
BotUI CI / build (push) Has been cancelled
- Remove RUSTC_WRAPPER=sccache from all workflows (permission denied
  in act container environment)
- Fix deploy paths to use CARGO_TARGET_DIR=/opt/gbo/work/target
  instead of relative target/debug
- Remove path triggers from botserver workflow (all pushes trigger)
- Add mkdir for target and bin dirs in setup steps
2026-04-22 02:07:07 +00:00
f6e869c930 ci: Trigger rebuild with host-mode runner 2026-04-22 01:51:58 +00:00
b537b021c4 fix: Update CI workflows for monorepo structure
Some checks failed
Botlib CI / build (push) Successful in 4m37s
BotServer CI / build (push) Failing after 3m55s
Bottest CI / build (push) Failing after 10m21s
BotUI CI / build (push) Failing after 2m40s
- Fix all workflows to use /opt/gbo/work/generalbots (monorepo)
- Add proper env vars (SCCACHE, CARGO_TARGET_DIR, PATH) to all workflows
- Add deploy steps for botui (with process restart)
- Remove broken workflows for non-Rust packages (botapp, botbook,
  botdevice, botmodels, botplugin)
- Add botlib test workflow
2026-04-22 01:23:37 +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