Documentation
¶
Index ¶
- Variables
- type SessionData
- func (d *SessionData) ActorKind(stepID string) string
- func (d *SessionData) AgentTextNear(stepID, file string, n int) []model.Step
- func (d *SessionData) EditsOf(stepID string) []model.Edit
- func (d *SessionData) EvidenceBefore(stepID string, limit int) []model.Step
- func (d *SessionData) InstructionFor(stepID string) (model.Step, bool)
- func (d *SessionData) Step(id string) (model.Step, bool)
- func (d *SessionData) TestRunOf(stepID string) (model.TestRun, bool)
- type Store
- func (s *Store) Check() error
- func (s *Store) Close() error
- func (s *Store) DeleteChangeHunks(changeID string) error
- func (s *Store) DeleteFlags(changeID, detector string) error
- func (s *Store) DeleteIntentItems(sessionID string) error
- func (s *Store) DeleteReviewUnitsExcept(changeID string, keep []string) error
- func (s *Store) DeleteSessionData(sessionID string) error
- func (s *Store) FindFlag(idOrPrefix string) (model.Flag, error)
- func (s *Store) FindSession(agent, agentSessionID string) (model.Session, error)
- func (s *Store) FlagCountsBySession(sessionID string) (map[string]int, error)
- func (s *Store) GetFlag(id string) (model.Flag, error)
- func (s *Store) GetRationale(hunkID string) (model.Rationale, error)
- func (s *Store) GetRepo(id string) (model.Repo, error)
- func (s *Store) GetSession(id string) (model.Session, error)
- func (s *Store) HasPrompt(sessionID string) (bool, error)
- func (s *Store) HunkStatuses(keys []string) (map[string]string, error)
- func (s *Store) ListActors(sessionID string) ([]model.Actor, error)
- func (s *Store) ListChanges(repoID string) ([]model.Change, error)
- func (s *Store) ListEdits(sessionID string) ([]model.Edit, error)
- func (s *Store) ListFlags(changeID string) ([]model.Flag, error)
- func (s *Store) ListHookEvents(sessionID string) ([]model.HookEvent, error)
- func (s *Store) ListHunks(changeID string) ([]model.Hunk, error)
- func (s *Store) ListIntentItems(sessionIDs ...string) ([]model.IntentItem, error)
- func (s *Store) ListRationales(changeID string) ([]model.Rationale, error)
- func (s *Store) ListReviewUnits(changeID string) ([]model.ReviewUnit, error)
- func (s *Store) ListSessions(repoID string, limit int) ([]model.Session, error)
- func (s *Store) ListSteps(sessionID string) ([]model.Step, error)
- func (s *Store) ListTestRuns(sessionID string) ([]model.TestRun, error)
- func (s *Store) ListToolCalls(sessionID string) ([]model.ToolCall, error)
- func (s *Store) LoadSession(id string) (*SessionData, error)
- func (s *Store) Migrations() ([]string, error)
- func (s *Store) PutActor(a model.Actor) error
- func (s *Store) PutChange(c model.Change) error
- func (s *Store) PutEdit(x model.Edit) error
- func (s *Store) PutFlag(f model.Flag) error
- func (s *Store) PutHookEvent(e model.HookEvent) error
- func (s *Store) PutHunk(h model.Hunk) error
- func (s *Store) PutHunkIntent(x model.HunkIntent) error
- func (s *Store) PutIntentItem(x model.IntentItem) error
- func (s *Store) PutProvenance(p model.HunkProvenance) error
- func (s *Store) PutRationale(r model.Rationale) error
- func (s *Store) PutRepo(r model.Repo) error
- func (s *Store) PutReviewUnit(u model.ReviewUnit) error
- func (s *Store) PutSession(x model.Session) error
- func (s *Store) PutStep(x model.Step) error
- func (s *Store) PutTestRun(x model.TestRun) error
- func (s *Store) PutToolCall(x model.ToolCall) error
- func (s *Store) SessionsBefore(t time.Time) ([]model.Session, error)
- func (s *Store) SetHunkStatus(key, status string) error
- func (s *Store) SetHunkUnit(hunkID, unitID string) error
- func (s *Store) SetReviewUnitStatus(id, status string) error
- func (s *Store) SetStepSummary(id, summary string) error
- func (s *Store) SuppressFlag(id, reason string) (model.Flag, error)
- func (s *Store) Tx(fn func(tx *Store) error) error
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) 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.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteChangeHunks ¶
func (*Store) DeleteFlags ¶
func (*Store) DeleteIntentItems ¶
func (*Store) DeleteReviewUnitsExcept ¶
func (*Store) DeleteSessionData ¶
func (*Store) FindSession ¶
func (*Store) FlagCountsBySession ¶
func (*Store) ListHookEvents ¶
func (*Store) ListIntentItems ¶
func (s *Store) ListIntentItems(sessionIDs ...string) ([]model.IntentItem, error)
func (*Store) ListRationales ¶
func (*Store) ListReviewUnits ¶
func (s *Store) ListReviewUnits(changeID string) ([]model.ReviewUnit, error)
func (*Store) ListSessions ¶
func (*Store) ListTestRuns ¶
func (*Store) ListToolCalls ¶
func (*Store) LoadSession ¶
func (s *Store) LoadSession(id string) (*SessionData, error)
func (*Store) Migrations ¶
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) PutReviewUnit ¶
func (s *Store) PutReviewUnit(u model.ReviewUnit) error
func (*Store) SetHunkStatus ¶
SetHunkStatus stores the review status of a hunk; "unreviewed" removes it.
func (*Store) SetHunkUnit ¶
func (*Store) SetReviewUnitStatus ¶
func (*Store) SetStepSummary ¶
Click to show internal directories.
Click to hide internal directories.