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 ¶
func NewAdapter(binaryPath, openbeeURL string) (ai.EngineAdapter, error)
Types ¶
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, openbeeURL string, store *SessionStore) *Invoker
NewInvoker creates an Invoker. openbeeURL is injected as OPENBEE_URL into subprocesses.
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.