codex

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: AGPL-3.0 Imports: 5 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 adapts the Codex CLI (`codex exec --json`) to the executor's canonical events (ADR-0010 Decision 3). Translate is a pure per-line function; the fixtures in the test pin every mapping.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

func New

func New() *Adapter

func (*Adapter) Command

func (a *Adapter) Command(req executor.Request) (string, []string, []string)

Command builds the headless launch. The prompt stays the trailing positional argument regardless of --sandbox, so flag placement never depends on whether PermissionMode was set.

--ephemeral is deliberately not used (ADR-0010 Decision 2): keeping the thread means provider_session_id (thread_id) still points at Codex's own session log, the original-reference pattern claude-code already uses (ADR-0006 Decision 3). ADR-0022 turns that kept thread into the chat's continuity: `exec resume <id> <prompt>`.

A resumed turn carries no --sandbox: measured on codex 0.144.4, `exec resume` has no such flag — the thread keeps the sandbox it was started with. Dropping it is the truthful mapping, not a silent downgrade.

作業場所の外で扱わせる場所 (ADR-0047 Decision 3) は codex にも --add-dir が ある("Additional directories that should be writable alongside the primary workspace")。claude 側とは権限の細部が違うが「主ワークスペースの外もこの 場所なら扱ってよい」という同じ意図の口なので、同じ Request フィールドの 翻訳先として使う。--sandbox と同じく `exec resume` にはこのフラグが無いため 再開ターンでは積まない — スレッドは開始時の設定のまま続く。 働く場所そのもの(WorkDir)に codex の -C/--cd は使わない: cwd は Executor が全 Provider 共通で落とす(Decision 2)。

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) Translate

func (a *Adapter) Translate(line []byte) ([]executor.Event, error)

Jump to

Keyboard shortcuts

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