mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
feat(research): add mana-research service — Phase 1 + 2
New Bun/Hono service on port 3068 that bundles many web-research providers behind a unified interface for side-by-side comparison. All eval runs persist in research.* (mana_platform) so quality can be reviewed later. Providers (Phase 1+2): search: searxng, duckduckgo, brave, tavily, exa, serper extract: readability (via mana-search), jina-reader, firecrawl Endpoints: POST /v1/search, /v1/search/compare — single + fan-out POST /v1/extract, /v1/extract/compare — single + fan-out GET /v1/runs, /v1/runs/:id — history POST /v1/runs/:run/results/:id/rate — manual eval GET /v1/providers, /v1/providers/health — catalog + readiness Auto-routing: when `provider` is omitted, queries are classified via regex (fast path, 0ms) with optional mana-llm fallback, then routed to the first available provider for that query type (news → tavily, academic → exa, semantic → exa, etc.). Credits: server-key calls go through mana-credits reserve → commit/refund so failed provider calls don't charge the user. BYO-keys supported via research.provider_configs (UI arrives in Phase 4). Cache: Redis with graceful degradation (1h TTL for search, 24h for extract). Pay-per-use APIs only — no subscription-gated providers. Docs: docs/plans/mana-research-service.md + docs/reports/web-research-capabilities.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
004fc0b2fd
commit
2bdb48bdd1
56 changed files with 4431 additions and 298 deletions
|
|
@ -75,6 +75,37 @@ const APP_CONFIGS = [
|
|||
},
|
||||
},
|
||||
|
||||
// Mana Research Service (Hono + Bun, Port 3068)
|
||||
{
|
||||
path: 'services/mana-research/.env',
|
||||
vars: {
|
||||
NODE_ENV: () => 'development',
|
||||
PORT: (env) => env.MANA_RESEARCH_PORT || '3068',
|
||||
DATABASE_URL: (env) =>
|
||||
env.MANA_RESEARCH_DATABASE_URL ||
|
||||
'postgresql://mana:devpassword@localhost:5432/mana_platform',
|
||||
REDIS_URL: (env) => env.REDIS_URL || 'redis://localhost:6379',
|
||||
MANA_AUTH_URL: (env) => env.MANA_AUTH_URL || 'http://localhost:3001',
|
||||
MANA_LLM_URL: (env) => env.MANA_LLM_URL || 'http://localhost:3025',
|
||||
MANA_CREDITS_URL: (env) => env.MANA_CREDITS_URL || 'http://localhost:3061',
|
||||
MANA_SEARCH_URL: (env) => env.MANA_SEARCH_URL || 'http://localhost:3021',
|
||||
MANA_SERVICE_KEY: (env) => env.MANA_SERVICE_KEY || 'dev-service-key',
|
||||
CACHE_TTL_SECONDS: (env) => env.MANA_RESEARCH_CACHE_TTL_SECONDS || '3600',
|
||||
CORS_ORIGINS: (env) => env.CORS_ORIGINS || 'http://localhost:5173',
|
||||
BRAVE_API_KEY: (env) => env.BRAVE_API_KEY || '',
|
||||
TAVILY_API_KEY: (env) => env.TAVILY_API_KEY || '',
|
||||
EXA_API_KEY: (env) => env.EXA_API_KEY || '',
|
||||
SERPER_API_KEY: (env) => env.SERPER_API_KEY || '',
|
||||
JINA_API_KEY: (env) => env.JINA_API_KEY || '',
|
||||
FIRECRAWL_API_KEY: (env) => env.FIRECRAWL_API_KEY || '',
|
||||
SCRAPINGBEE_API_KEY: (env) => env.SCRAPINGBEE_API_KEY || '',
|
||||
PERPLEXITY_API_KEY: (env) => env.PERPLEXITY_API_KEY || '',
|
||||
ANTHROPIC_API_KEY: (env) => env.ANTHROPIC_API_KEY || '',
|
||||
OPENAI_API_KEY: (env) => env.OPENAI_API_KEY || '',
|
||||
GOOGLE_GENAI_API_KEY: (env) => env.GOOGLE_GENAI_API_KEY || '',
|
||||
},
|
||||
},
|
||||
|
||||
// Chat Server (Hono/Bun)
|
||||
{
|
||||
path: 'apps/chat/apps/server/.env',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue