Skip to main content

TraceStore

Defined in: trace-store.ts:18

Trace storage interface for saving, loading, and querying execution graphs.

Methods​

get()​

get(graphId): Promise<ExecutionGraph | null>

Defined in: trace-store.ts:22

Load a graph by ID. Returns null if not found.

Parameters​

ParameterType
graphIdstring

Returns​

Promise<ExecutionGraph | null>


getReasoningLoops()​

getReasoningLoops(threshold?): Promise<readonly { graphId: string; nodes: ExecutionNode[]; }[]>

Defined in: trace-store.ts:28

Find reasoning loops: consecutive same-type node sequences exceeding threshold.

Parameters​

ParameterType
threshold?number

Returns​

Promise<readonly { graphId: string; nodes: ExecutionNode[]; }[]>


getStuckSpans()​

getStuckSpans(): Promise<ExecutionNode[]>

Defined in: trace-store.ts:26

Find all nodes with stuck status (running/hung/timeout) across all stored traces.

Returns​

Promise<ExecutionNode[]>


list()​

list(opts?): Promise<ExecutionGraph[]>

Defined in: trace-store.ts:24

List all stored graphs, optionally filtered by status.

Parameters​

ParameterType
opts?{ limit?: number; status?: GraphStatus; }
opts.limit?number
opts.status?GraphStatus

Returns​

Promise<ExecutionGraph[]>


save()​

save(graph): Promise<string>

Defined in: trace-store.ts:20

Save a graph to disk. Returns the file path.

Parameters​

ParameterType
graphExecutionGraph

Returns​

Promise<string>