codexcompose

package
v0.4.83 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 15 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 codexcompose is a self-contained, keyless one-shot text client for the command composer. It reuses the user's existing Codex / ChatGPT login (~/.codex/auth.json) and calls the Codex Responses endpoint. It deliberately does NOT plug into the streaming chat backend in this package — it's an isolated helper so it can't affect the interactive AI chat path.

The endpoint is undocumented/reverse-engineered and may change; callers must treat any error as non-fatal and surface structured status instead of secrets.

Index

Constants

View Source
const (
	StatusReady         = "ready"
	StatusLoginRequired = "loginrequired"
	StatusExpired       = "expired"
	StatusRequestFailed = "requestfailed"
	StatusEmptyResponse = "emptyresponse"
)

Variables

This section is empty.

Functions

func ComposeText

func ComposeText(ctx context.Context, systemPrompt string, userPrompt string) (string, error)

ComposeText sends a one-shot prompt and returns the accumulated assistant text.

func IsAvailable

func IsAvailable() bool

IsAvailable reports whether a usable Codex login is present.

Types

type Status added in v0.4.77

type Status struct {
	Available      bool
	Code           string
	Message        string
	LoginCommand   string
	InstallCommand string
	CliFound       bool
	HttpStatus     int
}

func AuthStatus added in v0.4.77

func AuthStatus() Status

func StatusForComposeError added in v0.4.77

func StatusForComposeError(err error) Status

Jump to

Keyboard shortcuts

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