Commit Graph

606 Commits

Author SHA1 Message Date
Agent Zero a897bca390 fix: use label IDs instead of strings for Forgejo issue creation 2026-07-26 15:14:24 +02:00
Agent Zero 14967fc70b fix: remove unused Request param from forgejo error reporter status endpoint 2026-07-26 13:02:11 +02:00
Agent Zero 227ab7546b fix: add routes to forgejo_error_reporter plugin manifest 2026-07-26 12:57:19 +02:00
Agent Zero c3e41906bf feat: add forgejo_error_reporter plugin for automatic error reporting to Forgejo issues 2026-07-26 12:49:39 +02:00
Agent Zero b9d05e2198 fix: exempt /api/v1/errors from CSRF for frontend error logging 2026-07-26 12:24:31 +02:00
Agent Zero 808da564f3 fix: improve error handling and stability - no logout on transient errors, add ErrorBoundary, global error logging 2026-07-26 12:18:52 +02:00
Agent Zero e12b85c2ce fix: correct Debian Trixie package name libgdk-pixbuf-2.0-0 in Dockerfile 2026-07-26 09:51:03 +02:00
Agent Zero 32a991a7ad fix: add weasyprint to requirements.txt and Dockerfile for PDF generation 2026-07-26 09:45:13 +02:00
Agent Zero 4dbbc422ce fix: repair print/PDF in Reports — fix document.write/appendChild mix, add printPdfBlob for print format 2026-07-26 09:40:43 +02:00
Agent Zero 0571cc8193 Fix: Add updated_at and deleted_at columns to backups migration (TenantMixin) 2026-07-26 03:22:40 +02:00
Agent Zero 79ece0fe2e Phase 4: Webhooks, Backup/Restore UI, Onboarding/Tutorial
- Webhooks Backend: model, schema, service (HMAC-SHA256, httpx), routes, event bus dispatcher, migration 0042
- Webhooks Frontend: SettingsWebhooksPage (CRUD, test button, event multi-select), API client
- Backup/Restore Backend: model, schema, service (pg_dump/pg_restore), routes (admin-only), migration 0043
- Backup/Restore Frontend: SettingsBackupPage (create, list, restore dialog with RESTORE confirmation, auto-refresh)
- Onboarding: OnboardingTour (8 steps, custom CSS overlay), WelcomeDialog, onboardingStore (zustand + localStorage)
- Onboarding integrated into AppShell
- Routes: /settings/webhooks, /settings/backup registered
- Settings nav: Webhooks, Backup & Restore entries added
- Migration conflict fixed: 0042_webhooks → 0043_backups chain
2026-07-26 03:17:40 +02:00
Agent Zero 10dcc8ae90 Phase 3: Saved Filters UI, Entity History UI, Activity Timeline, API Docs Link
- Saved Filters: SavedFilterBar (dropdown, apply, delete), SaveFilterDialog (name + save)
- Entity History: EntityHistoryPanel (timeline, restore, undo), HistoryDiff (field changes visual)
- Activity Timeline: ActivityTimelinePage (grouped by day, pagination), ActivityFilter (user/entity/action/date)
- API Docs Link: TopBar user menu entry, SettingsSystem Entwickler section (Swagger, ReDoc, OpenAPI)
- Routes: /activity registered
- Menu items: Aktivitäten added to automation plugin manifest
2026-07-26 03:08:26 +02:00
Agent Zero a7e3890634 Phase 2: Tags UI, Custom Fields UI, Notifications Bell
- Tags UI: TagsPage (CRUD, color picker), TagBadge, TagSelector (multi-select, inline creation)
- Custom Fields Backend: model, schema, service, routes, migration 0041
- Custom Fields Frontend: CustomFieldsPage (definitions CRUD), CustomFieldRenderer (dynamic field rendering)
- Custom Fields: _collect_custom_field_definitions() extended to merge DB definitions with plugin definitions
- Notifications Bell: NotificationBell (30s polling, unread badge), NotificationDropdown, NotificationItem
- NotificationBell integrated into TopBar
- Routes: /tags, /settings/custom-fields registered
- Settings nav: Custom Fields entry added
- Menu items: Tags added to automation plugin manifest
2026-07-26 03:02:25 +02:00
Agent Zero 444c7fdb88 Fix: Remove function field from export/import — not on Contact model 2026-07-26 02:45:04 +02:00
Agent Zero d468456fe1 Fix: Contact model has phone_2 not mobilephone — fix export+import service 2026-07-26 02:42:07 +02:00
Agent Zero a3a5a10514 Phase 1: Workflows UI, Dedup/Merge UI, Import/Export UI, Print/PDF
- Workflows UI: full page with definitions/instances tabs, step editor, instance detail with approve/reject
- Dedup/Merge UI: duplicate detection, side-by-side comparison, field-level merge dialog, merge history
- Import/Export UI: import wizard (dry-run preview), export panel (CSV/XLSX), backend export route added
- Print/PDF: PrintButton component, print.css, integrated in Contacts/Calendar/Reports/ContactDetail
- Backend: GET /api/v1/export endpoint, export_companies_csv() service function
- Routes: /workflows, /contacts/dedup, /import-export registered
- Menu items: Workflows, Import/Export, Duplikate added to automation plugin manifest
- IMPLEMENTATION_PLAN.md: audit-corrected plan for all 14 remaining features
2026-07-26 02:35:44 +02:00
Agent Zero 6d484ed747 Fix: handle paginated responses (items wrapper) for dms/automation/agents/ai hooks 2026-07-26 01:35:03 +02:00
Agent Zero 15a6c9b6c6 Fix: useReportPresets handle paginated response (items wrapper) 2026-07-26 01:33:04 +02:00
Agent Zero 90a6a1b929 Fix: useContactFolders handle paginated response (items wrapper) 2026-07-26 01:23:47 +02:00
Agent Zero b067369651 Fix: deploy.py status check — accept finished as success 2026-07-26 00:59:10 +02:00
Agent Zero 30b94fc738 Fix: use direct plugin module imports instead of BUILTIN_PLUGINS 2026-07-26 00:52:27 +02:00
Agent Zero 054ecb1c91 Fix: register plugin routes in create_app() not lifespan(); add status column to contacts migration 0039; add updated_at to user_tenants migration 0037 2026-07-26 00:42:31 +02:00
Agent Zero 07da2216b6 Fix: Vite circular dependency — move zustand/immer to react-vendor chunk 2026-07-26 00:25:37 +02:00
Agent Zero e8401c280f Add DEPLOY.md: deployment guide for Coolify and Docker Compose 2026-07-25 23:53:25 +02:00
Agent Zero 12220cc640 Deploy: portable volume config via Coolify DB, works on any instance 2026-07-25 23:50:06 +02:00
Agent Zero 745b634e7c Deploy automation: 8-step pipeline with volume mounting, multi-container docker-compose 2026-07-25 22:48:38 +02:00
Agent Zero 20e6545aa1 Add automated deploy script with RLS, worker, health checks 2026-07-25 22:42:05 +02:00
Agent Zero 388fbdd109 Fix: ARQ cron second schedule must be set of ints, not string 2026-07-25 22:07:56 +02:00
Agent Zero 3828e1b029 Fix: drop RLS policy on users before dropping tenant_id column in migration 0037 2026-07-25 21:29:17 +02:00
Agent Zero f6a099390e Fix: remove updated_at from user_tenants INSERT in migration 0037 2026-07-25 21:24:30 +02:00
Agent Zero f8f0d3e52a Fix: use pg_index.indisunique instead of pg_indexes.unique in migration 0037 2026-07-25 21:19:47 +02:00
Agent Zero 2e9fafc289 Fix: correct SQL quoting for unique keyword in migration 0037 2026-07-25 21:15:20 +02:00
Agent Zero 36fc5b868e Fix: SQL syntax error in migration 0037 (unique keyword quoting) 2026-07-25 21:11:11 +02:00
Agent Zero 727d86614e Security fixes: P0-P2 complete (22 fixes)
P0 (7): Auth-bypass removed, migrations fixed, plugin-upload disabled, RLS FORCE+WITH CHECK, plugin double-registration fixed, persistent volume, domain removed
P1 (11): User/tenant model, Redis centralized, worker separated, transactional outbox, XSS fixed, DMS chunked streaming, permissions unified, password reset, metrics secured, config/docs fixed, cross-tenant FK
P2 (4): Contact model normalized, cross-imports reduced 94%, commands+state machines for contacts/dms/mail/calendar, SPA path-traversal

8 new migrations, 99 unit tests, 13 commands, 8 contracts, 72 files changed
2026-07-25 21:03:46 +02:00
Agent Zero aaa7406929 perf: Fix all 7 code analysis issues
HIGH (Performance):
- Replace 8 sync file operations with aiofiles in async context (storage, mail,
  report_generator, dms_bridge, ai_assistant)
- Frontend bundle splitting: manualChunks for react-vendor, ui-components, tanstack,
  markdown, icons, utils, i18n (ui chunk 936K → ~19K)

MEDIUM (Architecture):
- Worker circular deps: Replace direct plugin imports with job_registry.py pattern
  (register_job/get_all_jobs, importlib-based lazy loading)
- App-wide ErrorBoundary: New ErrorBoundary.tsx component, wrapped in AppShell
  and all standalone routes

LOW (Code Quality):
- N+1 query fix: selectinload(Contact.contact_persons) in list_contacts()
- O(n²) dedup fix: SQL GROUP BY for email/phone duplicates, Dict-based name grouping
- Response format standardization: 7 routes converted from plain arrays to
  {items: [...], total: N} format
2026-07-25 09:19:32 +02:00
Agent Zero 224a71ba56 fix: CronJobContribution tenant_id error - use default tenant from DB
- register_plugin_contributions was accessing cron_def.tenant_id which doesn't exist
- All Contribution Models (AgentDefinitionContribution, AutomationTemplateContribution,
  CronJobContribution) lack tenant_id field
- Fix: Query default tenant from DB and use it for all contribution registrations
- Also fixes agent_def.tenant_id and auto_def.tenant_id which had the same issue
2026-07-25 03:40:37 +02:00
Agent Zero 6e7e39d101 fix: Event-bus workflow trigger, RBAC on all routes, search provider, events, cron jobs
Critical fixes:
- Event Bus → Workflow auto-trigger: wildcard subscription starts workflows on matching events
- Kommunikation routes: require_permission on all 30+ endpoints (comm:read/write/delete/manage)
- Permissions routes: require_permission('permissions:admin') on all management endpoints
- CompanySearchProvider registered in auto_register_providers()

Medium fixes:
- system_notif events: 10 event_bus.publish() calls added (lead.created, contact.created/updated,
  task.created/overdue, mail.received, user.created, workflow.completed, notification.created, backup.*)
- Cron jobs: backup_check (daily), search_index_check (daily), workflow_timeout (5min) registered
- AI tool permission: call_crm_api now requires 'ai:write' permission
- New file: automation/jobs.py with backup_check and search_index_check functions
2026-07-25 03:22:55 +02:00
Agent Zero b01c798739 fix: Chat search index, DMS group-share user_id, verify workflows and mail salt
- Implement CommSearchProvider: index_message(), reindex_all() with FTS + vector search
- Add migration 0035: search_tsv + embedding columns on comm_messages
- Fix DMS group-share: use current_user user_id instead of random uuid4()
- Workflows already DB-configurable (seed from onboarding.py, loaded from DB)
- Mail salt already dynamic with legacy fallback (migration 0026)
2026-07-25 03:02:41 +02:00
Agent Zero 6412eb03a8 fix: Replace automation stubs with real execution engine
- Replace automation execute stub with run_automation() from execution_engine.py
- Replace agent execute stub with run_agent() from agent_runner.py
- Persist automation settings in system_settings.automation_config JSONB
- Add migration 0034 for automation_config column
- Settings are now saved and loaded from database instead of being ignored
2026-07-25 02:52:07 +02:00
Agent Zero 46cadb5165 feat: MCP Server - generic CRM API access instead of 9 hardcoded tools
- Replace 9 hardcoded MCP tools with single call_crm_api tool
- MCP clients now have full access to all 259 CRM API endpoints
- Same generic approach as AI Assistant: method + path + body
- Internal auth via X-Internal-Call headers with tenant/user context
2026-07-25 02:41:55 +02:00
Agent Zero e2cd435861 feat: Generic CRM API tool - AI can control entire system
- Create call_crm_api tool: single tool that can call ANY CRM API endpoint
- Inject OpenAPI spec into system prompt so AI knows all available endpoints
- Always include call_crm_api in agent tools (not just via tool_ids)
- Extend get_current_user to support internal header-based auth (X-Internal-Call,
  X-Tenant-Id, X-User-Id) for AI tool API access
- No more manual tool-per-endpoint registration needed
2026-07-25 02:31:33 +02:00
Agent Zero 6a622665a2 fix: Register bank_accounts router in main.py
- Add bank_accounts import to main.py
- Add app.include_router(bank_accounts.router)
- Add bank_accounts to permissions metadata
2026-07-25 02:16:20 +02:00
Agent Zero 3e7abd4518 feat: Mini-Apps registry, Stammdaten backend persistence, bank accounts
- Register 6 mini-apps in kommunikation plugin (contact_picker, file_share,
  calendar_invite, mail_forward, ai_search, task_create)
- Connect AdressenTab to backend API (GET/POST/PATCH/DELETE /addresses)
- Create BankAccount model, schema, service, routes + migration 0033
- Connect KontenTab to backend API (GET/POST/PATCH/DELETE /bank-accounts)
- AI tools already working: 7 tools registered (hybrid_search, get_contact_mails, etc.)
2026-07-25 02:11:29 +02:00
Agent Zero 382f500f39 fix: Add Communication page as explicit route in router
- Add /communication route at top level (not inside /settings)
- Add CommunicationPage lazy import alongside other pages
- This ensures the page is properly code-split and loaded in production
2026-07-25 01:43:07 +02:00
Agent Zero 5d5bfb4b38 fix: Communication page, search field mapping, type compatibility
- Create Communication.tsx page with tree structure (System, KI, Kollegen)
- Chat window with messages, reactions, attachments, mini-apps
- WebSocket real-time updates
- AI streaming integration for AI conversations
- Fix search.ts: map backend fields (entity_type/entity_id/title/snippet)
  to frontend format (type/id/name/description/url)
- Fix hooks.ts: import SearchResult from search.ts instead of redefining
- Fix JSX syntax error in Communication.tsx title attribute
2026-07-25 01:32:20 +02:00
Agent Zero 868bb274ef feat: standalone buttons for all plugin pages + window system for modals
Standalone buttons:
- Add ExternalLink button to Dms, Calendar, Mail, ContactsList toolbars
- Create standalone pages for each (no sidebar, full screen)
- Add standalone routes outside ProtectedRoute

Window system for modals:
- AppointmentModal -> AppointmentEditForm + openWindow()
- ComposeModal -> MailComposeForm + openWindow()
- FilePreviewModal -> FilePreviewContent + openWindow()
- Calendar, Mail, Dms use openWindow() instead of modal state
2026-07-25 00:21:37 +02:00
Agent Zero 2f6c3175a3 feat: add standalone AI assistant window button
- Add ExternalLink button to AI assistant toolbar
- New route /ai-assistant-standalone renders AIAssistantPage without sidebar
- Opens in new browser window via window.open
2026-07-24 23:55:18 +02:00
Agent Zero 35e87b5d51 feat: window management system with minimize, fullscreen, and AI chat split
- Window manager store (Zustand) for managing open/minimized/fullscreen windows
- Window component with header controls: KI-Chat toggle, fullscreen, minimize, close
- AI chat panel with streaming chat via existing /ai/sessions API
- WindowContainer renders all non-minimized windows
- TopBar shows minimized windows as clickable pills
- ContactEditForm extracted from ContactEditModal for window rendering
- ContactsList and ContactDetailPage use openWindow() instead of modal state
- Draggable windows with z-index management
2026-07-24 23:42:53 +02:00
Agent Zero c1d49e4dfe feat: consolidate AI settings into one page with tabs
- New SettingsAI page with 3 tabs: KI Assistent, Proaktive KI, MCP
- Remove individual AI/proactive/mcp from settings nav
- Settings nav now 6 items: Stammdaten, Nutzerverwaltung, System, Mail, KI Einstellungen, Benachrichtigungen
2026-07-24 22:46:53 +02:00
Agent Zero 8b3873d676 feat: restructure settings menu + add automation/agents to topbar
TopBar:
- Add Automation and Agenten to user dropdown menu

Settings restructure:
- Stammdaten: Firmendaten, Adressen (CRUD), Konten (CRUD), Sonstige Daten
- Nutzerverwaltung: Benutzer, Rollen, Gruppen as tabs
- System: Menü, Theme, Plugins as tabs
- Reduce nav items from 15+ to 8
- Add end prop to all settings NavLinks
2026-07-24 22:35:35 +02:00