session

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package session owns session lifecycle (create/list/get) — the durable record a client attaches to. Turn-taking (sending a message and running the agent loop) lives in internal/daemon/agent, which reads and appends to the same store directly; keeping that logic out of this package avoids Service growing two unrelated responsibilities.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("session not found")

ErrNotFound is returned when a session ID doesn't exist.

Functions

func NewID

func NewID() string

NewID generates a session identifier.

Types

type Service

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

Service manages session records.

func New

func New(st *store.Store) *Service

New builds a session service backed by st.

func (*Service) Create

func (s *Service) Create(title string) (store.Session, error)

Create starts a new, empty session.

func (*Service) Get

func (s *Service) Get(id string) (store.Session, []store.Message, error)

Get returns a session and its full message history.

func (*Service) List

func (s *Service) List() ([]store.Session, error)

List returns every known session, most recently active first.

Jump to

Keyboard shortcuts

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