Skip to content
PACKAGES

admissionHandoff()

Build a bounded admission-gated hub-to-hub handoff.

The accepted port is a pull-quiet causal boundary: rejected, unmatched and replayed inputs do not preflight downstream work. A first correlated admission is released as one fresh ordinary DIRTY-to-DATA wave. The factory owns every internal lifecycle flag; callers cannot override them.

import { admissionHandoff } from "@graphrefly/ts/patterns";
function admissionHandoff(
graph: Graph,
opts: AdmissionHandoffOptions<T, R>,
): AdmissionHandoffBundle<T, R>
ParameterTypeDescription
graphGraphGraph that owns the visible correlation and release topology.
optsAdmissionHandoffOptions<T, R>Candidate/decision inputs and explicit memory bounds.

The accepted/rejected/status/issue/cursor ports and controller release handle.

import { admissionHandoff } from "@graphrefly/ts/patterns";
const handoff = admissionHandoff(graph, {
candidates,
decisions,
maxPending: 128,
maxRecent: 256,
});

packages/ts/src/patterns/admission-handoff.ts