e5c134b045
Ports a working Hermes agent skill to an MCP server. The skill's value was not its Mealie endpoints but ~25 operational rules found by running imports against the live instance; those are now code with tests rather than prompt text. The server owns deterministic mechanics — auth, the non-default User-Agent Cloudflare requires, the `extension` field on cover uploads, PATCH instead of the 500-ing bulk-action endpoints, decimal-comma normalization, and restoring Swedish display text after parsing. Language and taste judgement stay with the model, fed by the four reference notes shipped as MCP resources. verify_recipe runs the finished-import definition as code so an agent cannot report success on a recipe with an English ingredient line, a missing cover, or ingredients still in the "Click Parse" state. Home Assistant is optional and isolated; the Obsidian meal plan is out of scope. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1.0 KiB
1.0 KiB
Köket-attribution efter Mealie-import
När ett recept importeras från koket.se följer inte receptmakare/program alltid med på ett synligt sätt i Mealie.
Verifierat arbetssätt:
- Importera receptet via
POST /api/recipes/create/url. - Läs källsidan och hämta explicit attribution från sidan själv:
Av: <namn>→ använd somextras.authorFrån: <program>→ använd somextras.source
- Läs tillbaka receptet via slug.
- PATCH:a receptet så att attribution sparas både som metadata och synligt:
{
"extras": {
"author": "Zeina Mourtada",
"source": "Kökets middag"
},
"description": "... Recept av Zeina Mourtada. Från Kökets middag."
}
Varför båda behövs:
extras.author/extras.sourceär API-korrekt lagring.- En kort text i
descriptiongör attributionen synlig i vanliga Mealie-vyer.
Regel:
- Gissa aldrig författare eller källa.
- Ta bara värden som uttryckligen står på källsidan.
- Verifiera efter PATCH att både
extrasochdescriptionfaktiskt uppdaterades.