HeadlessHostOptions
What createHeadlessCanvasHost mounts and the services it hands each environment.
@internote/canvas-sdk/hostOn this page
import { HeadlessHostOptions } from '@internote/canvas-sdk/host';#Fields
assetsThe document's uploaded image assets, file name to public URL, or
null while the manifest is still arriving. Handed to each environment as ctx.assets.Record<string, string> | nullauthoringWhether the document is open in its author's editor. A scene then says in words what it is waiting for; a reader gets a quieter sign.
booleanclockThe clock the step controllers read, in milliseconds. A test passes a manual one.
() => numbercontinuesThe host this one replaces for the SAME document, rebuilt because a file or asset manifest arrived. Each scene carries on its old step timeline rather than starting a fresh one, so the reader's animation goes on where it was. Absent, every timeline starts at its creation.
HeadlessCanvasHost | nulldataFetchedAtWhen each URL dataset's response in
files was fetched, by URL (D74), so a footer can say the data is a fixed copy and how old it is.Record<string, string> | nulldataPendingThe URLs whose responses are on their way, so a scene drawing one can say it is waiting.
readonly string[] | nulldbThe durable store for environments declaring
session+db. A store that keeps nothing when absent.KeyValueStoragedocumentThe compiled and refined document.
data holds the @data datasets: an inline dataset arrives with its columns and rows, an attached one with only a src file name, since the compiler does not inline an attachment's rows.{ body?: unknown; data?: Record<string, ChalkDataset> }environmentsThe environments to register before mounting. Registering the same definition object again is a no-op.
EnvironmentDefinition[]filesThe document's uploaded text files by name, where an attached dataset's CSV and a boundary
.geojson are both found. Attached CSVs are folded into the datasets here; other files reach each environment as ctx.files.Record<string, string> | nullinternoteIdThe document's id, the first part of every environment's session key.
stringDefault
'headless'interpolationsHow keyframed values blend. The shared built-in registry when absent; every environment's own interpolators are registered into it.
InterpolationRegistryrunnerThe code execution service for environments that run programs. Running is unavailable when absent.
CodeRunnerseedSession state to start from: another host's
SessionStore.snapshot of the same document. Every environment and scene begins where it stood there — a switch thrown, a parameter moved — rather than at rest.Readonly<Record<string, unknown>> | nullsourceThe chalk source, when available, which sharpens semantic diagnostics.
stringstillDraw a still picture: every environment's context says so, and nothing plays on its own. For an exported figure.
booleanDeclared in packages/canvas-sdk/src/host/headless.ts:51.