The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
add recurring sessions, fix dashboard branding
Justin D'Souza2e8414e2a017
diff --git a/cli/beacon/internal/endpoint/dashboard/events.go b/cli/beacon/internal/endpoint/dashboard/events.goindex e8d8dd38..e131a8b2 100644--- a/cli/beacon/internal/endpoint/dashboard/events.go+++ b/cli/beacon/internal/endpoint/dashboard/events.go@@ -71,7 +71,7 @@ func ReadEvents(path string, query EventQuery) (EventResult, error) {limit := normalizeLimit(query.Limit)state := normalizeSessionState(query.SessionState)query.SessionState = state- if state != "" {+ if state != "" && query.sessionStateIDs == nil {ids, err := sessionIDsForState(path, query, state)if err != nil {return EventResult{}, err@@ -193,20 +193,47 @@ func streamSource(source eventSource, fn func(schema.Event) error) error {}type sessionStateStats struct {- lifecycleEvents int- nonLifecycleEvents int- capturedPrompts int+ hasVisibleActivity bool+ prompt string+ promptAt time.Time+ harness string+ harnessAt time.Time+ repository string+ repositoryAt time.Time+ user string+ userAt time.Time+}++type sessionClassification struct {+ state string+ recurrenceCount int}func sessionIDsForState(path string, query EventQuery, state string) (map[string]bool, error) {+ classifications, err := classifySessions(path, query)+ if err != nil {+ return nil, err+ }+ ids := map[string]bool{}+ for id, classification := range classifications {+ if classification.state == state {+ ids[id] = true+ }+ }+ return ids, nil+}++// classifySessions assigns one mutually exclusive category to every session active+// in the selected time window. Recurrence is computed over that complete set before+// any event or session result limit is applied.+func classifySessions(path string, query EventQuery) (map[string]sessionClassification, error) {// Session state is a property of the whole session, not the filtered slice.- // Use only time bounds and session/harness scope so content filters- // (category, action, search, etc.) do not affect the classification.+ // Only the selected time window scopes recurrence. The owner is part of the+ // recurrence key; content, harness and individual-session filters must not+ // change a group's classification or count.stateQuery := EventQuery{- Since: query.Since,- Until: query.Until,- Harness: query.Harness,- Session: query.Session,+ Since: query.Since,+ Until: query.Until,}stats := map[string]*sessionStateStats{}for _, source := range eventSources(path) {@@ -214,14 +241,28 @@ func sessionIDsForState(path string, query EventQuery, state string) (map[stringreturn nil, err}}- ids := map[string]bool{}+ groupCounts := map[string]int{}+ groupKeys := map[string]string{}for id, stat := range stats {- empty := isEmptySession(stat)- if (state == "empty" && empty) || (state == "captured" && !empty) {- ids[id] = true+ if stat.prompt == "" {+ continue}+ key := recurrenceGroupKey(stat)+ groupKeys[id] = key+ groupCounts[key]++}- return ids, nil+ classifications := make(map[string]sessionClassification, len(stats))+ for id, stat := range stats {+ classification := sessionClassification{state: "captured"}+ if !stat.hasVisibleActivity {+ classification.state = "empty"+ } else if key := groupKeys[id]; key != "" && groupCounts[key] >= 2 {+ classification.state = "recurring"+ classification.recurrenceCount = groupCounts[key]+ }+ classifications[id] = classification+ }+ return classifications, nil}func collectSessionStateStats(source eventSource, query EventQuery, stats map[string]*sessionStateStats) error {@@ -265,30 +306,55 @@ func collectSessionStateStats(source eventSource, query EventQuery, stats map[ststat = &sessionStateStats{}stats[event.Session.ID] = stat}- if hasCapturedPromptText(event) {- stat.capturedPrompts+++ if prompt := strings.TrimSpace(promptText(event)); prompt != "" && (stat.prompt == "" || eventComesBefore(parsed, stat.promptAt)) {+ stat.prompt = prompt+ stat.promptAt = parsed}- if isLifecycleSessionEvent(event) {- stat.lifecycleEvents++- } else {- stat.nonLifecycleEvents+++ if harness := strings.TrimSpace(event.Harness.Name); harness != "" && (stat.harness == "" || eventComesBefore(parsed, stat.harnessAt)) {+ stat.harness = harness+ stat.harnessAt = parsed+ }+ if repository := strings.TrimSpace(event.Repository); repository != "" && (stat.repository == "" || eventComesBefore(parsed, stat.repositoryAt)) {+ stat.repository = repository+ stat.repositoryAt = parsed+ }+ if user := normalizedSessionUser(event); user != "" && (stat.user == "" || eventComesBefore(parsed, stat.userAt)) {+ stat.user = user+ stat.userAt = parsed+ }+ if !isInternalSessionEvent(event) {+ stat.hasVisibleActivity = true}}return scanner.Err()}-func isEmptySession(stat *sessionStateStats) bool {- return stat != nil && stat.capturedPrompts == 0 && stat.lifecycleEvents > 0 && stat.nonLifecycleEvents == 0+func eventComesBefore(candidate, current time.Time) bool {+ return !candidate.IsZero() && (current.IsZero() || candidate.Before(current))}-func hasCapturedPromptText(event schema.Event) bool {- if !isPromptEvent(event) {- return false+func recurrenceGroupKey(stat *sessionStateStats) string {+ return strings.Join([]string{+ normalizeComparisonValue(stat.user),+ normalizeComparisonValue(stat.prompt),+ normalizeComparisonValue(asymptoteobserve.NormalizeHarnessName(stat.harness)),+ normalizeComparisonValue(stat.repository),+ }, "\x00")+}++func normalizeComparisonValue(value string) string {+ return strings.ToLower(strings.TrimSpace(value))+}++func normalizedSessionUser(event schema.Event) string {+ if uid := normalizeComparisonValue(event.User.UID); uid != "" {+ return "uid:" + uid}- if event.Prompt != nil && strings.TrimSpace(event.Prompt.Text) != "" {- return true+ if name := normalizeComparisonValue(event.User.Name); name != "" {+ return "name:" + name}- return strings.TrimSpace(rawString(event.Raw, "first_prompt")) != ""+ // Empty is the consistent identity for events without an owner in this local scope.+ return ""}func isPromptEvent(event schema.Event) bool {@@ -308,6 +374,24 @@ func isLifecycleSessionEvent(event schema.Event) bool {return false}+func isInternalSessionEvent(event schema.Event) bool {+ if isLifecycleSessionEvent(event) {+ return true+ }+ category := strings.ToLower(strings.TrimSpace(event.Event.Category))+ switch category {+ case "inventory", "validation", "metric":+ return true+ }+ action := strings.ToLower(strings.TrimSpace(event.Event.Action))+ for _, prefix := range []string{"inventory.", "validation.", "metric.", "endpoint.", "telemetry."} {+ if strings.HasPrefix(action, prefix) {+ return true+ }+ }+ return false+}+func normalizedLifecycleValue(value string) string {replacer := strings.NewReplacer(".", " ", "_", " ", "-", " ")return strings.Join(strings.Fields(strings.ToLower(replacer.Replace(strings.TrimSpace(value)))), " ")@@ -319,6 +403,8 @@ func normalizeSessionState(value string) string {return "empty"case "captured":return "captured"+ case "recurring":+ return "recurring"default:return ""}diff --git a/cli/beacon/internal/endpoint/dashboard/events_test.go b/cli/beacon/internal/endpoint/dashboard/events_test.goindex bb246b02..c1d044e9 100644--- a/cli/beacon/internal/endpoint/dashboard/events_test.go+++ b/cli/beacon/internal/endpoint/dashboard/events_test.go@@ -6,6 +6,8 @@ import ("net/http/httptest""os""path/filepath"+ "reflect"+ "strings""testing""time"@@ -413,6 +415,197 @@ func TestReadSessionsCountsEachEventInOneActivityCategory(t *testing.T) {}}+func TestRecurringSessionsNormalizePromptHarnessAndRepository(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ events := []schema.Event{+ recurringTestEvent("2026-05-13T01:00:00Z", "session-a", " Investigate The Dashboard ", " Claude ", " Repo-A ", "Alice"),+ recurringTestEvent("2026-05-13T01:01:00Z", "session-b", "investigate the dashboard", "claude_code", "repo-a", " alice "),+ }+ writeTestLog(t, path, marshalEvents(t, events...)...)++ result, err := ReadSessions(path, EventQuery{Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ for _, session := range result.Sessions {+ if !session.IsRecurring || session.RecurrenceCount != 2 {+ t.Fatalf("session %#v, want recurring count 2", session)+ }+ }+}++func TestRecurringSessionsRequireSameRepositoryAndHarness(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ events := []schema.Event{+ recurringTestEvent("2026-05-13T01:00:00Z", "base", "same prompt", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T01:01:00Z", "other-repo", "same prompt", "cursor", "repo-b", "alice"),+ recurringTestEvent("2026-05-13T01:02:00Z", "other-harness", "same prompt", "codex_cli", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T01:03:00Z", "other-user", "same prompt", "cursor", "repo-a", "bob"),+ }+ writeTestLog(t, path, marshalEvents(t, events...)...)++ result, err := ReadSessions(path, EventQuery{Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ for _, session := range result.Sessions {+ if session.IsRecurring || session.RecurrenceCount != 0 {+ t.Fatalf("session %#v must not recur across repository or harness", session)+ }+ }+}++func TestRecurringSessionsExcludeMissingAndBlankPrompts(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ missing := recurringTestEvent("2026-05-13T01:00:00Z", "missing", "", "cursor", "repo-a", "alice")+ missing.Prompt = nil+ missing.Message = ""+ blank := recurringTestEvent("2026-05-13T01:01:00Z", "blank", " \t ", "cursor", "repo-a", "alice")+ writeTestLog(t, path, marshalEvents(t, missing, blank)...)++ result, err := ReadSessions(path, EventQuery{Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ for _, session := range result.Sessions {+ if session.IsRecurring || session.RecurrenceCount != 0 {+ t.Fatalf("session %#v with no captured prompt must not recur", session)+ }+ }+}++func TestRecurringSessionsCompareMissingHarnessAndRepositoryConsistently(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ events := []schema.Event{+ recurringTestEvent("2026-05-13T01:00:00Z", "session-a", "same prompt", "", "", "alice"),+ recurringTestEvent("2026-05-13T01:01:00Z", "session-b", "same prompt", " ", " ", "alice"),+ }+ writeTestLog(t, path, marshalEvents(t, events...)...)++ result, err := ReadSessions(path, EventQuery{Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ for _, session := range result.Sessions {+ if !session.IsRecurring || session.RecurrenceCount != 2 {+ t.Fatalf("session %#v, want missing harness/repository recurring count 2", session)+ }+ }+}++func TestRecurringSessionsCountsTwoAndMoreOccurrences(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ events := []schema.Event{+ recurringTestEvent("2026-05-13T01:00:00Z", "pair-a", "pair", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T01:01:00Z", "pair-b", "pair", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T02:00:00Z", "triple-a", "triple", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T02:01:00Z", "triple-b", "triple", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T02:02:00Z", "triple-c", "triple", "cursor", "repo-a", "alice"),+ }+ writeTestLog(t, path, marshalEvents(t, events...)...)++ result, err := ReadSessions(path, EventQuery{Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ for _, session := range result.Sessions {+ want := 2+ if strings.HasPrefix(session.ID, "triple-") {+ want = 3+ }+ if !session.IsRecurring || session.RecurrenceCount != want {+ t.Fatalf("session %q recurrence = %t/%d, want true/%d", session.ID, session.IsRecurring, session.RecurrenceCount, want)+ }+ }+}++func TestRecurringSessionsRespectInclusiveDateRange(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ events := []schema.Event{+ recurringTestEvent("2026-05-13T09:59:59Z", "before", "bounded", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T10:00:00Z", "lower-bound", "bounded", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T11:00:00Z", "upper-bound", "bounded", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T11:00:01Z", "after", "bounded", "cursor", "repo-a", "alice"),+ }+ writeTestLog(t, path, marshalEvents(t, events...)...)+ since, _ := time.Parse(time.RFC3339, "2026-05-13T10:00:00Z")+ until, _ := time.Parse(time.RFC3339, "2026-05-13T11:00:00Z")++ result, err := ReadSessions(path, EventQuery{Since: since, Until: until, Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ if result.TotalSessions != 2 {+ t.Fatalf("total sessions = %d, want the two boundary sessions", result.TotalSessions)+ }+ for _, session := range result.Sessions {+ if !session.IsRecurring || session.RecurrenceCount != 2 {+ t.Fatalf("boundary session %#v, want recurring count 2", session)+ }+ }+}++func TestRecurringClassificationPrecedesResultLimit(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ events := []schema.Event{+ recurringTestEvent("2026-05-13T01:00:00Z", "session-a", "limited", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T01:01:00Z", "session-b", "limited", "cursor", "repo-a", "alice"),+ recurringTestEvent("2026-05-13T01:02:00Z", "session-c", "limited", "cursor", "repo-a", "alice"),+ }+ writeTestLog(t, path, marshalEvents(t, events...)...)++ result, err := ReadSessions(path, EventQuery{SessionState: "recurring", Limit: 1})+ if err != nil {+ t.Fatalf("ReadSessions returned error: %v", err)+ }+ if result.TotalSessions != 3 || len(result.Sessions) != 1 || !result.Truncated {+ t.Fatalf("limited result = total %d returned %d truncated %t, want 3/1/true", result.TotalSessions, len(result.Sessions), result.Truncated)+ }+ if !result.Sessions[0].IsRecurring || result.Sessions[0].RecurrenceCount != 3 {+ t.Fatalf("limited row %#v, want recurring count 3", result.Sessions[0])+ }++ filtered, err := ReadSessions(path, EventQuery{SessionState: "recurring", Session: "session-a", Limit: 1})+ if err != nil {+ t.Fatalf("ReadSessions filtered to one group member returned error: %v", err)+ }+ if filtered.TotalSessions != 1 || filtered.Sessions[0].RecurrenceCount != 3 {+ t.Fatalf("filtered row = total %d %#v, want one row with group count 3", filtered.TotalSessions, filtered.Sessions)+ }+}++func TestSessionClassificationsAreMutuallyExclusive(t *testing.T) {+ path := filepath.Join(t.TempDir(), "runtime.jsonl")+ recurringA := recurringTestEvent("2026-05-13T01:00:00Z", "recurring-a", "repeat", "cursor", "repo-a", "alice")+ recurringB := recurringTestEvent("2026-05-13T01:01:00Z", "recurring-b", "repeat", "cursor", "repo-a", "alice")+ captured := recurringTestEvent("2026-05-13T01:02:00Z", "captured", "unique", "cursor", "repo-a", "alice")+ emptyLifecycle := testSchemaEvent("2026-05-13T01:03:00Z", "cursor", "session.started", "session", "repo-a")+ emptyLifecycle.Session = &schema.SessionInfo{ID: "empty-lifecycle"}+ emptyMetric := testSchemaEvent("2026-05-13T01:04:00Z", "cursor", "token.usage", "metric", "repo-a")+ emptyMetric.Session = &schema.SessionInfo{ID: "empty-metric"}+ writeTestLog(t, path, marshalEvents(t, recurringA, recurringB, captured, emptyLifecycle, emptyMetric)...)++ want := map[string]map[string]bool{+ "recurring": {"recurring-a": true, "recurring-b": true},+ "captured": {"captured": true},+ "empty": {"empty-lifecycle": true, "empty-metric": true},+ "": {"recurring-a": true, "recurring-b": true, "captured": true, "empty-lifecycle": true, "empty-metric": true},+ }+ for state, wantIDs := range want {+ result, err := ReadSessions(path, EventQuery{SessionState: state, Limit: 10})+ if err != nil {+ t.Fatalf("ReadSessions state %q returned error: %v", state, err)+ }+ got := map[string]bool{}+ for _, session := range result.Sessions {+ got[session.ID] = true+ }+ if !reflect.DeepEqual(got, wantIDs) {+ t.Fatalf("state %q sessions = %#v, want %#v", state, got, wantIDs)+ }+ }+}+func TestHandlerSessionDetailReturnsRawEventsInTimelineOrder(t *testing.T) {path := filepath.Join(t.TempDir(), "runtime.jsonl")events := []schema.Event{@@ -658,6 +851,14 @@ func testSchemaEvent(ts, harness, action, category, repo string) schema.Event {}}+func recurringTestEvent(ts, id, prompt, harness, repo, user string) schema.Event {+ event := testSchemaEvent(ts, harness, "prompt.submitted", "prompt", repo)+ event.Session = &schema.SessionInfo{ID: id}+ event.Prompt = &schema.PromptInfo{Text: prompt}+ event.User = schema.UserInfo{Name: user}+ return event+}+func marshalEvents(t *testing.T, events ...schema.Event) [][]byte {t.Helper()lines := make([][]byte, 0, len(events))diff --git a/cli/beacon/internal/endpoint/dashboard/server_test.go b/cli/beacon/internal/endpoint/dashboard/server_test.goindex 29ae808f..8e66afce 100644--- a/cli/beacon/internal/endpoint/dashboard/server_test.go+++ b/cli/beacon/internal/endpoint/dashboard/server_test.go@@ -632,15 +632,15 @@ func TestStaticDashboardPagesServe(t *testing.T) {path stringwant string}{- {path: "/", want: "Beacon Endpoint Agent Activity"},- {path: "/session.html", want: "Beacon Endpoint Session Events"},- {path: "/overview.html", want: "Beacon Endpoint Agent Activity"},- {path: "/tokens.html", want: "Beacon Endpoint Token Usage"},- {path: "/memory.html", want: "Beacon Memory"},- {path: "/detections.html", want: "Beacon Endpoint Detections"},- {path: "/findings.html", want: "Beacon Endpoint Findings"},- {path: "/inventory.html", want: "Beacon Endpoint Agent Inventory"},- {path: "/inventory-hooks.html", want: "Beacon Endpoint Agent Inventory"},+ {path: "/", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/session.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/overview.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/tokens.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/memory.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/detections.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/findings.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/inventory.html", want: "Beacon | Self‑improving memory for coding agents"},+ {path: "/inventory-hooks.html", want: "Beacon | Self‑improving memory for coding agents"},}for _, tc := range cases {t.Run(tc.path, func(t *testing.T) {@@ -653,6 +653,9 @@ func TestStaticDashboardPagesServe(t *testing.T) {if !strings.Contains(rec.Body.String(), tc.want) {t.Fatalf("body did not contain %q", tc.want)}+ if !strings.Contains(rec.Body.String(), `href="/favicon.svg"`) {+ t.Fatal("body did not reference the Beacon favicon")+ }if count := strings.Count(rec.Body.String(), `href="/memory.html"`); count != 1 {t.Fatalf("memory nav link count = %d, want 1", count)}diff --git a/cli/beacon/internal/endpoint/dashboard/sessions.go b/cli/beacon/internal/endpoint/dashboard/sessions.goindex 3177f955..e23a3a60 100644--- a/cli/beacon/internal/endpoint/dashboard/sessions.go+++ b/cli/beacon/internal/endpoint/dashboard/sessions.go@@ -9,27 +9,29 @@ import ()type SessionRecord struct {- ID string `json:"id"`- FirstEventAt string `json:"first_event_at,omitempty"`- LastEventAt string `json:"last_event_at,omitempty"`- EventCount int `json:"event_count"`- ReviewCount int `json:"review_count"`- MaxSeverity string `json:"max_severity,omitempty"`- Harness string `json:"harness,omitempty"`- Model string `json:"model,omitempty"`- Repository string `json:"repository,omitempty"`- Branch string `json:"branch,omitempty"`- WorkingDir string `json:"working_directory,omitempty"`- OriginalPrompt string `json:"original_prompt,omitempty"`- LastAction string `json:"last_action,omitempty"`- LastMessage string `json:"last_message,omitempty"`- LastArtifact string `json:"last_artifact,omitempty"`- CommandCount int `json:"command_count"`- FileCount int `json:"file_count"`- MCPCount int `json:"mcp_count"`- ApprovalCount int `json:"approval_count"`- PromptCount int `json:"prompt_count"`- ToolCount int `json:"tool_count"`+ ID string `json:"id"`+ FirstEventAt string `json:"first_event_at,omitempty"`+ LastEventAt string `json:"last_event_at,omitempty"`+ EventCount int `json:"event_count"`+ ReviewCount int `json:"review_count"`+ MaxSeverity string `json:"max_severity,omitempty"`+ Harness string `json:"harness,omitempty"`+ Model string `json:"model,omitempty"`+ Repository string `json:"repository,omitempty"`+ Branch string `json:"branch,omitempty"`+ WorkingDir string `json:"working_directory,omitempty"`+ OriginalPrompt string `json:"original_prompt,omitempty"`+ LastAction string `json:"last_action,omitempty"`+ LastMessage string `json:"last_message,omitempty"`+ LastArtifact string `json:"last_artifact,omitempty"`+ CommandCount int `json:"command_count"`+ FileCount int `json:"file_count"`+ MCPCount int `json:"mcp_count"`+ ApprovalCount int `json:"approval_count"`+ PromptCount int `json:"prompt_count"`+ ToolCount int `json:"tool_count"`+ IsRecurring bool `json:"is_recurring"`+ RecurrenceCount int `json:"recurrence_count"`}type SessionResult struct {@@ -60,6 +62,20 @@ type SessionDetail struct {func ReadSessions(path string, query EventQuery) (SessionResult, error) {limit := normalizeLimit(query.Limit)+ classifications, err := classifySessions(path, query)+ if err != nil {+ return SessionResult{}, err+ }+ state := normalizeSessionState(query.SessionState)+ query.SessionState = state+ if state != "" {+ query.sessionStateIDs = map[string]bool{}+ for id, classification := range classifications {+ if classification.state == state {+ query.sessionStateIDs[id] = true+ }+ }+ }query.NoLimit = trueevents, err := ReadEvents(path, query)if err != nil {@@ -80,7 +96,11 @@ func ReadSessions(path string, query EventQuery) (SessionResult, error) {acc.add(record)}sessions := make([]SessionRecord, 0, len(byID))- for _, acc := range byID {+ for id, acc := range byID {+ if classification := classifications[id]; classification.state == "recurring" {+ acc.record.IsRecurring = true+ acc.record.RecurrenceCount = classification.recurrenceCount+ }sessions = append(sessions, acc.record)}sort.SliceStable(sessions, func(i, j int) bool {diff --git a/cli/beacon/internal/endpoint/dashboard/static/app.js b/cli/beacon/internal/endpoint/dashboard/static/app.jsindex 4fa8fbbc..1d711b4f 100644--- a/cli/beacon/internal/endpoint/dashboard/static/app.js+++ b/cli/beacon/internal/endpoint/dashboard/static/app.js@@ -798,9 +798,11 @@ const inventoryViewLabels = {const inventoryRuntimeLogos = {antigravity: "/runtime-logos/antigravity.png",antigravity_cli: "/runtime-logos/antigravity.png",+ chatgpt_web: "/runtime-logos/chatgpt.svg",claude: "/runtime-logos/claude-code.png",claude_code: "/runtime-logos/claude-code.png",claude_cowork: "/runtime-logos/claude-code.png",+ claude_web: "/runtime-logos/claude-code.png",cline: "/runtime-logos/cline.png",cline_cli: "/runtime-logos/cline.png",codex: "/runtime-logos/codex.png",@@ -1595,6 +1597,7 @@ function sessionRowHTML(session) {<td class="col-message"><span class="session-list-prompt">${models.length ? `<strong class="session-list-prompt-model">${models.map(escapeHTML).join(" · ")}</strong>` : ""}+ ${session.is_recurring ? `<strong class="session-recurring-indicator">Recurring ×${escapeHTML(session.recurrence_count)}</strong>` : ""}<span>${prompt}</span></span></td>@@ -2328,9 +2331,11 @@ function renderDatalist(id, values) {function harnessLabel(value) {const labels = {+ chatgpt_web: "ChatGPT Web",cline: "Cline",cursor: "Cursor",claude_code: "Claude Code",+ claude_web: "Claude Web",codex_cli: "Codex CLI",codex_desktop: "Codex Desktop",copilot_cli: "GitHub Copilot CLI",diff --git a/cli/beacon/internal/endpoint/dashboard/static/detections.html b/cli/beacon/internal/endpoint/dashboard/static/detections.htmlindex 4cbfe5a0..f8478e87 100644--- a/cli/beacon/internal/endpoint/dashboard/static/detections.html+++ b/cli/beacon/internal/endpoint/dashboard/static/detections.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Detections</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="detections">diff --git a/cli/beacon/internal/endpoint/dashboard/static/favicon.svg b/cli/beacon/internal/endpoint/dashboard/static/favicon.svgnew file mode 100644index 00000000..0a22002c--- /dev/null+++ b/cli/beacon/internal/endpoint/dashboard/static/favicon.svg@@ -0,0 +1,3 @@+<svg width="200" height="200" viewBox="21 20 200 200" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Beacon">+ <path d="M182.194 156.596C152.215 156.596 127.94 180.244 127.939 210.23V210.525H114.234V210.23H114.257C114.257 180.244 89.9597 156.596 60.0029 156.596V126.709C89.9595 126.709 114.256 150.357 114.257 180.343H114.234V180.639H127.939V180.343C127.94 150.357 152.215 126.709 182.194 126.709V156.596ZM127.96 30.2949H127.938C127.938 60.281 152.235 83.9295 182.191 83.9297V113.816C152.235 113.816 127.938 90.1685 127.938 60.1826H127.96V59.8867H114.255V60.1826C114.255 90.1687 89.9796 113.816 60 113.816V83.9297C89.9797 83.9297 114.255 60.2812 114.255 30.2949V30H127.96V30.2949Z" fill="#FF5400"/>+</svg>diff --git a/cli/beacon/internal/endpoint/dashboard/static/findings.html b/cli/beacon/internal/endpoint/dashboard/static/findings.htmlindex a5fbd5c0..156e58a4 100644--- a/cli/beacon/internal/endpoint/dashboard/static/findings.html+++ b/cli/beacon/internal/endpoint/dashboard/static/findings.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Findings</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="findings">diff --git a/cli/beacon/internal/endpoint/dashboard/static/index.html b/cli/beacon/internal/endpoint/dashboard/static/index.htmlindex 40807379..7cc21913 100644--- a/cli/beacon/internal/endpoint/dashboard/static/index.html+++ b/cli/beacon/internal/endpoint/dashboard/static/index.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Agent Activity</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="sessions">@@ -58,8 +58,10 @@<div class="session-filter-tabs" aria-label="Session filters"><button type="button" data-session-state="all">All sessions</button><button type="button" data-session-state="captured" class="active" aria-pressed="true">Captured sessions</button>+ <button type="button" data-session-state="recurring">Recurring sessions</button><button type="button" data-session-state="empty">Empty sessions</button></div>+ <p class="session-filter-help muted">Recurring sessions are repeated executions of the same prompt in the same repository and agent harness by the same user.</p><div class="session-filter-grid"><label><select id="range-filter" aria-label="Date range">diff --git a/cli/beacon/internal/endpoint/dashboard/static/inventory-hooks.html b/cli/beacon/internal/endpoint/dashboard/static/inventory-hooks.htmlindex 07743327..1009bb3b 100644--- a/cli/beacon/internal/endpoint/dashboard/static/inventory-hooks.html+++ b/cli/beacon/internal/endpoint/dashboard/static/inventory-hooks.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Agent Inventory</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="inventory-hooks">diff --git a/cli/beacon/internal/endpoint/dashboard/static/inventory.html b/cli/beacon/internal/endpoint/dashboard/static/inventory.htmlindex f39e9914..a9ef461e 100644--- a/cli/beacon/internal/endpoint/dashboard/static/inventory.html+++ b/cli/beacon/internal/endpoint/dashboard/static/inventory.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Agent Inventory</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="inventory">diff --git a/cli/beacon/internal/endpoint/dashboard/static/logo.svg b/cli/beacon/internal/endpoint/dashboard/static/logo.svgindex df37e646..cf3ea0db 100644--- a/cli/beacon/internal/endpoint/dashboard/static/logo.svg+++ b/cli/beacon/internal/endpoint/dashboard/static/logo.svg@@ -1,14 +1,3 @@-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">- <defs>- <linearGradient id="logoGradient" x1="0%" y1="0%" x2="100%" y2="100%">- <stop offset="0%" stop-color="#4F5BFF"/>- <stop offset="55%" stop-color="#2563EB"/>- <stop offset="100%" stop-color="#0891D1"/>- </linearGradient>- <filter id="logoShadow" x="-30%" y="-20%" width="160%" height="170%" color-interpolation-filters="sRGB">- <feDropShadow dx="0" dy="6" stdDeviation="5" flood-color="#1D4ED8" flood-opacity="0.24"/>- </filter>- </defs>- <rect width="40" height="40" rx="10" fill="url(#logoGradient)" filter="url(#logoShadow)"/>- <path d="M20 20c-2-3-4.5-5-7.5-5-4 0-6.5 2.5-6.5 5s2.5 5 6.5 5c3 0 5.5-2 7.5-5zm0 0c2 3 4.5 5 7.5 5 4 0 6.5-2.5 6.5-5s-2.5-5-6.5-5c-3 0-5.5 2-7.5 5z" stroke="white" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>+<svg width="40" height="40" viewBox="21 20 200 200" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Beacon logo">+ <path d="M182.194 156.596C152.215 156.596 127.94 180.244 127.939 210.23V210.525H114.234V210.23H114.257C114.257 180.244 89.9597 156.596 60.0029 156.596V126.709C89.9595 126.709 114.256 150.357 114.257 180.343H114.234V180.639H127.939V180.343C127.94 150.357 152.215 126.709 182.194 126.709V156.596ZM127.96 30.2949H127.938C127.938 60.281 152.235 83.9295 182.191 83.9297V113.816C152.235 113.816 127.938 90.1685 127.938 60.1826H127.96V59.8867H114.255V60.1826C114.255 90.1687 89.9796 113.816 60 113.816V83.9297C89.9797 83.9297 114.255 60.2812 114.255 30.2949V30H127.96V30.2949Z" fill="#FF5400"/></svg>diff --git a/cli/beacon/internal/endpoint/dashboard/static/memory.html b/cli/beacon/internal/endpoint/dashboard/static/memory.htmlindex 14496dc5..4281358c 100644--- a/cli/beacon/internal/endpoint/dashboard/static/memory.html+++ b/cli/beacon/internal/endpoint/dashboard/static/memory.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Memory</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="memory">diff --git a/cli/beacon/internal/endpoint/dashboard/static/overview.html b/cli/beacon/internal/endpoint/dashboard/static/overview.htmlindex 0aa4df48..5e93d729 100644--- a/cli/beacon/internal/endpoint/dashboard/static/overview.html+++ b/cli/beacon/internal/endpoint/dashboard/static/overview.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Agent Activity</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="overview">diff --git a/cli/beacon/internal/endpoint/dashboard/static/runtime-logos/chatgpt.svg b/cli/beacon/internal/endpoint/dashboard/static/runtime-logos/chatgpt.svgnew file mode 100644index 00000000..e787e526--- /dev/null+++ b/cli/beacon/internal/endpoint/dashboard/static/runtime-logos/chatgpt.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2406 2406" role="img" aria-label="ChatGPT">+ <path id="chatgpt-mark" d="M1107.3 299.1c-198 0-373.9 127.3-435.2 315.3L650 743.5v427.9c0 21.4 11 40.4 29.4 51.4l344.5 198.515V833.3h.1v-27.9L1372.7 604c33.715-19.52 70.44-32.857 108.47-39.828L1447.6 450.3C1361 353.5 1237.1 298.5 1107.3 299.1zm0 117.5-.6.6c79.699 0 156.3 27.5 217.6 78.4-2.5 1.2-7.4 4.3-11 6.1L952.8 709.3c-18.4 10.4-29.4 30-29.4 51.4V1248l-155.1-89.4V755.8c-.1-187.099 151.601-338.9 339-339.2z" fill="#111827"/>+ <use href="#chatgpt-mark" transform="rotate(60 1203 1203)"/>+ <use href="#chatgpt-mark" transform="rotate(120 1203 1203)"/>+ <use href="#chatgpt-mark" transform="rotate(180 1203 1203)"/>+ <use href="#chatgpt-mark" transform="rotate(240 1203 1203)"/>+ <use href="#chatgpt-mark" transform="rotate(300 1203 1203)"/>+</svg>diff --git a/cli/beacon/internal/endpoint/dashboard/static/session.html b/cli/beacon/internal/endpoint/dashboard/static/session.htmlindex e1e54eb1..421be82d 100644--- a/cli/beacon/internal/endpoint/dashboard/static/session.html+++ b/cli/beacon/internal/endpoint/dashboard/static/session.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Session Events</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="session-detail">diff --git a/cli/beacon/internal/endpoint/dashboard/static/styles.css b/cli/beacon/internal/endpoint/dashboard/static/styles.cssindex 49dba7e1..dd3b0b80 100644--- a/cli/beacon/internal/endpoint/dashboard/static/styles.css+++ b/cli/beacon/internal/endpoint/dashboard/static/styles.css@@ -1016,7 +1016,7 @@ main {}.nav-toggle::before {- content: "Asymptote";+ content: "Beacon";position: absolute;top: 0.75rem;left: 0.95rem;@@ -2689,6 +2689,11 @@ body[data-page="sessions"] .filter-section {border-bottom: 1px solid rgba(17, 24, 39, 0.08);}+.session-filter-help {+ margin: 0.6rem 0 0;+ font-size: 0.72rem;+}+.session-filter-tabs button,body[data-page="sessions"] .quick-filters button {min-height: 2rem;@@ -2845,6 +2850,18 @@ body[data-page="session-detail"] td {line-height: 1.3;}+.session-recurring-indicator {+ display: inline-flex;+ align-items: center;+ border-radius: 999px;+ background: #eef2ff;+ color: #4338ca;+ font-size: 0.68rem;+ font-weight: 800;+ line-height: 1;+ padding: 0.3rem 0.55rem;+}+.session-activity-summary {width: 100%;min-width: 0;diff --git a/cli/beacon/internal/endpoint/dashboard/static/tokens.html b/cli/beacon/internal/endpoint/dashboard/static/tokens.htmlindex 715dc5c3..2d667756 100644--- a/cli/beacon/internal/endpoint/dashboard/static/tokens.html+++ b/cli/beacon/internal/endpoint/dashboard/static/tokens.html@@ -3,8 +3,8 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Beacon Endpoint Token Usage</title>- <link rel="icon" type="image/svg+xml" href="/logo.svg" />+ <title>Beacon | Self‑improving memory for coding agents</title>+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" /><link rel="stylesheet" href="/styles.css" /></head><body data-page="tokens">diff --git a/docs/cli/dashboard.mdx b/docs/cli/dashboard.mdxindex 62c7307d..492c3185 100644--- a/docs/cli/dashboard.mdx+++ b/docs/cli/dashboard.mdx@@ -27,7 +27,10 @@ poll, and OTLP collection paths.- **Agent Activity Sessions:** browse grouped agent sessions with risk, prompt,harness, model, repository, duration, activity counts, and last-artifact- summaries.+ summaries. The **All**, **Captured**, **Recurring**, and **Empty** tabs are+ mutually exclusive views except that All contains every active session:+ Captured has user-visible activity, Recurring is described below, and Empty+ contains only lifecycle, metric, or internal events.- **Session detail:** open a session timeline with metadata, activity and severitysummaries, event filters, raw JSON, and value inspectors.- **Lenses:** add tabs to a session's page that show it from one angle: files@@ -57,6 +60,21 @@ The Detections and Findings screens mirror the same local rule resolution and scThe Memory screen is also read-only. Candidate approval, rejection, superseding,Jev evaluation, and Agent Skill installation stay in [`beacon memory`](/cli/memory).+### Recurring sessions++A session is recurring when at least two sessions owned by the same user have+the same prompt, agent harness, and repository within the dashboard's selected+date range. Beacon compares these values after trimming surrounding whitespace+and converting them to lowercase; harness names also use Beacon's standard+harness-name normalization. Missing harness and repository values compare+consistently. Sessions without a non-blank captured prompt are never recurring.++Every row in a recurring group shows **Recurring ×N**, where `N` is the number+of matching sessions in the selected date range and user scope. Classification+and this count are calculated before result limiting, so limiting the displayed+rows does not change either value. Opening a recurring row still shows that+individual session's timeline; Beacon does not merge the group.+## Flags| Flag | Description |