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

store

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type SessionData

type SessionData struct {
	Session   model.Session
	Steps     []model.Step
	Actors    map[string]model.Actor
	ToolCalls map[string]model.ToolCall
	Edits     []model.Edit
	TestRuns  []model.TestRun
	Intent    []model.IntentItem
	StepIndex map[string]int
}

func (*SessionData) ActorKind

func (d *SessionData) ActorKind(stepID string) string

func (*SessionData) AgentTextNear

func (d *SessionData) AgentTextNear(stepID, file string, n int) []model.Step

AgentTextNear returns assistant and reasoning steps of the same actor among the n steps before stepID. AgentTextNear returns the agent text in the n steps before stepID. Text that names another file of the session, and not file, is about something else and is left out.

func (*SessionData) EditsOf

func (d *SessionData) EditsOf(stepID string) []model.Edit

func (*SessionData) EvidenceBefore

func (d *SessionData) EvidenceBefore(stepID string, limit int) []model.Step

EvidenceBefore returns read, search and test tool calls before stepID.

func (*SessionData) InstructionFor

func (d *SessionData) InstructionFor(stepID string) (model.Step, bool)

InstructionFor returns the last human prompt before the step.

func (*SessionData) Step

func (d *SessionData) Step(id string) (model.Step, bool)

func (*SessionData) TestRunOf

func (d *SessionData) TestRunOf(stepID string) (model.TestRun, bool)

type Store

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

func Open

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

func (*Store) Check

func (s *Store) Check() error

func (*Store) Close

func (s *Store) Close() error

func (*Store) DeleteChangeHunks

func (s *Store) DeleteChangeHunks(changeID string) error

func (*Store) DeleteFlags

func (s *Store) DeleteFlags(changeID, detector string) error

func (*Store) DeleteIntentItems

func (s *Store) DeleteIntentItems(sessionID string) error

func (*Store) DeleteReviewUnitsExcept

func (s *Store) DeleteReviewUnitsExcept(changeID string, keep []string) error

func (*Store) DeleteSessionData

func (s *Store) DeleteSessionData(sessionID string) error

func (*Store) FindFlag

func (s *Store) FindFlag(idOrPrefix string) (model.Flag, error)

func (*Store) FindSession

func (s *Store) FindSession(agent, agentSessionID string) (model.Session, error)

func (*Store) FlagCountsBySession

func (s *Store) FlagCountsBySession(sessionID string) (map[string]int, error)

func (*Store) GetFlag

func (s *Store) GetFlag(id string) (model.Flag, error)

func (*Store) GetRationale

func (s *Store) GetRationale(hunkID string) (model.Rationale, error)

func (*Store) GetRepo

func (s *Store) GetRepo(id string) (model.Repo, error)

func (*Store) GetSession

func (s *Store) GetSession(id string) (model.Session, error)

func (*Store) HasPrompt

func (s *Store) HasPrompt(sessionID string) (bool, error)

func (*Store) HunkStatuses

func (s *Store) HunkStatuses(keys []string) (map[string]string, error)

func (*Store) ListActors

func (s *Store) ListActors(sessionID string) ([]model.Actor, error)

func (*Store) ListChanges

func (s *Store) ListChanges(repoID string) ([]model.Change, error)

func (*Store) ListEdits

func (s *Store) ListEdits(sessionID string) ([]model.Edit, error)

func (*Store) ListFlags

func (s *Store) ListFlags(changeID string) ([]model.Flag, error)

func (*Store) ListHookEvents

func (s *Store) ListHookEvents(sessionID string) ([]model.HookEvent, error)

func (*Store) ListHunks

func (s *Store) ListHunks(changeID string) ([]model.Hunk, error)

func (*Store) ListIntentItems

func (s *Store) ListIntentItems(sessionIDs ...string) ([]model.IntentItem, error)

func (*Store) ListRationales

func (s *Store) ListRationales(changeID string) ([]model.Rationale, error)

func (*Store) ListReviewUnits

func (s *Store) ListReviewUnits(changeID string) ([]model.ReviewUnit, error)

func (*Store) ListSessions

func (s *Store) ListSessions(repoID string, limit int) ([]model.Session, error)

func (*Store) ListSteps

func (s *Store) ListSteps(sessionID string) ([]model.Step, error)

func (*Store) ListTestRuns

func (s *Store) ListTestRuns(sessionID string) ([]model.TestRun, error)

func (*Store) ListToolCalls

func (s *Store) ListToolCalls(sessionID string) ([]model.ToolCall, error)

func (*Store) LoadSession

func (s *Store) LoadSession(id string) (*SessionData, error)

func (*Store) Migrations

func (s *Store) Migrations() ([]string, error)

func (*Store) PutActor

func (s *Store) PutActor(a model.Actor) error

func (*Store) PutChange

func (s *Store) PutChange(c model.Change) error

func (*Store) PutEdit

func (s *Store) PutEdit(x model.Edit) error

func (*Store) PutFlag

func (s *Store) PutFlag(f model.Flag) error

func (*Store) PutHookEvent

func (s *Store) PutHookEvent(e model.HookEvent) error

func (*Store) PutHunk

func (s *Store) PutHunk(h model.Hunk) error

func (*Store) PutHunkIntent

func (s *Store) PutHunkIntent(x model.HunkIntent) error

func (*Store) PutIntentItem

func (s *Store) PutIntentItem(x model.IntentItem) error

func (*Store) PutProvenance

func (s *Store) PutProvenance(p model.HunkProvenance) error

func (*Store) PutRationale

func (s *Store) PutRationale(r model.Rationale) error

func (*Store) PutRepo

func (s *Store) PutRepo(r model.Repo) error

func (*Store) PutReviewUnit

func (s *Store) PutReviewUnit(u model.ReviewUnit) error

func (*Store) PutSession

func (s *Store) PutSession(x model.Session) error

func (*Store) PutStep

func (s *Store) PutStep(x model.Step) error

func (*Store) PutTestRun

func (s *Store) PutTestRun(x model.TestRun) error

func (*Store) PutToolCall

func (s *Store) PutToolCall(x model.ToolCall) error

func (*Store) SessionsBefore

func (s *Store) SessionsBefore(t time.Time) ([]model.Session, error)

func (*Store) SetHunkStatus

func (s *Store) SetHunkStatus(key, status string) error

SetHunkStatus stores the review status of a hunk; "unreviewed" removes it.

func (*Store) SetHunkUnit

func (s *Store) SetHunkUnit(hunkID, unitID string) error

func (*Store) SetReviewUnitStatus

func (s *Store) SetReviewUnitStatus(id, status string) error

func (*Store) SetStepSummary

func (s *Store) SetStepSummary(id, summary string) error

func (*Store) SuppressFlag

func (s *Store) SuppressFlag(id, reason string) (model.Flag, error)

func (*Store) Tx

func (s *Store) Tx(fn func(tx *Store) error) error

Jump to

Keyboard shortcuts

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