The SDK
@mecsto/theme-sdk is the whole contract between a theme and the platform. Everything a theme can read, and every mutation it can perform, is here — and nothing else is reachable.
Four layers
Loaders (28)
Typed view-models for Server Components. Your default.
ClientHooks (20)
For genuinely interactive surfaces only.
MutationsActions (7)
The short list of things a theme may change.
Platform-ownedComponents (11)
Pieces that must behave identically everywhere.
Prefer a loader
A loader runs on the server, returns a typed shape, and ships no JavaScript. A hook fetches from the browser and costs a round trip plus bundle size. Reach for a hook only when the value genuinely changes after render — availability that updates as a customer picks a date, for instance.
You cannot query around it. There is no table access, no SQL and no credential in a theme. If the shape you need is not in the SDK, that is a contract gap worth raising — not a reason to find another way in.
View models are stable
Loaders return view-models, not database rows. That indirection is why the platform can change its schema without breaking every theme. See the typed shapes.