MCPcopy Create free account
hub / github.com/compozy/agh / sessionEventsBundle

Function sessionEventsBundle

internal/cli/session.go:1103–1139  ·  view source on GitHub ↗
(events []SessionEventRecord)

Source from the content-addressed store, hash-verified

1101}
1102
1103func sessionEventsBundle(events []SessionEventRecord) outputBundle {
1104 return listBundle(
1105 events,
1106 events,
1107 "Session Events",
1108 []string{"Seq", sessionTypeValue, sessionAgentValue, "Turn", sessionTimestampValue, "Content"},
1109 "events",
1110 []string{
1111 sessionSequenceKey,
1112 extensionTypeKey,
1113 sessionAgentNameKey,
1114 sessionTurnIDKey,
1115 networkTimestampKey,
1116 memoryContentKey,
1117 },
1118 func(event SessionEventRecord) []string {
1119 return []string{
1120 strconv.FormatInt(event.Sequence, 10),
1121 stringOrDash(event.Type),
1122 stringOrDash(event.AgentName),
1123 stringOrDash(event.TurnID),
1124 stringOrDash(formatTime(event.Timestamp)),
1125 stringOrDash(compactJSON(event.Content)),
1126 }
1127 },
1128 func(event SessionEventRecord) []string {
1129 return []string{
1130 strconv.FormatInt(event.Sequence, 10),
1131 event.Type,
1132 event.AgentName,
1133 event.TurnID,
1134 formatTime(event.Timestamp),
1135 compactJSON(event.Content),
1136 }
1137 },
1138 )
1139}
1140
1141func sessionHistoryBundle(history []TurnHistoryRecord) outputBundle {
1142 flattened := flattenHistory(history)

Callers 2

writeSessionEventsOutputFunction · 0.85

Calls 4

listBundleFunction · 0.85
stringOrDashFunction · 0.85
formatTimeFunction · 0.85
compactJSONFunction · 0.70

Tested by 1