Documentation
¶
Overview ¶
Package session provides SQLite-based session lookup for Codex CLI threads.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabasePath ¶
DatabasePath returns the full path to the Codex state database.
func DefaultCodexHome ¶
DefaultCodexHome returns the default Codex home directory (~/.codex).
Types ¶
type ThreadRow ¶
type ThreadRow struct {
ID string
RolloutPath string
CreatedAt time.Time
UpdatedAt time.Time
Title string
Source string
ModelProvider string
Cwd string
SandboxPolicy string
ApprovalMode string
TokensUsed int64
Archived bool
ArchivedAt *time.Time
GitSHA *string
GitBranch *string
GitOriginURL *string
CLIVersion string
FirstUserMessage string
AgentNickname *string
AgentRole *string
MemoryMode string
}
ThreadRow represents a row from the Codex threads table.
func LookupThread ¶
func LookupThread( ctx context.Context, dbPath string, sessionID string, projectPath string, ) (*ThreadRow, error)
LookupThread queries the Codex threads table for a session by ID. When projectPath is non-empty, it also filters by the cwd column. Returns ErrSessionNotFound when no matching row exists or the database file is missing.
Click to show internal directories.
Click to hide internal directories.