@oona/vlo / host / HostContext
Interface: HostContext
Defined in: sdk/ts/sdk/src/host/context.ts:96
The shared state every host function takes as its first argument. Built by createHost.
Properties
activities
activities:
Map<string,ActivityRegistration>
Defined in: sdk/ts/sdk/src/host/context.ts:110
Registered activities by name.
auth
auth:
AuthConfig
Defined in: sdk/ts/sdk/src/host/context.ts:118
Credentials this host checks and sends.
basePath?
optionalbasePath?:string
Defined in: sdk/ts/sdk/src/host/context.ts:127
Path prefix this host is mounted under, normalised to /api/vlo. The router strips it before matching and every URL built from publicUrl carries it.
blob
blob:
BlobStore
Defined in: sdk/ts/sdk/src/host/context.ts:100
Where payloads over the inline limit are offloaded.
drain?
optionaldrain?: (options?) =>Promise<DrainResult>
Defined in: sdk/ts/sdk/src/host/context.ts:140
Ticks until idle. Present only when this process holds the orchestrator role.
Parameters
options?
Returns
Promise<DrainResult>
events
events:
EventEmitter
Defined in: sdk/ts/sdk/src/host/context.ts:134
In-memory side channel. emit carries cmd.emit payloads, warning carries the dispatcher's, and task_scheduled wakes a long-poll the moment a task is written.
inProcess
inProcess:
InProcessTracker
Defined in: sdk/ts/sdk/src/host/context.ts:142
In-process handlers still owing a result; drain waits on it between passes.
journal
journal:
Journal
Defined in: sdk/ts/sdk/src/host/context.ts:98
Durable state and task queue.
kernel
kernel:
Kernel
Defined in: sdk/ts/sdk/src/host/context.ts:102
The wasm kernel. A proxy that throws until start() has loaded it.
kick
kick: () =>
void
Defined in: sdk/ts/sdk/src/host/context.ts:136
Set when this process holds the orchestrator role.
Returns
void
namespace
namespace:
string
Defined in: sdk/ts/sdk/src/host/context.ts:106
Namespace new runs are created in.
now
now: () =>
number
Defined in: sdk/ts/sdk/src/host/context.ts:104
Clock for journaled timestamps, epoch milliseconds.
Returns
number
publicUrl?
optionalpublicUrl?:string
Defined in: sdk/ts/sdk/src/host/context.ts:122
Base URL other processes can reach this host on; fills complete_url on a push.
queues
queues:
Record<string,QueueConfig>
Defined in: sdk/ts/sdk/src/host/context.ts:116
Per-queue delivery configuration.
roles
roles:
ReadonlySet<Role>
Defined in: sdk/ts/sdk/src/host/context.ts:120
Roles this process holds.
signals
signals:
Map<string,SignalRegistration>
Defined in: sdk/ts/sdk/src/host/context.ts:112
Registered signals by name.
streamPollMs
streamPollMs:
number
Defined in: sdk/ts/sdk/src/host/context.ts:129
How often an open SSE stream looks for new journal events.
tick?
optionaltick?: () =>Promise<TickCounts>
Defined in: sdk/ts/sdk/src/host/context.ts:138
One dispatcher pass. Present only when this process holds the orchestrator role.
Returns
Promise<TickCounts>
workers
workers:
Worker[]
Defined in: sdk/ts/sdk/src/host/context.ts:114
Workers this process runs in-process, by the queues they serve.
workflows
workflows:
Map<string,Workflow<unknown,unknown>>
Defined in: sdk/ts/sdk/src/host/context.ts:108
Registered workflows by name.