Skip to content

Separate world, volumetric, block, and avatar SDK surfaces#36

Merged
ogyrec-o merged 5 commits intomainfrom
mod-architecture-stage-4
Mar 23, 2026
Merged

Separate world, volumetric, block, and avatar SDK surfaces#36
ogyrec-o merged 5 commits intomainfrom
mod-architecture-stage-4

Conversation

@ogyrec-o
Copy link
Copy Markdown
Member

Summary

This PR formalizes the public SDK ownership split that had previously been blurred inside the world-facing surface. It introduces explicit avatar-, volumetric-, and block-owned crates, narrows freven_world_* back to generic world concerns, and refreshes the public contracts and docs so downstream runtime, engine, and vanilla code can depend on the correct layer.

What changed

  • Added explicit avatar SDK roots:
    • freven_avatar_sdk_types
    • freven_avatar_api
  • Added explicit volumetric SDK root:
    • freven_volumetric_sdk_types
  • Added explicit block SDK roots:
    • freven_block_sdk_types
    • freven_block_guest
    • freven_block_api
  • Moved public block vocabulary out of freven_world_sdk_types into freven_block_sdk_types.
  • Moved public topology/addressing helpers out of freven_world_sdk_types into freven_volumetric_sdk_types.
  • Split freven_world_api into clearer world-owned modules and repositioned it as a composition layer over lower-level block/volumetric surfaces rather than the owner of those semantics.
  • Updated freven_world_guest, guest contract docs, native ABI docs, and Wasm ABI docs to preserve the ownership split while still allowing generic world envelopes to carry block-specific payload families where needed.
  • Refreshed the top-level README to present the SDK as a layered contract surface instead of a mixed world/block story.

Why

The previous SDK layout made it too easy to treat world, voxel, block, and avatar concepts as one undifferentiated surface. That made ownership ambiguous for downstream runtime code and obscured which crates should remain stable public contracts versus which ones are merely composition points. This change makes those boundaries explicit and gives the rest of the stack a cleaner contract to build on.

Notes for reviewers

The main thing to review here is semantic ownership, not just crate movement. The important question is whether each public type now lives in the layer that truly owns it and whether the remaining freven_world_* surface is generic enough to stay world-owned without absorbing block- or topology-specific truth.

* Reshape SDK public world surface

Introduce dedicated block and volumetric SDK type crates, decompose freven_world_api into focused modules, and update guest-facing crates and workspace metadata to match the new public surface boundaries.
* Add volumetric addressing foundation types

Introduce stable volumetric addressing value types in freven_volumetric_sdk_types, split topology helpers into their own module, and migrate worldgen request/write contracts across world_api and world_guest to use the new column, section, and world-cell vocabulary.

* cargo fmt
* Clarify block vocabulary ownership

Document that standard block/profile ids and descriptors are owned by freven_block_sdk_types, while freven_world_api and freven_world_guest only consume that vocabulary through world-facing surfaces. Refresh crate docs, trait comments, and examples to make the layer boundaries explicit.

* Extract block gameplay contracts from world APIs

Introduce freven_block_guest and freven_block_api as the dedicated homes for runtime-loaded and builtin block gameplay contracts, then rewire freven_world_api, freven_world_guest, and freven_world_guest_sdk to consume those surfaces instead of owning them directly. This makes block mutation/query ownership explicit, narrows world-level service families, and keeps the public SDK layering aligned with the standard block gameplay split.

* Clarify block contract ownership and composition

Refresh SDK and ABI documentation to state that block vocabulary lives in freven_block_sdk_types, runtime-loaded block query and mutation contracts live in freven_block_guest, and world-facing APIs only compose over those block-owned families. Update examples and comments to reflect RuntimeOutput.blocks and the WorldServiceRequest::Block service family consistently.

* Clarify SDK ownership layers

Update the top-level SDK docs, world API README, and guest/native/wasm ABI references to describe the explicit split between generic world, volumetric, and reusable block-owned surfaces. Make the carrier role of world-owned envelopes over block-owned payload families explicit and align all documentation with RuntimeOutput.blocks terminology.

* fmt/clippy fix
Introduce freven_avatar_sdk_types and freven_avatar_api as the public home for avatar identity, control, controller, lifecycle, and presentation contracts. Move avatar-facing client and controller surfaces out of freven_world_api, keep world ownership boundaries explicit, and add hidden registration hooks so avatar-owned extensions can register through ModContext without leaving those contracts world-owned.
* Align guest provider ownership model

Group guest registration and provider callbacks into explicit world and avatar families in the public guest contract and SDK exports. This keeps the runtime-facing schema aligned with the Stage 4.7 ownership split.

* Trim guest action and query contracts

Remove the ad-hoc player position field from action inputs and drop entity/component query variants from the public guest contract so Stage 4.7 keeps runtime-facing surfaces aligned with explicit ownership boundaries.
@ogyrec-o ogyrec-o self-assigned this Mar 23, 2026
@ogyrec-o ogyrec-o merged commit 3a5e509 into main Mar 23, 2026
1 check passed
@ogyrec-o ogyrec-o deleted the mod-architecture-stage-4 branch March 23, 2026 17:30
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