Commit graph

41 commits

Author SHA1 Message Date
12de4abf13 Remove unused sqlx dependency and related code
The sqlx database library has been removed from the project along with
associated database-specific code that was no longer being used. This
includes removal of various sqlx-related dependencies from Cargo.lock
and cleanup of database connection pool references.
2025-11-28 09:27:29 -03:00
1c173e76e5 - Defined standard for diagrams. 2025-11-25 08:50:03 -03:00
f44b81e396 - From 4 to 7. 2025-11-23 20:12:09 -03:00
0382a39012 - More general docs. 2025-11-23 13:46:55 -03:00
d365744486 - New stuff, 6.1. 2025-11-21 23:23:53 -03:00
e146add4b2 Migrate HTTP API from Actix to Axum 2025-11-20 13:28:35 -03:00
4cf71b2c6e feat: add diesel_migrations and update dependencies
Added diesel_migrations crate (v2.3.0) to enable database migration functionality. Updated Cargo.toml and Cargo.lock to include the new dependency along with its required sub-dependencies (migrations_internals and migrations_macros). Also made minor cleanups in the codebase:
- Removed unused UI code from platform README
- Cleaned up LLM server initialization code
- Added additional build dependencies in documentation
2025-11-12 12:48:06 -03:00
fd45f4e0dd refactor: simplify UI panels, use pooled DB, add --noui flag
- Removed unused `id` and `app_state` fields from `ChatPanel`; updated constructor to accept but ignore the state, reducing memory footprint.
- Switched database access in `ChatPanel` from a raw `Mutex` lock to a connection pool (`app_state.conn.get()`), improving concurrency and error handling.
- Reordered and cleaned up imports in `status_panel.rs` and formatted struct fields for readability.
- Updated VS Code launch configuration to pass `--noui` argument, enabling headless mode for debugging.
- Bumped several crate versions in `Cargo.lock` (e.g., `bitflags` to 2.10.0, `syn` to 2.0.108, `cookie` to 0.16.2) and added the new `ashpd` dependency, aligning the project with latest library releases.
2025-11-11 09:42:52 -03:00
856e2f0252 feat(bot): persist user messages and refine session handling
Add logic to save user messages to session history for better traceability and context continuity. Simplify session creation error handling and remove redundant warning on closed response channel. Update README with guidance on maintaining production-ready source code.
2025-11-07 10:26:34 -03:00
4ce06daf75 feat(automation): improve prompt compaction with async LLM summarization
- Added initial 30s delay to compact prompt scheduler
- Implemented async LLM summarization for conversation history
- Reduced lock contention by minimizing critical sections
- Added fallback to original text if summarization fails
- Updated README with guidance for failed requirements
- Added new `summarize` method to LLMProvider trait
- Improved session manager query with proper DSL usage

The changes optimize the prompt compaction process by:
1. Reducing lock contention through better resource management
2. Adding LLM-based summarization for better conversation compression
3. Making the system more resilient with proper error handling
4. Improving documentation for development practices
2025-11-06 17:07:12 -03:00
cc741b378e feat: simplify LLM prompt and add debug logging
- Simplified build_llm_prompt by removing redundant formatting
- Added info logging for LLM model and processed content
- Updated README with development philosophy note
- Adjusted announcement schedule timing from 55 to 59 minutes past the hour
2025-11-05 14:15:12 -03:00
1f9100d3a5 feat: refactor auth and models, update LLM fallback strategy
- Simplified auth module by removing unused imports and code
- Cleaned up shared models by removing unused structs (Organization, User, Bot, etc.)
- Updated add-req.sh to comment out unused directories
- Modified LLM fallback strategy in README with additional notes about model behaviors

The changes focus on removing unused code and improving documentation while maintaining existing functionality. The auth module was significantly reduced by removing redundant code, and similar cleanup was applied to shared models. The build script was adjusted to reflect currently used directories.
2025-11-04 23:11:33 -03:00
4b1b68e74d feat(package_manager): add check_cmd to ComponentConfig and services
Added check_cmd field to ComponentConfig struct and implemented health check commands for all services including minio, postgres, valkey, stalwart, caddy, zitadel, forgejo, and forgejo-runner. This allows for proper health monitoring of each service. Also updated IDE guidelines to prohibit magic values and defaults.
2025-11-04 09:25:03 -03:00
854292bae5 feat(ide): update code generation guidelines and improve component startup
- Refine IDE prompt to clarify identifier/character requirements in English
- Add info and debug logging for component startup process in bootstrap
- Fix PostgreSQL command formatting and improve output redirection
- Standardize Valkey command formatting and fix execution command
- Remove LLM server execution command (now handled separately)
- Clean up unused PostgreSQL status check code for tables component
2025-11-04 07:58:43 -03:00
c079d6e452 chore(add-req): update active directories list for requirement generation
Enable automation, basic, config, context, session, kb, and tools directories while disabling bootstrap, file, and drive_monitor to refine which modules are processed by add-req.sh.
2025-11-04 07:03:20 -03:00
191ff1a7d8 docs: expand session management and add authentication section
Enhanced Chapter 1 documentation with detailed session architecture, storage layers, and API endpoints. Added new Part XI on authentication and security to SUMMARY.md, introducing chapters on user and bot authentication, password security, and API endpoints. Improves clarity and coverage of system interaction and security concepts.
2025-11-03 20:42:38 -03:00
a0629cc856 refactor: update configuration prefix to 'pragmatismo-' and add CLI example format 2025-10-27 18:32:36 -03:00
1253ef7fad Add templates for authentication, enrollment, and greeting flows with detailed explanations and examples 2025-10-25 16:51:03 -03:00
d16f34ca93 Revise documentation in Chapter 01 to improve clarity and structure, including updates to the installation instructions and session management overview. 2025-10-25 15:59:06 -03:00
3bb19a3b4c Add comprehensive documentation for GeneralBots, including keyword references, templates, and user guides
- Created detailed markdown files for keywords such as HEAR, TALK, and SET_USER.
- Added examples and usage notes for each keyword to enhance user understanding.
- Developed templates for common tasks like enrollment and authentication.
- Structured documentation into chapters covering various aspects of the GeneralBots platform, including gbapp, gbkb, and gbtheme.
- Introduced a glossary for key terms and concepts related to GeneralBots.
- Implemented a user-friendly table of contents for easy navigation.
2025-10-25 14:50:14 -03:00
30b026585d Add include_dir dependency and use it for embedded migrations
Use include_dir to embed migration scripts and load them at runtime.
This change allows for easier management and versioning of migrations.
2025-10-20 09:42:07 -03:00
6f30517526 - Tables is installing. 2025-10-19 14:02:47 -03:00
aa69c63cee Refactor bootstrap and package manager, add ureq
- Split package manager into separate modules
- Expose only the installer API
- Simplify BootstrapManager to install components and load config
- Pin ureq to 3.1.2 and add ureq‑proto crate
- Clean up configuration code and remove legacy comments
- Update helper scripts and server start command formatting
2025-10-19 11:08:23 -03:00
be1e2575f9 - Refactor in bot package. 2025-10-18 12:01:39 -03:00
79ac6df738 - Added component management. 2025-10-18 09:26:48 -03:00
4fb00820f7 Refactor: remove custom template and add dev-start 2025-10-17 20:32:25 -03:00
e5a9752caa Enhance bot memory and Redis guards
- Derive bot_id from BOT_GUID env var
- Guard concurrent runs with Redis
- Read CACHE_URL for Redis connection
- Extend bot memory keyword to accept comma as separator
- Increase LLM timeouts to 180s (local and legacy)
- Update templates to use bot memory (GET_BOT_MEMORY/SET_BOT_MEMORY)
- Fix start script path to announcements.gbai
2025-10-16 14:22:28 -03:00
4acb9bb8f5 Migrate automations to param and sqlite
- Rename script_name to param in automation flow and DB schema
- Add BotMemory model and bot_memories table
- Remove script_name field from automation
- Enable sqlite support via rusqlite and related crates (optional)
- Update prompts and queries to use param instead of script_name
- Remove deprecated annoucements GBai templates and align add-req.sh
- Refactor main to initialize automation service and simplify startup
2025-10-16 11:43:02 -03:00
83d4a61fcd Add dev prompts for keyword, model, and service 2025-10-16 08:04:13 -03:00
44d4a7b392 Delete dev prompt files and update shared rules
Add rule to shared.md to output only modified files in a .sh script
Remove obsolete dev prompt markdown files
2025-10-16 08:04:06 -03:00
ff89298e61 Refactor async GET and LLM, add connection UI
- Execute GET requests in a dedicated thread with its own Tokio runtime,
  add timeout handling and clearer error messages.
- Tighten `is_safe_path` checks and simplify HTTP/S3 logic.
- Change `llm_keyword` to accept `Arc<AppState>`, add prompt builder,
  run LLM generation in an isolated thread with timeout.
- Update keyword registration call in `basic/mod.rs`.
- Convert template script to use `let` declarations and return a
  boolean.
- Introduce connection‑status indicator in the web UI with styles,
  automatic reconnection attempts, and proper WS/WSS handling for voice.
2025-10-15 21:18:01 -03:00
f401c170d4 - GET ketyowrd for buckets. 2025-10-15 12:45:15 -03:00
51c9aea63b Add botserver prompt, auth template, and CSS 2025-10-14 13:51:54 -03:00
8f96cd1015 Refactor server code and add auth API fixes 2025-10-14 13:51:27 -03:00
d8ebae3aed Update prompt build script and shared guidelines 2025-10-13 09:36:06 -03:00
fa9f163971 - Compiling again. 2025-10-12 11:44:35 -03:00
147d12b7c0 - main.rs is compiling again. 2025-10-11 20:02:14 -03:00
793f2a2d4a - More LLM on compiler. 2025-10-11 13:29:52 -03:00
ecddc10244 - Fixing compilation errors. 2025-10-11 13:29:38 -03:00
283774aa0f - Remove all compilation errors. 2025-10-11 12:29:03 -03:00
9749893dd0 Migration to Rust and free from Azure. 2025-10-06 10:30:17 -03:00