Remote / foldkit-remote

How the server packages fit

foldkit-remote owns client cache semantics, not your source database or network transport.

client

Surface Projection
       |
       v
foldkit-remote
requirements + normalized cache
       |
       v
RemoteClient / Effect RPC

---------------- server boundary ----------------

foldkit-remote-server
Sources + field authorization
       |
       +---------------------+
       |                     |
       v                     v
foldkit-remote-drizzle    hand-written Source
(optional SQL compiler)   API / service / database

The package roles are:

PackageResponsibility
foldkit-remotenormalized cache, requirements, planning, queries, optimistic overlays, live cursors, retention
foldkit-remote-serverinterpret client selections/queries against server Sources and enforce semantic-field authorization
foldkit-remote-drizzleoptionally compile those selections and queries into typed Drizzle access
Effect RPC / your layerstransport and deployment

Remote.clientLayer(rpcClient) adapts RemoteRpc to RemoteClient and coalesces compatible reads/queries. HTTP, WebSocket, worker, and in-process execution are layer choices rather than Remote semantics.

See foldkit-remote-server for Source and authorization rules, and examples/kitchen-sink for the real server packages together.