sessionkind

package
v0.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sessionkind classifies a session into zero-or-more "special session" kinds from the turns and tool counters an importer already projected. The result is stored in the session_kinds table and surfaced in the panel as badges, a filter, and an insights breakdown.

Classify covers the kinds derivable from a single session in isolation (goal, workflow, ralph-loop). The orchestrator kind depends on child edges that may not exist at single-session projection time, so it is computed post-sweep by the store (see store.RefreshOrchestratorKinds).

Index

Constants

View Source
const (
	// KindGoal marks a Codex goal session: the first user turn is wrapped
	// in <codex_internal_context source="goal">.
	KindGoal = "goal"
	// KindWorkflow marks a Claude Code dynamic workflow: the session used
	// the Workflow tool.
	KindWorkflow = "workflow"
	// KindRalphLoop marks a Claude Code Ralph Loop run, detected by the
	// /ralph-loop:ralph-loop slash command.
	KindRalphLoop = "ralph-loop"
	// KindOrchestrator marks a session that spawned subagents. Set by the
	// store from parent/child edges, not by Classify.
	KindOrchestrator = "orchestrator"
)

Kind constants. These are the canonical values written to session_kinds and matched by the panel's Kind filter.

Variables

This section is empty.

Functions

func Classify

func Classify(turns []session.Turn, toolNames []string) []string

Classify returns the kinds derivable from a single session's turns and tool names, sorted and de-duplicated. orchestrator is never returned here (it is edge-dependent). Returns nil when the session is ordinary.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL