storage

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReadOnlyRecovery = errors.New("database is in read-only recovery mode")

Functions

This section is empty.

Types

type DB

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

func Open

func Open(path string) (*DB, error)

func (*DB) Close

func (database *DB) Close() error

func (*DB) CostIntelligence

func (database *DB) CostIntelligence(ctx context.Context, days int) (insights.CostIntelligence, error)

func (*DB) CreateMemory

func (database *DB) CreateMemory(ctx context.Context, projectID string, input projectmemory.CreateInput, now time.Time) (projectmemory.Item, error)

func (*DB) DashboardSnapshot

func (database *DB) DashboardSnapshot(ctx context.Context) (dashboard.Snapshot, error)

DashboardSnapshot returns only bounded aggregates and session labels. It does not select event payloads, repository paths, prompts, source or credentials.

func (*DB) DashboardSummary

func (database *DB) DashboardSummary(ctx context.Context) (dashboard.Summary, error)

DashboardSummary exposes aggregate operational state for the local dashboard. It never selects event payloads, project paths, commands or prompt text.

func (*DB) DeleteConversationSession

func (database *DB) DeleteConversationSession(ctx context.Context, sessionID string) error

func (*DB) DeleteMemory

func (database *DB) DeleteMemory(ctx context.Context, projectID, memoryID string, now time.Time) error

func (*DB) GetConversationRequest

func (database *DB) GetConversationRequest(ctx context.Context, requestID string) (conversations.Request, error)

func (*DB) GuidanceControlLevel

func (database *DB) GuidanceControlLevel(ctx context.Context, projectID string) (guidance.ControlLevel, error)

func (*DB) GuidanceStatus

func (database *DB) GuidanceStatus(ctx context.Context, now time.Time) (guidance.Status, error)

func (*DB) InsertEvent

func (database *DB) InsertEvent(ctx context.Context, event events.Event) error

func (*DB) LatestGuidanceDelivery

func (database *DB) LatestGuidanceDelivery(ctx context.Context) (guidance.DeliveryReceipt, error)

func (*DB) LatestRuntimeGuidance

func (database *DB) LatestRuntimeGuidance(ctx context.Context, projectID string, now time.Time) (guidance.Decision, error)

func (*DB) ListActiveGuidance

func (database *DB) ListActiveGuidance(ctx context.Context, now time.Time, limit int) ([]guidance.Decision, error)

func (*DB) ListClientConnections

func (database *DB) ListClientConnections(ctx context.Context) ([]conversations.ClientConnection, error)

func (*DB) ListConversationRequests

func (database *DB) ListConversationRequests(ctx context.Context, limit int, before string) ([]conversations.Request, error)

func (*DB) ListMemories

func (database *DB) ListMemories(ctx context.Context, projectID, state string) ([]projectmemory.Item, error)

func (*DB) ListSessionEvents

func (database *DB) ListSessionEvents(ctx context.Context, sessionID string) ([]events.Event, error)

func (*DB) LiveConversationAnalysis

func (database *DB) LiveConversationAnalysis(ctx context.Context) (conversations.LiveAnalysis, error)

func (*DB) PrivacySettings

func (database *DB) PrivacySettings(ctx context.Context) (conversations.PrivacySettings, error)

func (*DB) ProjectHandoff

func (database *DB) ProjectHandoff(ctx context.Context, projectIDs []string, budget int, now time.Time) (handoff.Capsule, error)

func (*DB) ReadOnly

func (database *DB) ReadOnly() bool

func (*DB) RecordGuidanceDelivery

func (database *DB) RecordGuidanceDelivery(ctx context.Context, receipt guidance.DeliveryReceipt) error

func (*DB) RecordHandoffDelivery

func (database *DB) RecordHandoffDelivery(ctx context.Context, capsule handoff.Capsule, targetClient string, deliveredAt time.Time) error

func (*DB) RecoveryBackupPath

func (database *DB) RecoveryBackupPath() string

func (*DB) RecoveryError

func (database *DB) RecoveryError() error

func (*DB) RequestTrends

func (database *DB) RequestTrends(ctx context.Context, days int) (insights.RequestTrends, error)

func (*DB) RuntimeGuidance

func (database *DB) RuntimeGuidance(ctx context.Context, sessionID string, now time.Time) (guidance.Decision, error)

func (*DB) SaveConversationRequest

func (database *DB) SaveConversationRequest(ctx context.Context, record conversations.Request) error

func (*DB) SaveGuidanceControlLevel

func (database *DB) SaveGuidanceControlLevel(ctx context.Context, projectID string, level guidance.ControlLevel, now time.Time) error

func (*DB) SavePrivacySettings

func (database *DB) SavePrivacySettings(ctx context.Context, settings conversations.PrivacySettings) error

func (*DB) SchemaVersion

func (database *DB) SchemaVersion() int

func (*DB) UpdateMemory

func (database *DB) UpdateMemory(ctx context.Context, projectID, memoryID string, input projectmemory.UpdateInput, now time.Time) (projectmemory.Item, error)

func (*DB) UpsertClientConnection

func (database *DB) UpsertClientConnection(ctx context.Context, connection conversations.ClientConnection) error

Jump to

Keyboard shortcuts

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