# Type Alias GraphEvent

GraphEvent:
| {
type: "node_started";
nodeId: string;
stepNumber: number;
timestamp: number;
}
| {
type: "node_completed";
nodeId: string;
stepNumber: number;
durationMs: number;
resultKeys: readonly string[];
timestamp: number;
}
| {
type: "node_error";
nodeId: string;
stepNumber: number;
error: string;
timestamp: number;
}
| {
type: "state_updated";
stepNumber: number;
updatedKeys: readonly string[];
timestamp: number;
}
| {
type: "step_completed";
stepNumber: number;
nodesExecuted: number;
timestamp: number;
}
| {
type: "execution_complete";
totalSteps: number;
totalNodes: number;
durationMs: number;
timestamp: number;
}
| {
type: "hook_started";
nodeId: string;
hookName: string;
hookPhase: "precondition"
| "verify";
stepNumber: number;
timestamp: number;
}
| {
type: "hook_completed";
nodeId: string;
hookName: string;
hookPhase: "precondition"
| "verify";
durationMs: number;
stepNumber: number;
timestamp: number;
}
| {
type: "hook_failed";
nodeId: string;
hookName: string;
hookPhase: "precondition"
| "verify";
error: string;
stepNumber: number;
timestamp: number;
}

Discriminated union of graph lifecycle events for streaming observation.

- Defined in packages/nexus-agents/src/orchestration/graph/graph-types.ts:317