## What changed - documents `extract-slot.instanceSelector` as a leaf-to-root occurrence path - provides valid examples for sections directly under Body and nested in a page wrapper - exposes those examples through `meta.get_more_tools` - makes invalid parent ordering errors explain how to recover using `list-instances` IDs and `parentId` - regenerates the public runtime schema with the selector contract ## Why Agents could discover `extract-slot` but could not determine the selector ordering expected by the runtime. Plausible selectors failed with a generic direct-parent error, and focused MCP discovery returned no working example. ## User impact Agents can now reliably convert existing sections into shared Slots without guessing the Navigator path format. Invalid selectors return enough context to correct the call instead of repeatedly probing the project. ## Verification - project-build slot and MCP tests: 108 passed - protocol operation docs and operation tests: 17 passed - CLI MCP tests: 35 passed - project-build, protocol, and CLI typechecks - repository lint - package-boundary check - generated API and documentation checks
Protocol
@webstudio-is/protocol owns Webstudio data exchange protocols.
The project bundle is the external export/import artifact used by sync, local
.webstudio/data.json, project import, transferred asset files, and prebuild.
This package owns the assembled bundle schemas, transfer RPC payloads, and
bundle compatibility/version helpers.
Domain models such as pages, assets, and serialized builds remain owned by their domain packages and are composed here through schema-only entrypoints. Do not copy those schemas into this package.
Terminology
Project bundle is the authoritative external project artifact. It is used by
sync, .webstudio/data.json, project import, transferred asset files, and
prebuild.
Data envelope is a serialized single-key object whose key is a versioned
Webstudio marker, for example { "@webstudio/instance/v0.1": data }. The
envelope identifies the payload version and lets consumers detect malformed
Webstudio-owned data before falling back to other formats.
Transfer data is the domain payload inside a data envelope. Examples include
InstanceTransferData, InstancesTransferData, and PageTransferData.
Transfer data is portable and detached from a project; insertion/import remaps
ids and merges it into authoritative project state. Runtime-owned transfer
formats live in @webstudio-is/project-build/transfer.
Clipboard data is a UI transport concern. Builder copy/paste may serialize transfer data into a data envelope and place it on the browser clipboard, but runtime and protocol code should name the reusable format as data envelope or transfer data, not clipboard.