managarten/apps/api/src/modules
Till JS 121a0c0a6f feat(api): POST /api/v1/context/import-url — crawler + optional LLM summary
New backend endpoint that wraps mana-crawler + mana-llm in a single
call so the Kontext "Aus URL" UI can hit one route:

- Starts a crawl job (single page or up-to-20-page deep crawl) via
  mana-crawler's /api/v1/crawl, polls status up to 90s, then fetches
  paginated results.
- When multiple pages are returned, joins them into one markdown
  document with H1-per-page section headers separated by ---.
- When summarize=true, routes the collected markdown through
  mana-llm/chat/completions with a system prompt that asks for
  "Überblick / Kernaussagen / Details" H2 structure in the source
  language. sanitizeSummary() strips the common local-LLM artefacts
  (```markdown fences, "Hier ist …:" preamble, stray leading H1)
  so the output drops cleanly into the Kontext doc. On summary
  failure the endpoint returns 502 rather than silently falling
  back to the raw crawl.
- Credits are validated + consumed via @mana/shared-hono/credits
  (1 credit crawl-only, 5 crawl+summary) under the new
  AI_CONTEXT_IMPORT_URL action.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:24:19 +02:00
..
calendar feat(api): create unified API server with first 3 modules 2026-04-02 21:12:15 +02:00
chat refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
contacts refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
context feat(api): POST /api/v1/context/import-url — crawler + optional LLM summary 2026-04-15 14:24:19 +02:00
food refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
guides refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
moodlit feat(api): port remaining 12 modules to unified API server 2026-04-02 21:34:08 +02:00
music refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
news refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
picture refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
plants refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
presi refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
research refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
storage refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
todo refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
traces refactor: rename planta → plants, clean up codebase 2026-04-12 18:59:44 +02:00
who feat(who): add character dossier system for staged fact disclosure 2026-04-10 17:40:16 +02:00