Skip to content

@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

Terminal window
npm install @aster/spaces

Quick 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 kindUse it for
capabilityA provider of a protocol such as aster.evidence-search, selected by the resolver.
specificAn 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:

Terminal window
bun run create:space -- --slug evidence-space --protocol aster.evidence-search

The generated package imports only @aster/spaces and emits literal requirements validated against @aster/services/protocols by the generator.

Entrypoints

EntrypointContents
@aster/spacesSpace.make, requirement-capable space module types, and service declaration helpers.
@aster/spaces/runtimeRuntime-facing module primitives used by Aster’s projection pipeline.
  • @aster/services/protocols owns the protocol registry that space requirements target.
  • @aster/authoring owns plugin and provider package authoring.
  • @aster/sdk is the gateway/client SDK and is separate from space authoring.