#pragma once #include #include #include /** HarmonyAdapter: translate native tool specs/calls to/from OpenAI Harmony JSON */ namespace Harmony { struct ToolSpec { QString name; QString description; QJsonObject parameters; // JSON Schema-like }; struct ToolCall { QString name; QVariantMap arguments; }; QJsonObject toHarmony(const ToolSpec &spec); ToolSpec fromHarmonySpec(const QJsonObject &obj, bool *ok=nullptr); QJsonObject toHarmony(const ToolCall &call); ToolCall fromHarmonyCall(const QJsonObject &obj, bool *ok=nullptr); } // namespace Harmony