Each StateWeave step records a trace.
export type TraceStep = {
  step: number;
  frameBefore: GraphFrame;
  prompt: string;
  tokenEstimate: { estimatedTokens: number; messageCount: number };
  streamedTokens: string[];
  rawModelOutput: string;
  parsedOps: GraphOp[];
  frameAfter: GraphFrame;
};
The CLI writes traces to:
src/traces/
Use traces to answer:
  • what state did the model receive?
  • what prompt was generated?
  • what tokens streamed back?
  • what graph operations were accepted?
  • how did the state graph change?
For StateWeave graph steps, messageCount is 0. The primitive is graph/frame state, not a message list.