codex

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package codex is the delivery adapter for Codex. It hands bundles to a thread with `codex queue`, which Codex starts once the thread's current turn ends, and checks a thread through `codex app-server` (JSON-RPC over standard input and output) before an agent is bound to it, refusing sub-agent threads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// ClientVersion is sent to the app server as the client's version.
	ClientVersion string
}

Adapter runs the codex command found on the PATH.

func (*Adapter) Hand

func (a *Adapter) Hand(ctx context.Context, h delivery.Handover) (bool, error)

Hand queues the bundle for the thread. The message is passed as an argument, never through a shell. Exit status 0 means Codex took it, which confirms it.

func (*Adapter) Harness

func (*Adapter) Harness() string

Harness returns "codex".

func (*Adapter) HasQueue

func (a *Adapter) HasQueue(ctx context.Context) bool

HasQueue reports whether this Codex has the queue command.

func (*Adapter) Validate

func (a *Adapter) Validate(ctx context.Context, threadID string) error

Validate reads the exact thread through the app server and refuses a thread that doesn't exist or that a parent thread spawned, saying so in Codex's words.

func (*Adapter) Version

func (a *Adapter) Version(ctx context.Context) (string, error)

Version returns what `codex --version` prints, such as "codex-cli 0.159.3".

func (*Adapter) WaitsForIdle

func (*Adapter) WaitsForIdle() bool

WaitsForIdle is false: Codex queues a bundle until the thread's turn ends.

Jump to

Keyboard shortcuts

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