codex

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package codex adapts the Codex app-server protocol to the runner harness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) harness.Adapter

New constructs a Codex harness adapter. The returned adapter starts no process until Probe or Run is called.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter is the Codex implementation of harness.Adapter.

func (*Adapter) Probe

func (a *Adapter) Probe(ctx context.Context) (harness.Info, error)

Probe checks the binary version and app-server authentication state without starting a model thread or turn.

func (*Adapter) Run

func (a *Adapter) Run(ctx context.Context, launch harness.Launch, emit harness.Emit) (result harness.Result, err error)

Run starts one dedicated app-server process, creates or resumes exactly one thread, starts one turn, forwards events, and stops the process before it returns. A resumed session is never silently replaced with a new thread.

type Config

type Config struct {
	Binary string
	// Home is a runner-owned CODEX_HOME. It must be separate from an
	// interactive user's Codex home and independently signed in by the worker.
	Home string
	// WorktreeRoot permits trust-only configuration for managed task checkouts.
	WorktreeRoot    string
	Model           string
	ExpectedVersion string
}

Config selects the Codex executable and its isolated worker home.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL