Add per-event documentation + getPluginEvents introspection

Mirror the per-method documentation pipeline for events. Events
(declared in a universal module's logos_events: section) now carry a
description parsed from their /// doc comments, and are introspectable
at runtime via a new getPluginEvents framework call.

- lidl_ast: EventDecl gains a description field.
- impl_header_parser: capture the event's doc comment (previously
  discarded) and an optional metadata.json events[].description.
- lidl_gen_provider: generated universal provider emits
  getEvents() override, mirroring getMethods() (name/signature/
  parameters/description; no returnType/isInvokable — events are void).
- logos_provider_object: default-empty virtual getEvents() so the
  legacy provider path and QtProviderObject inherit empty.
- module_proxy / qt_provider_object: intercept getPluginEvents next to
  the getPluginMethods special-case.
- docs: spec + README event-documentation notes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dario Gabriel Lipicar
2026-06-04 13:26:56 -03:00
co-authored by Claude Opus 4.8
parent 760916e97b
commit f803bb4cb0
11 changed files with 137 additions and 6 deletions
+12
View File
@@ -66,6 +66,10 @@ QVariant ModuleProxy::callRemoteMethod(const QString& authToken, const QString&
return QVariant(getPluginMethods());
}
if (methodName == "getPluginEvents" && args.isEmpty()) {
return QVariant(getPluginEvents());
}
qDebug() << "ModuleProxy: callRemoteMethod" << methodName << "args:" << args;
return m_provider->callMethod(methodName, args);
}
@@ -90,4 +94,12 @@ QJsonArray ModuleProxy::getPluginMethods()
return m_provider->getMethods();
}
QJsonArray ModuleProxy::getPluginEvents()
{
if (!m_provider) return QJsonArray();
qDebug() << "[LogosProviderObject] ModuleProxy: calling LogosProviderObject::getEvents()";
return m_provider->getEvents();
}
#include "moc_module_proxy.cpp"