Skip to content

Facilities

Facilities

Facilities are how a host provides capabilities to a bolt. Workspace code reaches the database, storage, models, and durable tasks only through host-provided bindings — never direct credentials.

Facility ports

Bolt defines ten facility ports. A host implements the ones a workspace requires:

PortProvides
databasethe tenant Postgres database — required by every workspace
filesobject storage behind file() columns: read, write, delete, list
aithe model catalogue, one model turn, and embeddings — which back /semantic and embedding columns
communicationchannel sends, inbound envelope verification, and per-person notification
connectornamed provider operations that integrations call
tasksdurable work: register a task, wake it, report active and settled, and interrupt it — schedules and task rows live in the tenant database
hostToolshost-owned tools an agent may call
transportthe connections the host holds — open, send, and publish to a topic
identityHooksidentity lifecycle observations the host may project, never originate
configone host-supplied configuration key per read — the runtime only; tenant `+env.ts` values live in the tenant vault

Notifications and secrets are not ports. They are runtime services backed by their own tables in the tenant database, so a host binds nothing for them.

Declaring requirements

Nobody hand-writes the requirement list. bolt sync compiles it into the artifact manifest as requiredFacilities , and activation checks that list against what the host actually bound: an unbound entry fails the bundle with missing_facility before any traffic reaches it. identityHooks is the one port that may stay unbound — it emits no-ops instead of failing.

Host bindings

Bindings are methods only — no data fields, no secrets. The rules:

  • Workspace source declares requirements, never secret values.
  • Client code cannot access private runtime facilities.
  • A missing facility fails at boot, not at the first run.

Colony as a host

Colony binds all ten — Postgres pools, object storage, model APIs, channel delivery, provider connectors, durable tasks, sandboxed host tools, the SSE stream that carries sync apply frames, the identity projection behind the organization selector, and runtime configuration keys. See Colony platform for how the managed host wires them.