• Resolved taohi

    (@taohi)


    Hi Jordy / Meow Apps team,

    First, thanks for AI Engine — we run it in production on a WooCommerce beverage-delivery shop with a fairly large custom chatbot (order lookup, product search, delivery scheduling) built on function calling / tools. We just updated to 3.6.5 and it went perfectly smoothly — nothing broke, so this is meant as forward-looking feedback, not a complaint.

    The reason I’m posting: because our integration is deep, we tend to delay updates and test each one carefully, since we can’t easily tell from the changelog whether a release touches the internals we rely on. A few things would make future updates safer and faster for integrators like us:

    1. A documented, stable public API for defining tools/parameters. We currently build tools with the internal classes Meow_MWAI_Query_Function and Meow_MWAI_Query_Parameter (plus mwai_core / the $mwai global) because there’s no documented alternative. A stable, versioned way to register a function-calling tool would let us stop depending on internals.
    2. Deprecation notices + a one-cycle compatibility window when an internal class, method signature, or filter changes — a _deprecated_function-style heads-up would let us migrate without downtime.
    3. Flag developer-facing breaking changes explicitly in the changelog (a short “⚠️ For developers” line), so we don’t have to audit before every update.
    4. A “Developer / Integration” doc page listing officially supported hooks and their signatures.

    For reference, here’s the surface our integration depends on today, in case it helps gauge integrator impact:

    • Classes: Meow_MWAI_Query_Function, Meow_MWAI_Query_Parameter, mwai_core / global $mwai
    • Filters: mwai_mcp_tools, mwai_mcp_callback, mwai_functions_list, mwai_function_call_max_depth, mwai_chatbot_reply, mwai_chatbot_query, mwai_chatbot_params, mwai_chatbot_blocks, mwai_ai_feedback
    • Env: external Qdrant embeddings environment

    Happy to be a test integrator if that’s ever useful. Thanks again — the security hardening in 3.6.x is much appreciated!

    • This topic was modified 1 week, 4 days ago by taohi.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @taohi,

    Thanks for this, and glad 3.6.5 went in cleanly. Your list of what you depend on was the useful part, so here is a straight answer to it.

    Those classes are not internals. mwai_functions_list is the documented filter, and the array it expects back is an array of Meow_MWAI_Query_Function. That is the API, I just never said so clearly. For what it is worth, its constructor has had no breaking change since June 2025 and everything added since has been additive. One tip: build your tools with Meow_MWAI_Query_Function::fromJson(), which takes a plain array, so a newly added argument can never shift your call.

    One distinction worth making: the global $mwai is Meow_MWAI_API, the public facade, and it is safe to build on. $mwai_core is internal and carries no promise. If something is only reachable through it today, tell me which method and I will expose an equivalent.

    You also found a real bug. mwai_mcp_callback was fired with five arguments over MCP but only four from the Workspace, so a handler registered for that fifth argument died with an ArgumentCountError as soon as the same tool ran in the Workspace. Fixed in 3.6.6, both paths now pass five. Thank you, that would not have surfaced without your list.

    On your four requests, yes to all of them. I will state the supported surface explicitly, keep a working compatibility path for at least twelve months on anything in it, and flag developer-facing changes in the changelog rather than folding them into a general line.

    The developer docs are at https://ai.thehiddendocs.com/ and the filters page is getting the missing MCP filters plus one correction: the second argument of mwai_chatbot_reply is the Reply object, not the query. Worth checking your handler if you wrote it from that page.

    Cheers,
    Jordy.

    Thread Starter taohi

    (@taohi)

    Re: AI Engine Pro — dependency list / 3.6.6


    Hi Jordy,

    3.6.6 is on production, clean install, no issues. PHP was already 8.3 so the new minimum was a non-event.

    The one thing you asked for. There is exactly one method we can only reach through $mwai_core:

    $mwai_core->discussions->get_discussion( $botId, $chatId )

    We use it to read a stored discussion's messages by chatId. The case: our chatbot suppresses a repeated greeting, but when the widget re-initialises the request arrives with an empty in-memory history, so the handler would wrongly conclude "new chat" and greet a second time. Reading the stored discussion is what closes that gap. We only need the messages array — a read, never a write.

    Worth noting that the facade already holds the module: Meow_MWAI_API has private $discussions_module and calls the exact same get_discussion( $botId, $params['chatId'] ) internally at classes/api.php:809. So what's missing is only the public accessor, not the capability. A getDiscussion( $botId, $chatId ) on the facade would cover us completely and we would drop the $mwai_core reference the same day.

    On the MCP callback. Glad it was useful. For the record, we were never hit by it ourselves — we register with accepted_args = 4 and our handler takes four, so WordPress only ever passed four. I found it by diffing the two apply_filters() call sites while checking whether 3.6.6 was safe for us. I verified the fix in the 3.6.6 zip: both paths now pass five and the fifth argument is appended, so positions 1–4 are untouched. Nothing to change on our side.

    On mwai_chatbot_reply. Thanks for flagging the doc error. We checked — our handler already treats the second argument as the Reply object and goes through $reply->query, so we were fine by luck rather than by the docs. The correction is still worth making; someone writing a new handler from that page would get it wrong silently, since a wrong assumption there degrades behaviour rather than throwing.

    On fromJson(). Noted, though it doesn't apply to us yet — we don't go through mwai_functions_list at all, our tools are attached to the query directly via a mwai_chatbot_query handler. If that ever changes we'll build them with fromJson().

    The commitments on the supported surface, the twelve-month compatibility path and the separate changelog lines are exactly what we needed. That turns "will this update break our 290 KB integration" from a research project into a changelog read. Thank you.

    Cheers,
    Klaus
    Plugin Author Jordy Meow

    (@tigroumeow)

    I am adding getDiscussion( $botId, $chatId ) to the Meow_MWAI_API for the next release. It returns the stored discussion with the messages array decoded, or null if the chatId has no history yet, so your greeting/suppression case is covered. The documentation will also be fixed

    The mwai_chatbot_reply documentation is being corrected. You are right that it is the worst kind of doc error, since a wrong assumption there quietly degrades behaviour instead of throwing. Thanks for your feedback, always!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.