codexstate

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 14 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCodexExecutable

func FindCodexExecutable() string

FindCodexExecutable prefers the client bundled with the desktop app, so Codex Switch speaks the same client version as the app it serves.

Types

type EffectiveModelConfig

type EffectiveModelConfig struct {
	Model         string
	Provider      string
	OpenAIBaseURL *string
}

type LocalReader

type LocalReader struct {
	CodexHome       string
	CodexExecutable string
}

func DefaultReader

func DefaultReader() (*LocalReader, error)

func (LocalReader) ModelConfig

func (r LocalReader) ModelConfig(ctx context.Context) (EffectiveModelConfig, error)

ModelConfig reads Codex's effective, layered model configuration with the official config/read call. ChatGPT.app owns its app-server over private stdio, so this starts a one-shot app-server with no listener, performs one read and stops it. An absent provider means the built-in OpenAI provider; a nil URL means that provider uses its standard endpoint.

func (LocalReader) ModelConfigInputs added in v0.1.1

func (r LocalReader) ModelConfigInputs() string

ModelConfigInputs identifies every file Codex layers its effective config from, and the Codex executable, by inode, size and modification time. The effective config can change only when this does, so a caller starts an app-server to read it again only then. An absent file counts as an input: creating one changes the identity.

func (LocalReader) TaskTitleInputs added in v0.1.1

func (r LocalReader) TaskTitleInputs() (string, error)

TaskTitleInputs identifies Codex's thread database and its write-ahead log, where a new or renamed task lands first. Titles can change only when this does.

func (LocalReader) TaskTitles

func (r LocalReader) TaskTitles(ctx context.Context, taskIDs []string) (map[string]string, error)

TaskTitles names the requested tasks from the current Codex home. A task takes the name Codex gave it. A task Codex did not name, such as a codex exec run, is named by how it was started and its project, for example "codex exec · codex-switch". Codex's stored title is the prompt's first line for those runs, so it is never shown.

func (LocalReader) UpdatedThreadRollouts added in v0.1.2

func (r LocalReader) UpdatedThreadRollouts(ctx context.Context, sinceMS int64) (string, []ThreadRollout, error)

type ThreadRollout added in v0.1.2

type ThreadRollout struct {
	ID          string
	Path        string
	UpdatedAtMS int64
	Archived    bool
}

ThreadRollout identifies a rollout changed in Codex's own thread index. Usage and lineage still come from the rollout, never the index.

Jump to

Keyboard shortcuts

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