codexcfg

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package codexcfg holds the Bot Agent configuration contract for the direct codex runtime.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConfigured = errors.New("codex runtime is not configured for this Agent")

Functions

func ValidPermissionMode

func ValidPermissionMode(mode string) bool

ValidPermissionMode also accepts an unset value, which means the default.

Types

type AuthMode

type AuthMode string

AuthMode selects how the driver authenticates codex.

const (
	// AuthAPIKey logs in with an OpenAI API key from bot configuration.
	AuthAPIKey AuthMode = "api_key"
	// AuthChatGPT uses a ChatGPT subscription login from the encrypted Agent
	// credential store, materialized into CODEX_HOME for the Codex process.
	AuthChatGPT AuthMode = "chatgpt"
)

type Config

type Config struct {
	Auth    AuthMode
	APIKey  string //nolint:gosec // decrypted runtime credential, not a hardcoded secret
	BaseURL string
	// Per-turn model and reasoning overrides win over these values.
	Model           string
	ReasoningEffort string
	PermissionMode  string
}

Config is one Codex Bot Agent's runtime configuration.

func ParseAgentConfig

func ParseAgentConfig(metadata map[string]any) (Config, error)

Jump to

Keyboard shortcuts

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