Commit graph

3613 commits

Author SHA1 Message Date
2e2fc43454 Update sync endpoints as desktop-only, add documentation fields
- /files/sync/status now returns is_desktop=false for web users
- /files/sync/start|stop return helpful message about desktop app requirement
- Add detailed docstrings pointing to botapp/src/desktop/sync.rs
- SyncStatus struct extended with is_desktop and message fields
2025-12-05 06:50:45 -03:00
26f7643f5c feat(auth): Add OAuth login for Google, Discord, Reddit, Twitter, Microsoft, Facebook
- Create core/oauth module with OAuthProvider enum and shared types
- Implement providers.rs with auth URLs, token exchange, user info endpoints
- Add routes for /auth/oauth/providers, /auth/oauth/{provider}, and callbacks
- Update login.html with OAuth button grid and dynamic provider loading
- Add OAuth config settings to config.csv with setup documentation and links
- Uses HTMX for login form, minimal JS for OAuth provider visibility
2025-12-04 22:53:40 -03:00
0c11cf8d5c feat(email): implement email read tracking with pixel support
- Add email-read-pixel config parameter to enable/disable tracking
- Implement tracking pixel injection in HTML emails
- Add sent_email_tracking table with migration
- Create 4 new API endpoints:
  - GET /api/email/tracking/pixel/{id} - serve pixel & record read
  - GET /api/email/tracking/status/{id} - get email read status
  - GET /api/email/tracking/list - list all tracked emails
  - GET /api/email/tracking/stats - get aggregate statistics
- Store tracking data: read_at, read_count, IP, user_agent
- Integrate with send_email() to auto-inject pixel when enabled
2025-12-04 18:15:09 -03:00
896156609b Update PROMPT.md with new LLM workflow and coding rules
New rules added:
- Two LLM work modes: Execution (fazer) vs Review (conferir)
- Rust code only in architecture.md (gbapp chapter)
- Scan and delete misplaced ALL_CAPS.md files
- HTMX-first: minimize JS, delegate to server
- Local assets only: no CDN references
- Documentation validation process for chapters
- No dead code: implement real code, never use _ prefix
- cargo audit must pass with 0 warnings
- diesel only, remove sqlx references
- Library consolidation guidance
2025-12-04 13:55:19 -03:00
d1301c9cd8 Add balanced documentation structure
Documentation organized with equilibrium:
- Small (50-100 lines): Index files
- Medium (250-400 lines): Guides
- Large (450-600 lines): Complete references

Structure:
- docs/api/ - REST endpoints, WebSocket
- docs/guides/ - Getting started, deployment, templates
- docs/reference/ - BASIC language, configuration, architecture

Updated README.md to point to new docs location.
2025-12-04 12:44:18 -03:00
78b359ab06 Remove obsolete CAPS.md documentation files
Deleted planning/tracking documents that are no longer needed:
- MISSING_IMPLEMENTATIONS.md (all 5 apps now implemented)
- GAP_ANALYSIS.md (analysis complete, implemented)
- IMPLEMENTATION_SUMMARY.md (implementations done)
- LIBRARY_MIGRATION.md (migration guide)
- ROADMAP.md (feature planning)
- START_CODING_PROMPT.md (coding guide)
- CHANGELOG.md (version history)
- templates/TEMPLATE_PLAN.md (template planning)
- templates/integration/public-apis.gbai/KEYWORDS_CHECKLIST.md
- templates/integration/public-apis.gbai/QUICKSTART.md
- botlib/VERSION.md (version history)

Kept: README.md, PROMPT.md, and SUMMARY.md (mdbook structure)
2025-12-04 12:28:05 -03:00
5b8b1cf7aa Implement real database functions, remove TODOs and placeholders
- CRM Lead Scoring: Implement get_lead_score_from_db and update_lead_score_in_db
  using bot_memories table with diesel queries
- Bot Manager: Implement real org lookup from database and template loading from filesystem
- KB Manager: Implement get_collection_info to query Qdrant for real statistics
- Analytics: Replace placeholder metrics with actual database queries for users,
  sessions, and storage stats
- Email Setup: Implement Stalwart admin account creation via management API
- Add CollectionInfo struct for Qdrant collection metadata

All implementations use diesel for database operations, no sqlx.
2025-12-03 22:23:30 -03:00
afbffeb934 - botbook extracted from. 2025-12-03 19:59:27 -03:00
7a5e369402 Add comprehensive documentation for GB templates and configuration
modules

Add detailed README documentation for 15+ bot templates including:
- Platform analytics, BI reporting, and web crawler templates
- CRM, contacts, and marketing automation templates
- Legal document processing and office productivity templates
- LLM tools, LLM server, and API client integration templates
- Reminder management and meta-template for creating new templates

Add new Rust configuration modules:
- BM25 config for Tantivy-based sparse
2025-12-03 16:05:50 -03:00
ad311944b8 Update dependencies and remove problematic crates
Drop image (with ravif/paste), sqlx, zitadel, and related dependencies
that were causing compilation issues. Replace image processing with
direct png crate usage. Update rcgen to 0.14 with new API changes.
Refactor CA certificate generation to use Issuer pattern.
2025-12-03 16:05:30 -03:00
e8d171ea40 - New templates. 2025-12-03 07:15:54 -03:00
b7975497aa - Split into botui. 2025-12-02 21:09:43 -03:00
e7fe4e5526 Add documentation infrastructure and certificate pinning
- Add mdBook configuration (book.toml) for documentation
- Create new docs style guide appendix for conversation examples
- Add WhatsApp-style chat CSS for consistent doc formatting
- Replace flow diagram references with screen mockup SVGs
- Create comprehensive SVG interface mockups for all Suite apps:
  - Main suite layout and individual app screens
  - Analytics, Calendar, Chat, Compliance, Designer
  - Drive, Mail, Meet, Paper, Player, Research
  - Sources, Tasks interfaces
- Implement certificate pinning module (cert_pinning.rs) with:
  - SPKI fingerprint validation using SHA-256
  - Support for primary and backup pins
  - Pin rotation with expiration tracking
  - Report-only mode for testing
  - Validation caching for performance
- Add ring crate dependency for cryptographic operations
2025-12-01 16:15:52 -03:00
55d092472b Add monitoring dashboard with live system visualization
Introduce an interactive SVG-based monitoring dashboard that displays:
- Central BotServer node with animated status indicators
- Service nodes for PostgreSQL, Qdrant, MinIO, BotModels, Cache, and
  Vault
- Animated data flow connections between services
- Real-time metrics panels (sessions, messages, response time)
- Resource utilization bars (CPU, memory, GPU, disk)
- Live activity ticker

The HTML version includes
2025-12-01 08:35:47 -03:00
09ccb5e0dd Update monitoring dashboard with animated SVG visualization
Replace static grid layout with interactive live system view featuring:
- Animated data packets flowing between service nodes
- Real-time metrics panels with HTMX polling
- Service status dots with pulse animations
- Resource utilization bars
- Live activity ticker
- Toggle between Live and Grid views (V key)

Documentation updated to reflect new visualization and API endpoints.
2025-12-01 08:35:28 -03:00
2d0c00cd71 - SVG UI. 2025-12-01 02:22:35 -03:00
ffd492a75f Add toml dependency for Askama custom filters config 2025-11-30 23:48:08 -03:00
fd764709fc Add template samples and compliance API documentation
- Add template-samples.md with ready-to-use bot examples and sample
  conversations for CRM, FAQ, calendar, HR, sales, IT helpdesk,
  compliance, broadcast, and analytics templates
- Add compliance-api.md with full REST API reference for data subject
  requests, consent management, scanning
2025-11-30 22:39:24 -03:00
ab98cfd82e Add template samples and compliance API docs to summary 2025-11-30 22:39:00 -03:00
c414a99d58 - Screen manuals. 2025-11-30 22:33:54 -03:00
e68a12176d Add Suite app documentation, templates, and Askama config
- Add askama.toml for template configuration (ui/ directory)
- Add Suite app documentation with flow diagrams (SVG)
  - App launcher, chat flow, drive flow, tasks flow
  - Individual app docs: chat, drive, tasks, mail, etc.
- Add HTML templates for Suite apps
  - Base template with header and app launcher
  - Auth login page
  - Chat, Drive, Mail, Meet, Tasks templates
  - Partial templates for messages, sessions, notifications
- Add Extensions type to AppState for type-erased storage
- Add mTLS module for service-to-service authentication
- Update web handlers to use new template paths (suite/)
- Fix auth module to avoid axum-extra TypedHeader dependency
2025-11-30 21:00:48 -03:00
36d5f3838c Add Suite user manual and HTMX architecture documentation
- Add comprehensive user manual covering all Suite applications
- Document HTMX architecture patterns used throughout the UI
- Complete designer.html JavaScript implementation
- Complete sources/index.html with remaining UI and event handlers
- Update SUMMARY.md with new documentation entries
2025-11-30 19:50:47 -03:00
5edb45133f Add docs, UI pages, code scanner, and Docker deployment guide
- Add CRM contacts template documentation
- Add Docker deployment documentation with compose examples
- Add BASIC code scanner for security compliance checking
- Add visual dialog designer UI (designer.html)
- Add drive file manager UI (drive/index.html)
- Add sources browser UI (sources/index.html)
- Add compliance report tool UI (tools/compliance.html)
2025-11-30 19:36:50 -03:00
3ca3a2c3e3 F)
- Implement code sandbox for Python/JS/Bash execution
- Implement agent reflection for self-improvement
- Implement SSE streaming for real-time responses
- Add episodic memory, knowledge graph, and approval modules
- Add LLM observability with metrics and cost tracking
- Update documentation with new keywords and features
2025-11-30 19:18:42 -03:00
5165131b06 Add implementation plan and multi-agent features
This commit introduces comprehensive documentation and implementation
for multi-agent orchestration capabilities:

- Add IMPLEMENTATION-PLAN.md with 4-phase roadmap
- Add Kubernetes deployment manifests (deployment.yaml, hpa.yaml)
- Add database migrations for multi-agent tables (6.1.1, 6.1.2)
- Implement A2A protocol for agent-to-agent communication
- Implement user memory keywords for cross-session persistence
- Implement model routing for dynamic L
2025-11-30 19:18:23 -03:00
430ec12357 Remove documentation files that have been merged into the mdbook
structure under docs/src/. These files were either duplicates, outdated,
or have been properly integrated into the structured documentation.
2025-11-30 18:07:22 -03:00
10e578b1a3 d suggestions
- ADD SUGGESTION TOOL "name" WITH params AS "text" for pre-filled
    params

- Add secrets module for Vault integration with minimal .env approach

- Update LLM providers documentation with model recommendations

- Refactor template dialogs for consistency:
  - Use PARAM with proper types and DESCRIPTION
  - Use WITH blocks for structured data
  - Simplify TALK messages (remove emoji prefixes)
  - Add RETURN statements to tools
  - Add proper CLEAR SUGGESTIONS and ADD TOOL patterns

- Add analytics-dashboard template demonstrating KB Statistics usage ```
2025-11-30 16:40:11 -03:00
5d21bba1e1 ``` Add KB Statistics keywords and infrastructure documentation
- Add KB Statistics keywords for Qdrant vector database monitoring: KB
  STATISTICS, KB COLLECTION STATS, KB DOCUMENTS COUNT, KB DOCUMENTS
  ADDED SINCE, KB LIST COLLECTIONS, KB STORAGE SIZE

- Add comprehensive infrastructure documentation:
  - Scaling and load balancing with LXC containers
  - Infrastructure design with encryption, sharding strategies
  - Observ
2025-11-30 16:25:51 -03:00
48c1ae0b51 , dt.month, dt.hour, dt.is_weekend, etc.)
- Add startup wizard module for first-run configuration
- Add white-label branding system with .product file support
- Add bot manager for lifecycle, MinIO buckets, and templates
- Add version tracking registry for component updates
- Create comparison doc: BASIC vs n8n/Zapier/Make/Copilot
- Add WhatsApp-style sample dialogs to template documentation
- Add data traceability SVG diagram ```
2025-11-30 15:07:29 -03:00
635f3a7923 Looking at this diff, I need to summarize the significant documentation
and code changes:

``` Add natural language scheduling, docs, wizard, and branding

- Add SET SCHEDULE natural language parser supporting patterns like
  "every hour", "at 9am", "weekdays at 8am", "business
2025-11-30 12:20:48 -03:00
a41ff7a7d4 Add documentation and core BASIC language functions
- Add SET_SCHEDULE.md and TEMPLATE_VARIABLES.md documentation
- Implement array functions (CONTAINS, PUSH/POP, SLICE, SORT, UNIQUE)
- Implement math functions module structure
- Implement datetime functions module structure
- Implement validation functions (ISNULL, ISEMPTY, VAL, STR, TYPEOF)
- Implement error handling functions (THROW, ERROR, ASSERT)
- Add CRM lead scoring keywords (SCORE_LEAD, AI_SCORE_LEAD)
- Add messaging keywords (SEND_TEMPLATE, CREATE_TEMPLATE)
2025-11-30 11:09:16 -03:00
50eae38d36 Looking at this diff, I can see it's a comprehensive documentation
update and code refactoring focused on:

1. Adding new documentation pages to the table of contents
2. Restructuring the bot templates documentation
3. Changing keyword syntax from underscore format to space format (e.g.,
   `SET_BOT_MEMORY` → `SET BOT MEMORY`)
4. Updating compiler and keyword registration to support the new
   space-based syntax
5. Adding new keyword modules (social media, lead scoring, templates,
   etc.)

Refactor BASIC keywords to use spaces instead of underscores

Change keyword syntax from underscore format (SET_BOT_MEMORY) to more
natural space-separated format (SET BOT MEMORY) throughout the codebase.

Key changes:
- Update Rhai custom syntax registration to use space tokens
- Simplify compiler preprocessing (fewer replacements needed)
- Update all template .bas files to use new syntax
- Expand documentation with consolidated examples and new sections
- Add new keyword modules: social_media, lead_scoring, send_template,
  core_functions, qrcode, sms, procedures, import_export, llm_macros,
  on_form_submit
2025-11-30 10:53:59 -03:00
e5ff51de76 Add tar/flate2 deps and document new BASIC keywords
Add flate2 and tar dependencies for archive extraction support in file
operations. Update documentation with:

- New BASIC keywords: SWITCH/CASE, WEBHOOK, INSTR, IS_NUMERIC
- HTTP operations: POST, PUT, PATCH, DELETE_HTTP, GRAPHQL, SOAP
- Data operations: SAVE, INSERT, UPDATE, DELETE, MERGE, FILTER, etc.
- File operations: READ, WRITE, COMPRESS, EXTRACT, GENERATE_PDF, etc.

Simplify README and add appendices for external services and environment
variables. Add monitoring dashboard and player UI docs.
2025-11-30 07:53:58 -03:00
46d6ff6268 Add desktop tools, antivirus, and editor modules
- Add desktop tools module with drive cleaner, Windows optimizer, and
  Brave browser installer
- Add antivirus module with ClamAV integration and Windows Defender
  management
- Add tools.html template for settings page integration
- Add standalone editor.html for file editing
- Re-export new types from desktop and security
2025-11-29 21:23:19 -03:00
a21292daa3 Add multimodal module for botmodels integration
Introduces IMAGE, VIDEO, AUDIO, and SEE keywords for BASIC scripts that
connect to the botmodels service for AI-powered media generation and
vision/captioning capabilities.

- Add BotModelsClient for HTTP communication with botmodels service
- Implement BASIC keywords: IMAGE, VIDEO, AUDIO (generation), SEE
  (captioning)
- Support configuration via config.csv for models
2025-11-29 20:40:08 -03:00
d761a076aa Update executive vision with expanded feature set and corrections
- Add 14 new capabilities to the feature table including calendar, task
  automation, whiteboard, video conferencing, analytics, and more
- Expand SaaS replacement comparison with 7 additional products
- Update annual savings calculation from $1,500 to $3,000 per user
- Add technical infrastructure details for new components
- Fix BASIC script example formatting and syntax
- Correct installation command from general-bots to botserver
- Add DeepSeek to supported LLM list
- Minor text refinements for clarity
2025-11-29 17:46:27 -03:00
d86cf106c4 - Executive summary. 2025-11-29 17:46:05 -03:00
5aa175845e - More htmx. 2025-11-29 17:27:13 -03:00
9ecbd927f0 HTMX enters. 2025-11-29 16:29:28 -03:00
ee4c0dcda1 Add message type constants and documentation
Introduce a shared enum-based system for categorizing message types
across the Rust backend and JavaScript frontend. This replaces magic
numbers with named constants for improved type safety, readability, and
maintainability.

The implementation includes:
- Rust MessageType enum with serialization support
- JavaScript constants matching the Rust enum values
- Helper
2025-11-29 11:17:01 -03:00
752d455312 Replace magic numbers with MessageType constants
This commit replaces all hardcoded message type integers (0, 1, 2, 3, 4,
5) with named constants from a new MessageType module, improving code
readability and maintainability across the codebase.
2025-11-28 18:15:09 -03:00
2dca1664dd run
- Database migrations run automatically on startup
- New QUICK_START.md with usage examples and troubleshooting
- Better handling of already-running services
2025-11-28 15:06:30 -03:00
b4250785c8 Update default features and add quick start guide
Replaces ui-server with console in default features, adds comprehensive
quick start documentation, implements automatic database migrations at
startup, and ensures critical services (PostgreSQL and MinIO) are
started automatically.

Key changes:
- Console UI now enable
2025-11-28 13:50:28 -03:00
92dbb7019e Add .env.example with comprehensive configuration template
The commit adds a complete example environment configuration file
documenting all available settings for BotServer, including logging,
database, server, drive, LLM, Redis, email, and feature flags.

Also removes hardcoded environment variable usage throughout the
codebase, replacing them with configuration via config.csv or
appropriate defaults. This includes:

- WhatsApp, Teams, Instagram adapter configurations
- Weather API key handling
- Email and directory service configurations
- Console feature conditionally compiles monitoring code
- Improved logging configuration with library suppression
2025-11-28 13:19:03 -03:00
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
a42915f7fd Add SQLx dependencies for calendar feature 2025-11-27 23:10:43 -03:00
f8e2e0360b Add metadata and refactor BASIC compiler
- Add package metadata (keywords, categories) to Cargo.toml
- Add #[must_use] attributes to constructor methods
- Simplify conditional logic by inverting if-else blocks
- Replace string formatting with interpolation syntax
2025-11-27 15:19:17 -03:00
36c8203fb5 Refactor InstagramAdapter initialization and implement file sending
The InstagramAdapter constructor is simplified to remove unused
parameters, and the send_instagram_file function is fully implemented
with S3 upload and message sending capabilities.
2025-11-27 13:53:16 -03:00
58f19e6450 olithic route configuration
- Add route configuration and handlers to calendar module
- Add route configuration and handlers to task module
- Update main.rs to build router from module configurations
- Fix various compiler warnings (dead code, unused variables)

This improves code organization by keeping routes co-located with their
implementation logic.
2025-11-27 13:53:00 -03:00
6888b5e449 Looking at the diff, I can see this commit removes the api_router.rs
file and distributes its functionality to individual modules. The
calendar and task modules now have their own route configuration and API
handlers.

Remove centralized API router in favor of module-based routing

Decentralizes API route configuration by moving route definitions and
handlers to their respective modules. Each module now exports its own
`configure_*_routes()` function that is merged in main.rs.

- Delete api_router.rs with its mon
2025-11-27 09:38:50 -03:00