Documentation
¶
Overview ¶
Package codex implements the Codex CLI foreign-agent driver. NewAgent resolves provider configuration and an explicitly supplied parent environment into a driver.Agent. Per-turn cwd, prompt, and session selection remain owned by driver.Turn. Codex v1 streams expose normalized live events and explicitly unavailable authoritative history.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApprovalPolicy ¶
type ApprovalPolicy uint8
ApprovalPolicy is the typed Codex CLI approval policy.
const ( ApprovalUntrusted ApprovalPolicy = iota ApprovalOnRequest ApprovalNever )
type Config ¶
type Config struct {
ExecPath string
Model string
Profile string
AdditionalDirs []string
Sandbox SandboxMode
Approval ApprovalPolicy
EnvAllow []string
Credential map[string]string
IgnoreUserConfig bool
IgnoreRules bool
SkipGitRepoCheck bool
}
Config is the provider-owned configuration used to construct a Codex agent. Turn-owned cwd and session selection are supplied to Agent.Spawn.
type ConfigError ¶
type ConfigError struct{ Field, Reason string }
ConfigError reports invalid provider configuration at construction time.
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
type PlatformError ¶
type PlatformError struct{ GOOS string }
PlatformError reports an OS without the required process-group supervision.
func (*PlatformError) Error ¶
func (e *PlatformError) Error() string
type SandboxMode ¶
type SandboxMode uint8
SandboxMode is the typed Codex CLI sandbox mode.
const ( SandboxReadOnly SandboxMode = iota SandboxWorkspaceWrite SandboxDangerFullAccess )
type SpawnConfigError ¶
type SpawnConfigError struct{ Field, Reason string }
SpawnConfigError reports invalid internal agent state discovered before a child is started. NewAgent prevents callers from constructing this state.
func (*SpawnConfigError) Error ¶
func (e *SpawnConfigError) Error() string