From 28c9db8848a3d5bae0535934dda231f6f59a60da Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:23:40 +0100 Subject: [PATCH 01/30] Add support for health status event --- delivery_module_plugin.cpp | 6 ++++++ vendor/logos-delivery | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/delivery_module_plugin.cpp b/delivery_module_plugin.cpp index 3cbb636..a2fdc98 100644 --- a/delivery_module_plugin.cpp +++ b/delivery_module_plugin.cpp @@ -101,6 +101,12 @@ void DeliveryModulePlugin::event_callback(int callerRet, const char* msg, size_t eventData << timestamp; plugin->emitEvent("messagePropagated", eventData); + } else if (eventType == "connection_status_change") { + QVariantList eventData; + eventData << jsonObj["connectionStatus"].toString(); + eventData << timestamp; + plugin->emitEvent("connectionStateChanged", eventData); + } else { qWarning() << "DeliveryModulePlugin::event_callback: Unknown event type:" << eventType; } diff --git a/vendor/logos-delivery b/vendor/logos-delivery index a7872d5..4e74433 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit a7872d59d1991c7f726c7845d8ac536c6bdf7fb4 +Subproject commit 4e744333217f329201ea8a78f086d5a1e34d5507 From 281398b20044a1c1ce96c78e1dda811ea796c9fe Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:04:22 +0100 Subject: [PATCH 02/30] chore(nix): pin logos-delivery input to 4e744333 --- flake.lock | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index 8ecbbbf..7459083 100644 --- a/flake.lock +++ b/flake.lock @@ -122,14 +122,12 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1771543191, - "narHash": "sha256-gvPc2Q28zSm3KffJZCRjQ+bT6UGpqYPynMvbC/MB1gs=", - "ref": "refs/heads/master", - "rev": "a7872d59d1991c7f726c7845d8ac536c6bdf7fb4", - "revCount": 2225, - "submodules": true, - "type": "git", - "url": "https://github.com/logos-messaging/logos-delivery" + "lastModified": 1772029367, + "narHash": "sha256-E8JqHZrlG0g9xTEMX3ooxyab1GupJJxUl09+qRVskLg=", + "owner": "logos-messaging", + "repo": "logos-delivery", + "rev": "4e744333217f329201ea8a78f086d5a1e34d5507", + "type": "github" }, "original": { "submodules": true, From bd751194c896106dc0fd8c690f52f26492b50065 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:13:40 +0100 Subject: [PATCH 03/30] Updage logos-delivery ref to the correct one --- flake.lock | 6 +++--- vendor/logos-delivery | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 7459083..027ef2b 100644 --- a/flake.lock +++ b/flake.lock @@ -122,11 +122,11 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772029367, - "narHash": "sha256-E8JqHZrlG0g9xTEMX3ooxyab1GupJJxUl09+qRVskLg=", + "lastModified": 1772113678, + "narHash": "sha256-RvdKIKreuxVWz92mmJoB6EXfX+bEVdTwXtw0SxP3R4o=", "owner": "logos-messaging", "repo": "logos-delivery", - "rev": "4e744333217f329201ea8a78f086d5a1e34d5507", + "rev": "fd9453ba50bc7cabb8e06e4c6b10256bd357e363", "type": "github" }, "original": { diff --git a/vendor/logos-delivery b/vendor/logos-delivery index 4e74433..fd9453b 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit 4e744333217f329201ea8a78f086d5a1e34d5507 +Subproject commit fd9453ba50bc7cabb8e06e4c6b10256bd357e363 From e44e310c2c849e1cb3585d0697b17c1c27b1f35d Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Thu, 26 Feb 2026 18:01:44 +0100 Subject: [PATCH 04/30] After dependency logos-delivery Pr merged, we just move this to point to that master too --- flake.lock | 4 ++-- vendor/logos-delivery | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 027ef2b..e3cdc24 100644 --- a/flake.lock +++ b/flake.lock @@ -122,11 +122,11 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772113678, + "lastModified": 1772124931, "narHash": "sha256-RvdKIKreuxVWz92mmJoB6EXfX+bEVdTwXtw0SxP3R4o=", "owner": "logos-messaging", "repo": "logos-delivery", - "rev": "fd9453ba50bc7cabb8e06e4c6b10256bd357e363", + "rev": "ba85873f03a1da6ab04287949849815fd97b7bfd", "type": "github" }, "original": { diff --git a/vendor/logos-delivery b/vendor/logos-delivery index fd9453b..ba85873 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit fd9453ba50bc7cabb8e06e4c6b10256bd357e363 +Subproject commit ba85873f03a1da6ab04287949849815fd97b7bfd From a225c662ae64251ef7d53587b112180b038e9b2c Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Thu, 26 Feb 2026 18:41:44 +0100 Subject: [PATCH 05/30] update flake.lock --- flake.lock | 119 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 106 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 8ecbbbf..99f2941 100644 --- a/flake.lock +++ b/flake.lock @@ -85,11 +85,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1767724329, - "narHash": "sha256-UPkqxqxbKwU5Dmu00TnjiJVXUmfVylF3p1qziEuYwIE=", + "lastModified": 1772028960, + "narHash": "sha256-BDWFjaKeoJW8oWDlPphNINt5U3P1xt1z1Y4f9jyC7uU=", "owner": "logos-co", "repo": "logos-cpp-sdk", - "rev": "32f1d7080d784ff044d91d076ef2f0c7305d4784", + "rev": "95f763b48d74bcdc63093b05159f43500cab139e", "type": "github" }, "original": { @@ -122,11 +122,11 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1771543191, - "narHash": "sha256-gvPc2Q28zSm3KffJZCRjQ+bT6UGpqYPynMvbC/MB1gs=", + "lastModified": 1772124931, + "narHash": "sha256-FsXQHFsex9kD9+046sKu0fy/FGu0bEUPUv0ZRbESAAQ=", "ref": "refs/heads/master", - "rev": "a7872d59d1991c7f726c7845d8ac536c6bdf7fb4", - "revCount": 2225, + "rev": "ba85873f03a1da6ab04287949849815fd97b7bfd", + "revCount": 2227, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" @@ -142,6 +142,8 @@ "logos-capability-module": "logos-capability-module", "logos-cpp-sdk": "logos-cpp-sdk_4", "logos-module": "logos-module", + "nix-bundle-appimage": "nix-bundle-appimage", + "nix-bundle-dir": "nix-bundle-dir_2", "nixpkgs": [ "logos-liblogos", "logos-cpp-sdk", @@ -149,11 +151,11 @@ ] }, "locked": { - "lastModified": 1770837874, - "narHash": "sha256-wr75lv1q4U1FS5+l/6ypwzJFJe06l2RyUvx1npoRS88=", + "lastModified": 1772115748, + "narHash": "sha256-sPdAuYiLOjsulrk+uKMT7EG05ZlGT7OYEpgUh+f0nME=", "owner": "logos-co", "repo": "logos-liblogos", - "rev": "e3741c01fd3abf6b7bd9ff2fa8edf89c41fc0cea", + "rev": "07780444deb99f10e600247e3696ba495f2f071a", "type": "github" }, "original": { @@ -198,11 +200,11 @@ ] }, "locked": { - "lastModified": 1770062426, - "narHash": "sha256-zc7ZxDTlqOCYGyEHhrTA/7GS1EWh7+4amdPUKh+gGds=", + "lastModified": 1770999556, + "narHash": "sha256-anpsEniGTTwUAwknRxjaT9GP4avHzIsolEHdHDTV9rM=", "owner": "logos-co", "repo": "logos-module", - "rev": "f7ee69d9ad9f27c84f04f59896e9194125e951dc", + "rev": "d1b35f335f938bb5de21a2a6010f1104075bdb1c", "type": "github" }, "original": { @@ -211,6 +213,65 @@ "type": "github" } }, + "nix-bundle-appimage": { + "inputs": { + "nix-bundle-dir": "nix-bundle-dir", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1772047346, + "narHash": "sha256-RUsTUxKCxuQ3+D2LfBbK0EX1vF7HNMkpWgOGFfZbrEg=", + "owner": "logos-co", + "repo": "nix-bundle-appimage", + "rev": "4d68437c97ac59c3c70c1b2b116235c434d571a8", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-appimage", + "type": "github" + } + }, + "nix-bundle-dir": { + "inputs": { + "nixpkgs": [ + "logos-liblogos", + "nix-bundle-appimage", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771971384, + "narHash": "sha256-fq0H+sxQhkGN054jdN+ZfHZibbOjHA+KD5SpRH78T1g=", + "owner": "logos-co", + "repo": "nix-bundle-dir", + "rev": "1ecb9662145a1ad84007a970b4bef50a4af159c9", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-dir", + "type": "github" + } + }, + "nix-bundle-dir_2": { + "inputs": { + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1771971384, + "narHash": "sha256-fq0H+sxQhkGN054jdN+ZfHZibbOjHA+KD5SpRH78T1g=", + "owner": "logos-co", + "repo": "nix-bundle-dir", + "rev": "1ecb9662145a1ad84007a970b4bef50a4af159c9", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-dir", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1759036355, @@ -307,6 +368,38 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1771848320, + "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1770562336, + "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "logos-cpp-sdk": "logos-cpp-sdk", From c8d4458733d703c190aa33b4e2a2d96d62322ce1 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:21:58 +0100 Subject: [PATCH 06/30] Adjust submodules to flake.lock --- vendor/logos-cpp-sdk | 2 +- vendor/logos-liblogos | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/logos-cpp-sdk b/vendor/logos-cpp-sdk index 30ef798..c3477d2 160000 --- a/vendor/logos-cpp-sdk +++ b/vendor/logos-cpp-sdk @@ -1 +1 @@ -Subproject commit 30ef7986f4b65b7dcf43af84bb073233b1b77821 +Subproject commit c3477d29e32cae5f73ca637fb81e547f8a6cba58 diff --git a/vendor/logos-liblogos b/vendor/logos-liblogos index e3741c0..0778044 160000 --- a/vendor/logos-liblogos +++ b/vendor/logos-liblogos @@ -1 +1 @@ -Subproject commit e3741c01fd3abf6b7bd9ff2fa8edf89c41fc0cea +Subproject commit 07780444deb99f10e600247e3696ba495f2f071a From 64a1fdb61bbc0b532904d22662b61b5e446ff6fa Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Sun, 1 Mar 2026 23:31:45 +0100 Subject: [PATCH 07/30] add examples.nix --- nix/examples.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 nix/examples.nix diff --git a/nix/examples.nix b/nix/examples.nix new file mode 100644 index 0000000..fbc740f --- /dev/null +++ b/nix/examples.nix @@ -0,0 +1,33 @@ +{ pkgs ? import {} }: + +pkgs.stdenv.mkDerivation { + pname = "example-simple"; + version = "0.1"; + + # Source directory of the project + src = ./.; + + # Dependencies + buildInputs = [ + pkgs.qt6.qtbase + pkgs.gcc + pkgs.make + ]; + + # Build the simple.cpp example + buildPhase = '' + mkdir -p build + g++ -std=c++17 \ + -I${pkgs.qt6.qtbase.dev}/include/QtCore \ + -I${src}/delivery_interface \ + ${src}/examples/simple.cpp \ + -L${pkgs.qt6.qtbase.out}/lib -lQt6Core \ + -o build/simple + ''; + + # Install binary + installPhase = '' + mkdir -p $out/bin + cp build/simple $out/bin/ + ''; +} \ No newline at end of file From e41963fae63c409f7a4c07af0607b2b3dcb3978b Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Sun, 1 Mar 2026 23:43:14 +0100 Subject: [PATCH 08/30] add simple example --- examples/simple.cpp | 37 +++++++++++++++++++++++++++++++++++++ nix/examples.nix | 11 +++++++---- 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 examples/simple.cpp diff --git a/examples/simple.cpp b/examples/simple.cpp new file mode 100644 index 0000000..bea970d --- /dev/null +++ b/examples/simple.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include "delivery_module_interface.h" + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + + QPluginLoader loader("delivery_plugin"); + QObject *plugin = loader.instance(); + + if (!plugin) { + qDebug() << "Failed to load plugin:" << loader.errorString(); + return -1; + } + + auto delivery = qobject_cast(plugin); + if (!delivery) { + qDebug() << "Invalid plugin type"; + return -1; + } + + qDebug() << "Loaded plugin:" << delivery->name(); + + delivery->createNode("config.json"); + delivery->start(); + + auto result = delivery->send("topic1", "Hello World"); + + if (result.has_value()) + qDebug() << "Send result:" << result.value(); + + delivery->stop(); + + return 0; +} \ No newline at end of file diff --git a/nix/examples.nix b/nix/examples.nix index fbc740f..3644881 100644 --- a/nix/examples.nix +++ b/nix/examples.nix @@ -1,17 +1,20 @@ -{ pkgs ? import {} }: +{ pkgs, src }: pkgs.stdenv.mkDerivation { pname = "example-simple"; version = "0.1"; - # Source directory of the project - src = ./.; + # Disable default source handling + dontUnpack = true; + + nativeBuildInputs = [ + pkgs.qt6.wrapQtAppsNoGuiHook + ]; # Dependencies buildInputs = [ pkgs.qt6.qtbase pkgs.gcc - pkgs.make ]; # Build the simple.cpp example From c21eb91976a23e0032a25b0b5911a57e800a4bc7 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 2 Mar 2026 00:54:27 +0100 Subject: [PATCH 09/30] add CMakeLists.txt examples --- CMakeLists.txt | 4 +++ examples/CMakeLists.txt | 61 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 examples/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c1f1eb3..5334059 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,3 +300,7 @@ install(DIRECTORY "${PLUGINS_OUTPUT_DIR}/" DESTINATION ${CMAKE_INSTALL_DATADIR}/logos-delivery-module/generated OPTIONAL ) + +# Include examples build +include(examples/CMakesLists.txt) + diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..db2c157 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,61 @@ +# examples.cmake + +# Example executable +set(EXAMPLE_SOURCES + examples/simple.cpp +) + +add_executable(simple_example ${EXAMPLE_SOURCES}) + +# Include directories (reuse same paths as plugin) +target_include_directories(simple_example PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} # root +) + +# Include liblogos headers +if(_liblogos_is_source) + target_include_directories(simple_example PRIVATE ${LOGOS_LIBLOGOS_ROOT}) +else() + target_include_directories(simple_example PRIVATE ${LOGOS_LIBLOGOS_ROOT}/include) +endif() + +# Include SDK headers +if(_cpp_sdk_is_source) + target_include_directories(simple_example PRIVATE + ${LOGOS_CPP_SDK_ROOT}/cpp + ${LOGOS_CPP_SDK_ROOT}/cpp/generated + ) +else() + target_include_directories(simple_example PRIVATE + ${LOGOS_CPP_SDK_ROOT}/include + ${LOGOS_CPP_SDK_ROOT}/include/cpp + ${LOGOS_CPP_SDK_ROOT}/include/core + ) +endif() + +# Link Qt libraries +target_link_libraries(simple_example PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::RemoteObjects +) + +# Link SDK library if installed layout +if(NOT _cpp_sdk_is_source) + target_link_libraries(simple_example PRIVATE ${LOGOS_SDK_LIB}) +endif() + +# Link liblogosdelivery +if(LIBLOGOSDELIVERY_PATH) + target_link_libraries(simple_example PRIVATE ${LIBLOGOSDELIVERY_PATH}) +endif() + +# Ensure C++20 standard +target_compile_features(simple_example PRIVATE cxx_std_20) + +# Ensure generator runs first +add_dependencies(simple_example run_cpp_generator_messaging) + +# Optional: output directory same as plugin +set_target_properties(simple_example PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules" +) \ No newline at end of file From 367c93ced39fb5bb5faa47ffcade5aa6b6cf661e Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 2 Mar 2026 12:44:31 +0100 Subject: [PATCH 10/30] add simple example to validate logos-delivery-module --- CMakeLists.txt | 2 +- delivery_module_interface.h | 1 + delivery_module_plugin.cpp | 30 ++++++++++++ delivery_module_plugin.h | 3 +- examples/simple.cpp | 96 +++++++++++++++++++++++++++++++++---- flake.lock | 11 +++-- flake.nix | 18 +++---- nix/examples.nix | 63 ++++++++++++++++++------ 8 files changed, 182 insertions(+), 42 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5334059..bfb7578 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -302,5 +302,5 @@ install(DIRECTORY "${PLUGINS_OUTPUT_DIR}/" ) # Include examples build -include(examples/CMakesLists.txt) +include(examples/CMakeLists.txt) diff --git a/delivery_module_interface.h b/delivery_module_interface.h index 54602b2..f71c1c4 100644 --- a/delivery_module_interface.h +++ b/delivery_module_interface.h @@ -14,6 +14,7 @@ public: Q_INVOKABLE virtual QExpected send(const QString &contentTopic, const QString &payload) = 0; Q_INVOKABLE virtual bool subscribe(const QString &contentTopic) = 0; Q_INVOKABLE virtual bool unsubscribe(const QString &contentTopic) = 0; + Q_INVOKABLE virtual QString my_version() const = 0; signals: // for now this is required for events, later it might not be necessary if using a proxy diff --git a/delivery_module_plugin.cpp b/delivery_module_plugin.cpp index a2fdc98..0808e8c 100644 --- a/delivery_module_plugin.cpp +++ b/delivery_module_plugin.cpp @@ -315,3 +315,33 @@ bool DeliveryModulePlugin::unsubscribe(const QString &contentTopic) qDebug() << "DeliveryModulePlugin: Unsubscribe completed for topic:" << contentTopic << " with success: true"; return true; } + +QString DeliveryModulePlugin::version() const { + QString moduleVersion = "1.0.0"; + if (!deliveryCtx) { + qWarning() << "DeliveryModulePlugin: Cannot subscribe - context not initialized. Call createNode first."; + return moduleVersion + " (liblogosdelivery version unknown, context not initialized)"; + } + + auto attributeName = "Version"; + auto liblogosDeliveryVersion = callApiRetValue( + "get_node_info", + CALLBACK_TIMEOUT, + bindApiCall(logosdelivery_get_node_info, deliveryCtx, attributeName)); + + if (liblogosDeliveryVersion.isErr()) { + qWarning() << "DeliveryModulePlugin: Get node info failed getting version, reason:" << + liblogosDeliveryVersion.error(); + return moduleVersion + " (liblogosdelivery version unknown)"; + } + + const QString version = liblogosDeliveryVersion.value(); + qDebug() << "DeliveryModulePlugin: Get node info completed for attribute:" << + attributeName << ", with success: " << version; + + return moduleVersion + " (liblogosdelivery version: " + version + ")"; +} + +QString DeliveryModulePlugin::my_version() const { + return this->version(); +} \ No newline at end of file diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 8ffc9eb..5aa6ef5 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -23,7 +23,8 @@ public: Q_INVOKABLE bool subscribe(const QString &contentTopic) override; Q_INVOKABLE bool unsubscribe(const QString &contentTopic) override; QString name() const override { return "delivery_module"; } - QString version() const override { return "1.0.0"; } + QString version() const; + Q_INVOKABLE QString my_version() const; // LogosAPI initialization Q_INVOKABLE void initLogos(LogosAPI* logosAPIInstance); diff --git a/examples/simple.cpp b/examples/simple.cpp index bea970d..9246355 100644 --- a/examples/simple.cpp +++ b/examples/simple.cpp @@ -1,13 +1,79 @@ #include #include #include -#include "delivery_module_interface.h" +#include +#include +#include +#include +#include +#include +#include "../delivery_module_interface.h" int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); + QCoreApplication::setApplicationName("DeliveryModuleLoader"); + QCoreApplication::setApplicationVersion("1.0"); - QPluginLoader loader("delivery_plugin"); + QCommandLineParser parser; + parser.setApplicationDescription("Loads a delivery module plugin and runs it."); + parser.addHelpOption(); + parser.addVersionOption(); + + QCommandLineOption pluginOption( + QStringList() << "m" << "module", + "Path to the delivery module plugin (.so/.dll).", + "plugin_file" + ); + parser.addOption(pluginOption); + + QCommandLineOption configOption( + QStringList() << "c" << "config", + "Path to JSON config file for the plugin.", + "config_file", + "config.json" + ); + parser.addOption(configOption); + + parser.process(app); + + if (!parser.isSet(pluginOption)) { + qDebug() << "Error: plugin module path is required."; + parser.showHelp(); // exits automatically + } + + QString pluginPath = parser.value(pluginOption); + QString configPath = parser.value(configOption); + + QFileInfo pluginFile(pluginPath); + if (!pluginFile.exists() || !pluginFile.isFile()) { + qDebug() << "Plugin file does not exist:" << pluginPath; + return -1; + } + + QFileInfo configFile(configPath); + if (!configFile.exists() || !configFile.isFile()) { + qDebug() << "Config file does not exist:" << configPath; + return -1; + } + + QFile jsonFile(configFile.absoluteFilePath()); + if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + qDebug() << "Failed to open config file:" << configFile.absoluteFilePath(); + return -1; + } + + QByteArray jsonData = jsonFile.readAll(); + jsonFile.close(); + + QJsonParseError parseError; + QJsonDocument doc = QJsonDocument::fromJson(jsonData, &parseError); + if (parseError.error != QJsonParseError::NoError) { + qDebug() << "Failed to parse JSON:" << parseError.errorString(); + return -1; + } + + QPluginLoader loader(pluginFile.absoluteFilePath()); QObject *plugin = loader.instance(); if (!plugin) { @@ -21,15 +87,29 @@ int main(int argc, char *argv[]) return -1; } - qDebug() << "Loaded plugin:" << delivery->name(); - - delivery->createNode("config.json"); + delivery->createNode(QString::fromUtf8(jsonData)); delivery->start(); - auto result = delivery->send("topic1", "Hello World"); + qDebug() << "Plugin loaded. Type a message to send, or 'exit' to quit."; - if (result.has_value()) - qDebug() << "Send result:" << result.value(); + // ------------------------ + // Interactive loop + // ------------------------ + std::string input; + while (true) { + std::cout << "> "; + std::getline(std::cin, input); + + if (input == "exit") { + break; + } else if (!input.empty()) { + auto result = delivery->send("/simple-example/2/ivan/proto", QString::fromStdString(input)); + if (!result.isErr()) + qDebug() << "Send result:" << result.value(); + else + qDebug() << "Send failed"; + } + } delivery->stop(); diff --git a/flake.lock b/flake.lock index 99f2941..74f236e 100644 --- a/flake.lock +++ b/flake.lock @@ -122,16 +122,17 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772124931, - "narHash": "sha256-FsXQHFsex9kD9+046sKu0fy/FGu0bEUPUv0ZRbESAAQ=", - "ref": "refs/heads/master", - "rev": "ba85873f03a1da6ab04287949849815fd97b7bfd", - "revCount": 2227, + "lastModified": 1772226887, + "narHash": "sha256-8ZYbbjjhUvJ/TY+JUawNlfW3WWosoisAGvvPJy+URR8=", + "ref": "add-debug-api", + "rev": "e069167cdda1cf9aed5cd4ca42530f6b5048fb54", + "revCount": 2229, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" }, "original": { + "ref": "add-debug-api", "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" diff --git a/flake.nix b/flake.nix index 9e9c72c..6b810d0 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ nixpkgs.follows = "logos-liblogos/nixpkgs"; logos-cpp-sdk.url = "github:logos-co/logos-cpp-sdk?ref=feat/logos-result"; logos-liblogos.url = "github:logos-co/logos-liblogos"; - logos-delivery.url = "git+https://github.com/logos-messaging/logos-delivery?submodules=1"; + logos-delivery.url = "git+https://github.com/logos-messaging/logos-delivery?ref=add-debug-api&submodules=1"; }; outputs = { self, nixpkgs, logos-cpp-sdk, logos-liblogos, logos-delivery }: @@ -24,29 +24,23 @@ { packages = forAllSystems ({ pkgs, logosSdk, logosLiblogos, logosDelivery }: let - # Common configuration common = import ./nix/default.nix { inherit pkgs logosSdk logosLiblogos logosDelivery; }; src = ./.; - - # Library package (plugin + libcodex) lib = import ./nix/lib.nix { inherit pkgs common src logosDelivery; }; - - # Include package (generated headers from plugin) include = import ./nix/header.nix { inherit pkgs common src lib logosSdk logosDelivery; }; - - # Combined package + simple = import ./nix/examples.nix { inherit pkgs src logosSdk logosLiblogos logosDelivery; }; combined = pkgs.symlinkJoin { name = "logos-delivery-module"; - paths = [ lib include ]; + paths = [ lib include simple ]; }; in { - # Individual outputs lib = lib; include = include; - - # Default package (combined) default = combined; + + # Add new output + simple = simple; } ); diff --git a/nix/examples.nix b/nix/examples.nix index 3644881..71477aa 100644 --- a/nix/examples.nix +++ b/nix/examples.nix @@ -1,36 +1,69 @@ -{ pkgs, src }: +{ pkgs, src, logosSdk, logosLiblogos, logosDelivery }: pkgs.stdenv.mkDerivation { pname = "example-simple"; version = "0.1"; - # Disable default source handling - dontUnpack = true; + inherit src; nativeBuildInputs = [ + pkgs.cmake + pkgs.ninja + pkgs.pkg-config pkgs.qt6.wrapQtAppsNoGuiHook + pkgs.gcc + pkgs.bash ]; - # Dependencies buildInputs = [ pkgs.qt6.qtbase + pkgs.qt6.qtdeclarative + pkgs.qt6.qtremoteobjects pkgs.gcc + # Add other dependencies if logos SDK/libs are packaged ]; - # Build the simple.cpp example + cmakeFlags = [ + "-GNinja" + "-DLOGOS_CPP_SDK_ROOT=${logosSdk}" + "-DLOGOS_LIBLOGOS_ROOT=${logosLiblogos}" + "-DLOGOS_DELIVERY_ROOT=${logosDelivery}" + "-DLOGOS_MESSAGING_MODULE_USE_VENDOR=OFF" + ]; + + env = { + LOGOS_CPP_SDK_ROOT = "${logosSdk}"; + LOGOS_LIBLOGOS_ROOT = "${logosLiblogos}"; + LOGOS_DELIVERY_ROOT = "${logosDelivery}"; + }; + + configurePhase = '' + # skip default configurePhase + ''; + + # BuildPhase uses CMake for the example buildPhase = '' - mkdir -p build - g++ -std=c++17 \ - -I${pkgs.qt6.qtbase.dev}/include/QtCore \ - -I${src}/delivery_interface \ - ${src}/examples/simple.cpp \ - -L${pkgs.qt6.qtbase.out}/lib -lQt6Core \ - -o build/simple + mkdir build + cd build + + cmake ${src} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$out \ + -GNinja \ + -DLOGOS_CPP_SDK_ROOT=${logosSdk} \ + -DLOGOS_LIBLOGOS_ROOT=${logosLiblogos} \ + -DLOGOS_DELIVERY_ROOT=${logosDelivery} \ + -DLOGOS_MESSAGING_MODULE_USE_VENDOR=OFF + + ls + cat build.ninja + # Build the specific example executable + cmake --build . --target simple_example ''; - # Install binary installPhase = '' - mkdir -p $out/bin - cp build/simple $out/bin/ + mkdir -p $out/bin/ + chmod -R 755 $out/bin/ + cp modules/simple_example $out/bin/ ''; } \ No newline at end of file From c0e0e17e40cd31d0503f98aee37fc304d5d12997 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 2 Mar 2026 13:02:18 +0100 Subject: [PATCH 11/30] set a more generic content topic when publishing --- examples/simple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/simple.cpp b/examples/simple.cpp index 9246355..857b8fe 100644 --- a/examples/simple.cpp +++ b/examples/simple.cpp @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) if (input == "exit") { break; } else if (!input.empty()) { - auto result = delivery->send("/simple-example/2/ivan/proto", QString::fromStdString(input)); + auto result = delivery->send("/simple-example/2/delivery/proto", QString::fromStdString(input)); if (!result.isErr()) qDebug() << "Send result:" << result.value(); else From c095afe90f2904ef9a47a4db7df0a5345cfae883 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Tue, 3 Mar 2026 14:01:46 +0100 Subject: [PATCH 12/30] initially subscribe to generic contenttopic in simple example --- examples/simple.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/simple.cpp b/examples/simple.cpp index 857b8fe..0dd2c7b 100644 --- a/examples/simple.cpp +++ b/examples/simple.cpp @@ -92,6 +92,12 @@ int main(int argc, char *argv[]) qDebug() << "Plugin loaded. Type a message to send, or 'exit' to quit."; + QString contentTopicOfInterest = "/simple-example/2/delivery/proto"; + if (!delivery->subscribe(contentTopicOfInterest)) { + qDebug() << "Failed to subscribe to topic:" << contentTopicOfInterest; + return -1; + } + // ------------------------ // Interactive loop // ------------------------ @@ -103,7 +109,7 @@ int main(int argc, char *argv[]) if (input == "exit") { break; } else if (!input.empty()) { - auto result = delivery->send("/simple-example/2/delivery/proto", QString::fromStdString(input)); + auto result = delivery->send(contentTopicOfInterest, QString::fromStdString(input)); if (!result.isErr()) qDebug() << "Send result:" << result.value(); else From 7a35d6382c959bf9b31cda6041a7fa6b094c221e Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Tue, 3 Mar 2026 18:07:36 +0100 Subject: [PATCH 13/30] start using debug API in the example --- delivery_module_interface.h | 4 +++- delivery_module_plugin.cpp | 45 ++++++++++++++++++++++++++++++++++--- delivery_module_plugin.h | 4 +++- examples/simple.cpp | 33 +++++++++++++++++++++++++++ flake.lock | 11 +++++---- flake.nix | 2 +- 6 files changed, 87 insertions(+), 12 deletions(-) diff --git a/delivery_module_interface.h b/delivery_module_interface.h index f71c1c4..3fb7de8 100644 --- a/delivery_module_interface.h +++ b/delivery_module_interface.h @@ -14,7 +14,9 @@ public: Q_INVOKABLE virtual QExpected send(const QString &contentTopic, const QString &payload) = 0; Q_INVOKABLE virtual bool subscribe(const QString &contentTopic) = 0; Q_INVOKABLE virtual bool unsubscribe(const QString &contentTopic) = 0; - Q_INVOKABLE virtual QString my_version() const = 0; + Q_INVOKABLE virtual QString getAvailableNodeInfoIDs() = 0; + Q_INVOKABLE virtual QString getNodeInfo(const QString &contentTopic) = 0; + Q_INVOKABLE virtual QString getAvailableConfigs() = 0; signals: // for now this is required for events, later it might not be necessary if using a proxy diff --git a/delivery_module_plugin.cpp b/delivery_module_plugin.cpp index 0808e8c..1ec1e67 100644 --- a/delivery_module_plugin.cpp +++ b/delivery_module_plugin.cpp @@ -342,6 +342,45 @@ QString DeliveryModulePlugin::version() const { return moduleVersion + " (liblogosdelivery version: " + version + ")"; } -QString DeliveryModulePlugin::my_version() const { - return this->version(); -} \ No newline at end of file +QString DeliveryModulePlugin::getAvailableNodeInfoIDs() { + auto outcome = callApiRetValue( + "get_available_node_info_ids", + CALLBACK_TIMEOUT, + bindApiCall(logosdelivery_get_available_node_info_ids, deliveryCtx)); + + if (outcome.isErr()) { + qWarning() << "DeliveryModulePlugin: Get available node info IDs failed, reason:" << outcome.error(); + return QString(); + } + + return outcome.value(); +} + +QString DeliveryModulePlugin::getNodeInfo(const QString &nodeInfoId) { + auto outcome = callApiRetValue( + "get_node_info", + CALLBACK_TIMEOUT, + bindApiCall(logosdelivery_get_node_info, deliveryCtx, nodeInfoId.toUtf8().constData())); + + if (outcome.isErr()) { + qWarning() << "DeliveryModulePlugin: Get node info failed for ID:" << nodeInfoId << + ", reason:" << outcome.error(); + return QString(); + } + + return outcome.value(); +} + +QString DeliveryModulePlugin::getAvailableConfigs() { + auto outcome = callApiRetValue( + "get_available_configs", + CALLBACK_TIMEOUT, + bindApiCall(logosdelivery_get_available_configs, deliveryCtx)); + + if (outcome.isErr()) { + qWarning() << "DeliveryModulePlugin: Get available configs failed, reason:" << outcome.error(); + return QString(); + } + + return outcome.value(); +} diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 5aa6ef5..19456b6 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -22,9 +22,11 @@ public: Q_INVOKABLE QExpected send(const QString &contentTopic, const QString &payload) override; Q_INVOKABLE bool subscribe(const QString &contentTopic) override; Q_INVOKABLE bool unsubscribe(const QString &contentTopic) override; + Q_INVOKABLE QString getAvailableNodeInfoIDs() override; + Q_INVOKABLE QString getNodeInfo(const QString &contentTopic) override; + Q_INVOKABLE QString getAvailableConfigs() override; QString name() const override { return "delivery_module"; } QString version() const; - Q_INVOKABLE QString my_version() const; // LogosAPI initialization Q_INVOKABLE void initLogos(LogosAPI* logosAPIInstance); diff --git a/examples/simple.cpp b/examples/simple.cpp index 0dd2c7b..ef385ff 100644 --- a/examples/simple.cpp +++ b/examples/simple.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "../delivery_module_interface.h" @@ -98,6 +99,38 @@ int main(int argc, char *argv[]) return -1; } + qDebug() << "Subscribed to topic:" << contentTopicOfInterest; + + // ------------------------ + // Show available node info items + // ------------------------ + + qDebug() << "Retrieving all available node info IDs..."; + QString nodeInfoIDs = delivery->getAvailableNodeInfoIDs(); + qDebug() << "Available node info IDs:" << nodeInfoIDs; + + // Remove "@[" at start and "]" at end + if (nodeInfoIDs.startsWith("@[") && nodeInfoIDs.endsWith("]")) { + nodeInfoIDs = nodeInfoIDs.mid(2, nodeInfoIDs.length() - 3); + } + + QStringList configItems = nodeInfoIDs.split(",", Qt::SkipEmptyParts); + + for (QString &item : configItems) { + item = item.trimmed(); + qDebug() << "Retrieving node info for ID:" << item; + QString nodeInfo = delivery->getNodeInfo(item); + qDebug() << nodeInfo; + qDebug() << "-----------------------------"; + } + + // ------------------------ + // Show available node info items + // ------------------------ + qDebug() << "Retrieving available configs..."; + QString availableConfigs = delivery->getAvailableConfigs(); + qDebug() << "Available configs:" << availableConfigs; + // ------------------------ // Interactive loop // ------------------------ diff --git a/flake.lock b/flake.lock index 74f236e..e2a2fde 100644 --- a/flake.lock +++ b/flake.lock @@ -122,17 +122,16 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772226887, - "narHash": "sha256-8ZYbbjjhUvJ/TY+JUawNlfW3WWosoisAGvvPJy+URR8=", - "ref": "add-debug-api", - "rev": "e069167cdda1cf9aed5cd4ca42530f6b5048fb54", - "revCount": 2229, + "lastModified": 1772541165, + "narHash": "sha256-BqXn0MSuJqCB15PLQC5Riw6ah3GyS8XIMaFKM58Eamw=", + "ref": "refs/heads/master", + "rev": "09618a2656195f3c2d529e97d0447ec13d4f118a", + "revCount": 2231, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" }, "original": { - "ref": "add-debug-api", "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" diff --git a/flake.nix b/flake.nix index 6b810d0..4983b28 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ nixpkgs.follows = "logos-liblogos/nixpkgs"; logos-cpp-sdk.url = "github:logos-co/logos-cpp-sdk?ref=feat/logos-result"; logos-liblogos.url = "github:logos-co/logos-liblogos"; - logos-delivery.url = "git+https://github.com/logos-messaging/logos-delivery?ref=add-debug-api&submodules=1"; + logos-delivery.url = "git+https://github.com/logos-messaging/logos-delivery?submodules=1"; }; outputs = { self, nixpkgs, logos-cpp-sdk, logos-liblogos, logos-delivery }: From ba698e9c760d746cad63aa09eb034d6f04c078bd Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Tue, 3 Mar 2026 19:24:14 +0100 Subject: [PATCH 14/30] Update logos-delivery to latest master --- flake.lock | 8 ++++---- vendor/logos-delivery | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index e2a2fde..bd4537b 100644 --- a/flake.lock +++ b/flake.lock @@ -122,11 +122,11 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772541165, - "narHash": "sha256-BqXn0MSuJqCB15PLQC5Riw6ah3GyS8XIMaFKM58Eamw=", + "lastModified": 1772561874, + "narHash": "sha256-ovUk8NzIbypTU1uDidlN+lUJIjE5b1AIDq/nq5YGfrw=", "ref": "refs/heads/master", - "rev": "09618a2656195f3c2d529e97d0447ec13d4f118a", - "revCount": 2231, + "rev": "1f9c4cb8cc4cac2347d19bac6eecb169775ca366", + "revCount": 2232, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" diff --git a/vendor/logos-delivery b/vendor/logos-delivery index ba85873..1f9c4cb 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit ba85873f03a1da6ab04287949849815fd97b7bfd +Subproject commit 1f9c4cb8cc4cac2347d19bac6eecb169775ca366 From cbd028b81aaf3866c28420336847a6f967e89ad8 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 02:10:42 +0100 Subject: [PATCH 15/30] bump to logos-delivery fix debug-api --- flake.lock | 8 ++++---- vendor/logos-delivery | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index bd4537b..a9d26c8 100644 --- a/flake.lock +++ b/flake.lock @@ -122,11 +122,11 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772561874, - "narHash": "sha256-ovUk8NzIbypTU1uDidlN+lUJIjE5b1AIDq/nq5YGfrw=", + "lastModified": 1772578080, + "narHash": "sha256-JI+pECDsSe06aNTB0d5PVL9vdyXL01kaeXIkuuAJUNk=", "ref": "refs/heads/master", - "rev": "1f9c4cb8cc4cac2347d19bac6eecb169775ca366", - "revCount": 2232, + "rev": "4a6ad732356c99d00c5f0143df8a470b84b6281d", + "revCount": 2233, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" diff --git a/vendor/logos-delivery b/vendor/logos-delivery index 1f9c4cb..4a6ad73 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit 1f9c4cb8cc4cac2347d19bac6eecb169775ca366 +Subproject commit 4a6ad732356c99d00c5f0143df8a470b84b6281d From b52e75fa3d4e3b1dcafa58741cff87a5b2e40abc Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:39:20 +0100 Subject: [PATCH 16/30] Added doxygen module interface documentation --- delivery_module_interface.h | 1 - delivery_module_plugin.h | 204 +++++++++++++++++++++++++++++++++++- 2 files changed, 199 insertions(+), 6 deletions(-) diff --git a/delivery_module_interface.h b/delivery_module_interface.h index 3fb7de8..3c7fa01 100644 --- a/delivery_module_interface.h +++ b/delivery_module_interface.h @@ -19,7 +19,6 @@ public: Q_INVOKABLE virtual QString getAvailableConfigs() = 0; signals: - // for now this is required for events, later it might not be necessary if using a proxy void eventResponse(const QString& eventName, const QVariantList& data); }; diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 19456b6..271102c 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -6,6 +6,44 @@ #include "logos_api.h" #include "logos_api_client.h" +/** + * @brief Concrete Qt plugin implementing the delivery messaging module. + * + * This class adapts the host plugin API to liblogosdelivery C-FFI calls and + * forwards asynchronous events back to the host through Logos API clients. + * + * Lifecycle contract: + * - call @ref createNode exactly once per context + * - call @ref start before message operations + * - use @ref subscribe / @ref send / @ref unsubscribe as needed + * - call @ref stop before shutdown + * Notice all of these calls are synchronous. + * + * Asynchronous events are emitted off thread as Logos Plugin events. + * Emitted plugin event contracts (name + `QVariantList data` indices): + * - `messageSent` (see `send` method) + * - `data[0]` (`QString`): request id + * - `data[1]` (`QString`): message hash + * - `data[2]` (`QString`): local timestamp (ISO-8601) + * - `messageError` (see `send` method) + * - `data[0]` (`QString`): request id + * - `data[1]` (`QString`): message hash + * - `data[2]` (`QString`): error message + * - `data[3]` (`QString`): local timestamp (ISO-8601) + * - `messagePropagated` (see `send` method) + * - `data[0]` (`QString`): request id + * - `data[1]` (`QString`): message hash + * - `data[2]` (`QString`): local timestamp (ISO-8601) + * - `connectionStateChanged` + * - `data[0]` (`QString`): connection status + * - `data[1]` (`QString`): local timestamp (ISO-8601) + * + * The raw FFI `eventType` values mapped into these plugin events are: + * - `message_sent` -> `messageSent` + * - `message_error` -> `messageError` + * - `message_propagated` -> `messagePropagated` + * - `connection_status_change` -> `connectionStateChanged` + */ class DeliveryModulePlugin : public QObject, public DeliveryModuleInterface { Q_OBJECT @@ -13,14 +51,136 @@ class DeliveryModulePlugin : public QObject, public DeliveryModuleInterface Q_INTERFACES(DeliveryModuleInterface PluginInterface) public: + /** + * @brief Constructs the plugin with no active delivery context. + */ DeliveryModulePlugin(); + + /** + * @brief Destroys the plugin and releases owned resources. + * + * If present, the owned `LogosAPI` instance is deleted and the underlying + * liblogosdelivery context is destroyed. + */ virtual ~DeliveryModulePlugin(); + /** + * @brief Creates a liblogosdelivery node from a NodeConfig JSON document. + * + * The JSON is parsed by Nim-side `decodeNodeConfigFromJson` and maps to + * `NodeConfig` from `waku/api/api_conf.nim`. + * + * ## Top-level keys (`NodeConfig`) + * - `mode` (`"Core" | "Edge"`, optional, default: `"Core"`) + * - `protocolsConfig` (object, optional, default: network preset) + * - `networkingConfig` (object, optional, default shown below) + * - `ethRpcEndpoints` (array of string, optional, default: `[]`) + * - `p2pReliability` (boolean, optional, default: `false`) + * - `logLevel` (enum string, optional, default: `"INFO"`) + * - `logFormat` (`"TEXT" | "JSON"`, optional, default: `"TEXT"`) + * + * ## `protocolsConfig` keys + * - `entryNodes` (array of string (in formats: enr, multiaddress), + * required when `protocolsConfig` is present) + * - `staticStoreNodes` (array of string (in formats: enr, multiaddress), + * optional, default: `[]`) + * - `clusterId` (number/uint16, required when `protocolsConfig` is present) + * - `autoShardingConfig` (object, optional) + * - `numShardsInCluster` (number/uint16, required if object present) + * - `messageValidation` (object, optional) + * - `maxMessageSize` (string, required if object present; e.g. `"150 KiB"`) + * - `rlnConfig` (object or `null`, optional, default: `null`) + * - `contractAddress` (string, required if object present) + * - `chainId` (number/uint, required if object present) + * - `epochSizeSec` (number/uint64, required if object present) + * + * ## `networkingConfig` keys + * - `listenIpv4` (string IPv4, required if object present) + * - `p2pTcpPort` (number/uint16, required if object present) + * - `discv5UdpPort` (number/uint16, required if object present) + * + * @note Unknown keys at any level are rejected by the decoder. + * @note Omitting `protocolsConfig` entirely is valid and uses the preset. + * @note If `protocolsConfig` is present, both `entryNodes` and `clusterId` + * must be provided. + * + * Example: + * @code{.json} + * { + * "mode": "Core", + * "protocolsConfig": { + * "entryNodes": ["enrtree://TREE@nodes.example.com"], + * "staticStoreNodes": [], + * "clusterId": 1, + * "autoShardingConfig": { "numShardsInCluster": 8 }, + * "messageValidation": { + * "maxMessageSize": "150 KiB", + * "rlnConfig": null + * } + * }, + * "networkingConfig": { + * "listenIpv4": "0.0.0.0", + * "p2pTcpPort": 60000, + * "discv5UdpPort": 9000 + * }, + * "ethRpcEndpoints": [], + * "p2pReliability": false, + * "logLevel": "INFO", + * "logFormat": "TEXT" + * } + * @endcode + * + * @param cfg UTF-16 Qt string containing a UTF-8 serializable JSON payload. + * @return `true` if context creation succeeds and callback returns `RET_OK`, + * otherwise `false`. + */ Q_INVOKABLE bool createNode(const QString &cfg) override; + + /** + * @brief Starts the delivery node. + * @return `true` on success; `false` when no context exists or start fails. + */ Q_INVOKABLE bool start() override; + + /** + * @brief Stops the delivery node. + * @return `true` on success; `false` when no context exists or stop fails. + */ Q_INVOKABLE bool stop() override; + + /** + * @brief Sends a message over the active node. + * + * This method builds a JSON envelope expected by `logosdelivery_send`: + * `{ "contentTopic": string, "payload": base64, "ephemeral": (bool, default: false) }`. + * + * `send` call validates the input and returns with an associated requestId. + * After all the exact send operation is done async and user can expect Message events in response + * The requestId helps keep track of send operation results. + * - `messageError` emitted in case module can't sent the message + * - `messagePropagated` emitted if message has hit the network, you can expect delivery but + * module could not validate it yet. + * - `messageSent` emitted after message sending is validated by a network store node. + * + * @param contentTopic Destination content topic. + * @param payload Raw message bytes represented as QString; converted to UTF-8 + * bytes and base64-encoded before crossing the FFI boundary. + * @return Success with request id, or error details. + */ Q_INVOKABLE QExpected send(const QString &contentTopic, const QString &payload) override; + + /** + * @brief Subscribes to the supplied content topic. + * @param contentTopic Topic identifier. + * @return `true` when subscribed successfully, otherwise `false`. + */ Q_INVOKABLE bool subscribe(const QString &contentTopic) override; + + /** + * @brief Unsubscribes from the supplied content topic. + * @param contentTopic Topic identifier. + * @return `true` when unsubscribed successfully, otherwise `false`. + */ Q_INVOKABLE bool unsubscribe(const QString &contentTopic) override; Q_INVOKABLE QString getAvailableNodeInfoIDs() override; Q_INVOKABLE QString getNodeInfo(const QString &contentTopic) override; @@ -28,22 +188,56 @@ public: QString name() const override { return "delivery_module"; } QString version() const; - // LogosAPI initialization + /** + * @brief Injects/replaces the Logos API bridge used for event forwarding. + * + * Ownership is transferred to this plugin instance. + * + * @param logosAPIInstance Heap-allocated API object or `nullptr`. + */ Q_INVOKABLE void initLogos(LogosAPI* logosAPIInstance); signals: - // for now this is required for events, later it might not be necessary if using a proxy + /** + * @brief Module event signal (currently retained for compatibility). + * @param eventName Event identifier. + * @param data Event payload as positional values. + */ void eventResponse(const QString& eventName, const QVariantList& data); private: + /** + * @brief Opaque liblogosdelivery context pointer. + */ void* deliveryCtx; + + /** + * @brief Serializes node creation to a single in-flight operation. + */ + std::mutex createNodeMutex; - // Timeout for callback operations + /** + * @brief Common timeout for FFI operations that complete via callback. + */ static constexpr std::chrono::seconds CALLBACK_TIMEOUT{30}; - // Helper method for emitting events + /** + * @brief Forwards normalized events to the registered Logos API client. + * @param eventName Canonical event name. + * @param data Event payload list. + */ void emitEvent(const QString& eventName, const QVariantList& data); - // Static callback functions for liblogosdelivery + /** + * @brief Global C callback used by liblogosdelivery to report async events. + * + * Expected event payload format is a JSON document containing an `eventType` + * discriminator and event-specific fields. + * + * @param callerRet FFI return code associated with callback dispatch. + * @param msg UTF-8 JSON event payload buffer. + * @param len Message length in bytes. + * @param userData Opaque pointer expected to be `DeliveryModulePlugin*`. + */ static void event_callback(int callerRet, const char* msg, size_t len, void* userData); }; From b3bf70cc736c5a32d60ec94f24e6673e1eeec649 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:52:08 +0100 Subject: [PATCH 17/30] Apply suggestions from code review Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> --- delivery_module_plugin.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 271102c..5e29203 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -67,8 +67,8 @@ public: /** * @brief Creates a liblogosdelivery node from a NodeConfig JSON document. * - * The JSON is parsed by Nim-side `decodeNodeConfigFromJson` and maps to - * `NodeConfig` from `waku/api/api_conf.nim`. + * The JSON is parsed by logos-delivery (liblogosdelivery folder) side and maps to + * `NodeConfig` from `waku/api/api_conf.nim` (https://github.com/logos-messaging/logos-delivery). * * ## Top-level keys (`NodeConfig`) * - `mode` (`"Core" | "Edge"`, optional, default: `"Core"`) @@ -80,7 +80,7 @@ public: * - `logFormat` (`"TEXT" | "JSON"`, optional, default: `"TEXT"`) * * ## `protocolsConfig` keys - * - `entryNodes` (array of string (in formats: enr, multiaddress), + * - `entryNodes` (array of string (in formats: enrtree, multiaddress), * required when `protocolsConfig` is present) * - `staticStoreNodes` (array of string (in formats: enr, multiaddress), * optional, default: `[]`) @@ -89,7 +89,7 @@ public: * - `numShardsInCluster` (number/uint16, required if object present) * - `messageValidation` (object, optional) * - `maxMessageSize` (string, required if object present; e.g. `"150 KiB"`) - * - `rlnConfig` (object or `null`, optional, default: `null`) + * - `rlnConfig` Rate Limit Nullifier configuration (object or `null`, optional, default: `null`) * - `contractAddress` (string, required if object present) * - `chainId` (number/uint, required if object present) * - `epochSizeSec` (number/uint64, required if object present) @@ -160,7 +160,7 @@ public: * - `messageError` emitted in case module can't sent the message * - `messagePropagated` emitted if message has hit the network, you can expect delivery but * module could not validate it yet. - * - `messageSent` emitted after message sending is validated by a network store node. + * - `messageSent` emitted after the sent message is validated by the network. * * @param contentTopic Destination content topic. * @param payload Raw message bytes represented as QString; converted to UTF-8 From 3a20e0eaba671f4434f0590448bd3b852e08c3aa Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Tue, 3 Mar 2026 21:45:38 +0100 Subject: [PATCH 18/30] add doxygen annotations for debug API methods --- delivery_module_interface.h | 2 +- delivery_module_plugin.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/delivery_module_interface.h b/delivery_module_interface.h index 3c7fa01..dfe0f5e 100644 --- a/delivery_module_interface.h +++ b/delivery_module_interface.h @@ -15,7 +15,7 @@ public: Q_INVOKABLE virtual bool subscribe(const QString &contentTopic) = 0; Q_INVOKABLE virtual bool unsubscribe(const QString &contentTopic) = 0; Q_INVOKABLE virtual QString getAvailableNodeInfoIDs() = 0; - Q_INVOKABLE virtual QString getNodeInfo(const QString &contentTopic) = 0; + Q_INVOKABLE virtual QString getNodeInfo(const QString &nodeInfoId) = 0; Q_INVOKABLE virtual QString getAvailableConfigs() = 0; signals: diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 5e29203..6e07b47 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -183,7 +183,17 @@ public: */ Q_INVOKABLE bool unsubscribe(const QString &contentTopic) override; Q_INVOKABLE QString getAvailableNodeInfoIDs() override; - Q_INVOKABLE QString getNodeInfo(const QString &contentTopic) override; + + /** + * @brief Semantic version of this plugin implementation. + * @param nodeInfoId Identifier for the requested node info item. + * @return UTF-16 string containing UTF-8 serializable JSON data, or an empty string on error. + */ + Q_INVOKABLE QString getNodeInfo(const QString &nodeInfoId) override; + + /** + * @brief Information about the available configuration parameters to be used in `createNode`. + */ Q_INVOKABLE QString getAvailableConfigs() override; QString name() const override { return "delivery_module"; } QString version() const; From 8281a48fffba9ba43d0d6e0b40a7270040acc7f0 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:53:16 +0100 Subject: [PATCH 19/30] WIP --- delivery_module_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 6e07b47..14a7f28 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -72,7 +72,7 @@ public: * * ## Top-level keys (`NodeConfig`) * - `mode` (`"Core" | "Edge"`, optional, default: `"Core"`) - * - `protocolsConfig` (object, optional, default: network preset) + * - `protocolsConfig` (object, optional, default: `TheWakuNetwork`) # Notice: about to change! * - `networkingConfig` (object, optional, default shown below) * - `ethRpcEndpoints` (array of string, optional, default: `[]`) * - `p2pReliability` (boolean, optional, default: `false`) From 287d424c9035803bb33aaa914aba97264f801e8e Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 03:56:13 +0100 Subject: [PATCH 20/30] Adapted doxygen doc comments and readme to the new config format. --- README.md | 77 ++++++++++++++++++++++++++++---- delivery_module_plugin.h | 95 +++++++++++++++++++--------------------- 2 files changed, 113 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 29901bc..985bd3b 100644 --- a/README.md +++ b/README.md @@ -88,24 +88,83 @@ All dependencies are automatically handled by the Nix flake configuration. ## Module Interface -The delivery module provides the following API methods: +The delivery module provides the following API methods (all synchronous): -- `createNode(cfg: QString)` - Initialize the delivery node with JSON configuration +- `createNode(cfg: QString)` - Initialize the delivery node with a JSON configuration (call once) - `start()` - Start the delivery node - `stop()` - Stop the delivery node -- `send(contentTopic: QString, payload: QString)` - Send a message +- `send(contentTopic: QString, payload: QString)` - Send a message (returns a request id) - `subscribe(contentTopic: QString)` - Subscribe to receive messages on a topic - `unsubscribe(contentTopic: QString)` - Unsubscribe from a topic +- `getAvailableNodeInfoIDs()` - List queryable node info identifiers +- `getNodeInfo(nodeInfoId: QString)` - Retrieve node info by identifier +- `getAvailableConfigs()` - Retrieve available configuration parameter descriptions + +### Node Configuration (`createNode`) + +`createNode` accepts a **flat** JSON object whose keys correspond to `WakuNodeConf` +field names (camelCase) from +[logos-delivery](https://github.com/logos-messaging/logos-delivery). +Unknown keys are silently ignored. Every field has a built-in default, so only +values that differ from defaults need to be supplied. + +#### Commonly used keys + +| Key | Type | Default | Description | +|----------------------|------------------|------------|------------------------------------------| +| `mode` | string | `"noMode"` | `"Core"`, `"Edge"`, or `"noMode"` | +| `preset` | string | `""` | Network preset (`"twn"`, `"logos.dev"`) | +| `clusterId` | number (uint16) | `0` | Cluster identifier | +| `entryNodes` | array of string | `[]` | Bootstrap peers (enrtree / multiaddress) | +| `relay` | boolean | `false` | Enable relay protocol | +| `rlnRelay` | boolean | `false` | Enable RLN rate-limit nullifier | +| `tcpPort` | number (uint16) | `60000` | P2P TCP listen port | +| `numShardsInNetwork` | number (uint16) | `1` | Auto-sharding shard count | +| `logLevel` | string | `"INFO"` | `"TRACE"`, `"DEBUG"`, `"INFO"`, `"WARN"` | +| `logFormat` | string | `"TEXT"` | `"TEXT"` or `"JSON"` | +| `maxMessageSize` | string | `"150KiB"` | Maximum message payload size | + +#### Presets + +Using a `preset` populates cluster ID, entry nodes, sharding, RLN, and other +network-specific defaults automatically. Individual keys supplied alongside a +preset override the preset values. + +- `"twn"` – The RLN-protected Waku Network (cluster 1). +- `"logos.dev"` – Logos Dev Network (cluster 2, mix enabled, p2pReliability on, + 8 auto-shards, built-in bootstrap nodes). + +Minimal example using the `logos.dev` preset: + +```json +{ + "logLevel": "INFO", + "mode": "Core", + "preset": "logos.dev" +} +``` ### Events -The module emits the following events: +Asynchronous events are emitted off-thread as Logos Plugin events. Each event +carries a `QVariantList data` with positional values: -- `deliveryInitialized` - When the node is initialized -- `deliveryStarted` - When the node is started -- `messageSent` - When a message is successfully sent -- `messageReceived` - When a message is received -- `messageError` - When an error occurs during message sending +- **`messageSent`** – message confirmed by the network + - `data[0]` (`QString`): request id + - `data[1]` (`QString`): message hash + - `data[2]` (`QString`): local timestamp (ISO-8601) +- **`messageError`** – send failure + - `data[0]` (`QString`): request id + - `data[1]` (`QString`): message hash + - `data[2]` (`QString`): error message + - `data[3]` (`QString`): local timestamp (ISO-8601) +- **`messagePropagated`** – message reached the network but not yet validated + - `data[0]` (`QString`): request id + - `data[1]` (`QString`): message hash + - `data[2]` (`QString`): local timestamp (ISO-8601) +- **`connectionStateChanged`** – node connectivity change + - `data[0]` (`QString`): connection status + - `data[1]` (`QString`): local timestamp (ISO-8601) ## Architecture diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 14a7f28..9c4f732 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -65,66 +65,59 @@ public: virtual ~DeliveryModulePlugin(); /** - * @brief Creates a liblogosdelivery node from a NodeConfig JSON document. + * @brief Creates a liblogosdelivery node from a WakuNodeConf JSON document. * * The JSON is parsed by logos-delivery (liblogosdelivery folder) side and maps to - * `NodeConfig` from `waku/api/api_conf.nim` (https://github.com/logos-messaging/logos-delivery). + * `WakuNodeConf` from `tools/confutils/cli_args.nim` + * (https://github.com/logos-messaging/logos-delivery). * - * ## Top-level keys (`NodeConfig`) - * - `mode` (`"Core" | "Edge"`, optional, default: `"Core"`) - * - `protocolsConfig` (object, optional, default: `TheWakuNetwork`) # Notice: about to change! - * - `networkingConfig` (object, optional, default shown below) - * - `ethRpcEndpoints` (array of string, optional, default: `[]`) - * - `p2pReliability` (boolean, optional, default: `false`) - * - `logLevel` (enum string, optional, default: `"INFO"`) - * - `logFormat` (`"TEXT" | "JSON"`, optional, default: `"TEXT"`) + * The configuration is a **flat** JSON object whose keys correspond to + * `WakuNodeConf` Nim field names (camelCase). Unknown keys are silently + * ignored. Every field has a built-in default, so only the values that + * differ from defaults need to be supplied. * - * ## `protocolsConfig` keys - * - `entryNodes` (array of string (in formats: enrtree, multiaddress), - * required when `protocolsConfig` is present) - * - `staticStoreNodes` (array of string (in formats: enr, multiaddress), - * optional, default: `[]`) - * - `clusterId` (number/uint16, required when `protocolsConfig` is present) - * - `autoShardingConfig` (object, optional) - * - `numShardsInCluster` (number/uint16, required if object present) - * - `messageValidation` (object, optional) - * - `maxMessageSize` (string, required if object present; e.g. `"150 KiB"`) - * - `rlnConfig` Rate Limit Nullifier configuration (object or `null`, optional, default: `null`) - * - `contractAddress` (string, required if object present) - * - `chainId` (number/uint, required if object present) - * - `epochSizeSec` (number/uint64, required if object present) + * ## Commonly used keys + * | Key | Type | Default | Description | + * |----------------------|------------------|------------|---------------------------------------------| + * | `mode` | string | `"noMode"` | `"Core"`, `"Edge"`, or `"noMode"` | + * | `preset` | string | `""` | Network preset (`"twn"`, `"logos.dev"`, …) | + * | `clusterId` | number (uint16) | `0` | Cluster identifier | + * | `entryNodes` | array of string | `[]` | Bootstrap peers (enrtree / multiaddress) | + * | `relay` | boolean | `false` | Enable relay protocol | + * | `rlnRelay` | boolean | `false` | Enable RLN rate-limit nullifier | + * | `tcpPort` | number (uint16) | `60000` | P2P TCP listen port | + * | `numShardsInNetwork` | number (uint16) | `1` | Auto-sharding shard count | + * | `logLevel` | string | `"INFO"` | `"TRACE"`, `"DEBUG"`, `"INFO"`, `"WARN"`, … | + * | `logFormat` | string | `"TEXT"` | `"TEXT"` or `"JSON"` | + * | `maxMessageSize` | string | `"150KiB"` | Maximum message payload size | * - * ## `networkingConfig` keys - * - `listenIpv4` (string IPv4, required if object present) - * - `p2pTcpPort` (number/uint16, required if object present) - * - `discv5UdpPort` (number/uint16, required if object present) + * ## Presets + * Using a `preset` populates cluster ID, entry nodes, sharding, RLN, and + * other network-specific defaults automatically. Individual keys supplied + * alongside a preset override the preset values. + * - `"twn"` – The RLN-protected Waku Network (cluster 1). + * - `"logos.dev"` – Logos Dev Network (cluster 2, mix enabled, + * p2pReliability on, 8 auto-shards, built-in bootstrap nodes). * - * @note Unknown keys at any level are rejected by the decoder. - * @note Omitting `protocolsConfig` entirely is valid and uses the preset. - * @note If `protocolsConfig` is present, both `entryNodes` and `clusterId` - * must be provided. + * Minimal `logos.dev` example: + * @code{.json} + * { + * "logLevel": "INFO", + * "mode": "Core", + * "preset": "logos.dev" + * } + * @endcode * - * Example: + * Full override example: * @code{.json} * { * "mode": "Core", - * "protocolsConfig": { - * "entryNodes": ["enrtree://TREE@nodes.example.com"], - * "staticStoreNodes": [], - * "clusterId": 1, - * "autoShardingConfig": { "numShardsInCluster": 8 }, - * "messageValidation": { - * "maxMessageSize": "150 KiB", - * "rlnConfig": null - * } - * }, - * "networkingConfig": { - * "listenIpv4": "0.0.0.0", - * "p2pTcpPort": 60000, - * "discv5UdpPort": 9000 - * }, - * "ethRpcEndpoints": [], - * "p2pReliability": false, + * "clusterId": 42, + * "entryNodes": ["enrtree://TREE@nodes.example.com"], + * "relay": true, + * "tcpPort": 60000, + * "numShardsInNetwork": 8, + * "maxMessageSize": "150KiB", * "logLevel": "INFO", * "logFormat": "TEXT" * } @@ -195,7 +188,9 @@ public: * @brief Information about the available configuration parameters to be used in `createNode`. */ Q_INVOKABLE QString getAvailableConfigs() override; + QString name() const override { return "delivery_module"; } + QString version() const; /** From 629daaaa0846a6ed699705f2b5a2f8b7c352d319 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 04:24:53 +0100 Subject: [PATCH 21/30] added payload and content_topic formatting suggestions --- README.md | 27 +++++++++++++++++++++++++++ delivery_module_plugin.h | 3 +++ 2 files changed, 30 insertions(+) diff --git a/README.md b/README.md index 985bd3b..7757e3c 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,33 @@ Minimal example using the `logos.dev` preset: } ``` +### Content Topics + +Content topics identify message channels for publishing and subscribing. Use a +properly structured content topic for your application following the format +specified in +[LIP-23: Topics](https://lip.logos.co/messaging/informational/23/topics.html#content-topics). + +Example: `"/myapp/1/chat/proto"` + +### Sending Messages (`send`) + +`send(contentTopic, payload)` accepts a content topic and a raw payload string. +The plugin converts the payload to UTF-8 bytes, base64-encodes it, and wraps it +in a JSON envelope before crossing the FFI boundary: + +```json +{ "contentTopic": "", "payload": "", "ephemeral": false } +``` + +The call is synchronous and returns a **request id** on success. The actual +network delivery is asynchronous — track results via the emitted events: + +- **`messageError`** – the module could not send the message. +- **`messagePropagated`** – the message reached the network but is not yet + validated. +- **`messageSent`** – the message has been confirmed by the network. + ### Events Asynchronous events are emitted off-thread as Logos Plugin events. Each event diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index 9c4f732..a2bd6a3 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -43,6 +43,9 @@ * - `message_error` -> `messageError` * - `message_propagated` -> `messagePropagated` * - `connection_status_change` -> `connectionStateChanged` + * + * As a general concept consider using proper content_topic format for your purpose. + * --> https://lip.logos.co/messaging/informational/23/topics.html#content-topics */ class DeliveryModulePlugin : public QObject, public DeliveryModuleInterface { From bb37f68197e4bcdf6a6e67402dc22fb58bfec6cc Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:30:01 +0100 Subject: [PATCH 22/30] Temporary direct logos-devlivery link to connected PR --- flake.lock | 8 ++++---- vendor/logos-delivery | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index a9d26c8..bd38eb4 100644 --- a/flake.lock +++ b/flake.lock @@ -122,11 +122,11 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772578080, - "narHash": "sha256-JI+pECDsSe06aNTB0d5PVL9vdyXL01kaeXIkuuAJUNk=", + "lastModified": 1772610727, + "narHash": "sha256-VdCFKJb+xG/YxslYpiFOYISc6wo5CUgiF6UVxUNTb64=", "ref": "refs/heads/master", - "rev": "4a6ad732356c99d00c5f0143df8a470b84b6281d", - "revCount": 2233, + "rev": "91c48fa2a7efe997d81df4bd7ad72a3ff5dc4fff", + "revCount": 2234, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" diff --git a/vendor/logos-delivery b/vendor/logos-delivery index 4a6ad73..91c48fa 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit 4a6ad732356c99d00c5f0143df8a470b84b6281d +Subproject commit 91c48fa2a7efe997d81df4bd7ad72a3ff5dc4fff From d48a541e123a75263feddac4ce6bf12ef5bc0ba9 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:39:42 +0100 Subject: [PATCH 23/30] Add event_callback translation forr message_received event --- delivery_module_plugin.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/delivery_module_plugin.cpp b/delivery_module_plugin.cpp index 1ec1e67..975db9d 100644 --- a/delivery_module_plugin.cpp +++ b/delivery_module_plugin.cpp @@ -101,6 +101,16 @@ void DeliveryModulePlugin::event_callback(int callerRet, const char* msg, size_t eventData << timestamp; plugin->emitEvent("messagePropagated", eventData); + } else if (eventType == "message_received") { + // MessageReceivedEvent: messageHash, message (WakuMessage) + QJsonObject msgObj = jsonObj["message"].toObject(); + QVariantList eventData; + eventData << jsonObj["messageHash"].toString(); + eventData << msgObj["contentTopic"].toString(); + eventData << msgObj["payload"].toString(); + eventData << QString::number(msgObj["timestamp"].toDouble(), 'f', 0); + plugin->emitEvent("messageReceived", eventData); + } else if (eventType == "connection_status_change") { QVariantList eventData; eventData << jsonObj["connectionStatus"].toString(); From 3aa5162ebc7c9ce936634507e9dd2960c654aa5e Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:53:22 +0100 Subject: [PATCH 24/30] Extend doc with message_received event desc --- README.md | 5 +++++ delivery_module_plugin.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 7757e3c..b5707ab 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,11 @@ carries a `QVariantList data` with positional values: - `data[0]` (`QString`): request id - `data[1]` (`QString`): message hash - `data[2]` (`QString`): local timestamp (ISO-8601) +- **`messageReceived`** – a message arrived on a subscribed topic + - `data[0]` (`QString`): message hash + - `data[1]` (`QString`): content topic + - `data[2]` (`QString`): payload (base64-encoded) + - `data[3]` (`QString`): timestamp (nanoseconds since epoch) - **`connectionStateChanged`** – node connectivity change - `data[0]` (`QString`): connection status - `data[1]` (`QString`): local timestamp (ISO-8601) diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index a2bd6a3..dc6adfa 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -34,6 +34,11 @@ * - `data[0]` (`QString`): request id * - `data[1]` (`QString`): message hash * - `data[2]` (`QString`): local timestamp (ISO-8601) + * - `messageReceived` (emitted when a message arrives on a subscribed topic) + * - `data[0]` (`QString`): message hash + * - `data[1]` (`QString`): content topic + * - `data[2]` (`QString`): payload (base64-encoded) + * - `data[3]` (`QString`): timestamp (nanoseconds since epoch) * - `connectionStateChanged` * - `data[0]` (`QString`): connection status * - `data[1]` (`QString`): local timestamp (ISO-8601) @@ -42,6 +47,7 @@ * - `message_sent` -> `messageSent` * - `message_error` -> `messageError` * - `message_propagated` -> `messagePropagated` + * - `message_received` -> `messageReceived` * - `connection_status_change` -> `connectionStateChanged` * * As a general concept consider using proper content_topic format for your purpose. From 804f1732f5d6bc7d1cf9c2dc3f1d4c454810256e Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:57:10 +0100 Subject: [PATCH 25/30] Move logos-delivery ref to origin/master after dependent PR is merged --- flake.lock | 4 ++-- vendor/logos-delivery | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index bd38eb4..a0cd946 100644 --- a/flake.lock +++ b/flake.lock @@ -122,10 +122,10 @@ "zerokit": "zerokit" }, "locked": { - "lastModified": 1772610727, + "lastModified": 1772614128, "narHash": "sha256-VdCFKJb+xG/YxslYpiFOYISc6wo5CUgiF6UVxUNTb64=", "ref": "refs/heads/master", - "rev": "91c48fa2a7efe997d81df4bd7ad72a3ff5dc4fff", + "rev": "0ad55159b39ed74ba6b88b5a9d72db766b4b0f08", "revCount": 2234, "submodules": true, "type": "git", diff --git a/vendor/logos-delivery b/vendor/logos-delivery index 91c48fa..0ad5515 160000 --- a/vendor/logos-delivery +++ b/vendor/logos-delivery @@ -1 +1 @@ -Subproject commit 91c48fa2a7efe997d81df4bd7ad72a3ff5dc4fff +Subproject commit 0ad55159b39ed74ba6b88b5a9d72db766b4b0f08 From 2d53368cce2a6df825623096cf677c7b92fa249c Mon Sep 17 00:00:00 2001 From: pablo Date: Thu, 19 Mar 2026 11:05:13 +0200 Subject: [PATCH 26/30] fix: using LogosResult on send --- delivery_module_interface.h | 4 ++-- delivery_module_plugin.cpp | 16 ++++++++-------- delivery_module_plugin.h | 2 +- examples/simple.cpp | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/delivery_module_interface.h b/delivery_module_interface.h index dfe0f5e..7d5f8cf 100644 --- a/delivery_module_interface.h +++ b/delivery_module_interface.h @@ -2,7 +2,7 @@ #include #include "interface.h" -#include "QExpected.h" +#include "logos_types.h" class DeliveryModuleInterface : public PluginInterface { @@ -11,7 +11,7 @@ public: Q_INVOKABLE virtual bool createNode(const QString &cfg) = 0; Q_INVOKABLE virtual bool start() = 0; Q_INVOKABLE virtual bool stop() = 0; - Q_INVOKABLE virtual QExpected send(const QString &contentTopic, const QString &payload) = 0; + Q_INVOKABLE virtual LogosResult send(const QString &contentTopic, const QString &payload) = 0; Q_INVOKABLE virtual bool subscribe(const QString &contentTopic) = 0; Q_INVOKABLE virtual bool unsubscribe(const QString &contentTopic) = 0; Q_INVOKABLE virtual QString getAvailableNodeInfoIDs() = 0; diff --git a/delivery_module_plugin.cpp b/delivery_module_plugin.cpp index 975db9d..dc729a2 100644 --- a/delivery_module_plugin.cpp +++ b/delivery_module_plugin.cpp @@ -239,26 +239,26 @@ bool DeliveryModulePlugin::stop() qDebug() << "DeliveryModulePlugin: Messaging stop completed with success: true"; return true; } -QExpected DeliveryModulePlugin::send(const QString &contentTopic, const QString &payload) +LogosResult DeliveryModulePlugin::send(const QString &contentTopic, const QString &payload) { qDebug() << "DeliveryModulePlugin::send called with contentTopic:" << contentTopic; qDebug() << "DeliveryModulePlugin::send payload:" << payload; - + if (!deliveryCtx) { qWarning() << "DeliveryModulePlugin: Cannot send message - context not initialized. Call createNode first."; - return QExpected::err("Context not initialized"); + return {false, QVariant(), QStringLiteral("Context not initialized")}; } - + // Construct JSON message according to logosdelivery_send API // The payload should be base64-encoded as per the API spec QJsonObject messageObj; messageObj["contentTopic"] = contentTopic; messageObj["payload"] = QString::fromUtf8(payload.toUtf8().toBase64()); messageObj["ephemeral"] = false; - + QJsonDocument doc(messageObj); QByteArray messageJson = doc.toJson(QJsonDocument::Compact); - + auto outcome = callApiRetValue( "send", CALLBACK_TIMEOUT, @@ -266,12 +266,12 @@ QExpected DeliveryModulePlugin::send(const QString &contentTopic, const if (outcome.isErr()) { qWarning() << "DeliveryModulePlugin: Send failed for topic:" << contentTopic << ", reason:" << outcome.error(); - return QExpected::err(outcome.error()); + return {false, QVariant(), outcome.error()}; } const QString responseMessage = outcome.value(); qDebug() << "DeliveryModulePlugin: Send initiated for topic:" << contentTopic << ", with success: true"; - return QExpected::ok(responseMessage); + return {true, responseMessage}; } bool DeliveryModulePlugin::subscribe(const QString &contentTopic) diff --git a/delivery_module_plugin.h b/delivery_module_plugin.h index dc6adfa..9487f97 100644 --- a/delivery_module_plugin.h +++ b/delivery_module_plugin.h @@ -169,7 +169,7 @@ public: * bytes and base64-encoded before crossing the FFI boundary. * @return Success with request id, or error details. */ - Q_INVOKABLE QExpected send(const QString &contentTopic, const QString &payload) override; + Q_INVOKABLE LogosResult send(const QString &contentTopic, const QString &payload) override; /** * @brief Subscribes to the supplied content topic. diff --git a/examples/simple.cpp b/examples/simple.cpp index ef385ff..bd732f7 100644 --- a/examples/simple.cpp +++ b/examples/simple.cpp @@ -143,10 +143,10 @@ int main(int argc, char *argv[]) break; } else if (!input.empty()) { auto result = delivery->send(contentTopicOfInterest, QString::fromStdString(input)); - if (!result.isErr()) - qDebug() << "Send result:" << result.value(); + if (result.success) + qDebug() << "Send result:" << result.getString(); else - qDebug() << "Send failed"; + qDebug() << "Send failed:" << result.getError(); } } From b21826164e979fdf1837de181225381c5bbfa1e9 Mon Sep 17 00:00:00 2001 From: pablo Date: Thu, 19 Mar 2026 12:37:19 +0200 Subject: [PATCH 27/30] fix: encode message_received payload bytes as base64 --- delivery_module_plugin.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/delivery_module_plugin.cpp b/delivery_module_plugin.cpp index dc729a2..4b83e25 100644 --- a/delivery_module_plugin.cpp +++ b/delivery_module_plugin.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "api_call_handler.h" @@ -107,7 +108,22 @@ void DeliveryModulePlugin::event_callback(int callerRet, const char* msg, size_t QVariantList eventData; eventData << jsonObj["messageHash"].toString(); eventData << msgObj["contentTopic"].toString(); - eventData << msgObj["payload"].toString(); + + // The waku API returns payload as a JSON byte array (e.g. [106,106,106,106]). + // Convert it to a base64 string to match the documented event contract. + QJsonValue payloadValue = msgObj["payload"]; + if (payloadValue.isArray()) { + QJsonArray payloadArray = payloadValue.toArray(); + QByteArray payloadBytes; + payloadBytes.reserve(payloadArray.size()); + for (const QJsonValue& val : payloadArray) { + payloadBytes.append(static_cast(val.toInt())); + } + eventData << QString::fromLatin1(payloadBytes.toBase64()); + } else { + eventData << payloadValue.toString(); + } + eventData << QString::number(msgObj["timestamp"].toDouble(), 'f', 0); plugin->emitEvent("messageReceived", eventData); From 7300c9d65155ce784797800ca5e260336d254974 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 31 Mar 2026 12:11:34 -0400 Subject: [PATCH 28/30] use logos-module-builder use logos-module-builder use logos-module-builder use logos-module-builder use logos-module-builder --- .gitignore | 43 +- .gitmodules | 11 - CMakeLists.txt | 313 +-- examples/CMakeLists.txt | 61 - examples/simple.cpp | 156 -- flake.lock | 1826 ++++++++++++++++- flake.nix | 80 +- metadata.json | 50 +- nix/default.nix | 44 - nix/examples.nix | 69 - nix/header.nix | 86 - nix/lib.nix | 141 -- QExpected.h => src/QExpected.h | 0 api_call_handler.h => src/api_call_handler.h | 0 .../delivery_module_interface.h | 0 .../delivery_module_plugin.cpp | 0 .../delivery_module_plugin.h | 0 vendor/logos-cpp-sdk | 1 - vendor/logos-delivery | 1 - vendor/logos-liblogos | 1 - 20 files changed, 1796 insertions(+), 1087 deletions(-) delete mode 100644 .gitmodules delete mode 100644 examples/CMakeLists.txt delete mode 100644 examples/simple.cpp delete mode 100644 nix/default.nix delete mode 100644 nix/examples.nix delete mode 100644 nix/header.nix delete mode 100644 nix/lib.nix rename QExpected.h => src/QExpected.h (100%) rename api_call_handler.h => src/api_call_handler.h (100%) rename delivery_module_interface.h => src/delivery_module_interface.h (100%) rename delivery_module_plugin.cpp => src/delivery_module_plugin.cpp (100%) rename delivery_module_plugin.h => src/delivery_module_plugin.h (100%) delete mode 160000 vendor/logos-cpp-sdk delete mode 160000 vendor/logos-delivery delete mode 160000 vendor/logos-liblogos diff --git a/.gitignore b/.gitignore index cd0e478..d5ef851 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,6 @@ -# Build directories -build/ -result -result-* -.direnv/ - -# CMake -CMakeCache.txt -CMakeFiles/ -cmake_install.cmake -Makefile -*.cmake - -# Compiled objects -*.o -*.a -*.so -*.dylib -*.dll - -# Qt -*.moc -moc_*.cpp -qrc_*.cpp -*.qm - -# IDE -.vscode/ -.idea/ -*.swp -*.swo -*~ - -# macOS .DS_Store -._* - -# Nix -.pre-commit-config.yaml +build +.deps/ +vendor/* +lib/* +result diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 39c36e5..0000000 --- a/.gitmodules +++ /dev/null @@ -1,11 +0,0 @@ -[submodule "vendor/logos-delivery"] - path = vendor/logos-delivery - url = https://github.com/logos-messaging/logos-delivery.git - branch = master - fetchRecurseSubmodules = true -[submodule "vendor/logos-liblogos"] - path = vendor/logos-liblogos - url = https://github.com/logos-co/logos-liblogos -[submodule "vendor/logos-cpp-sdk"] - path = vendor/logos-cpp-sdk - url = https://github.com/logos-co/logos-cpp-sdk diff --git a/CMakeLists.txt b/CMakeLists.txt index bfb7578..875ca4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,306 +1,29 @@ cmake_minimum_required(VERSION 3.14) -project(DeliveryModulePlugin LANGUAGES CXX) +project(LogosDeliveryModulePlugin LANGUAGES CXX) # Require C++20 set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -include(GNUInstallDirs) - -set(CMAKE_AUTOMOC ON) - -option(LOGOS_MESSAGING_MODULE_USE_VENDOR "Force use of vendored Logos dependencies" OFF) - -# Allow override from environment or command line -if(NOT DEFINED LOGOS_LIBLOGOS_ROOT) - set(_parent_liblogos "${CMAKE_CURRENT_SOURCE_DIR}/../logos-liblogos") - set(_use_vendor ${LOGOS_MESSAGING_MODULE_USE_VENDOR}) - if(NOT _use_vendor) - if(NOT EXISTS "${_parent_liblogos}/interface.h") - set(_use_vendor ON) - endif() - endif() - if(_use_vendor) - set(LOGOS_LIBLOGOS_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/vendor/logos-liblogos") - else() - set(LOGOS_LIBLOGOS_ROOT "${_parent_liblogos}") - endif() -endif() - -if(NOT DEFINED LOGOS_CPP_SDK_ROOT) - set(_parent_cpp_sdk "${CMAKE_CURRENT_SOURCE_DIR}/../logos-cpp-sdk") - set(_use_vendor ${LOGOS_MESSAGING_MODULE_USE_VENDOR}) - if(NOT _use_vendor) - if(NOT EXISTS "${_parent_cpp_sdk}/cpp/logos_api.h") - set(_use_vendor ON) - endif() - endif() - if(_use_vendor) - set(LOGOS_CPP_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/vendor/logos-cpp-sdk") - else() - set(LOGOS_CPP_SDK_ROOT "${_parent_cpp_sdk}") - endif() -endif() - -if(NOT DEFINED LOGOS_DELIVERY_ROOT) - set(LOGOS_DELIVERY_ROOT "$ENV{LOGOS_DELIVERY_ROOT}") -endif() - -# Check if dependencies are available (support both source and installed layouts) -set(_liblogos_found FALSE) -if(EXISTS "${LOGOS_LIBLOGOS_ROOT}/interface.h") - set(_liblogos_found TRUE) - set(_liblogos_is_source TRUE) -elseif(EXISTS "${LOGOS_LIBLOGOS_ROOT}/include/interface.h") - set(_liblogos_found TRUE) - set(_liblogos_is_source FALSE) -endif() - -set(_cpp_sdk_found FALSE) -if(EXISTS "${LOGOS_CPP_SDK_ROOT}/cpp/logos_api.h") - set(_cpp_sdk_found TRUE) - set(_cpp_sdk_is_source TRUE) -elseif(EXISTS "${LOGOS_CPP_SDK_ROOT}/include/cpp/logos_api.h") - set(_cpp_sdk_found TRUE) - set(_cpp_sdk_is_source FALSE) -endif() - -if(NOT _liblogos_found) - message(FATAL_ERROR "logos-liblogos not found at ${LOGOS_LIBLOGOS_ROOT}. " - "Set LOGOS_LIBLOGOS_ROOT or run git submodule update --init --recursive.") -endif() - -if(NOT _cpp_sdk_found) - message(FATAL_ERROR "logos-cpp-sdk not found at ${LOGOS_CPP_SDK_ROOT}. " - "Set LOGOS_CPP_SDK_ROOT or run git submodule update --init --recursive.") -endif() - -# Root that contains the vendored dependencies (logos-core checkout or script vendor directory) -get_filename_component(LOGOS_DEPS_ROOT "${LOGOS_CPP_SDK_ROOT}" DIRECTORY) - -# Find Qt RemoteObjects (needed for LogosAPI) -if(NOT DEFINED QT_VERSION_MAJOR) - find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core RemoteObjects) - if(Qt6_FOUND) - set(QT_VERSION_MAJOR 6) - else() - set(QT_VERSION_MAJOR 5) - endif() -endif() -find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core RemoteObjects) - -# Run Logos C++ generator on metadata before compilation -set(METADATA_JSON "${CMAKE_CURRENT_SOURCE_DIR}/metadata.json") -set(PLUGINS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/modules") - -# Try to find the generator binary -if(_cpp_sdk_is_source) - # Source layout: build the generator - set(CPP_GENERATOR_BUILD_DIR "${LOGOS_DEPS_ROOT}/build/cpp-generator") - set(CPP_GENERATOR "${CPP_GENERATOR_BUILD_DIR}/bin/logos-cpp-generator") - - if(NOT TARGET cpp_generator_build) - add_custom_target(cpp_generator_build - COMMAND bash "${LOGOS_CPP_SDK_ROOT}/cpp-generator/compile.sh" - WORKING_DIRECTORY "${LOGOS_DEPS_ROOT}" - COMMENT "Building logos-cpp-generator via ${LOGOS_CPP_SDK_ROOT}/cpp-generator/compile.sh" - VERBATIM - ) - endif() - - add_custom_target(run_cpp_generator_messaging - COMMAND "${CPP_GENERATOR}" --metadata "${METADATA_JSON}" --module-dir "${PLUGINS_OUTPUT_DIR}" - WORKING_DIRECTORY "${LOGOS_DEPS_ROOT}" - COMMENT "Running logos-cpp-generator on ${METADATA_JSON} with module-dir ${PLUGINS_OUTPUT_DIR}" - VERBATIM - ) - add_dependencies(run_cpp_generator_messaging cpp_generator_build) +# Include the Logos Module CMake helper +if(DEFINED ENV{LOGOS_MODULE_BUILDER_ROOT}) + include($ENV{LOGOS_MODULE_BUILDER_ROOT}/cmake/LogosModule.cmake) else() - # Installed layout: use the generator from the install path - find_program(CPP_GENERATOR logos-cpp-generator PATHS ${LOGOS_CPP_SDK_ROOT}/bin NO_DEFAULT_PATH REQUIRED) - - add_custom_target(run_cpp_generator_messaging - COMMAND "${CPP_GENERATOR}" --metadata "${METADATA_JSON}" --module-dir "${PLUGINS_OUTPUT_DIR}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Running logos-cpp-generator on ${METADATA_JSON} with module-dir ${PLUGINS_OUTPUT_DIR}" - VERBATIM - ) + message(FATAL_ERROR "LogosModule.cmake not found. Set LOGOS_MODULE_BUILDER_ROOT.") endif() -# Find liblogosdelivery library -set(LIBLOGOSDELIVERY_DIR "${LOGOS_DELIVERY_ROOT}/bin") -# Prioritize platform-specific library names -if(APPLE) - set(LIBLOGOSDELIVERY_NAMES liblogosdelivery.dylib liblogosdelivery.so) -elseif(WIN32) - set(LIBLOGOSDELIVERY_NAMES liblogosdelivery.dll lmapi.dll) -else() - set(LIBLOGOSDELIVERY_NAMES liblogosdelivery.so) -endif() -find_library(LIBLOGOSDELIVERY_PATH NAMES ${LIBLOGOSDELIVERY_NAMES} PATHS ${LIBLOGOSDELIVERY_DIR} NO_DEFAULT_PATH) - -# Plugin sources -set(PLUGIN_SOURCES - delivery_module_plugin.cpp - delivery_module_plugin.h - delivery_module_interface.h +# Define the module +logos_module( + NAME delivery_module + SOURCES + src/delivery_module_interface.h + src/delivery_module_plugin.h + src/delivery_module_plugin.cpp + src/api_call_handler.h + src/QExpected.h + EXTERNAL_LIBS + logosdelivery + INCLUDE_DIRS + lib ) - -# Add liblogos interface header -if(_liblogos_is_source) - list(APPEND PLUGIN_SOURCES ${LOGOS_LIBLOGOS_ROOT}/interface.h) -else() - list(APPEND PLUGIN_SOURCES ${LOGOS_LIBLOGOS_ROOT}/include/interface.h) -endif() - -# Add SDK sources (only if source layout, installed layout uses the library) -if(_cpp_sdk_is_source) - list(APPEND PLUGIN_SOURCES - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api.cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api.h - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api_client.cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api_client.h - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api_consumer.cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api_consumer.h - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api_provider.cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/logos_api_provider.h - ${LOGOS_CPP_SDK_ROOT}/cpp/token_manager.cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/token_manager.h - ${LOGOS_CPP_SDK_ROOT}/cpp/module_proxy.cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/module_proxy.h - ) -endif() - -# Create the plugin library -add_library(delivery_module_plugin SHARED ${PLUGIN_SOURCES}) - -# Set output name without lib prefix -set_target_properties(delivery_module_plugin PROPERTIES - PREFIX "") - -# Ensure generator runs before building the plugin -add_dependencies(delivery_module_plugin run_cpp_generator_messaging) - -# Link Qt libraries -target_link_libraries(delivery_module_plugin PRIVATE - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::RemoteObjects -) - -# Link SDK library if using installed layout -if(NOT _cpp_sdk_is_source) - find_library(LOGOS_SDK_LIB logos_sdk PATHS ${LOGOS_CPP_SDK_ROOT}/lib NO_DEFAULT_PATH REQUIRED) - target_link_libraries(delivery_module_plugin PRIVATE ${LOGOS_SDK_LIB}) -endif() - -# Link to liblogosdelivery on all platforms -if(LIBLOGOSDELIVERY_PATH) - target_link_libraries(delivery_module_plugin PRIVATE ${LIBLOGOSDELIVERY_PATH}) -else() - message(WARNING "liblogosdelivery not found in ${LIBLOGOSDELIVERY_DIR}. Build or provide it before linking.") -endif() - -# Include directories -target_include_directories(delivery_module_plugin PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${LIBLOGOSDELIVERY_DIR} -) - -# Look for liblogosdelivery.h in logos-delivery -if(EXISTS "${LOGOS_DELIVERY_ROOT}/include/liblogosdelivery.h") - target_include_directories(delivery_module_plugin PRIVATE ${LOGOS_DELIVERY_ROOT}/include) -elseif(EXISTS "${LOGOS_DELIVERY_ROOT}/liblogosdelivery/liblogosdelivery.h") - target_include_directories(delivery_module_plugin PRIVATE ${LOGOS_DELIVERY_ROOT}/liblogosdelivery) -endif() - -# Add include directories based on layout type -if(_liblogos_is_source) - target_include_directories(delivery_module_plugin PRIVATE ${LOGOS_LIBLOGOS_ROOT}) -else() - target_include_directories(delivery_module_plugin PRIVATE ${LOGOS_LIBLOGOS_ROOT}/include) -endif() - -if(_cpp_sdk_is_source) - target_include_directories(delivery_module_plugin PRIVATE - ${LOGOS_CPP_SDK_ROOT}/cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/generated - ) -else() - target_include_directories(delivery_module_plugin PRIVATE - ${LOGOS_CPP_SDK_ROOT}/include - ${LOGOS_CPP_SDK_ROOT}/include/cpp - ${LOGOS_CPP_SDK_ROOT}/include/core - ) -endif() - -set_target_properties(delivery_module_plugin PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules" # For Windows .dll - BUILD_WITH_INSTALL_RPATH TRUE - SKIP_BUILD_RPATH FALSE) - -if(APPLE) - # Allow unresolved symbols at link time; liblogosdelivery will be provided at runtime - target_link_options(delivery_module_plugin PRIVATE -undefined dynamic_lookup) - set_target_properties(delivery_module_plugin PROPERTIES - INSTALL_RPATH "@loader_path" - INSTALL_NAME_DIR "@rpath" - BUILD_WITH_INSTALL_NAME_DIR TRUE) - - if(LIBLOGOSDELIVERY_PATH) - get_filename_component(LIBLOGOSDELIVERY_FILENAME "${LIBLOGOSDELIVERY_PATH}" NAME) - add_custom_command(TARGET delivery_module_plugin PRE_LINK - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${LIBLOGOSDELIVERY_PATH} - ${CMAKE_BINARY_DIR}/modules/${LIBLOGOSDELIVERY_FILENAME} - COMMENT "Copying ${LIBLOGOSDELIVERY_FILENAME} to modules directory" - ) - - add_custom_command(TARGET delivery_module_plugin POST_BUILD - COMMAND install_name_tool -id "@rpath/delivery_module_plugin.dylib" $ - COMMAND install_name_tool -id "@rpath/${LIBLOGOSDELIVERY_FILENAME}" "${CMAKE_BINARY_DIR}/modules/${LIBLOGOSDELIVERY_FILENAME}" - COMMAND install_name_tool -change "${LIBLOGOSDELIVERY_PATH}" "@rpath/${LIBLOGOSDELIVERY_FILENAME}" $ - COMMENT "Updating library paths for macOS" - ) - else() - add_custom_command(TARGET delivery_module_plugin POST_BUILD - COMMAND install_name_tool -id "@rpath/delivery_module_plugin.dylib" $ - COMMENT "Updating library paths for macOS (liblogosdelivery not found)" - ) - endif() -else() - set_target_properties(delivery_module_plugin PROPERTIES - INSTALL_RPATH "$ORIGIN" - INSTALL_RPATH_USE_LINK_PATH FALSE) - - if(LIBLOGOSDELIVERY_PATH) - get_filename_component(LIBLOGOSDELIVERY_FILENAME "${LIBLOGOSDELIVERY_PATH}" NAME) - add_custom_command(TARGET delivery_module_plugin PRE_LINK - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${LIBLOGOSDELIVERY_PATH} - ${CMAKE_BINARY_DIR}/modules/${LIBLOGOSDELIVERY_FILENAME} - COMMENT "Copying ${LIBLOGOSDELIVERY_FILENAME} to modules directory" - ) - endif() -endif() - -install(TARGETS delivery_module_plugin - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/logos/modules - RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/logos/modules - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/logos/modules -) - -install(FILES ${METADATA_JSON} - DESTINATION ${CMAKE_INSTALL_DATADIR}/logos-delivery-module -) - -install(DIRECTORY "${PLUGINS_OUTPUT_DIR}/" - DESTINATION ${CMAKE_INSTALL_DATADIR}/logos-delivery-module/generated - OPTIONAL -) - -# Include examples build -include(examples/CMakeLists.txt) - diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt deleted file mode 100644 index db2c157..0000000 --- a/examples/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -# examples.cmake - -# Example executable -set(EXAMPLE_SOURCES - examples/simple.cpp -) - -add_executable(simple_example ${EXAMPLE_SOURCES}) - -# Include directories (reuse same paths as plugin) -target_include_directories(simple_example PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} # root -) - -# Include liblogos headers -if(_liblogos_is_source) - target_include_directories(simple_example PRIVATE ${LOGOS_LIBLOGOS_ROOT}) -else() - target_include_directories(simple_example PRIVATE ${LOGOS_LIBLOGOS_ROOT}/include) -endif() - -# Include SDK headers -if(_cpp_sdk_is_source) - target_include_directories(simple_example PRIVATE - ${LOGOS_CPP_SDK_ROOT}/cpp - ${LOGOS_CPP_SDK_ROOT}/cpp/generated - ) -else() - target_include_directories(simple_example PRIVATE - ${LOGOS_CPP_SDK_ROOT}/include - ${LOGOS_CPP_SDK_ROOT}/include/cpp - ${LOGOS_CPP_SDK_ROOT}/include/core - ) -endif() - -# Link Qt libraries -target_link_libraries(simple_example PRIVATE - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::RemoteObjects -) - -# Link SDK library if installed layout -if(NOT _cpp_sdk_is_source) - target_link_libraries(simple_example PRIVATE ${LOGOS_SDK_LIB}) -endif() - -# Link liblogosdelivery -if(LIBLOGOSDELIVERY_PATH) - target_link_libraries(simple_example PRIVATE ${LIBLOGOSDELIVERY_PATH}) -endif() - -# Ensure C++20 standard -target_compile_features(simple_example PRIVATE cxx_std_20) - -# Ensure generator runs first -add_dependencies(simple_example run_cpp_generator_messaging) - -# Optional: output directory same as plugin -set_target_properties(simple_example PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules" -) \ No newline at end of file diff --git a/examples/simple.cpp b/examples/simple.cpp deleted file mode 100644 index bd732f7..0000000 --- a/examples/simple.cpp +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../delivery_module_interface.h" - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - QCoreApplication::setApplicationName("DeliveryModuleLoader"); - QCoreApplication::setApplicationVersion("1.0"); - - QCommandLineParser parser; - parser.setApplicationDescription("Loads a delivery module plugin and runs it."); - parser.addHelpOption(); - parser.addVersionOption(); - - QCommandLineOption pluginOption( - QStringList() << "m" << "module", - "Path to the delivery module plugin (.so/.dll).", - "plugin_file" - ); - parser.addOption(pluginOption); - - QCommandLineOption configOption( - QStringList() << "c" << "config", - "Path to JSON config file for the plugin.", - "config_file", - "config.json" - ); - parser.addOption(configOption); - - parser.process(app); - - if (!parser.isSet(pluginOption)) { - qDebug() << "Error: plugin module path is required."; - parser.showHelp(); // exits automatically - } - - QString pluginPath = parser.value(pluginOption); - QString configPath = parser.value(configOption); - - QFileInfo pluginFile(pluginPath); - if (!pluginFile.exists() || !pluginFile.isFile()) { - qDebug() << "Plugin file does not exist:" << pluginPath; - return -1; - } - - QFileInfo configFile(configPath); - if (!configFile.exists() || !configFile.isFile()) { - qDebug() << "Config file does not exist:" << configPath; - return -1; - } - - QFile jsonFile(configFile.absoluteFilePath()); - if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - qDebug() << "Failed to open config file:" << configFile.absoluteFilePath(); - return -1; - } - - QByteArray jsonData = jsonFile.readAll(); - jsonFile.close(); - - QJsonParseError parseError; - QJsonDocument doc = QJsonDocument::fromJson(jsonData, &parseError); - if (parseError.error != QJsonParseError::NoError) { - qDebug() << "Failed to parse JSON:" << parseError.errorString(); - return -1; - } - - QPluginLoader loader(pluginFile.absoluteFilePath()); - QObject *plugin = loader.instance(); - - if (!plugin) { - qDebug() << "Failed to load plugin:" << loader.errorString(); - return -1; - } - - auto delivery = qobject_cast(plugin); - if (!delivery) { - qDebug() << "Invalid plugin type"; - return -1; - } - - delivery->createNode(QString::fromUtf8(jsonData)); - delivery->start(); - - qDebug() << "Plugin loaded. Type a message to send, or 'exit' to quit."; - - QString contentTopicOfInterest = "/simple-example/2/delivery/proto"; - if (!delivery->subscribe(contentTopicOfInterest)) { - qDebug() << "Failed to subscribe to topic:" << contentTopicOfInterest; - return -1; - } - - qDebug() << "Subscribed to topic:" << contentTopicOfInterest; - - // ------------------------ - // Show available node info items - // ------------------------ - - qDebug() << "Retrieving all available node info IDs..."; - QString nodeInfoIDs = delivery->getAvailableNodeInfoIDs(); - qDebug() << "Available node info IDs:" << nodeInfoIDs; - - // Remove "@[" at start and "]" at end - if (nodeInfoIDs.startsWith("@[") && nodeInfoIDs.endsWith("]")) { - nodeInfoIDs = nodeInfoIDs.mid(2, nodeInfoIDs.length() - 3); - } - - QStringList configItems = nodeInfoIDs.split(",", Qt::SkipEmptyParts); - - for (QString &item : configItems) { - item = item.trimmed(); - qDebug() << "Retrieving node info for ID:" << item; - QString nodeInfo = delivery->getNodeInfo(item); - qDebug() << nodeInfo; - qDebug() << "-----------------------------"; - } - - // ------------------------ - // Show available node info items - // ------------------------ - qDebug() << "Retrieving available configs..."; - QString availableConfigs = delivery->getAvailableConfigs(); - qDebug() << "Available configs:" << availableConfigs; - - // ------------------------ - // Interactive loop - // ------------------------ - std::string input; - while (true) { - std::cout << "> "; - std::getline(std::cin, input); - - if (input == "exit") { - break; - } else if (!input.empty()) { - auto result = delivery->send(contentTopicOfInterest, QString::fromStdString(input)); - if (result.success) - qDebug() << "Send result:" << result.getString(); - else - qDebug() << "Send failed:" << result.getError(); - } - } - - delivery->stop(); - - return 0; -} \ No newline at end of file diff --git a/flake.lock b/flake.lock index a0cd946..e87e5e3 100644 --- a/flake.lock +++ b/flake.lock @@ -2,21 +2,54 @@ "nodes": { "logos-capability-module": { "inputs": { - "logos-cpp-sdk": "logos-cpp-sdk_2", - "logos-liblogos": "logos-liblogos_2", + "logos-cpp-sdk": [ + "logos-module-builder", + "logos-standalone-app", + "logos-cpp-sdk" + ], + "logos-module": "logos-module_3", + "logos-nix": "logos-nix_9", "nixpkgs": [ - "logos-liblogos", - "logos-capability-module", - "logos-liblogos", + "logos-module-builder", + "logos-standalone-app", + "logos-nix", "nixpkgs" ] }, "locked": { - "lastModified": 1767809111, - "narHash": "sha256-jehjsB+BpDJlVu3I7x+vFVOdXmy9MDmFTJtRqzFUONo=", + "lastModified": 1774455138, + "narHash": "sha256-szx2dnnY9MP1NpdBnR8E2DRSz9CtQlo/6698zgJcAEM=", "owner": "logos-co", "repo": "logos-capability-module", - "rev": "7b35383e0aa4e28a4633ed18a87efb57636939b1", + "rev": "0655be68e0078bede0682bb6a5b53330dac37a72", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-capability-module", + "type": "github" + } + }, + "logos-capability-module_2": { + "inputs": { + "logos-cpp-sdk": "logos-cpp-sdk_4", + "logos-module": "logos-module_4", + "logos-nix": "logos-nix_14", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-capability-module", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774455138, + "narHash": "sha256-szx2dnnY9MP1NpdBnR8E2DRSz9CtQlo/6698zgJcAEM=", + "owner": "logos-co", + "repo": "logos-capability-module", + "rev": "0655be68e0078bede0682bb6a5b53330dac37a72", "type": "github" }, "original": { @@ -27,33 +60,46 @@ }, "logos-cpp-sdk": { "inputs": { - "nixpkgs": "nixpkgs" + "logos-nix": "logos-nix_2", + "nixpkgs": [ + "logos-module-builder", + "logos-plugin-core", + "logos-cpp-sdk", + "logos-nix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1770978598, - "narHash": "sha256-CR5N5v+y2ZInnBocGgjIeLaS9XqNjAKGXE2abC3E110=", + "lastModified": 1774530738, + "narHash": "sha256-EXZ0nsVbBHdeFuXZsSeMNsTi10kA/tpxwea1PJny7G8=", "owner": "logos-co", "repo": "logos-cpp-sdk", - "rev": "c3477d29e32cae5f73ca637fb81e547f8a6cba58", + "rev": "01221559b7e5d7db1362128f5888adddd8a23bda", "type": "github" }, "original": { "owner": "logos-co", - "ref": "feat/logos-result", "repo": "logos-cpp-sdk", "type": "github" } }, "logos-cpp-sdk_2": { "inputs": { - "nixpkgs": "nixpkgs_3" + "logos-nix": "logos-nix_5", + "nixpkgs": [ + "logos-module-builder", + "logos-plugin-qt", + "logos-cpp-sdk", + "logos-nix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1761230734, - "narHash": "sha256-CMRUwXH7pJZ1OI6bd/TDDDXKqQ1tQZHQEOOwK8TgYHI=", + "lastModified": 1774530738, + "narHash": "sha256-EXZ0nsVbBHdeFuXZsSeMNsTi10kA/tpxwea1PJny7G8=", "owner": "logos-co", "repo": "logos-cpp-sdk", - "rev": "4b143922c190df00bb3835441c9f0075cb28283b", + "rev": "01221559b7e5d7db1362128f5888adddd8a23bda", "type": "github" }, "original": { @@ -64,14 +110,21 @@ }, "logos-cpp-sdk_3": { "inputs": { - "nixpkgs": "nixpkgs_4" + "logos-nix": "logos-nix_10", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-cpp-sdk", + "logos-nix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1761230734, - "narHash": "sha256-CMRUwXH7pJZ1OI6bd/TDDDXKqQ1tQZHQEOOwK8TgYHI=", + "lastModified": 1774530738, + "narHash": "sha256-EXZ0nsVbBHdeFuXZsSeMNsTi10kA/tpxwea1PJny7G8=", "owner": "logos-co", "repo": "logos-cpp-sdk", - "rev": "4b143922c190df00bb3835441c9f0075cb28283b", + "rev": "01221559b7e5d7db1362128f5888adddd8a23bda", "type": "github" }, "original": { @@ -82,14 +135,23 @@ }, "logos-cpp-sdk_4": { "inputs": { - "nixpkgs": "nixpkgs_5" + "logos-nix": "logos-nix_12", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-capability-module", + "logos-cpp-sdk", + "logos-nix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1772028960, - "narHash": "sha256-BDWFjaKeoJW8oWDlPphNINt5U3P1xt1z1Y4f9jyC7uU=", + "lastModified": 1773956385, + "narHash": "sha256-CV0Lo1FrosBt/MSP+GWQGWXnYobxRGXGOREylNuwZ58=", "owner": "logos-co", "repo": "logos-cpp-sdk", - "rev": "95f763b48d74bcdc63093b05159f43500cab139e", + "rev": "4b66dac015e4b977d33cfae80a4c8e1d518679f3", "type": "github" }, "original": { @@ -100,14 +162,22 @@ }, "logos-cpp-sdk_5": { "inputs": { - "nixpkgs": "nixpkgs_6" + "logos-nix": "logos-nix_15", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-cpp-sdk", + "logos-nix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1767724329, - "narHash": "sha256-UPkqxqxbKwU5Dmu00TnjiJVXUmfVylF3p1qziEuYwIE=", + "lastModified": 1774530738, + "narHash": "sha256-EXZ0nsVbBHdeFuXZsSeMNsTi10kA/tpxwea1PJny7G8=", "owner": "logos-co", "repo": "logos-cpp-sdk", - "rev": "32f1d7080d784ff044d91d076ef2f0c7305d4784", + "rev": "01221559b7e5d7db1362128f5888adddd8a23bda", "type": "github" }, "original": { @@ -118,15 +188,15 @@ }, "logos-delivery": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "zerokit": "zerokit" }, "locked": { - "lastModified": 1772614128, - "narHash": "sha256-VdCFKJb+xG/YxslYpiFOYISc6wo5CUgiF6UVxUNTb64=", + "lastModified": 1774870234, + "narHash": "sha256-YXyn9vh4Y3Lj4Aw88g2YkPTACmr7BUiIIap7BEVGWsI=", "ref": "refs/heads/master", - "rev": "0ad55159b39ed74ba6b88b5a9d72db766b4b0f08", - "revCount": 2234, + "rev": "dc026bbff19050155f0ef1abb3e03a64c8bba81e", + "revCount": 2276, "submodules": true, "type": "git", "url": "https://github.com/logos-messaging/logos-delivery" @@ -137,50 +207,52 @@ "url": "https://github.com/logos-messaging/logos-delivery" } }, + "logos-design-system": { + "inputs": { + "logos-nix": "logos-nix_11", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-design-system", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774455271, + "narHash": "sha256-fXPDvB4VoS9k0oiW3CjN1w2cw9noqcloftXKMc8E0ng=", + "owner": "logos-co", + "repo": "logos-design-system", + "rev": "75201e56002327864544b729ad0077bca7e5b03d", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-design-system", + "type": "github" + } + }, "logos-liblogos": { "inputs": { - "logos-capability-module": "logos-capability-module", - "logos-cpp-sdk": "logos-cpp-sdk_4", - "logos-module": "logos-module", - "nix-bundle-appimage": "nix-bundle-appimage", - "nix-bundle-dir": "nix-bundle-dir_2", + "logos-capability-module": "logos-capability-module_2", + "logos-cpp-sdk": "logos-cpp-sdk_5", + "logos-module": "logos-module_5", + "logos-nix": "logos-nix_17", + "logos-package-manager": "logos-package-manager", "nixpkgs": [ - "logos-liblogos", - "logos-cpp-sdk", + "logos-module-builder", + "logos-standalone-app", + "logos-nix", "nixpkgs" - ] + ], + "process-stats": "process-stats" }, "locked": { - "lastModified": 1772115748, - "narHash": "sha256-sPdAuYiLOjsulrk+uKMT7EG05ZlGT7OYEpgUh+f0nME=", + "lastModified": 1774618989, + "narHash": "sha256-At0cTqrcSHmRL90kd7cYu2iNFvwdKC4WWsyZKs+e5+0=", "owner": "logos-co", "repo": "logos-liblogos", - "rev": "07780444deb99f10e600247e3696ba495f2f071a", - "type": "github" - }, - "original": { - "owner": "logos-co", - "repo": "logos-liblogos", - "type": "github" - } - }, - "logos-liblogos_2": { - "inputs": { - "logos-cpp-sdk": "logos-cpp-sdk_3", - "nixpkgs": [ - "logos-liblogos", - "logos-capability-module", - "logos-liblogos", - "logos-cpp-sdk", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1761845775, - "narHash": "sha256-ulK8xq05ejK6qIgZ7WtWb/MJt2rk5BKfDA2z7mM3wq8=", - "owner": "logos-co", - "repo": "logos-liblogos", - "rev": "a92c2c1268bc70764c8f73c7bce07d21024f5af9", + "rev": "010e75814fc25b33831af86b5e88ba758178a64b", "type": "github" }, "original": { @@ -191,20 +263,21 @@ }, "logos-module": { "inputs": { - "logos-cpp-sdk": "logos-cpp-sdk_5", + "logos-nix": "logos-nix_3", "nixpkgs": [ - "logos-liblogos", + "logos-module-builder", + "logos-plugin-core", "logos-module", - "logos-cpp-sdk", + "logos-nix", "nixpkgs" ] }, "locked": { - "lastModified": 1770999556, - "narHash": "sha256-anpsEniGTTwUAwknRxjaT9GP4avHzIsolEHdHDTV9rM=", + "lastModified": 1774633164, + "narHash": "sha256-TobXeKMS1RWYKo30ujYJNnrDVhu4U1JFdtL31yIOu8c=", "owner": "logos-co", "repo": "logos-module", - "rev": "d1b35f335f938bb5de21a2a6010f1104075bdb1c", + "rev": "8ed727449a4a6713a8c819c213b0d5d25f575580", "type": "github" }, "original": { @@ -213,17 +286,963 @@ "type": "github" } }, - "nix-bundle-appimage": { + "logos-module-builder": { + "inputs": { + "logos-nix": "logos-nix", + "logos-plugin-core": "logos-plugin-core", + "logos-plugin-qt": "logos-plugin-qt", + "logos-standalone-app": "logos-standalone-app", + "nix-bundle-lgx": "nix-bundle-lgx_2", + "nixpkgs": [ + "logos-module-builder", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774903377, + "narHash": "sha256-MpvZv35e/VJ9r4fBv0v3I/kTDVG13e75EMOTb5ZSo8E=", + "owner": "logos-co", + "repo": "logos-module-builder", + "rev": "6119d6bf36c1a06f8955af7c70c954b807f65fb5", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-module-builder", + "type": "github" + } + }, + "logos-module_2": { + "inputs": { + "logos-nix": "logos-nix_6", + "nixpkgs": [ + "logos-module-builder", + "logos-plugin-qt", + "logos-module", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774633164, + "narHash": "sha256-TobXeKMS1RWYKo30ujYJNnrDVhu4U1JFdtL31yIOu8c=", + "owner": "logos-co", + "repo": "logos-module", + "rev": "8ed727449a4a6713a8c819c213b0d5d25f575580", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-module", + "type": "github" + } + }, + "logos-module_3": { + "inputs": { + "logos-nix": "logos-nix_8", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-capability-module", + "logos-module", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773963329, + "narHash": "sha256-zdvDHoYWQDse0eJ/UCKIJcfuYJ8NMgl6QfxRcyDEovI=", + "owner": "logos-co", + "repo": "logos-module", + "rev": "ac5a4f06ea94b01dd9c5fbb9ed4f20620beab88d", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-module", + "type": "github" + } + }, + "logos-module_4": { + "inputs": { + "logos-nix": "logos-nix_13", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-capability-module", + "logos-module", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773963329, + "narHash": "sha256-zdvDHoYWQDse0eJ/UCKIJcfuYJ8NMgl6QfxRcyDEovI=", + "owner": "logos-co", + "repo": "logos-module", + "rev": "ac5a4f06ea94b01dd9c5fbb9ed4f20620beab88d", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-module", + "type": "github" + } + }, + "logos-module_5": { + "inputs": { + "logos-nix": "logos-nix_16", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-module", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774455286, + "narHash": "sha256-rE4xxKOThAnaZhA0K8Gjf8mxne7dZyerLOlXI7qvHpQ=", + "owner": "logos-co", + "repo": "logos-module", + "rev": "c4c6bb273f1020351fb4944f3243610c98bd6b49", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-module", + "type": "github" + } + }, + "logos-nix": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1774455309, + "narHash": "sha256-3AN7aFnArdysrbQQ2UskWzjNSFADb4hDCsnx69Fa0ng=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "e637a1f5e871244d1c2df1e3c52a067f2eb406f2", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_10": { + "inputs": { + "nixpkgs": "nixpkgs_11" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_11": { + "inputs": { + "nixpkgs": "nixpkgs_12" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_12": { + "inputs": { + "nixpkgs": "nixpkgs_13" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_13": { + "inputs": { + "nixpkgs": "nixpkgs_14" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_14": { + "inputs": { + "nixpkgs": "nixpkgs_15" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_15": { + "inputs": { + "nixpkgs": "nixpkgs_16" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_16": { + "inputs": { + "nixpkgs": "nixpkgs_17" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_17": { + "inputs": { + "nixpkgs": "nixpkgs_18" + }, + "locked": { + "lastModified": 1774455309, + "narHash": "sha256-3AN7aFnArdysrbQQ2UskWzjNSFADb4hDCsnx69Fa0ng=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "e637a1f5e871244d1c2df1e3c52a067f2eb406f2", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_18": { + "inputs": { + "nixpkgs": "nixpkgs_19" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_19": { + "inputs": { + "nixpkgs": "nixpkgs_20" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_2": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_20": { + "inputs": { + "nixpkgs": "nixpkgs_21" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_21": { + "inputs": { + "nixpkgs": "nixpkgs_22" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_22": { + "inputs": { + "nixpkgs": "nixpkgs_23" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_23": { + "inputs": { + "nixpkgs": "nixpkgs_24" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_24": { + "inputs": { + "nixpkgs": "nixpkgs_25" + }, + "locked": { + "lastModified": 1774455309, + "narHash": "sha256-3AN7aFnArdysrbQQ2UskWzjNSFADb4hDCsnx69Fa0ng=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "e637a1f5e871244d1c2df1e3c52a067f2eb406f2", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_25": { + "inputs": { + "nixpkgs": "nixpkgs_26" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_26": { + "inputs": { + "nixpkgs": "nixpkgs_27" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_27": { + "inputs": { + "nixpkgs": "nixpkgs_28" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_28": { + "inputs": { + "nixpkgs": "nixpkgs_29" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_29": { + "inputs": { + "nixpkgs": "nixpkgs_30" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_3": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_30": { + "inputs": { + "nixpkgs": "nixpkgs_31" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_31": { + "inputs": { + "nixpkgs": "nixpkgs_32" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_32": { + "inputs": { + "nixpkgs": "nixpkgs_33" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_33": { + "inputs": { + "nixpkgs": "nixpkgs_34" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_4": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1774455309, + "narHash": "sha256-3AN7aFnArdysrbQQ2UskWzjNSFADb4hDCsnx69Fa0ng=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "e637a1f5e871244d1c2df1e3c52a067f2eb406f2", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_5": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_6": { "inputs": { - "nix-bundle-dir": "nix-bundle-dir", "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1772047346, - "narHash": "sha256-RUsTUxKCxuQ3+D2LfBbK0EX1vF7HNMkpWgOGFfZbrEg=", + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_7": { + "inputs": { + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1774455309, + "narHash": "sha256-3AN7aFnArdysrbQQ2UskWzjNSFADb4hDCsnx69Fa0ng=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "e637a1f5e871244d1c2df1e3c52a067f2eb406f2", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_8": { + "inputs": { + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-nix_9": { + "inputs": { + "nixpkgs": "nixpkgs_10" + }, + "locked": { + "lastModified": 1773955630, + "narHash": "sha256-KqzMoWYIVp2xMgphs7v02T/BE54RKMFxpdC2duhJKG0=", + "owner": "logos-co", + "repo": "logos-nix", + "rev": "0e9e6d66ab8eb34f59e45ed448f7dc29130feb88", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-nix", + "type": "github" + } + }, + "logos-package": { + "inputs": { + "logos-nix": "logos-nix_19", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-package-manager", + "logos-package", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773965173, + "narHash": "sha256-toDnGXUthRcQm7vcEYzb2bLI7FE1tbfzH8Ie2Cnb9mk=", + "owner": "logos-co", + "repo": "logos-package", + "rev": "9e3730d5c0e3ec955761c05b50e3a6047ee4030b", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-package", + "type": "github" + } + }, + "logos-package-manager": { + "inputs": { + "logos-nix": "logos-nix_18", + "logos-package": "logos-package", + "nix-bundle-appimage": "nix-bundle-appimage", + "nix-bundle-dir": "nix-bundle-dir_2", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-package-manager", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774532547, + "narHash": "sha256-QloRHwJ1Vxq27LwL0r8kirjcmMfKT5rAA5ydzZQx4OA=", + "owner": "logos-co", + "repo": "logos-package-manager", + "rev": "e15beeac56265daf423f1d744e34d5405655c0f8", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-package-manager", + "type": "github" + } + }, + "logos-package_2": { + "inputs": { + "logos-nix": "logos-nix_26", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "nix-bundle-lgx", + "logos-package", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773965173, + "narHash": "sha256-toDnGXUthRcQm7vcEYzb2bLI7FE1tbfzH8Ie2Cnb9mk=", + "owner": "logos-co", + "repo": "logos-package", + "rev": "9e3730d5c0e3ec955761c05b50e3a6047ee4030b", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-package", + "type": "github" + } + }, + "logos-package_3": { + "inputs": { + "logos-nix": "logos-nix_29", + "nixpkgs": [ + "logos-module-builder", + "nix-bundle-lgx", + "logos-package", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773965173, + "narHash": "sha256-toDnGXUthRcQm7vcEYzb2bLI7FE1tbfzH8Ie2Cnb9mk=", + "owner": "logos-co", + "repo": "logos-package", + "rev": "9e3730d5c0e3ec955761c05b50e3a6047ee4030b", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-package", + "type": "github" + } + }, + "logos-package_4": { + "inputs": { + "logos-nix": "logos-nix_32", + "nixpkgs": [ + "nix-bundle-lgx", + "logos-package", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773965173, + "narHash": "sha256-toDnGXUthRcQm7vcEYzb2bLI7FE1tbfzH8Ie2Cnb9mk=", + "owner": "logos-co", + "repo": "logos-package", + "rev": "9e3730d5c0e3ec955761c05b50e3a6047ee4030b", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-package", + "type": "github" + } + }, + "logos-plugin-core": { + "inputs": { + "logos-cpp-sdk": "logos-cpp-sdk", + "logos-module": "logos-module", + "logos-nix": "logos-nix_4", + "nixpkgs": [ + "logos-module-builder", + "logos-plugin-core", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774706519, + "narHash": "sha256-DJwgxju0ZVxYV5cxVDO//ync2qnOb9q7Gc82SGL/Mkk=", + "owner": "logos-co", + "repo": "logos-plugin-qt", + "rev": "5305602e80f76efea4208ef4c83a88f9ed7fb8e3", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-plugin-qt", + "type": "github" + } + }, + "logos-plugin-qt": { + "inputs": { + "logos-cpp-sdk": "logos-cpp-sdk_2", + "logos-module": "logos-module_2", + "logos-nix": "logos-nix_7", + "nixpkgs": [ + "logos-module-builder", + "logos-plugin-qt", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774706519, + "narHash": "sha256-DJwgxju0ZVxYV5cxVDO//ync2qnOb9q7Gc82SGL/Mkk=", + "owner": "logos-co", + "repo": "logos-plugin-qt", + "rev": "5305602e80f76efea4208ef4c83a88f9ed7fb8e3", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-plugin-qt", + "type": "github" + } + }, + "logos-standalone-app": { + "inputs": { + "logos-capability-module": "logos-capability-module", + "logos-cpp-sdk": "logos-cpp-sdk_3", + "logos-design-system": "logos-design-system", + "logos-liblogos": "logos-liblogos", + "logos-nix": "logos-nix_24", + "nix-bundle-lgx": "nix-bundle-lgx", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774630730, + "narHash": "sha256-dwdeFKeVtLDLgtSHpKjPwL+nHB6tKwBF8OPSaivxZrY=", + "owner": "logos-co", + "repo": "logos-standalone-app", + "rev": "a101e8c0c9c1d4fcd49814e54b89d283b585c8fc", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "logos-standalone-app", + "type": "github" + } + }, + "nix-bundle-appimage": { + "inputs": { + "logos-nix": "logos-nix_20", + "nix-bundle-dir": "nix-bundle-dir", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-package-manager", + "nix-bundle-appimage", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773961597, + "narHash": "sha256-UEUlp3VRXBcj2YlOMTQdeW3qjyGJl2V3+GMf8IXwSWA=", "owner": "logos-co", "repo": "nix-bundle-appimage", - "rev": "4d68437c97ac59c3c70c1b2b116235c434d571a8", + "rev": "7343f6df1ebab357f51f23dff0af9d7e468638cb", "type": "github" }, "original": { @@ -234,18 +1253,22 @@ }, "nix-bundle-dir": { "inputs": { + "logos-nix": "logos-nix_21", "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", "logos-liblogos", + "logos-package-manager", "nix-bundle-appimage", "nixpkgs" ] }, "locked": { - "lastModified": 1771971384, - "narHash": "sha256-fq0H+sxQhkGN054jdN+ZfHZibbOjHA+KD5SpRH78T1g=", + "lastModified": 1773961179, + "narHash": "sha256-bpaTvz//R8WFP5xnnDLv3a9l7unDmBwJjCewx3wCjzM=", "owner": "logos-co", "repo": "nix-bundle-dir", - "rev": "1ecb9662145a1ad84007a970b4bef50a4af159c9", + "rev": "cd214dbf15487d80967389847ae2210468be6ebf", "type": "github" }, "original": { @@ -256,14 +1279,23 @@ }, "nix-bundle-dir_2": { "inputs": { - "nixpkgs": "nixpkgs_8" + "logos-nix": "logos-nix_22", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-liblogos", + "logos-package-manager", + "nix-bundle-dir", + "logos-nix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1771971384, - "narHash": "sha256-fq0H+sxQhkGN054jdN+ZfHZibbOjHA+KD5SpRH78T1g=", + "lastModified": 1773961179, + "narHash": "sha256-bpaTvz//R8WFP5xnnDLv3a9l7unDmBwJjCewx3wCjzM=", "owner": "logos-co", "repo": "nix-bundle-dir", - "rev": "1ecb9662145a1ad84007a970b4bef50a4af159c9", + "rev": "cd214dbf15487d80967389847ae2210468be6ebf", "type": "github" }, "original": { @@ -272,7 +1304,319 @@ "type": "github" } }, + "nix-bundle-dir_3": { + "inputs": { + "logos-nix": "logos-nix_27", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "nix-bundle-lgx", + "nix-bundle-dir", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773961179, + "narHash": "sha256-bpaTvz//R8WFP5xnnDLv3a9l7unDmBwJjCewx3wCjzM=", + "owner": "logos-co", + "repo": "nix-bundle-dir", + "rev": "cd214dbf15487d80967389847ae2210468be6ebf", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-dir", + "type": "github" + } + }, + "nix-bundle-dir_4": { + "inputs": { + "logos-nix": "logos-nix_30", + "nixpkgs": [ + "logos-module-builder", + "nix-bundle-lgx", + "nix-bundle-dir", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773961179, + "narHash": "sha256-bpaTvz//R8WFP5xnnDLv3a9l7unDmBwJjCewx3wCjzM=", + "owner": "logos-co", + "repo": "nix-bundle-dir", + "rev": "cd214dbf15487d80967389847ae2210468be6ebf", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-dir", + "type": "github" + } + }, + "nix-bundle-dir_5": { + "inputs": { + "logos-nix": "logos-nix_33", + "nixpkgs": [ + "nix-bundle-lgx", + "nix-bundle-dir", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773961179, + "narHash": "sha256-bpaTvz//R8WFP5xnnDLv3a9l7unDmBwJjCewx3wCjzM=", + "owner": "logos-co", + "repo": "nix-bundle-dir", + "rev": "cd214dbf15487d80967389847ae2210468be6ebf", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-dir", + "type": "github" + } + }, + "nix-bundle-lgx": { + "inputs": { + "logos-nix": "logos-nix_25", + "logos-package": "logos-package_2", + "nix-bundle-dir": "nix-bundle-dir_3", + "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774455541, + "narHash": "sha256-ku5gG6qKIZeWzJ/jNOxfsx1rwJ3kPrCw8/wnBKq1Uyw=", + "owner": "logos-co", + "repo": "nix-bundle-lgx", + "rev": "9d6f9016c865b9d2793672bc3c45a50b59753c78", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-lgx", + "type": "github" + } + }, + "nix-bundle-lgx_2": { + "inputs": { + "logos-nix": "logos-nix_28", + "logos-package": "logos-package_3", + "nix-bundle-dir": "nix-bundle-dir_4", + "nixpkgs": [ + "logos-module-builder", + "nix-bundle-lgx", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774455541, + "narHash": "sha256-ku5gG6qKIZeWzJ/jNOxfsx1rwJ3kPrCw8/wnBKq1Uyw=", + "owner": "logos-co", + "repo": "nix-bundle-lgx", + "rev": "9d6f9016c865b9d2793672bc3c45a50b59753c78", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-lgx", + "type": "github" + } + }, + "nix-bundle-lgx_3": { + "inputs": { + "logos-nix": "logos-nix_31", + "logos-package": "logos-package_4", + "nix-bundle-dir": "nix-bundle-dir_5", + "nixpkgs": [ + "nix-bundle-lgx", + "logos-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774455541, + "narHash": "sha256-ku5gG6qKIZeWzJ/jNOxfsx1rwJ3kPrCw8/wnBKq1Uyw=", + "owner": "logos-co", + "repo": "nix-bundle-lgx", + "rev": "9d6f9016c865b9d2793672bc3c45a50b59753c78", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "nix-bundle-lgx", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1757590060, + "narHash": "sha256-EWwwdKLMZALkgHFyKW7rmyhxECO74+N+ZO5xTDnY/5c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0ef228213045d2cdb5a169a95d63ded38670b293", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0ef228213045d2cdb5a169a95d63ded38670b293", + "type": "github" + } + }, + "nixpkgs_10": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_15": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_16": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_17": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_18": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_19": { "locked": { "lastModified": 1759036355, "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", @@ -290,17 +1634,177 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1757590060, - "narHash": "sha256-EWwwdKLMZALkgHFyKW7rmyhxECO74+N+ZO5xTDnY/5c=", + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ef228213045d2cdb5a169a95d63ded38670b293", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_20": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_21": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_22": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_23": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_24": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_25": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_26": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_27": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_28": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_29": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", - "rev": "0ef228213045d2cdb5a169a95d63ded38670b293", "type": "github" } }, @@ -320,6 +1824,86 @@ "type": "github" } }, + "nixpkgs_30": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_31": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_32": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_33": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_34": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_4": { "locked": { "lastModified": 1759036355, @@ -370,11 +1954,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", "type": "github" }, "original": { @@ -386,11 +1970,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1770562336, - "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", "type": "github" }, "original": { @@ -400,15 +1984,53 @@ "type": "github" } }, - "root": { + "nixpkgs_9": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "process-stats": { "inputs": { - "logos-cpp-sdk": "logos-cpp-sdk", - "logos-delivery": "logos-delivery", - "logos-liblogos": "logos-liblogos", + "logos-nix": "logos-nix_23", "nixpkgs": [ + "logos-module-builder", + "logos-standalone-app", "logos-liblogos", + "process-stats", + "logos-nix", "nixpkgs" ] + }, + "locked": { + "lastModified": 1774455550, + "narHash": "sha256-T30DJXAMb+hezgnmlZe9qqa9LL5oolvuAdF5fIVz8A0=", + "owner": "logos-co", + "repo": "process-stats", + "rev": "8213ad456b4ac074a214f24fc2b378b1bdbb0234", + "type": "github" + }, + "original": { + "owner": "logos-co", + "repo": "process-stats", + "type": "github" + } + }, + "root": { + "inputs": { + "logos-delivery": "logos-delivery", + "logos-module-builder": "logos-module-builder", + "nix-bundle-lgx": "nix-bundle-lgx_3" } }, "rust-overlay": { diff --git a/flake.nix b/flake.nix index 4983b28..48042cc 100644 --- a/flake.nix +++ b/flake.nix @@ -2,70 +2,26 @@ description = "Logos Delivery Module"; inputs = { - # Follow the same nixpkgs as logos-liblogos to ensure compatibility - nixpkgs.follows = "logos-liblogos/nixpkgs"; - logos-cpp-sdk.url = "github:logos-co/logos-cpp-sdk?ref=feat/logos-result"; - logos-liblogos.url = "github:logos-co/logos-liblogos"; + logos-module-builder.url = "github:logos-co/logos-module-builder"; + nix-bundle-lgx.url = "github:logos-co/nix-bundle-lgx"; logos-delivery.url = "git+https://github.com/logos-messaging/logos-delivery?submodules=1"; }; - outputs = { self, nixpkgs, logos-cpp-sdk, logos-liblogos, logos-delivery }: - let - systems = [ "aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux" ]; - forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f { - pkgs = import nixpkgs { inherit system; }; - logosSdk = logos-cpp-sdk.packages.${system}.default; - logosLiblogos = logos-liblogos.packages.${system}.default; - logosDelivery = (logos-delivery.packages.${system}.liblogosdelivery).overrideAttrs (old: { - NIMFLAGS = (old.NIMFLAGS or "") + " -d:postgres -d:nimDebugDlOpen -d:chronicles_colors:none "; - }); - }); - in - { - packages = forAllSystems ({ pkgs, logosSdk, logosLiblogos, logosDelivery }: - let - common = import ./nix/default.nix { inherit pkgs logosSdk logosLiblogos logosDelivery; }; - src = ./.; - lib = import ./nix/lib.nix { inherit pkgs common src logosDelivery; }; - include = import ./nix/header.nix { inherit pkgs common src lib logosSdk logosDelivery; }; - simple = import ./nix/examples.nix { inherit pkgs src logosSdk logosLiblogos logosDelivery; }; - combined = pkgs.symlinkJoin { - name = "logos-delivery-module"; - paths = [ lib include simple ]; - }; - in - { - lib = lib; - include = include; - default = combined; - - # Add new output - simple = simple; - } - ); - - devShells = forAllSystems ({ pkgs, logosSdk, logosLiblogos, logosDelivery }: { - default = pkgs.mkShell { - nativeBuildInputs = [ - pkgs.cmake - pkgs.ninja - pkgs.pkg-config - ]; - buildInputs = [ - pkgs.qt6.qtbase - pkgs.qt6.qtremoteobjects - ]; - - shellHook = '' - export LOGOS_CPP_SDK_ROOT="${logosSdk}" - export LOGOS_LIBLOGOS_ROOT="${logosLiblogos}" - export LOGOS_DELIVERY_ROOT="${logosDelivery}" - echo "Logos Delivery Module development environment" - echo "LOGOS_CPP_SDK_ROOT: $LOGOS_CPP_SDK_ROOT" - echo "LOGOS_LIBLOGOS_ROOT: $LOGOS_LIBLOGOS_ROOT" - echo "LOGOS_DELIVERY_ROOT: $LOGOS_DELIVERY_ROOT" - ''; - }; - }); + outputs = inputs@{ logos-module-builder, ... }: + logos-module-builder.lib.mkLogosModule { + src = ./.; + configFile = ./metadata.json; + flakeInputs = inputs; + externalLibInputs = { + delivery = inputs.logos-delivery; + }; + # Copy liblogosdelivery header from the logos-delivery source tree. + # The .so is not needed at compile time — shared libs allow undefined symbols. + preConfigure = '' + mkdir -p lib + for f in $(find /nix/store -maxdepth 5 -name "liblogosdelivery.h" 2>/dev/null); do + cp "$f" lib/ 2>/dev/null || true + done + ''; }; } diff --git a/metadata.json b/metadata.json index e4c42dd..ca84d60 100644 --- a/metadata.json +++ b/metadata.json @@ -1,20 +1,32 @@ { - "name": "delivery_module", - "version": "1.0.0", - "description": "Logos Delivery Module - High-level message-delivery API", - "author": "Logos Core Team", - "type": "core", - "category": "protocol", - "main": "delivery_module_plugin", - "dependencies": [], - "include": [ - "liblogosdelivery.so", - "liblogosdelivery.dylib", - "liblogosdelivery.dll", - "libpq.so", - "libpq.so.5", - "libpq.dylib", - "libpq.5.dylib", - "libpq.dll"], - "capabilities": [] -} \ No newline at end of file + "name": "delivery_module", + "version": "1.0.0", + "description": "Logos Delivery Module - High-level message-delivery API", + "author": "Logos Core Team", + "type": "core", + "category": "protocol", + "main": "delivery_module_plugin", + "dependencies": [], + "include": [ + "liblogosdelivery.so", + "liblogosdelivery.dylib", + "liblogosdelivery.dll", + "libpq.so", + "libpq.so.5", + "libpq.dylib", + "libpq.5.dylib", + "libpq.dll" + ], + "capabilities": [], + "nix": { + "external_libraries": [ + { + "name": "delivery", + "build_command": "true" + } + ], + "cmake": { + "extra_include_dirs": ["lib"] + } + } +} diff --git a/nix/default.nix b/nix/default.nix deleted file mode 100644 index db444ed..0000000 --- a/nix/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -# Common build configuration shared across all packages -{ pkgs, logosSdk, logosLiblogos, logosDelivery }: - -{ - pname = "logos-delivery-module"; - version = "1.0.0"; - - # Common native build inputs - nativeBuildInputs = [ - pkgs.cmake - pkgs.ninja - pkgs.pkg-config - pkgs.qt6.wrapQtAppsNoGuiHook - ]; - - # Common runtime dependencies - buildInputs = [ - pkgs.qt6.qtbase - pkgs.qt6.qtremoteobjects - pkgs.postgresql - ]; - - # Common CMake flags - cmakeFlags = [ - "-GNinja" - "-DLOGOS_CPP_SDK_ROOT=${logosSdk}" - "-DLOGOS_LIBLOGOS_ROOT=${logosLiblogos}" - "-DLOGOS_DELIVERY_ROOT=${logosDelivery}" - "-DLOGOS_MESSAGING_MODULE_USE_VENDOR=OFF" - ]; - - # Environment variables - env = { - LOGOS_CPP_SDK_ROOT = "${logosSdk}"; - LOGOS_LIBLOGOS_ROOT = "${logosLiblogos}"; - LOGOS_DELIVERY_ROOT = "${logosDelivery}"; - }; - - # Metadata - meta = with pkgs.lib; { - description = "Logos Delivery Module - Provides Logos Delivery communication capabilities"; - platforms = platforms.unix; - }; -} diff --git a/nix/examples.nix b/nix/examples.nix deleted file mode 100644 index 71477aa..0000000 --- a/nix/examples.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ pkgs, src, logosSdk, logosLiblogos, logosDelivery }: - -pkgs.stdenv.mkDerivation { - pname = "example-simple"; - version = "0.1"; - - inherit src; - - nativeBuildInputs = [ - pkgs.cmake - pkgs.ninja - pkgs.pkg-config - pkgs.qt6.wrapQtAppsNoGuiHook - pkgs.gcc - pkgs.bash - ]; - - buildInputs = [ - pkgs.qt6.qtbase - pkgs.qt6.qtdeclarative - pkgs.qt6.qtremoteobjects - pkgs.gcc - # Add other dependencies if logos SDK/libs are packaged - ]; - - cmakeFlags = [ - "-GNinja" - "-DLOGOS_CPP_SDK_ROOT=${logosSdk}" - "-DLOGOS_LIBLOGOS_ROOT=${logosLiblogos}" - "-DLOGOS_DELIVERY_ROOT=${logosDelivery}" - "-DLOGOS_MESSAGING_MODULE_USE_VENDOR=OFF" - ]; - - env = { - LOGOS_CPP_SDK_ROOT = "${logosSdk}"; - LOGOS_LIBLOGOS_ROOT = "${logosLiblogos}"; - LOGOS_DELIVERY_ROOT = "${logosDelivery}"; - }; - - configurePhase = '' - # skip default configurePhase - ''; - - # BuildPhase uses CMake for the example - buildPhase = '' - mkdir build - cd build - - cmake ${src} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=$out \ - -GNinja \ - -DLOGOS_CPP_SDK_ROOT=${logosSdk} \ - -DLOGOS_LIBLOGOS_ROOT=${logosLiblogos} \ - -DLOGOS_DELIVERY_ROOT=${logosDelivery} \ - -DLOGOS_MESSAGING_MODULE_USE_VENDOR=OFF - - ls - cat build.ninja - # Build the specific example executable - cmake --build . --target simple_example - ''; - - installPhase = '' - mkdir -p $out/bin/ - chmod -R 755 $out/bin/ - cp modules/simple_example $out/bin/ - ''; -} \ No newline at end of file diff --git a/nix/header.nix b/nix/header.nix deleted file mode 100644 index bd8abef..0000000 --- a/nix/header.nix +++ /dev/null @@ -1,86 +0,0 @@ -# Generates headers from the messaging module plugin using logos-cpp-generator -{ pkgs, common, src, lib, logosSdk, logosDelivery }: - -pkgs.stdenv.mkDerivation { - pname = "${common.pname}-headers"; - version = common.version; - - inherit src; - inherit (common) meta; - - # We need the generator and the built plugin - nativeBuildInputs = [ logosSdk ]; - buildInputs = [ pkgs.qt6.qtbase pkgs.qt6.qtremoteobjects ]; - - # No configure phase needed - dontConfigure = true; - dontWrapQtApps = true; - - buildPhase = '' - runHook preBuild - - # Create output directory for generated headers - mkdir -p ./generated_headers - - # Determine platform-specific library extension - if [ -f "${lib}/lib/delivery_module_plugin.dylib" ]; then - PLUGIN_FILE="${lib}/lib/delivery_module_plugin.dylib" - elif [ -f "${lib}/lib/delivery_module_plugin.so" ]; then - PLUGIN_FILE="${lib}/lib/delivery_module_plugin.so" - else - echo "Error: No delivery_module_plugin library file found" - exit 1 - fi - - # Set library path so the plugin can find liblogosdelivery when loaded - if [ "$(uname -s)" = "Darwin" ]; then - export DYLD_LIBRARY_PATH="${lib}/lib:''${DYLD_LIBRARY_PATH:-}" - else - export LD_LIBRARY_PATH="${lib}/lib:${pkgs.qt6.qtbase}/lib:${pkgs.qt6.qtremoteobjects}/lib:''${LD_LIBRARY_PATH:-}" - fi - - # Run logos-cpp-generator on the built plugin with --module-only flag - echo "Running logos-cpp-generator on $PLUGIN_FILE" - echo "Library path: ${lib}/lib" - ls -la "${lib}/lib" - logos-cpp-generator "$PLUGIN_FILE" --output-dir ./generated_headers --module-only || { - echo "Warning: logos-cpp-generator failed, this may be expected if the module has no public API" - # Create a marker file to indicate attempt was made - touch ./generated_headers/.no-api - } - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - # Install generated headers - mkdir -p $out/include - - # Copy all generated files to include/ if they exist - if [ -d ./generated_headers ] && [ "$(ls -A ./generated_headers 2>/dev/null)" ]; then - echo "Copying generated headers..." - ls -la ./generated_headers - cp -r ./generated_headers/. $out/include/ - else - echo "Warning: No generated headers found, creating empty include directory" - # Create a placeholder file to indicate headers should be generated from metadata - echo "# Generated headers from metadata.json" > $out/include/.generated - fi - - # Copy header from logos-delivery - echo "Copying header from logos-delivery..." - if [ -d "${logosDelivery}/include" ]; then - echo "Found include directory in logos-delivery" - cp -r "${logosDelivery}/include"/. $out/include/ - else - echo "Warning: No include directory found in logos-delivery" - fi - - echo "Copied include files:" - ls -la $out/include/ - - runHook postInstall - ''; -} diff --git a/nix/lib.nix b/nix/lib.nix deleted file mode 100644 index ddee49c..0000000 --- a/nix/lib.nix +++ /dev/null @@ -1,141 +0,0 @@ -# Builds the logos-delivery-module library -{ pkgs, common, src, logosDelivery }: - -pkgs.stdenv.mkDerivation { - pname = "${common.pname}-lib"; - version = common.version; - - inherit src; - inherit (common) nativeBuildInputs buildInputs cmakeFlags meta env; - - # Determine platform-specific library extension - libdeliveryLib = if pkgs.stdenv.hostPlatform.isDarwin then "liblogosdelivery.dylib" else "liblogosdelivery.so"; - libpqPattern = if pkgs.stdenv.hostPlatform.isDarwin then "libpq*.dylib" else "libpq.so*"; - - postInstall = '' - mkdir -p $out/lib - - # Copy libpq from PostgreSQL so it ships with the module runtime libs - for pq in ${pkgs.lib.getLib pkgs.postgresql}/lib/''${libpqPattern}; do - if [ -e "$pq" ]; then - cp -L "$pq" "$out/lib/$(basename "$pq")" - fi - done - - # Normalize libpq naming for runtime loaders - if [ -f "$out/lib/libpq.5.dylib" ] && [ ! -e "$out/lib/libpq.dylib" ]; then - ln -s libpq.5.dylib "$out/lib/libpq.dylib" - fi - - if [ -f "$out/lib/libpq.so.5" ] && [ ! -e "$out/lib/libpq.so" ]; then - ln -s libpq.so.5 "$out/lib/libpq.so" - fi - - # Copy liblogosdelivery directly from the delivery package - if [ -f "${logosDelivery}/bin/''${libdeliveryLib}" ]; then - cp "${logosDelivery}/bin/''${libdeliveryLib}" "$out/lib/''${libdeliveryLib}" - elif [ -f "$out/share/logos-delivery-module/generated/''${libdeliveryLib}" ]; then - cp "$out/share/logos-delivery-module/generated/''${libdeliveryLib}" "$out/lib/''${libdeliveryLib}" - fi - - # Fix the install name of liblogosdelivery on macOS - ${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' - if [ -f "$out/lib/''${libdeliveryLib}" ]; then - ${pkgs.darwin.cctools}/bin/install_name_tool -id "@rpath/''${libdeliveryLib}" "$out/lib/''${libdeliveryLib}" - # Ensure @rpath lookups resolve against the library's own directory - ${pkgs.darwin.cctools}/bin/install_name_tool -add_rpath "@loader_path" "$out/lib/''${libdeliveryLib}" 2>/dev/null || true - fi - - if [ -f "$out/lib/libpq.dylib" ]; then - ${pkgs.darwin.cctools}/bin/install_name_tool -id "@loader_path/libpq.dylib" "$out/lib/libpq.dylib" 2>/dev/null || true - fi - - if [ -f "$out/lib/libpq.5.dylib" ]; then - ${pkgs.darwin.cctools}/bin/install_name_tool -id "@loader_path/libpq.5.dylib" "$out/lib/libpq.5.dylib" 2>/dev/null || true - fi - ''} - - # Ensure Linux runtime lookup can find adjacent shared libraries - ${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isLinux '' - if [ -f "$out/lib/''${libdeliveryLib}" ]; then - chmod 755 -R $out/lib - ${pkgs.patchelf}/bin/patchelf --set-rpath '$ORIGIN' "$out/lib/''${libdeliveryLib}" - ${pkgs.patchelf}/bin/patchelf --add-needed libpq.so.5 "$out/lib/''${libdeliveryLib}" 2>/dev/null || true - fi - ''} - - # Copy the storage module plugin from the installed location - if [ -f "$out/lib/logos/modules/delivery_module_plugin.dylib" ]; then - cp "$out/lib/logos/modules/delivery_module_plugin.dylib" "$out/lib/" - - # Fix the plugin's reference to liblogosdelivery on macOS - ${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' - # Find what liblogosdelivery path the plugin is referencing and change it to @rpath - for dep in $(${pkgs.darwin.cctools}/bin/otool -L "$out/lib/delivery_module_plugin.dylib" | grep liblogosdelivery | awk '{print $1}'); do - ${pkgs.darwin.cctools}/bin/install_name_tool -change "$dep" "@rpath/''${libdeliveryLib}" "$out/lib/delivery_module_plugin.dylib" - done - # Ensure plugin resolves @rpath entries from its own location - ${pkgs.darwin.cctools}/bin/install_name_tool -add_rpath "@loader_path" "$out/lib/delivery_module_plugin.dylib" 2>/dev/null || true - - # If plugin references libpq directly, make it resolve next to the plugin - for dep in $(${pkgs.darwin.cctools}/bin/otool -L "$out/lib/delivery_module_plugin.dylib" | grep libpq | awk '{print $1}'); do - ${pkgs.darwin.cctools}/bin/install_name_tool -change "$dep" "@loader_path/libpq.dylib" "$out/lib/delivery_module_plugin.dylib" 2>/dev/null || true - done - ''} - elif [ -f "$out/lib/logos/modules/delivery_module_plugin.so" ]; then - cp "$out/lib/logos/modules/delivery_module_plugin.so" "$out/lib/" - - ${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isLinux '' - ${pkgs.patchelf}/bin/patchelf --set-rpath '$ORIGIN' "$out/lib/delivery_module_plugin.so" - ${pkgs.patchelf}/bin/patchelf --add-needed libpq.so.5 "$out/lib/delivery_module_plugin.so" 2>/dev/null || true - ''} - else - echo "Error: No delivery_module_plugin library file found" - exit 1 - fi - - # Remove the nested structure we don't want - rm -rf "$out/lib/logos" 2>/dev/null || true - rm -rf "$out/share" 2>/dev/null || true - - # Assert runtime packaging/fixups are in place - if [ ! -e "$out/lib/libpq.dylib" ] && [ ! -e "$out/lib/libpq.so" ] && [ ! -e "$out/lib/libpq.so.5" ]; then - echo "Error: libpq was not packaged into $out/lib" - exit 1 - fi - - ${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' - if [ ! -f "$out/lib/liblogosdelivery.dylib" ]; then - echo "Error: liblogosdelivery.dylib missing" - exit 1 - fi - - if ! ${pkgs.darwin.cctools}/bin/otool -l "$out/lib/liblogosdelivery.dylib" | grep -A2 LC_RPATH | grep -q '@loader_path'; then - echo "Error: liblogosdelivery.dylib is missing LC_RPATH @loader_path" - exit 1 - fi - - if [ -f "$out/lib/libpq.dylib" ] && ! ${pkgs.darwin.cctools}/bin/otool -D "$out/lib/libpq.dylib" | grep -q '@loader_path/libpq.dylib'; then - echo "Error: libpq.dylib install id is not @loader_path/libpq.dylib" - exit 1 - fi - ''} - - ${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isLinux '' - if [ ! -f "$out/lib/liblogosdelivery.so" ]; then - echo "Error: liblogosdelivery.so missing" - exit 1 - fi - - if [ "$(${pkgs.patchelf}/bin/patchelf --print-rpath "$out/lib/liblogosdelivery.so")" != '$ORIGIN' ]; then - echo "Error: liblogosdelivery.so rpath is not $ORIGIN" - exit 1 - fi - - if ! ${pkgs.patchelf}/bin/patchelf --print-needed "$out/lib/liblogosdelivery.so" | grep -q '^libpq\.so\.5$'; then - echo "Error: liblogosdelivery.so is missing NEEDED libpq.so.5" - exit 1 - fi - ''} - ''; -} diff --git a/QExpected.h b/src/QExpected.h similarity index 100% rename from QExpected.h rename to src/QExpected.h diff --git a/api_call_handler.h b/src/api_call_handler.h similarity index 100% rename from api_call_handler.h rename to src/api_call_handler.h diff --git a/delivery_module_interface.h b/src/delivery_module_interface.h similarity index 100% rename from delivery_module_interface.h rename to src/delivery_module_interface.h diff --git a/delivery_module_plugin.cpp b/src/delivery_module_plugin.cpp similarity index 100% rename from delivery_module_plugin.cpp rename to src/delivery_module_plugin.cpp diff --git a/delivery_module_plugin.h b/src/delivery_module_plugin.h similarity index 100% rename from delivery_module_plugin.h rename to src/delivery_module_plugin.h diff --git a/vendor/logos-cpp-sdk b/vendor/logos-cpp-sdk deleted file mode 160000 index c3477d2..0000000 --- a/vendor/logos-cpp-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c3477d29e32cae5f73ca637fb81e547f8a6cba58 diff --git a/vendor/logos-delivery b/vendor/logos-delivery deleted file mode 160000 index 0ad5515..0000000 --- a/vendor/logos-delivery +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0ad55159b39ed74ba6b88b5a9d72db766b4b0f08 diff --git a/vendor/logos-liblogos b/vendor/logos-liblogos deleted file mode 160000 index 0778044..0000000 --- a/vendor/logos-liblogos +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 07780444deb99f10e600247e3696ba495f2f071a From 0a509807ce3490c9db451b5776deb51b07d0913a Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 31 Mar 2026 12:45:24 -0400 Subject: [PATCH 29/30] include postgresql in the module config --- flake.nix | 10 ++++++++++ metadata.json | 3 +++ 2 files changed, 13 insertions(+) diff --git a/flake.nix b/flake.nix index 48042cc..8f18050 100644 --- a/flake.nix +++ b/flake.nix @@ -23,5 +23,15 @@ cp "$f" lib/ 2>/dev/null || true done ''; + # Bundle runtime libraries alongside the plugin. + postInstall = '' + # Use pkg-config to locate the exact libpq from the build environment + LIBPQ_LIBDIR=$(pkg-config --variable=libdir libpq 2>/dev/null || true) + if [ -n "$LIBPQ_LIBDIR" ] && [ -d "$LIBPQ_LIBDIR" ]; then + for f in "$LIBPQ_LIBDIR"/libpq.*; do + [ -f "$f" ] && cp -L "$f" $out/lib/ 2>/dev/null || true + done + fi + ''; }; } diff --git a/metadata.json b/metadata.json index ca84d60..a68d68b 100644 --- a/metadata.json +++ b/metadata.json @@ -19,6 +19,9 @@ ], "capabilities": [], "nix": { + "packages": { + "runtime": ["postgresql"] + }, "external_libraries": [ { "name": "delivery", From efa0e587143ec044fea5e08ddcd7cdb7b2cc7e2e Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 31 Mar 2026 13:08:48 -0400 Subject: [PATCH 30/30] add warning about current workaround --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 8f18050..a5e49ee 100644 --- a/flake.nix +++ b/flake.nix @@ -15,8 +15,9 @@ externalLibInputs = { delivery = inputs.logos-delivery; }; - # Copy liblogosdelivery header from the logos-delivery source tree. - # The .so is not needed at compile time — shared libs allow undefined symbols. + # TODO: The module builder copies libwaku.h from the flake output instead of + # liblogosdelivery.h from the source. This workaround copies the correct header. + # Should be fixed in logos-module-builder (e.g. header_path in metadata.json). preConfigure = '' mkdir -p lib for f in $(find /nix/store -maxdepth 5 -name "liblogosdelivery.h" 2>/dev/null); do