Skip to content

Commit 78b4c5b

Browse files
Merge branch 'feat/sdk-canonical-object-types' into 'internal_main'
RFC — SDK del MessageParser/DataSource para inversión ObjectStore (builtin-object types) See merge request client-projets/p.2026-plotjuggler/plotjuggler_core!175
2 parents 869e325 + 901f98d commit 78b4c5b

202 files changed

Lines changed: 4493 additions & 1366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,43 @@ PlotJuggler Core — C++20 foundation libraries for PlotJuggler storage, plugin
66

77
### Modules
88

9-
- **pj_base** — vocabulary types, plugin ABI headers, plugin SDK headers (zero external deps)
9+
- **pj_base** — foundational SDK/ABI types, canonical builtin object vocabulary, plugin ABI headers,
10+
host-view helpers, ImageAnnotations codec, and shared utilities
1011
- **pj_datastore** — columnar storage engine + `ObjectStore` (for media blobs) + `DerivedEngine` (fmt, tsl::robin_map, nanoarrow)
11-
- **pj_plugins** — C-ABI plugin protocol, C++ SDK base classes, plugin discovery, host-side loaders, config envelope helpers, and dialog protocol primitives; four plugin families: DataSource, MessageParser, Dialog, Toolbox
12-
- **pj_scene_protocol** — canonical schema + Foxglove `ImageAnnotations` Protobuf codec (writer + reader); SDK boundary for plugin authors producing or consuming 2D markers / scene primitives. `pj_base`-only deps.
12+
- **pj_plugins** — C++ plugin SDK base classes, plugin discovery, host-side loaders, config envelope
13+
helpers, and dialog protocol primitives; four plugin families: DataSource, MessageParser, Dialog, Toolbox
1314

1415
### Dependency graph
1516

1617
- `pj_datastore``pj_base`
1718
- `pj_plugins``pj_base`
18-
- `pj_scene_protocol``pj_base`
19+
20+
## Documentation Workflow
21+
22+
Coding agents should use this context hierarchy:
23+
24+
```text
25+
CLAUDE.md -> relevant docs -> code
26+
```
27+
28+
- Start with this file to identify the module and the relevant source-of-truth documents.
29+
- Read the relevant docs before treating code as authoritative for intent. Code shows current implementation
30+
details; docs define the intended architecture, public contracts, terminology, and module boundaries.
31+
- If docs and code disagree, treat that as a documentation consistency problem. Do not silently let stale docs survive.
32+
- Any change to behavior, public APIs, ABI structs, SDK types, module ownership, plugin workflows,
33+
storage formats, or user-facing semantics must include a documentation check.
34+
- Before any commit, verify that documentation is up to date for the change. If docs are stale and the user did
35+
not explicitly ask for a docs update, ask whether to update the docs before committing. Do not commit
36+
known-stale documentation.
1937

2038
## Key Documentation
2139

2240
**Project-wide:**
2341

2442
| Document | Content |
2543
|----------|---------|
44+
| `docs/builtin_type.md` | Canonical builtin object types used as the shim between third-party schemas and PlotJuggler internals |
45+
| `docs/image_annotations_format.md` | Canonical `PJ.ImageAnnotations` wire format for builtin `ImageAnnotations` payloads |
2646
| `docs/cpp_design_recommendations.md` | C++ style, error handling, API design guidelines |
2747
| `docs/toolbox-porting-gap-analysis.md` | SDK gaps identified when porting PJ3 toolboxes (being addressed) |
2848

@@ -46,13 +66,6 @@ PlotJuggler Core — C++20 foundation libraries for PlotJuggler storage, plugin
4666
| `dialog-plugin-guide.md` | SDK tutorial: WidgetData, typed events, EmbedUi, requestAccept, onTick |
4767
| `toolbox-guide.md` | SDK tutorial: read+write access, catalog, notifyDataChanged |
4868

49-
**Scene protocol** (`pj_scene_protocol/docs/`):
50-
51-
| Document | Content |
52-
|----------|---------|
53-
| `ARCHITECTURE.md` | Wire format spec (`foxglove.ImageAnnotations` Protobuf), type catalog, encoding rules, design rationale (single canonical decoder, loader-side conversion) |
54-
| `USER_GUIDE.md` | Producer recipe (loader writing markers) and consumer recipe (sink/viewer decoding), common pitfalls, pointer to PJ4 reference adapters |
55-
5669
## Build & Test
5770

5871
```bash
@@ -65,18 +78,27 @@ Dependencies: Conan (`conanfile.txt`).
6578

6679
## Pre-commit Validation
6780

81+
Before committing, first check whether the code changes require documentation updates. If documentation is stale
82+
and the requested task did not include updating it, ask the user whether to update the docs before committing.
83+
6884
Before committing, always run:
6985

7086
```bash
71-
./build.sh --debug && ./test.sh && ./run_clang_tidy.sh
87+
./build.sh --debug && ./test.sh
7288
```
7389

90+
Code formatting and linting are enforced via pre-commit hooks (clang-format v17).
91+
7492
## Instructions Glossary
7593

76-
- **"Read all documentation"** means: find and read every `.md` file in the entire project tree (all subdirectories). Use `find . -name "*.md"` or equivalent. This includes docs in `pj_base/`, `pj_datastore/docs/`, `pj_plugins/docs/`, `pj_scene_protocol/docs/`, and any other location.
94+
- **"Read all documentation"** means: find and read every `.md` file in the entire project tree (all subdirectories). Use `find . -name "*.md"` or equivalent. This includes docs in `docs/`, `pj_datastore/docs/`, `pj_plugins/docs/`, and any other location.
7795

7896
- **"Update the documentation"** means: based on what you learned during this session, correct any documentation that is outdated or inaccurate, and clarify any ambiguity that caused confusion or errors. If a doc says one thing but the code does another, fix the doc to match reality. If missing information led to a bug, add it.
7997

98+
- **"Check documentation"** means: review the docs listed above that are related to the changed module or API.
99+
Confirm they still describe the current intent and behavior. If not, update them or ask the user before
100+
committing.
101+
80102
## Coding Conventions
81103

82104
- **Formatting:** Google style via `.clang-format` — 2-space indent, 120-char limit

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ if(PJ_BUILD_DATASTORE)
159159
add_subdirectory(pj_datastore)
160160
endif()
161161
add_subdirectory(pj_plugins)
162-
add_subdirectory(pj_scene_protocol)
163162

164163
if(PJ_BUILD_PORTED_PLUGINS AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/pj_ported_plugins/CMakeLists.txt")
165164
set(PJ_HAS_PORTED_PLUGINS TRUE)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Davide Faconti
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

cmake/PlotJugglerSDKConfig.cmake.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/PlotJugglerSDKTargets.cmake")
1313
# Per-component validation.
1414
foreach(_comp ${PlotJugglerSDK_FIND_COMPONENTS})
1515
if(_comp STREQUAL "DataSource")
16-
# No additional dependencies — pj_base is self-contained.
1716
set(PlotJugglerSDK_DataSource_FOUND TRUE)
1817

1918
elseif(_comp STREQUAL "Dialog")

0 commit comments

Comments
 (0)