SessionTrace
Portable replay container for an outer harness session.
Class Diagram
Section titled “Class Diagram”---
title: SessionTrace
config:
look: handDrawn
theme: colorful
class:
hideEmptyMembersBox: true
---
classDiagram
class SessionTrace {
+string version
+string runtime
+string promptyVersion
+string sessionId
+SessionEvent[] events
+TurnTrace[] turns
+Checkpoint[] checkpoints
+TrajectoryEvent[] trajectory
+SessionFileRef[] files
+SessionRef[] refs
+SessionSummary summary
}
class SessionEvent {
+string id
+string type
+string timestamp
+string sessionId
+string turnId
+string parentId
+string spanId
+dictionary payload
+RedactionMetadata redaction
}
SessionTrace *-- SessionEvent
class TurnTrace {
+string version
+string runtime
+string promptyVersion
+TurnEvent[] events
+TurnSummary summary
}
SessionTrace *-- TurnTrace
class Checkpoint {
+string id
+string sessionId
+string turnId
+int32 checkpointNumber
+string title
+string overview
+dictionary state
+string summary
+dictionary metadata
+string createdAt
+RedactionMetadata redaction
}
SessionTrace *-- Checkpoint
class TrajectoryEvent {
+string id
+string sessionId
+string turnId
+string toolCallId
+int32 turnIndex
+string eventType
+dictionary data
+string createdAt
+RedactionMetadata redaction
}
SessionTrace *-- TrajectoryEvent
class SessionFileRef {
+string sessionId
+string path
+string toolName
+int32 turnIndex
+string firstSeenAt
}
SessionTrace *-- SessionFileRef
class SessionRef {
+string sessionId
+string refType
+string refValue
+int32 turnIndex
+string createdAt
}
SessionTrace *-- SessionRef
class SessionSummary {
+string sessionId
+string status
+int32 turns
+int32 checkpoints
+TokenUsage usage
+float64 durationMs
}
SessionTrace *-- SessionSummary
Yaml Example
Section titled “Yaml Example”version: "1"runtime: typescriptpromptyVersion: 2.0.0sessionId: sess_abc123Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| version | string | Trace schema version |
| runtime | string | Runtime name that produced the trace |
| promptyVersion | string | Prompty library version that produced the trace |
| sessionId | string | Stable session identifier |
| events | SessionEvent[] | Recorded session events in emission order |
| turns | TurnTrace[] | Recorded turn traces associated with the session |
| checkpoints | Checkpoint[] | Checkpoints created during the session |
| trajectory | TrajectoryEvent[] | Compact trajectory records associated with the session |
| files | SessionFileRef[] | Files observed or touched during the session |
| refs | SessionRef[] | Non-file references observed during the session |
| summary | SessionSummary | Optional summary computed from the event stream |
Composed Types
Section titled “Composed Types”The following types are composed within SessionTrace: