Documentation
¶
Overview ¶
Package session stores per-worktree state in the git directory (never committed).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Session ¶
type Session struct {
SchemaVersion int `json:"schema_version"`
ActiveTask *string `json:"active_task"`
StartedAt string `json:"started_at,omitempty"`
Tool string `json:"tool,omitempty"`
LastCheck *task.Check `json:"last_check,omitempty"`
LastTask string `json:"last_task,omitempty"`
LastTaskAt string `json:"last_task_at,omitempty"`
}
Session mirrors schemas/session.schema.json.
func Load ¶
Load returns the most recently written session among the state locations (a sandboxed tool may only be able to write the fallback), or an empty one.
func (*Session) CommitTask ¶
CommitTask is the task a commit belongs to: the active one, else one closed in the last hour (agents usually commit right after closing).