Documentation
¶
Overview ¶
Package codex provides the OpenAI Codex CLI source for agentwatch.
CODEX_HOME resolution ¶
This source does NOT read the CODEX_HOME environment variable. Callers must supply the base directory explicitly via WithRoot. If no WithRoot is provided the source returns no sessions. A caller that wants environment fallback can implement it itself:
root := os.Getenv("CODEX_HOME")
if root == "" {
home, _ := os.UserHomeDir()
root = filepath.Join(home, ".codex")
}
src := codex.New(codex.WithRoot(root))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Source)
Option configures a Source.
func WithDiscoverWindow ¶
WithDiscoverWindow limits discovery to rollout files whose modification time is within d of the current time. Zero disables age filtering.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements source.Source for OpenAI Codex CLI sessions.
Codex CLI stores sessions at:
<root>/sessions/YYYY/MM/DD/rollout-{timestamp}-{uuid}.jsonl
Click to show internal directories.
Click to hide internal directories.