feat(trace): waterfall visualization + persona YAML sync
- trace.Logger: Trace+Span model with 14+ hop tracking - trace.SpanTimer: convenience API for instrumentation - trace_adapter.go: serialize Trace+Span for frontend - Frontend TracePage: colored waterfall bars, expand/collapse, detail popup - persona.go: full v1 YAML parser (identity/traits/forbidden/sections) - cyrene_persona.yaml: v1 persona config copied to v2 - Orchestrator: TraceHook + MemoryExtractor injection points
This commit is contained in:
1 parent
47047c903c
commit
4e2e81f684
8 files changed
+1178
-198
No files matched your search
@@ -281,21 +281,6 @@ func pluginNamesToMap(names []string) []map[string]string {
|
||||
return result
|
||||
}
|
||||
|
||||
// traceAdapter adapts trace.Logger to api.TraceLogger interface.
|
||||
type traceAdapter struct{ *tracepkg.Logger }
|
||||
func (a *traceAdapter) Recent(n int) []map[string]any {
|
||||
events := a.Logger.Recent(n)
|
||||
result := make([]map[string]any, len(events))
|
||||
for i, e := range events {
|
||||
result[i] = map[string]any{
|
||||
"id": e.ID, "timestamp": e.Timestamp.Format(time.RFC3339),
|
||||
"hop": e.Hop, "label": e.Label, "status": e.Status,
|
||||
"duration_ms": e.DurationMs, "detail": e.Detail, "data": e.Data,
|
||||
}
|
||||
if result[i]["data"] == nil { result[i]["data"] = map[string]any{} }
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// perfAdapter adapts perf.Monitor to api.PerfMonitor interface.
|
||||
type perfAdapter struct{ *perfpkg.Monitor }
|
||||
|
||||
Reference in new issue
Block a user