English
core/charts/bindings.ts
Generated from the exports of core/charts/bindings.ts · npm run docs:gen
A chart with its needs bound (docs/standards/alta-chart-0.1.md, "Needs"): what the install plan, the guard loop and the agent's files read once the player's providers are known. The sign-ins, proofs and repairs of a provider come from its row of the closed table (core/charts/needs.ts), never from the chart; a chart that names "need:mind" never learns which provider it is. Pure: no disk, no network.
Standards that cite this file: alta.chart/0.1: the Agent Chart
Exports
ExpandOptions interface
ts
interface ExpandOptions {
/**
* Does this chart carry the alive proof and the repairs of a provider? Once per world: the chart `alta-os` carries
* those of the providers it binds; another chart carries only a provider `alta-os` does not bind. Default: yes.
*/
carries?: (provider: string) => boolean;
}connects function
Does a binding still need its provider connected (a sign-in step)?
ts
function connects(b: Binding): booleanexpandChart function
The chart as installed with these bindings: each need proof becomes its provider's proof, need:<id> in a part's requires becomes the provider's sign-in (when it must be connected), agents get the provider as a pinned channel, the generated sign-ins, alive proofs and repairs are added. The needs stay: their services are generated from them.
ts
function expandChart(c: Chart, bindings: Record<string, Binding>, o: ExpandOptions = {}): ChartwithBindings const
The chosen values of a release with its bindings ("need:<id>" → provider).
ts
const withBindings = (values: Record<string, unknown>, b: Record<string, Binding>) => …bindingIds const
Bindings as kept in a release record (need id → provider), and back.
ts
const bindingIds = (b: Record<string, Binding>): Record<string, string> => …