Add a space
Spaces live inspaces/, an npm project next to ontology/. Each folder is one space.
spaces/package.json
@tilde/spaces is provided at build time, like @tilde/ontology, so it is not listed.
A page default-exports a component, and exports a title.
spaces/pipeline/index.tsx
@tilde/contractexports one typed reference per handler. Importing a handler that does not exist is a build error.useRead(handler, { key?, input })calls a read again when its request changes, or onrefetch(). It does not poll. Use a realtime view for live data.useRealtime(handler, request)subscribes to a realtime view, and reconnects on its own.useAction(handler)returnsrun(request), which resolves with the action’s outcome, including pending approval.- The kit includes
Page,Grid,Card,MetricTile,DataGridwithuseGridState,FilterBar,Chart, andErrorNote, with a Tailwind preset for light and dark themes.DataGridpasses paging, sorting, and filters to your read, so the server does the work.
@tilde/contract and @tilde/spaces when it builds the project. Every deploy builds and publishes the spaces with the ontology.
Who can open a space
Opening a space is a Cedar decision, like any other:Open spaces in Live
1
Serve the environment in Live
Switch on Serve its spaces in Live when you create the environment.
2
Grant access
Give people
view on the project, and an openSpace policy for each space.3
Open Live
People select Live, then the space. Tilde opens it for their own identity, so every call is decided as
user:<id>.