feat(02-01): implement protocol types, SessionRegistry, and LabelStore

- Enrich Session with Workspace, Label, WaitingSince fields
- Protocol types: Request, Response, SessionInfo, SwitchArgs, LabelArgs
- SessionRegistry with WaitingSince transition tracking
- LabelStore with JSON file persistence
This commit is contained in:
Pierre Martin
2026-03-23 17:43:12 +01:00
parent c9a28df3dc
commit 5315e88494
3 changed files with 196 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
package main
import "time"
// SessionState represents the current activity state of a Claude Code session.
type SessionState int
@@ -32,11 +34,14 @@ type Process struct {
// Session represents a Claude Code session enriched with JSONL metadata.
type Session struct {
Process Process
SessionID string
GitBranch string
State SessionState
Preview string // last lines of output
CwdPath string // process cwd
Worktree string // git worktree (may differ from cwd)
Process Process
SessionID string
GitBranch string
State SessionState
Preview string // last lines of output
CwdPath string // process cwd
Worktree string // git worktree (may differ from cwd)
Workspace string // i3 workspace number
Label string // user-assigned label
WaitingSince *time.Time // when session started waiting for input
}