Skip to content

feat(api): add LED, microphone, and speaker component-capability topic leaves#60

Merged
jBernavaPrah merged 2 commits into
mainfrom
feat/component-led-mic-speaker-topics
Jun 11, 2026
Merged

feat(api): add LED, microphone, and speaker component-capability topic leaves#60
jBernavaPrah merged 2 commits into
mainfrom
feat/component-led-mic-speaker-topics

Conversation

@jBernavaPrah

Copy link
Copy Markdown
Contributor

Summary

The v1 topic_tree! (in phoxal/src/api/v1/mod.rs) only exposed component-capability leaves for the capabilities wired by platform runtimes. The LED, microphone, and speaker payload modules existed under phoxal::api::v1::component::capability::{led, microphone, speaker} but had no component(id).<kind>(cap).<stream>() fluent leaves.

Because of this gap, the v0.5.0 consumer migration forced operator (rerun-proxy visualizer, operator#18) and simulator (Webots controller, simulator#16) to drop their LED/microphone/speaker wiring and visualization paths.

This PR restores the missing leaves so consumers can re-wire those paths. Targets a v0.5.x minor release.

Changes

Added against the existing canonical payload types:

Fluent leaf Payload Schema
component(id).led(cap).command() led::Command v1/component/led/command
component(id).microphone(cap).data() microphone::Frame v1/component/microphone/data
component(id).speaker(cap).audio() speaker::audio::Audio v1/component/speaker/audio
component(id).speaker(cap).command() speaker::command::Command v1/component/speaker/command

The speaker shape (audio + command) and the schema strings match the pre-fluent TOPIC_KIND/KIND values, so the wire contract is unchanged. Representative key/schema assertions were added alongside the other capabilities in topic_tree_component_and_simulation_slots_elide_holes_in_schemas.

Verification

  • cargo build --workspace
  • cargo clippy --workspace --all-targets ✅ (clean)
  • cargo test --workspace ✅ (all passing)

🤖 Generated with Claude Code

jBernavaPrah and others added 2 commits June 11, 2026 11:12
…c leaves

The v1 `topic_tree!` only exposed component-capability leaves for the
capabilities wired by platform runtimes, leaving the LED, microphone, and
speaker payload modules without any `component(id).<kind>(cap).<stream>()`
fluent leaves. Consumers (operator's rerun-proxy visualizer, simulator's
Webots controller) consequently had to drop their LED/mic/speaker paths
during the v0.5.0 migration.

Add the missing leaves against the existing canonical payload types:
- `component(id).led(cap).command()` -> led::Command
- `component(id).microphone(cap).data()` -> microphone::Frame
- `component(id).speaker(cap).audio()` -> speaker::audio::Audio
- `component(id).speaker(cap).command()` -> speaker::command::Command

Schemas (`v1/component/speaker/audio`, `v1/component/speaker/command`,
`v1/component/led/command`, `v1/component/microphone/data`) match the
pre-fluent TOPIC_KIND/KIND values, so the wire contract is unchanged.
Representative key/schema tests added alongside the other capabilities.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@jBernavaPrah jBernavaPrah merged commit 70b805e into main Jun 11, 2026
4 checks passed
@jBernavaPrah jBernavaPrah deleted the feat/component-led-mic-speaker-topics branch June 11, 2026 09:25
@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
This was referenced Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant