Spaces SDK
Build programmable Aster spaces with @aster/spaces.
The Spaces SDK lives in packages/spaces and is published as @aster/spaces.
It is the API for declaring programmable spaces as apps that require
capability protocols. A space names what it needs; Aster resolves which
provider satisfies those requirements.
Distro stores space modules and projects their declarations into runtime state. The SDK gives those modules a stable authoring surface.
Install
npm install @aster/spacesDefine a space
import { Space } from "@aster/spaces"
export default Space.make({ slug: "evidence-search-space", displayName: "Evidence Search Space", description: "A space that requires Evidence Search.", requires: [ { kind: "capability", protocolId: "aster.evidence-search", range: "^1.0.0", }, ],})Space.make() validates the module shape and produces a manifest that Distro
can store, plan, bind, and project into runtime state.
Requirement Surface
Spaces declare requirements. Capability requirements target protocol IDs from the Protocol Registry; specific requirements target a named bundle when identity is intentional.
| Requirement kind | Use it for |
|---|---|
capability | A provider selected by protocol ID and compatible version range. |
specific | A named bundle dependency where the bundle identity matters. |
Scaffolding
bun run create:space -- --slug evidence-search-space --protocol aster.evidence-searchThe scaffold validates requested protocols against @aster/services/protocols
and emits a building @aster/spaces package with literal requirements.
Runtime context
Runtime hooks receive product APIs through the projected space environment. The declaration stays portable: provider selection and authority live in binding and plan data, not in provider-specific imports.
Use the Spaces SDK for per-project capability bundles. Use Provider Authoring when you need to build the plugin service that satisfies a protocol.