Intelligence · function

parseEntityRef

Read a reference back, or null when it is not one.

Explained in Agents and behaviour.

function parseEntityRef(ref: string, world: World): Entity | null
import { parseEntityRef } from '@driftengine/ai';

Parameters

ParameterTypeDescription
refstring
worldWorld

In depth

A model inventing an identifier is ordinary rather than exceptional — the parent design's identity constraints say so in words — so this returns rather than throws, and the caller's guard turns it into a refusal.