feat: unified_search + ai_proactive plugins with Ollama Cloud DeepSeek V4

- unified_search: Hybride Suche (PostgreSQL FTS + pgvector + RRF Fusion)
  - 5 Search Providers (Contact, Company, Mail, File, Event)
  - KI Query Understanding (Fuzzy, Facetten via LiteLLM)
  - DMS Text-Extraction (PDF, DOCX, XLSX, PPTX)
  - Embedding Pipeline (ollama/nomic-embed-text, 768 Dim)
  - Background Jobs für Indexierung
  - Plugin-basierte Provider Registry

- ai_proactive: Proaktiver KI-Agent
  - Context-Tracking (Frontend → Backend → Event Bus)
  - Proactive Engine mit LLM Suggestion-Generierung
  - SSE Real-time Push an Frontend
  - 6 AI Tools für Tool Registry
  - Rate-Limiting + User Settings
  - Deep Analysis Background Jobs

- Frontend Integration:
  - useAIContext Hook, SuggestionSidebar, SuggestionBadge
  - ProactiveAISettings Page, Search API Client
  - Globale Suche auf neue API umgestellt

- Tests: test_unified_search.py + test_ai_proactive.py (alle bestanden)
- Config: Ollama Cloud DeepSeek V4 als Default, konfigurierbar
- Dependencies: PyMuPDF, python-docx, python-pptx, pgvector
- Bugfixes: notification type_key length, migration IF NOT EXISTS
This commit is contained in:
Agent Zero
2026-07-18 11:21:51 +02:00
parent 4c9295de21
commit 8cebb4f4e9
52 changed files with 6493 additions and 41 deletions
+38
View File
@@ -0,0 +1,38 @@
import { apiClient } from './client';
export interface SearchResult {
type: 'company' | 'contact' | 'mail' | 'file' | 'event';
id: string;
name: string;
description?: string;
url: string;
}
export interface SearchResponse {
results: SearchResult[];
facets?: Record<string, Array<{ value: string; count: number }>>;
summary?: string;
suggestions?: string[];
}
export async function search(query: string, entityTypes?: string[], limit = 20): Promise<SearchResponse> {
const r = await apiClient.post('/api/v1/search', {
query,
entity_types: entityTypes,
limit,
});
return r.data;
}
export async function searchSuggest(q: string): Promise<string[]> {
const r = await apiClient.get('/api/v1/search/suggest', { params: { q } });
return r.data.suggestions;
}
export async function searchSimilar(entityType: string, entityId: string): Promise<SearchResult[]> {
const r = await apiClient.post('/api/v1/search/similar', {
entity_type: entityType,
entity_id: entityId,
});
return r.data.similar;
}