feat(pj_base): pj.data_processors.v1 — data-only SDK service for plugin-created transforms#125
Open
facontidavide wants to merge 1 commit into
Open
feat(pj_base): pj.data_processors.v1 — data-only SDK service for plugin-created transforms#125facontidavide wants to merge 1 commit into
facontidavide wants to merge 1 commit into
Conversation
…ugin-created transforms
Adds the `pj.data_processors.v1` host service: a DATA-ONLY C ABI that lets a
toolbox plugin create catalog-resident "transform" nodes in the host. Only
strings cross the boundary (script source + input/output names + params JSON +
an id); the host owns all execution, so a transform survives plugin unload and
session reload — the originating plugin is needed only for re-editing.
- PJ_data_processors_host_vtable_t (create/remove/list/config), protocol_version 1,
struct_size-gated and ABI-appendable; all slots [main-thread], PJ_NOEXCEPT.
- sdk::DataProcessorsHostView C++ sugar + DataProcessorsHostService trait.
- Payload (script/params) is binary-safe (PJ_string_view_t {data,size}), so the
native "door" is WASM bytes through this same surface — a future host-owned
WASM/Python backend is purely additive and survives unload, deliberately NOT a
C++ kernel vtable that would dangle on DSO unload.
- The view now rejects an empty output list (transforms create named topics, so
>=1 output is required) before it ever reaches the vtable.
- Fake-host gtest suite (8 cases) incl. a binary-safe payload round-trip and the
empty-outputs guard.
Additive new service -> Conan MINOR (0.8.0 -> 0.9.0); abi/baseline.abi untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the
pj.data_processors.v1host service — a data-only C ABI that lets a toolbox plugin create catalog-resident Transform nodes in the host. Only strings cross the boundary (script source + input/output names + params JSON + an id); the host owns all execution.This is M4.1 of the PJ4 Data Processors plan (the SDK half). The PJ4 host bridge (M4.2) that turns these calls into live
DerivedEnginenodes lands separately in the application repo.Why this shape
library_ownerUAF that sank the earlier filter-registry attempt.PJ_string_view_t {data,size}), so a future host-owned WASM/Python backend ships as bytes through this same surface — purely additive, survives unload, sandboxed — rather than a native kernel vtable that would dangle on unload.outputsis required non-empty (named catalog topics); host-internal per-curve Filters are not created through this ABI but share the sameDataProcessorsubstrate.Changes
PJ_data_processors_host_vtable_t(create/remove/list/config),protocol_version 1,struct_size-gated, ABI-appendable; all slots[main-thread],PJ_NOEXCEPT.sdk::DataProcessorsHostViewC++ sugar +DataProcessorsHostServicetrait.Versioning
Additive new service → Conan MINOR
0.8.0→0.9.0;abi/baseline.abiuntouched (additions-only).Tests
Fake-host gtest suite, 8 cases (6 baseline +
CreateRejectsEmptyOutputs,BinarySafePayloadRoundTrips). Full SDK build + 47/47 tests green; pre-commit (clang-format v22.1.0) clean.🤖 Generated with Claude Code