源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
This commit is contained in:
commit
2ed3415fb7
8018 files changed
+1936476
No files matched your search
@@ -0,0 +1,48 @@
|
||||
package agentruntime
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
activityshared "github.com/tutti-os/tutti/packages/agent/daemon/activity/events"
|
||||
)
|
||||
|
||||
type agentSubmitRuntimeEventSummary struct {
|
||||
batchCount int
|
||||
activityEventCount int
|
||||
eventTypeCounts map[string]int
|
||||
lastSessionStatus string
|
||||
lastTurnPhase string
|
||||
}
|
||||
|
||||
func (s *agentSubmitRuntimeEventSummary) observe(events []activityshared.Event, session Session) {
|
||||
if len(events) == 0 {
|
||||
return
|
||||
}
|
||||
s.batchCount++
|
||||
s.activityEventCount += len(events)
|
||||
if s.eventTypeCounts == nil {
|
||||
s.eventTypeCounts = make(map[string]int)
|
||||
}
|
||||
for _, event := range events {
|
||||
eventType := strings.TrimSpace(string(event.Type))
|
||||
if eventType == "" {
|
||||
eventType = "unknown"
|
||||
}
|
||||
s.eventTypeCounts[eventType]++
|
||||
}
|
||||
s.lastSessionStatus = strings.TrimSpace(string(session.Status))
|
||||
s.lastTurnPhase = strings.TrimSpace(turnLifecyclePhaseFromEvents(events))
|
||||
}
|
||||
|
||||
func (s agentSubmitRuntimeEventSummary) log(event string, session Session, turnID string, metadata map[string]any) {
|
||||
if s.batchCount == 0 {
|
||||
return
|
||||
}
|
||||
logAgentSubmitTrace(event, session, turnID, metadata, map[string]any{
|
||||
"activity_event_count": s.activityEventCount,
|
||||
"emit_batch_count": s.batchCount,
|
||||
"event_type_counts": s.eventTypeCounts,
|
||||
"session_status": s.lastSessionStatus,
|
||||
"turn_phase": s.lastTurnPhase,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user