codex

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) ListHookTrust added in v0.1.5

func (a *Adapter) ListHookTrust(ctx context.Context, home, dir string) ([]HookTrust, error)

ListHookTrust reads approval state in home for the requested project.

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) ValidateSession added in v0.1.5

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

ValidateSession checks the thread in its session's Codex home.

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.

type HookTrust added in v0.1.5

type HookTrust struct {
	Command     string `json:"command"`
	SourcePath  string `json:"sourcePath"`
	TrustStatus string `json:"trustStatus"`
}

HookTrust is Codex's read-only approval metadata for one configured command.

Jump to

Keyboard shortcuts

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