feat(articles): bulk-import AI tool wiring (Phase 6)

Adds import_articles_from_urls tool to the articles module so the AI
Workbench can kick off a bulk-import job in one call. Auto-policy: the
job itself is the unit of approval, no per-article propose card.

- shared-ai schemas: declare the tool name + propose/auto policy
- articles/tools.ts: implement parseUrls + articleImportsStore.createJob
- consume-pickup.ts: handle the new event type
- events/catalog.ts: register article-import lifecycle events
- imports.svelte.ts: minor polish

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-28 22:33:31 +02:00
parent 5f0a1b5053
commit 0fc16d1bfd
5 changed files with 130 additions and 3 deletions

View file

@ -436,6 +436,21 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
},
],
},
{
name: 'import_articles_from_urls',
module: 'articles',
description:
'Erstellt einen Bulk-Import-Job für mehrere URLs. Server extrahiert sie nacheinander im Hintergrund (Concurrency 3, Retries pro URL). Auto-Policy: kein Approval pro Artikel, der Job wird als ein einziger Task angelegt. Returns die jobId zum Tracking.',
defaultPolicy: 'auto',
parameters: [
{
name: 'urls',
type: 'array',
description: 'Liste der Artikel-URLs (max 50)',
required: true,
},
],
},
{
name: 'archive_article',
module: 'articles',