@aster/spaces
Canonical package README synced from packages/spaces/README.md.
Canonical source:
packages/spaces/README.md· Edit the source file
Programmatic space module primitives for Aster runtimes.
Use spaces as declarative apps that state the capability protocols they need. The runtime resolves those requirements to providers, records the binding as space data, and projects the resulting declaration into the run environment.
Install
npm install @aster/spacesQuick start
import { Space } from "@aster/spaces"
export default Space.make({ slug: "memory-space", displayName: "Evidence Search Space", description: "A space that requires the memory capability.", requires: [ { kind: "capability", protocolId: "aster.evidence-search", range: "^1.0.0", }, ],})Space.make() validates the public module shape and produces the manifest that
Aster stores, plans, binds, and projects into runtime state.
Requirements
Spaces express needs, not provider identity.
| Requirement kind | Use it for |
|---|---|
capability | A provider of a protocol such as aster.evidence-search, selected by the resolver. |
specific | An identity-bearing bundle dependency when the space deliberately needs that bundle. |
Capability requirements use the protocol registry vocabulary: protocolId,
semver range, and optional settings once the protocol defines settings.
Scaffolding
Create a registry-backed space skeleton from the repository root:
bun run create:space -- --slug evidence-space --protocol aster.evidence-searchThe generated package imports only @aster/spaces and emits literal
requirements validated against @aster/services/protocols by the generator.
Entrypoints
| Entrypoint | Contents |
|---|---|
@aster/spaces | Space.make, requirement-capable space module types, and service declaration helpers. |
@aster/spaces/runtime | Runtime-facing module primitives used by Aster’s projection pipeline. |
Related packages
@aster/services/protocolsowns the protocol registry that space requirements target.@aster/authoringowns plugin and provider package authoring.@aster/sdkis the gateway/client SDK and is separate from space authoring.