Intelligence · interface
DecisionChannel
How a decision crosses. The consumer's, because packing and transport are theirs.
Explained in Agents and behaviour.
interface DecisionChannelimport type { DecisionChannel } from '@driftengine/ai';In depth
A command is a tool id, structured arguments and two tick numbers. It is not a simulation
input: inputLog.ts is fixed-width per participant per tick and refuses variable-length payloads
by design, and an agent's decision is exactly the shape it refuses. So this rides whatever
reliable channel the consumer already has.
Methods
replicateDecision
replicateDecision(command: AiCommand): voidAuthority side. Called once per accepted command, never for a floor intent.
| Parameter | Type | Description |
|---|---|---|
command | AiCommand |
drain
drain(into: (command: AiCommand) => void): numberParticipant side. Hand over everything that has arrived since the last call.
| Parameter | Type | Description |
|---|---|---|
into | (command: AiCommand) => void |
More
Returns how many were delivered. Draining rather than a callback registration so the consumer decides when decisions enter the simulation, which on a fixed step must be at a tick boundary.