codexcompose

package
v0.4.79 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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