disk

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLiteStore

func NewSQLiteStore() (interfaces.SessionStorer, error)

NewSQLiteStore creates a new SQLite-based storage instance

func NewSQLiteStoreWithPath

func NewSQLiteStoreWithPath(dbPath string) (interfaces.SessionStorer, error)

NewSQLiteStoreWithPath creates a new SQLite-based storage instance with a custom path

Types

type ExtendedSession

type ExtendedSession struct {
	models.Session
	Type                string `json:"type" db:"type"`
	PlanName            string `json:"plan_name" db:"plan_name"`
	PlanDirectory       string `json:"plan_directory" db:"plan_directory"`
	JobTitle            string `json:"job_title" db:"job_title"`
	JobFilePath         string `json:"job_file_path" db:"job_file_path"`
	ClaudeSessionID     string `json:"claude_session_id" db:"claude_session_id"`
	ProjectName         string `json:"project_name" db:"project_name"`
	IsWorktree          bool   `json:"is_worktree" db:"is_worktree"`
	IsEcosystem         bool   `json:"is_ecosystem" db:"is_ecosystem"`
	ParentEcosystemPath string `json:"parent_ecosystem_path" db:"parent_ecosystem_path"`
	Provider            string `json:"provider" db:"provider"`
}

ExtendedSession wraps the grove-core Session with oneshot-specific fields

func (*ExtendedSession) MarshalJSON

func (e *ExtendedSession) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling to include extended fields

type SQLiteStore

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

SQLiteStore implements SessionStorer using SQLite

func (*SQLiteStore) ArchiveSessions

func (s *SQLiteStore) ArchiveSessions(sessionIDs []string) error

ArchiveSessions archives multiple sessions by setting is_deleted flag

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

Close closes the database connection

func (*SQLiteStore) EnsureSessionExists

func (s *SQLiteStore) EnsureSessionExists(session interface{}) error

EnsureSessionExists creates or updates a session

func (*SQLiteStore) GetAllExtendedSessions

func (s *SQLiteStore) GetAllExtendedSessions() ([]*ExtendedSession, error)

GetAllExtendedSessions retrieves all sessions as ExtendedSession objects

func (*SQLiteStore) GetAllSessions

func (s *SQLiteStore) GetAllSessions() ([]*models.Session, error)

GetAllSessions retrieves all sessions

func (*SQLiteStore) GetSession

func (s *SQLiteStore) GetSession(sessionID string) (interface{}, error)

GetSession retrieves a session by ID

func (*SQLiteStore) GetToolExecution

func (s *SQLiteStore) GetToolExecution(sessionID, toolID string) (*models.ToolExecution, error)

GetToolExecution retrieves a tool execution by ID

func (*SQLiteStore) LogEvent

func (s *SQLiteStore) LogEvent(sessionID string, event *models.Event) error

LogEvent logs an event

func (*SQLiteStore) LogNotification

func (s *SQLiteStore) LogNotification(sessionID string, notification *models.ClaudeNotification) error

LogNotification logs a notification

func (*SQLiteStore) LogToolUsage

func (s *SQLiteStore) LogToolUsage(sessionID string, tool *models.ToolExecution) error

LogToolUsage logs a new tool execution

func (*SQLiteStore) UpdateSessionStatus

func (s *SQLiteStore) UpdateSessionStatus(sessionID, status string) error

UpdateSessionStatus updates the status of a session

func (*SQLiteStore) UpdateSessionStatusWithError

func (s *SQLiteStore) UpdateSessionStatusWithError(sessionID, status string, errorMsg string) error

UpdateSessionStatusWithError updates the status of a session with an optional error message

func (*SQLiteStore) UpdateToolExecution

func (s *SQLiteStore) UpdateToolExecution(sessionID, toolID string, update *models.ToolExecution) error

UpdateToolExecution updates an existing tool execution

Jump to

Keyboard shortcuts

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