managarten/apps/mana/apps/web/src/lib/modules/guides/tools.ts
Till JS c95aaa4d48 feat(brain): add domain events + tools for remaining 9 modules
Batches 5+6: extends to 29 modules. Adds events and tools for cycles,
firsts, guides, inventory, photos, plants, news, recipes, questions.

New domain events (12 types):
- Cycles: CycleDayLogged
- Firsts: FirstCreated
- Guides: GuideCreated
- Inventory: InventoryItemCreated
- Photos: PhotoDeleted
- Plants: PlantCreated, PlantDeleted
- News: ArticleSaved
- Recipes: RecipeCreated, RecipeDeleted
- Questions: QuestionAsked

New tools (7 tools):
- Cycles: log_cycle_day
- Firsts: create_first
- Guides: create_guide
- Inventory: create_inventory_item
- Plants: create_plant
- Recipes: create_recipe

Skipped (no simple create API): context (read-only), news (complex
LocalCachedArticle input), questions (requires questionId).

Totals: 67 event types, 47 tools across 29 modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 23:26:57 +02:00

16 lines
588 B
TypeScript

import type { ModuleTool } from '$lib/data/tools/types';
export const guidesTools: ModuleTool[] = [
{
name: 'create_guide',
module: 'guides',
description: 'Erstellt eine neue Anleitung / Guide',
parameters: [
{ name: 'title', type: 'string', description: 'Titel der Anleitung', required: true },
],
async execute(params) {
const { guidesStore } = await import('./stores/guides.svelte');
const guide = await guidesStore.createGuide({ title: params.title as string });
return { success: true, data: guide, message: `Guide "${params.title}" erstellt` };
},
},
];