Help us shape the future of Go! Take the 2026 Go Developer Survey

session

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package session manages Atlas agent sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestID added in v0.2.0

func GetLatestID(sessionsDir string) (string, error)

GetLatestID reads the 'latest' pointer file to get the most recent session ID. If the file doesn't exist, it falls back to finding the directory with the newest modification time.

func SessionDir

func SessionDir(sessionsDir, id string) string

SessionDir returns the canonical directory for a session's state files.

Types

type Session

type Session struct {
	ID        string    `json:"id"`
	Status    string    `json:"status"` // see internal/state for valid values
	Workspace string    `json:"workspace_path"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Session represents a single Atlas deployment session — identity and lifecycle only. Goal and progress tracking live in planner.json (internal/orchestrator).

func Load

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

Load reads the session identified by id from <sessionsDir>/<id>/session.json.

func New

func New(workspacePath string) *Session

New creates a new Session with a unique ID and status "created".

func (*Session) Save

func (s *Session) Save(sessionsDir string) error

Save atomically persists the session to <sessionsDir>/<id>/session.json. UpdatedAt is refreshed before writing.

Jump to

Keyboard shortcuts

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