Commit graph

529 commits

Author SHA1 Message Date
78d154cc7f feat(bootstrap): add env check and improve config update logic
Introduce environment existence check to prevent redundant bootstrap runs and ensure smoother startup. Refactor `update_bot_config` to use globally unique config keys and atomic updates for better data consistency.
2025-10-28 21:06:31 -03:00
44c745ef57 feat(config): refresh environment before establishing DB connection
Reload configuration from environment to ensure latest DATABASE_URL and credentials are used before creating the database connection. This prevents stale config values when environment variables change.
2025-10-28 20:48:28 -03:00
0118fd52e9 feat(bootstrap): associate bot configuration updates with bot ID
Add logic to retrieve a default bot ID from the database and pass it to `update_bot_config`, ensuring configuration entries are linked to a specific bot. Updated SQL queries to include `bot_id` and `id` fields for consistency and improved data integrity.
2025-10-28 20:41:21 -03:00
77421683b7 Fix installer: write DATABASE_URL after DB creation and append drive credentials later; update drive credentials only after DB ready 2025-10-28 20:39:14 -03:00
dba8ffe782 - Migration to Open ADAL. 2025-10-28 14:53:45 -03:00
2a2915b543 - Migration to Open ADAL. 2025-10-28 14:20:55 -03:00
f29a3c1259 - Migration to Apache OpenDAL. 2025-10-28 14:00:52 -03:00
0cb16552b3 Refactor dependencies in Cargo.toml and update start.bas dialog
- Removed unused Tauri dependencies and replaced aws-sdk-s3 with opendal for S3 services.
- Cleaned up feature flags in Cargo.toml.
- Simplified the welcome message logic in start.bas and removed redundant comments.
2025-10-28 12:07:14 -03:00
6c511b4ebb
Merge branch 'main' into main 2025-10-28 07:18:56 -03:00
a0629cc856 refactor: update configuration prefix to 'pragmatismo-' and add CLI example format 2025-10-27 18:32:36 -03:00
223f6e2b5d refactor: remove unused dev-start script and clean up code formatting in mod.rs 2025-10-26 21:47:20 -03:00
f1f4531529 fix: update required components and correct exec command path in PackageManager 2025-10-26 20:50:37 -03:00
b033f81071 fix: update file paths to use correct directory for HTML files 2025-10-26 18:49:11 -03:00
f75ca07df1 refactor: remove unnecessary post-install commands for Linux in PackageManager 2025-10-26 18:42:34 -03:00
8bcaadd970 feat: add data download list to ComponentConfig and implement file downloading
- Added `data_download_list` field to `ComponentConfig` struct in `component.rs`.
- Implemented processing of `data_download_list` in the `PackageManager` to download files asynchronously in `facade.rs`.
- Updated `installer.rs` to initialize `data_download_list` for various components.
- Refactored `download_file` function in `utils.rs` to return `anyhow::Error` for better error handling.
2025-10-26 18:26:19 -03:00
6ad29634ea - Termination procedure optional. 2025-10-26 17:13:58 -03:00
f1d4439f47 Update download_file function to set a custom user agent for HTTP requests 2025-10-26 16:00:41 -03:00
ca66f09031 Remove unused aws_config import from bootstrap module 2025-10-26 15:40:46 -03:00
a04d896b80 Refactor AWS SDK configuration in bot update logic and fix comment typos 2025-10-26 15:40:29 -03:00
a8982e5914 Add AWS SDK integration and update bot configuration management
- Introduced AWS SDK dependencies for S3 and CSV handling.
- Implemented logic to check and update the default bot configuration in S3 after component installation.
- Added a new configuration CSV template for bot settings.
- Refactored package manager to register cache component with updated download URL and binary name.
- Updated README and Cargo files to reflect new dependencies and configuration options.
2025-10-26 14:15:43 -03:00
dfe7e4e4b6 Add About and Login pages with responsive design and user authentication
- Created a new About page (index.html) detailing the BotServer platform, its features, and technology stack.
- Developed a Login page (login.html) with sign-in and sign-up functionality, including form validation and user feedback messages.
- Removed the empty style.css file as it is no longer needed.
2025-10-26 00:02:19 -03:00
13574feb23 Refactor BotOrchestrator to remove in-memory cache and implement LangCache for user input responses 2025-10-25 11:18:05 -03:00
2e1c0a9a68 Add caching mechanism to BotOrchestrator for user input responses 2025-10-24 23:36:16 -03:00
6d95c3acd5 Refactor installer to remove app user credentials and streamline environment variable setup 2025-10-24 22:36:49 -03:00
619dc39ddb Update exec_cmd in post_install_cmds_linux to include wait and timeout options 2025-10-24 15:44:50 -03:00
c1778d15ca Enhance package manager to generate and store drive credentials in .env file 2025-10-24 15:39:27 -03:00
a0c367d79b Revert "Implement token-based context usage in chat UI"
This reverts commit 82aa3e8d36.
2025-10-24 11:17:22 -03:00
82aa3e8d36 Implement token-based context usage in chat UI
- Replace simple message count with token-based calculation
- Add token estimation function (4 chars ≈ 1 token)
- Set MAX_TOKENS to 5000 and MIN_DISPLAY_PERCENTAGE to 20
- Update context usage display to show token count percentage
- Track tokens for both user and assistant messages
- Handle server-provided context usage as ratio of MAX_TOKENS
2025-10-23 16:33:23 -03:00
48290c6e3c Add Windows post-install commands for MinIO
Add curl command to download MinIO client for Windows and configure
MinIO client with admin user and policy.

Also add powershell commands to install Valkey on Windows.
2025-10-22 09:25:16 -03:00
fe42812091 Switch cache install to Redis build from source 2025-10-21 22:51:46 -03:00
c242aa010b Enable template bot creation and fix bot schema 2025-10-21 22:43:28 -03:00
9c36aa10fa - More automation from start to web, user sessions. 2025-10-20 23:32:49 -03:00
c595380837 Support legacy bootstrap and update installer 2025-10-20 20:21:31 -03:00
248ad08efc Add new KB and session association tables 2025-10-20 19:49:54 -03:00
de5b651b89 Refactor config loading and DB URL parsing 2025-10-20 16:52:08 -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
93dab6f741 Update PostgreSQL installer commands
Add build command before running cargo Update PostgreSQL installation
commands to use relative paths

Update Linux and macOS installation commands to use `chmod +x ./bin/*`
instead of `chmod +x bin/*`
2025-10-20 07:50:51 -03:00
ed93f70f94 Remove tables install from bootstrap
The tables component is now installed by default. The install command no
longer installs it as part of the bootstrap process.
2025-10-20 07:34:06 -03:00
f8d4e8925f Add indicatif for progress bars and enhance bootstrap
----------------------------------------------------------------
2025-10-19 19:28:08 -03:00
fa0fa390bd Add await to bootstrap start_all call
Fixes the asynchronous bootstrap process by properly awaiting the
start_all method, ensuring all services are started before proceeding.
2025-10-19 15:42:13 -03:00
2af3e3a4b8 Add method to start all components
Implement a new method `start_all` in `BootstrapManager` to start all
components using the `PackageManager`.

This method creates a new `PackageManager` instance and uses it to start
each component in a predefined list.

--- Add remove_local for PackageManager

Remove component specific code

The specific code for component 'tables' has been removed from the
`remove_local` method in `PackageManager`.

The method now simply removes the binary directory for the component.

--- Implement start for PackageManager

Add a new method `start` to `PackageManager` to start a component.

This method takes a component name as an argument and uses the
`exec_cmd` for that component to spawn a new process.

If the component is not found, it returns an error.
2025-10-19 15:03:27 -03:00
6f30517526 - Tables is installing. 2025-10-19 14:02:47 -03:00
88ca214366 Add package manager CLI and component system
Implement core package manager with component configuration, installer
logic, OS detection, and a command‑line interface for install, remove,
list, and status operations.
2025-10-19 11:08:35 -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
e1f9111392 Update password generator to new Rand API
Replace `thread_rng` with `rng` and use `random_range` for character
selection. Rename the `component` argument to `_component` in
`PackageManager::download_binary` to suppress an unused‑parameter
warning.
2025-10-18 22:26:42 -03:00
d970d48aa7 - Postgres updated to 18. 2025-10-18 22:25:59 -03:00
88a52f172e - New bootstrap engine. 2025-10-18 19:08:00 -03:00
d9e0f1f256 - Knowledge management. 2025-10-18 18:20:02 -03:00
a77e0d6aa5 - Added logic to Knowledge management. 2025-10-18 18:19:08 -03:00
27d0349989 - Refactoring bot package. 2025-10-18 12:03:07 -03:00