config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 6 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 config loads codex-mcp settings from the environment.

Index

Constants

View Source
const (
	DefaultTimeout    = 30 * time.Minute
	MaxTimeout        = 2 * time.Hour
	DefaultMaxFinal   = 32 * 1024
	DefaultMaxJSON    = 64 * 1024
	DefaultMaxDiag    = 8 * 1024
	DefaultMaxPrompt  = 64 * 1024
	DefaultRetention  = 100
	DefaultQueueLimit = 32
	DefaultWorkers    = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CodexBin         string
	JobsDir          string
	Root             string
	Timeout          time.Duration
	MaxConcurrency   int
	QueueLimit       int
	MaxFinal         int
	MaxJSON          int
	MaxDiag          int
	MaxPrompt        int
	Retention        int
	IgnoreUserConfig bool
	AllowNonGit      bool
	AllowFullAccess  bool
}

Config is the fully resolved server configuration.

func Default

func Default() Config

Default returns the defaults, with the jobs directory under the user's home.

func Load

func Load() (Config, error)

Load reads the environment over the defaults and validates the result.

func (Config) Validate

func (c Config) Validate() error

Validate rejects values that would make the server behave unpredictably.

Jump to

Keyboard shortcuts

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