session

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactDir added in v0.15.8

func ArtifactDir(sessionsDir, id string) (string, error)

ArtifactDir is the durable sidecar directory for state that is not part of conversational history (turn queue, schedules, and subagent registry).

func Delete

func Delete(sessionsDir, id string) error

func Save

func Save(sessionsDir, id string, state agent.State) error

Save is a compatibility/backstop API. Live built-in sessions append through Journal as facts happen; Save only fills events absent from the file.

Types

type Journal added in v0.15.8

type Journal struct {
	// contains filtered or unexported fields
}

Journal is the live append boundary for one session. All instances for the same path share a process-local lock, so a final Save and live Agent writes cannot interleave JSON records.

func OpenJournal added in v0.15.8

func OpenJournal(sessionsDir, id string) (*Journal, error)

func (*Journal) AppendEvents added in v0.15.8

func (j *Journal) AppendEvents(events []agent.RuntimeEvent) error

type Session

type Session struct {
	ID        string      `json:"id"`
	Title     string      `json:"title,omitempty"`
	CreatedAt time.Time   `json:"created_at"`
	UpdatedAt time.Time   `json:"updated_at"`
	State     agent.State `json:"state"`
}

func List

func List(sessionsDir string) ([]Session, error)

func Load

func Load(sessionsDir, id string) (Session, error)

Jump to

Keyboard shortcuts

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