Documentation
¶
Index ¶
- type DBTX
- type ListPrimaryAgentsParams
- type PrimaryAgent
- type Querier
- type Queries
- func (q *Queries) DeleteSession(ctx context.Context, id string) error
- func (q *Queries) DeleteSessionsByWorktree(ctx context.Context, worktreeID string) error
- func (q *Queries) FindSessionByExternalID(ctx context.Context, externalID string) (Session, error)
- func (q *Queries) GetSession(ctx context.Context, id string) (Session, error)
- func (q *Queries) ListPrimaryAgents(ctx context.Context, arg ListPrimaryAgentsParams) (string, error)
- func (q *Queries) ListSessions(ctx context.Context) ([]Session, error)
- func (q *Queries) ListSessionsByWorktree(ctx context.Context, worktreeID string) ([]Session, error)
- func (q *Queries) SearchSessions(ctx context.Context, arg SearchSessionsParams) ([]Session, error)
- func (q *Queries) UpsertPrimaryAgents(ctx context.Context, arg UpsertPrimaryAgentsParams) error
- func (q *Queries) UpsertSession(ctx context.Context, arg UpsertSessionParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type SearchSessionsParams
- type Session
- type UpsertPrimaryAgentsParams
- type UpsertSessionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListPrimaryAgentsParams ¶
type PrimaryAgent ¶
type Querier ¶
type Querier interface {
DeleteSession(ctx context.Context, id string) error
// Removes every session belonging to a worktree. Used when a worktree is
// deleted (full cleanup), alongside removing its materialized ~/work/<id>.
DeleteSessionsByWorktree(ctx context.Context, worktreeID string) error
FindSessionByExternalID(ctx context.Context, externalID string) (Session, error)
GetSession(ctx context.Context, id string) (Session, error)
ListPrimaryAgents(ctx context.Context, arg ListPrimaryAgentsParams) (string, error)
ListSessions(ctx context.Context) ([]Session, error)
// Used by session-sync to enumerate sessions in a worktree for export.
// worktree_id is the host-minted worktree ULID; cross-machine stable identity.
ListSessionsByWorktree(ctx context.Context, worktreeID string) ([]Session, error)
// Filtered list. Empty filter values are treated as "no filter" by
// the query (NULL/empty matches anything for that column). Visibility
// filter is exact match.
SearchSessions(ctx context.Context, arg SearchSessionsParams) ([]Session, error)
UpsertPrimaryAgents(ctx context.Context, arg UpsertPrimaryAgentsParams) error
UpsertSession(ctx context.Context, arg UpsertSessionParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) DeleteSession ¶
func (*Queries) DeleteSessionsByWorktree ¶
Removes every session belonging to a worktree. Used when a worktree is deleted (full cleanup), alongside removing its materialized ~/work/<id>.
func (*Queries) FindSessionByExternalID ¶
func (*Queries) GetSession ¶
func (*Queries) ListPrimaryAgents ¶
func (*Queries) ListSessions ¶
func (*Queries) ListSessionsByWorktree ¶
Used by session-sync to enumerate sessions in a worktree for export. worktree_id is the host-minted worktree ULID; cross-machine stable identity.
func (*Queries) SearchSessions ¶
Filtered list. Empty filter values are treated as "no filter" by the query (NULL/empty matches anything for that column). Visibility filter is exact match.
func (*Queries) UpsertPrimaryAgents ¶
func (q *Queries) UpsertPrimaryAgents(ctx context.Context, arg UpsertPrimaryAgentsParams) error
func (*Queries) UpsertSession ¶
func (q *Queries) UpsertSession(ctx context.Context, arg UpsertSessionParams) error
type SearchSessionsParams ¶
type Session ¶
type Session struct {
ID string
ExternalID string
Backend string
Status string
Visibility string
FollowUp int64
ProjectDir string
WorktreeID string
WorktreeBranch string
Prompt string
Title string
TicketID string
Agent string
Draft string
CreatedAt int64
UpdatedAt int64
LastReadAt sql.NullInt64
Subdir string
DisplayName string
Config string
}
type UpsertSessionParams ¶
type UpsertSessionParams struct {
ID string
ExternalID string
Backend string
Status string
Visibility string
FollowUp int64
ProjectDir string
WorktreeID string
WorktreeBranch string
Subdir string
DisplayName string
Prompt string
Title string
TicketID string
Agent string
Draft string
Config string
CreatedAt int64
UpdatedAt int64
LastReadAt sql.NullInt64
}
Click to show internal directories.
Click to hide internal directories.