Skip to content
PACKAGES

effectRunCompletionProjector()

Creates an effect run completion projector.

import { effectRunCompletionProjector } from "@graphrefly/ts/orchestration";
function effectRunCompletionProjector(
graph: Graph,
opts: {
readonly name?: string;
readonly effectRuns: Node<EffectRun>;
readonly decisions?: readonly Node<AgentDecision>[];
readonly requestStatuses?: readonly Node<AgentRequestStatusChanged>[];
readonly requestFacts?: readonly Node<AgentRequestFact>[];
readonly resultCandidates?: readonly Node<EffectRunResult>[];
readonly now?: () => number;
},
): EffectRunCompletionBundle
ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
opts{ readonly name?: string; readonly effectRuns: Node<EffectRun>; readonly decisions?: readonly Node<AgentDecision>[]; readonly requestStatuses?: readonly Node<AgentRequestStatusChanged>[]; readonly requestFacts?: readonly Node<AgentRequestFact>[]; readonly resultCandidates?: readonly Node<EffectRunResult>[]; readonly now?: () => number; }Options that configure the helper.

A node bundle that emits the projected records.

import { effectRunCompletionProjector } from "@graphrefly/ts/orchestration";

packages/ts/src/orchestration/agent-runtime-effect-completion.ts