Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .claude/skills/plotjuggler-plugin/references/data-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ if (!r) return PJ::unexpected(r.error()); // a failed push IS an e
The cache owns the `ensureParserBinding` + `pushMessage` pair per topic and anchors
the payload bytes so the host's fetch callable is idempotent and by-value (the host
may invoke it zero, one, or many times, from consumer threads, and releases it once
even when the push fails). The config-envelope that ties source⇆parser is managed
by the host; you never see the parser directly. Two delegated-ingest traps the
even when the push fails). You never see the parser directly. Two delegated-ingest traps the
helpers already encode — know them anyway:

- **Forward `_parser_config`.** The host injects the parser's saved options into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ Key pieces:
## Route claims and functional extensions

Recompile a handler-registering parser against SDK 0.22 and the base class
automatically exposes all three host-facing tables:
automatically exposes both host-facing tables:

- `pj.parser_route_claims.v1` reports exact claims from the handler table. It
never reports a wildcard. The host synthesizes one universal wildcard scalar
claim per manifest encoding.
- `pj.parser_functional.v1` carries complete canonical-wire objects and scalar
records through synchronous caller-owned sinks.
- `pj.parser_functional.v2` keeps the scalar route unchanged and adds the object
splice sink. The host asks for v2 first and falls back to v1.
- `pj.parser_functional.v2` carries scalar records and canonical-wire objects
(complete, or with one spliced bulk field) through synchronous caller-owned
sinks.

Scalar and object routes resolve independently. Another provider may therefore
own the object route for a type that this parser still flattens to scalars. There
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,29 @@ SceneEntities and PlotMarkers:
- `PlotMarkers`: the decoder drops a marker whose `kind` it does not know instead of drawing it as
a time region; wire numbers unchanged.

Removed:

- **Breaking (source):** the `pj.colormap.v1` service: `PJ_colormap_registry_vtable_t`,
`PJ_colormap_registry_t`, `sdk::ColorMapRegistryView`, `sdk::ColorMapRegistryService` and
`ToolboxPluginBase::colorMapRegistry()` / `colorMapRegistryBound()`. No replacement; no host
served it. The id `pj.colormap.v1` is retired and never reused (a future service would be
`pj.colormap.v2`).
- **Breaking (source):** `PJ::ConfigEnvelope` (`pj_plugins/host/config_envelope.hpp`). No
replacement; the host never used it.
- **Breaking (source):** the `descriptor_import_support` compatibility surface: the
`plotjuggler_sdk::descriptor_import_support` CMake target and Conan component, and the forwarding
headers under `pj_base/sdk/descriptor_import/` with their `PJ::sdk::descriptor_import` namespace
alias. Use `plotjuggler_sdk::source`, `pj_base/sdk/source/` and `PJ::sdk::source`.
`pj_base/sdk/descriptor_import.hpp` and the `pj.descriptor_import.v1` protocol are unchanged.
- **Breaking (source):** the `pj.parser_functional.v1` extension: `PJ_PARSER_FUNCTIONAL_EXTENSION_V1`,
`PJ_parser_functional_v1_t`, `PJ_parser_object_sink_v1_t`, `PJ_parser_parse_object_fn_t` and
their `*_V1_MIN_SIZE` macros. `MessageParserPluginBase` no longer answers the v1 id and
`MessageParserHandle` negotiates only `pj.parser_functional.v2`, treating a v1-only parser like one
without a functional extension. Use v2. The id `pj.parser_functional.v1` is retired and never
reused.
- **Breaking (source):** `PJ::sdk::MediaMetadataBuilder` (`pj_base/sdk/media_metadata.hpp`). Use
`ObjectTopicMetadataBuilder` (`pj_base/sdk/object_topic_metadata.hpp`).

## [0.40.0]

Host contract: extended: pj.mcp_endpoint.v1, PJ_mcp_endpoint_host_vtable_t::acquire_endpoint,
Expand Down
3 changes: 1 addition & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ ownership or storage formats change. Read only the relevant reference sections.

`pj_source` (`plotjuggler_sdk::source`, `PJ::sdk::source`) and `pj_plugins`
depend on `pj_base`; both use nlohmann/json. Provider headers live under
`pj_base/sdk/source/`. The pre-0.31 `descriptor_import_support` component and
include directory forward to `source` for one release; new code uses `source`.
`pj_base/sdk/source/`.

DataSource/MessageParser/Toolbox C protocols live in `pj_base`; the Dialog
protocol lives in `pj_plugins/dialog_protocol/` and the Widget protocol in
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ endif()
# Components:
# base — vocabulary types (always available)
# plugin_sdk — plugin-author surface: base + dialog SDK + parser SDK
# source — compiled provider helpers (descriptor_import_support is an alias)
# source — compiled provider helpers
# plugin_host — host-side loaders (data_source, message_parser, toolbox,
# dialog, catalogs)
# ---------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions cmake/plotjuggler_sdkConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ foreach(_comp ${plotjuggler_sdk_FIND_COMPONENTS})
include("${CMAKE_CURRENT_LIST_DIR}/PjSdkTestFixtures.cmake")
set(plotjuggler_sdk_plugin_sdk_FOUND TRUE)

elseif(_comp STREQUAL "source" OR _comp STREQUAL "descriptor_import_support")
elseif(_comp STREQUAL "source")
find_dependency(nlohmann_json)
set(plotjuggler_sdk_${_comp}_FOUND TRUE)
set(plotjuggler_sdk_source_FOUND TRUE)

elseif(_comp STREQUAL "plugin_host")
find_dependency(nlohmann_json)
Expand Down
6 changes: 0 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
plugin_sdk — umbrella for plugin authors (base + dialog SDK + parser SDK)
plugin_host — umbrella for host loaders (data_source/parser/toolbox/dialog)
source — compiled source-provider support
descriptor_import_support — compatibility alias for source

A consuming Conan recipe declares `plotjuggler_sdk/<version>` and then:

Expand Down Expand Up @@ -178,11 +177,6 @@ def package_info(self):
source.includedirs = ["include"]
source.requires = ["base", "nlohmann_json::nlohmann_json"]

support = self.cpp_info.components["descriptor_import_support"]
support.set_property("cmake_target_name", "plotjuggler_sdk::descriptor_import_support")
support.libs = []
support.requires = ["source"]


# --- plugin_host (umbrella linking every host-side loader) ---
if self.options.with_host:
Expand Down
4 changes: 1 addition & 3 deletions docs/BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ imply that consumer repositories have adopted it.
## 0.31 delivery status

The 2026-09-05 promotion plan is implemented below, with the 2026-09-06
maintainer decisions on query/rate ownership. `pj_source` replaces the compiled
`descriptor_import_support` component; the old target and includes forward for
one release. New consumers use `plotjuggler_sdk::source` and `PJ::sdk::source`.
maintainer decisions on query/rate ownership. New consumers use `plotjuggler_sdk::source` and `PJ::sdk::source`.

| Original item | Status and reuse destination |
|---|---|
Expand Down
4 changes: 2 additions & 2 deletions docs/builtin_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ are small enough that the zero-copy anchor pattern is unnecessary.
**Serialize only at an explicit boundary.** Large byte-backed types remain
views over source-native payload bytes while they are inside one component and
an ownership anchor is available. Every stable builtin also has a canonical
codec for storage/replay and for the `pj.parser_functional.v1`/v2 DSO boundary.
codec for storage/replay and for the `pj.parser_functional.v2` DSO boundary.
That boundary deliberately serializes the value rather than sharing C++ class,
allocator, RTTI, or destructor state with the host. Functional v2 may carry one
frozen eligible bulk field as a splice into the input payload; the host still
Expand Down Expand Up @@ -162,7 +162,7 @@ For example, an image topic uses
produce this field without a free-form type string.

`object_type` and `media_class` are not renderer-discovery aliases.
`MediaMetadataBuilder` remains available for supplemental fields such as media
`ObjectTopicMetadataBuilder::string()` adds supplemental fields such as media
classification, encoding, and schema, and custom untyped object topics remain
valid.

Expand Down
5 changes: 1 addition & 4 deletions docs/provider-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ A descriptor-import provider turns a saved request into a finite dataset. Link
Your plugin owns request semantics, transport, trust, credentials, parser selection
and UI. This guide uses the existing C ABI and adds no protocol slots.

`plotjuggler_sdk::descriptor_import_support`, its Conan component, and headers
under `pj_base/sdk/descriptor_import/` forward to `source` for one release.
Existing source consumers still build. Use `pj_base/sdk/source/` for new code.
The consumer extension views remain in `pj_base/sdk/descriptor_import.hpp`.
The consumer extension views live in `pj_base/sdk/descriptor_import.hpp`.

## Reuse the provider machinery

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk-utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CMake helpers become available through `find_package(plotjuggler_sdk)`.
| `PJ::SemVer::parse, PJ::SemVer::isValid, PJ::SemVer::operator<=>; PJ::sdkVersion` | Parse/compare SDK and manifest versions | `pj_base/sdk/semver.hpp; pj_base/sdk/version.hpp` |
| `PJ::WidgetEvent` | Decode raw widget events; DialogPluginTyped already dispatches typed handlers | `pj_plugins/sdk/widget_event.hpp` |
| `PJ::FilePickerOptions, FilePickerResult, TreeItem, TreeCell` | Canonical picker/tree payloads and wire-value spellings | `pj_plugins/sdk/file_picker_types.hpp; pj_plugins/sdk/tree_types.hpp` |
| `PJ::sdk::MediaMetadataBuilder, ObjectTopicMetadataBuilder` | Build media hints and canonical renderer metadata | `pj_base/sdk/media_metadata.hpp; pj_base/sdk/object_topic_metadata.hpp` |
| `PJ::sdk::ObjectTopicMetadataBuilder` | Build canonical renderer metadata and supplemental media hints | `pj_base/sdk/object_topic_metadata.hpp` |
| `PJ::sdk::ObjectBytes` | Own object-read bytes through move-only RAII | `pj_base/sdk/object_bytes.hpp` |
| `PJ::sdk::ArrowSchemaHolder, ArrowArrayHolder, ArrowStreamHolder` | Own Arrow out-params; successful writes transfer ownership, failed writes retain it | `pj_base/sdk/arrow.hpp` |
| `PJ::sdk::parseEvaluationReport` | Parse a data-processor poll report (COMPLETED or FAILED) and derive each bundle's stamp | `pj_plugins/sdk/evaluation_report.hpp` |
Expand Down
12 changes: 6 additions & 6 deletions examples/sdk_consumer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(sdk_consumer LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(plotjuggler_sdk REQUIRED COMPONENTS plugin_sdk source descriptor_import_support)
find_package(plotjuggler_sdk REQUIRED COMPONENTS plugin_sdk source)

# A plugin is: add_library(SHARED) + link plugin_sdk + pj_configure_plugin().
# The helper (shipped with plugin_sdk) applies symbol isolation, the export
Expand Down Expand Up @@ -33,12 +33,12 @@ pj_embed_file(dialog_controls_example
VAR_NAME kUiContent
)

# Probe for the descriptor_import_support component: links the exported
# compiled target and touches one symbol per public header.
add_executable(descriptor_import_probe descriptor_import_probe.cpp)
target_link_libraries(descriptor_import_probe PRIVATE plotjuggler_sdk::descriptor_import_support)
# Probe for the source component: links the exported compiled target and
# touches one symbol per public header.
add_executable(source_probe source_probe.cpp)
target_link_libraries(source_probe PRIVATE plotjuggler_sdk::source)

# New component and packaged fixture consumption, alongside the deprecated probe.
# Packaged fixture consumption.
foreach(fixture mock_data_source mock_file_source mock_toolbox missing_id_data_source)
pj_add_sdk_test_fixture(${fixture} fixture_target)
# Repeated calls must return the same target without redefining it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Copyright 2026 Davide Faconti
// SPDX-License-Identifier: Apache-2.0
//
// Install-test probe for the descriptor_import_support component: exercises
// Install-test probe for the source component: exercises
// one symbol from each public header through the exported CMake target.

#include <cstdio>
#include <filesystem>
#include <pj_base/sdk/descriptor_import/origin.hpp>
#include <pj_base/sdk/descriptor_import/provider_job.hpp>
#include <pj_base/sdk/descriptor_import/request_cache.hpp>
#include <pj_base/sdk/descriptor_import/source_descriptor.hpp>
#include <pj_base/sdk/source/origin.hpp>
#include <pj_base/sdk/source/provider_job.hpp>
#include <pj_base/sdk/source/request_cache.hpp>
#include <pj_base/sdk/source/source_descriptor.hpp>
#include <string>

int main() {
namespace di = PJ::sdk::descriptor_import;
namespace di = PJ::sdk::source;

di::OriginPolicy origin_policy;
origin_policy.allowed_schemes = {"grpc", "grpc+tls"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
# nlohmann_json is in PUBLIC installed headers (config_envelope.hpp,
# widget_data, plugin_catalog) and is find_dependency()'d by the
# nlohmann_json is in PUBLIC installed headers (streaming_source.hpp,
# widget_data.hpp) and is find_dependency()'d by the
# installed CMake usage, so it must propagate to consumers.
self.requires("nlohmann_json/3.12.0", transitive_headers=True)

Expand Down
8 changes: 1 addition & 7 deletions pj_base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,13 @@ set_target_properties(pj_source PROPERTIES
EXPORT_NAME source
)
add_library(plotjuggler_sdk::source ALIAS pj_source)
# Deprecated compatibility target, retained for one release.
add_library(pj_descriptor_import_support INTERFACE)
target_link_libraries(pj_descriptor_import_support INTERFACE pj_source)
set_target_properties(pj_descriptor_import_support PROPERTIES EXPORT_NAME descriptor_import_support)
add_library(plotjuggler_sdk::descriptor_import_support ALIAS pj_descriptor_import_support)

# ---------------------------------------------------------------------------
# Install (guarded by PJ_INSTALL_SDK in root CMakeLists.txt)
# ---------------------------------------------------------------------------

if(PJ_INSTALL_SDK)
install(TARGETS pj_base pj_source pj_descriptor_import_support EXPORT plotjuggler_sdkTargets
install(TARGETS pj_base pj_source EXPORT plotjuggler_sdkTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
Expand Down Expand Up @@ -174,7 +169,6 @@ if(PJ_BUILD_TESTS)
tests/image_annotations_codec_test.cpp
tests/image_annotations_decoder_test.cpp
tests/field_table_test.cpp
tests/media_metadata_test.cpp
tests/object_topic_metadata_test.cpp
tests/push_message_test.cpp
tests/attach_source_record_test.cpp
Expand Down
3 changes: 0 additions & 3 deletions pj_base/feature_floors.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@
"PJ_DESCRIPTOR_IMPORT_START_FLAG_NONE",
"PJ_PARSER_ROUTE_FLAG_OBJECT_V1",
"PJ_PARSER_ROUTE_FLAG_SCALAR_V1",
"PJ_colormap_registry_vtable_t::register_map",
"PJ_colormap_registry_vtable_t::unregister_map",
"PJ_data_processors_host_vtable_t::create_data_processor",
"PJ_data_processors_host_vtable_t::data_processor_config",
"PJ_data_processors_host_vtable_t::list_data_processor_ids",
Expand Down Expand Up @@ -151,7 +149,6 @@
"PJ_toolbox_runtime_host_vtable_t::report_message",
"PJ_viewport_host_vtable_t::zoom_reset",
"PJ_viewport_host_vtable_t::zoom_to_time_range",
"pj.colormap.v1",
"pj.data_processors.v1",
"pj.parser_object_write.v1",
"pj.parser_runtime.v1",
Expand Down
2 changes: 1 addition & 1 deletion pj_base/include/pj_base/builtin_object_abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* carrying a PJ_builtin_object_type_t.
*
* Canonical-object and pure-functional scalar production use the additive
* `pj.parser_functional.v1` and v2 C extensions. MessageParserPluginBase keeps
* `pj.parser_functional.v2` C extension. MessageParserPluginBase keeps
* the plugin-author-facing ObjectRecord/ScalarRecord API inside the plugin
* DSO; its trampolines emit only POD scalar views, canonical wire bytes, or a
* v2 splice using the frozen eligibility table below. The concrete host-owned
Expand Down
6 changes: 3 additions & 3 deletions pj_base/include/pj_base/message_parser_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
* per-record, with an optional append_arrow_stream tail slot for
* parser-shaped formats that naturally decode batches.
*
* Pure-functional production uses the additive `pj.parser_functional.v1` and
* v2 extensions declared in parser_functional_protocol.h. Scalar fields cross
* Pure-functional production uses the additive `pj.parser_functional.v2`
* extension declared in parser_functional_protocol.h. Scalar fields cross
* as synchronous borrowed C values; canonical objects cross as a stable type
* tag plus canonical wire bytes or a v2 splice. No C++ parser class or STL
* value crosses the new path. Parsers built before SDK 0.21 do not expose the
* value crosses the new path. Parsers built before SDK 0.22 do not expose the
* extension and may use a deprecated host compatibility bridge until the next
* SDK major version. Pure-C plugins may continue using parse() to write
* scalars to writeHost.
Expand Down
Loading
Loading