Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractResultFromLog ¶
ExtractResultFromLog scans a Codex JSON log file and returns the text of the last agent_message item, or "" if none found.
func NewAdapter ¶
Types ¶
type Collector ¶ added in v0.0.32
type Collector struct {
// contains filtered or unexported fields
}
Collector reads the openbee-UUID → codex-thread-ID mapping written by SessionStore, then locates the session JSONL under codexBase/sessions/.
func NewCollector ¶ added in v0.0.32
func NewCollector() *Collector
NewCollector builds a Collector using the default mapping directory and CODEX_HOME (or ~/.codex if unset).
func NewCollectorAt ¶ added in v0.0.32
NewCollectorAt is a test seam allowing arbitrary mapping/codex roots.
type Invoker ¶
type Invoker struct {
// contains filtered or unexported fields
}
Invoker spawns Codex CLI processes and is safe for concurrent use.
func NewInvoker ¶
func NewInvoker(binary string, store *SessionStore, extraEnv map[string]string) *Invoker
NewInvoker creates an Invoker. extraEnv entries are merged into the base environment at lowest priority. OPENBEE_URL is inherited from the server process environment.
func (*Invoker) Run ¶
func (inv *Invoker) Run(ctx context.Context, workDir, prompt string, opts ai.RunOptions, logPath string) (ai.Process, <-chan ai.Output, error)
Run starts a Codex CLI process, redirecting output to logPath. For new sessions, prompt is passed via stdin; for resumes, the thread_id is resolved from the store.
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
SessionStore maps openbee session UUIDs to codex thread IDs on disk. Per-session files avoid concurrent write conflicts between sessions.
func NewSessionStore ¶
func NewSessionStore() (*SessionStore, error)
NewSessionStore creates a SessionStore rooted at the default location.
func (*SessionStore) Set ¶
func (s *SessionStore) Set(openbeeUUID, threadID string) error
Set writes the codex thread_id for the given openbee UUID. Writes are atomic via temp-file rename.