Documentation
¶
Overview ¶
Package codex provides an idiomatic Go SDK for the Codex app-server.
The SDK spawns the `codex app-server` process (or uses a custom transport) and exposes a high-level facade for accounts, models, threads, turns, and streaming turn control. For lower-level access, you can reach the JSON-RPC client via (*Codex).Client().
Typical usage:
ctx := context.Background()
logger := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: slog.LevelInfo}))
prompt := "Diagnose the test failure and propose a fix"
client, err := codex.New(ctx, codex.Options{Logger: logger})
if err != nil {
panic(err)
}
defer client.Close()
The constructor context is used for initialization only. Once New returns successfully, the spawned app-server lifetime is managed by Close.
thread, err := client.StartThread(ctx, codex.ThreadStartOptions{})
if err != nil {
panic(err)
}
result, err := thread.Run(ctx, prompt, nil)
if err != nil {
panic(err)
}
fmt.Println(result.FinalResponse)
For a running turn that needs steering or interruption, start a turn handle:
handle, err := thread.StartTurn(ctx, []codex.Input{codex.TextInput("Inspect the repo")}, nil)
if err != nil {
panic(err)
}
defer handle.Close()
_, err = handle.Steer(ctx, []codex.Input{codex.TextInput("Focus on tests")})
if err != nil {
panic(err)
}
result, err = handle.Run(ctx)
if err != nil {
panic(err)
}
Account, model, and thread lifecycle helpers cover common app-server calls:
account, err := client.Account(ctx, codex.AccountOptions{})
models, err := client.ListModels(ctx, codex.ListModelsOptions{})
threads, err := client.ListThreads(ctx, codex.ThreadListOptions{})
_ = account
_ = models
_ = threads
JSON-typed options (approval policies, sandbox policies, output schemas, etc.) accept any JSON-marshalable value. If you already have raw JSON, pass json.RawMessage or codex.MustJSON(...) to avoid double encoding.
For common values, prefer typed constants:
- codex.ApprovalPolicyNever / codex.ApprovalPolicyOnRequest / ...
- codex.SandboxModeReadOnly / codex.SandboxModeWorkspaceWrite / ...
- codex.ReasoningEffortLow / codex.ReasoningEffortMedium / ...
Overload errors can be classified with codex.IsOverloaded. The helper works with wrapped errors, but callers must decide retry safety from the operation's idempotency; classification alone cannot prove that a retry is safe.
A TurnHandle has one notification consumer. Choose Run, repeated Next calls, or Stream; mixing styles returns ErrTurnConsumptionMode. Failed turns return both their partial TurnResult and a *TurnError that matches ErrTurnFailed. FinalResponse is derived only from completed agentMessage items.
App-server requests should normally be configured with Options.RequestHandler and ServerRequestCallbacks. Unset callbacks report rpc.ErrServerRequestUnsupported. Options.ApprovalHandler and the broad rpc.ServerRequestHandler remain deprecated compatibility surfaces.
The protocol package uses canonical Go initialisms and concrete lifecycle response types. Prefer MCP... and OAuth... declarations and the typed thread sort and approval decision values; legacy spellings remain deprecated aliases.
Index ¶
- Constants
- Variables
- func IsOverloaded(err error) bool
- func IsRetryable(err error) booldeprecated
- type AccountOptions
- type ApprovalCallbackHandler
- type ApprovalPolicy
- type AutoApproveHandler
- func (h AutoApproveHandler) AccountChatgptAuthTokensRefresh(ctx context.Context, params protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
- func (h AutoApproveHandler) ApplyPatchApproval(ctx context.Context, params protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
- func (h AutoApproveHandler) AttestationGenerate(ctx context.Context, params protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
- func (h AutoApproveHandler) ExecCommandApproval(ctx context.Context, params protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
- func (h AutoApproveHandler) ItemCommandExecutionRequestApproval(ctx context.Context, params protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
- func (h AutoApproveHandler) ItemFileChangeRequestApproval(ctx context.Context, params protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
- func (h AutoApproveHandler) ItemPermissionsRequestApproval(ctx context.Context, params protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
- func (h AutoApproveHandler) ItemToolCall(ctx context.Context, params protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
- func (h AutoApproveHandler) ItemToolRequestUserInput(ctx context.Context, params protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
- func (h AutoApproveHandler) MCPServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
- func (h AutoApproveHandler) McpServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)deprecated
- type Codex
- func (c *Codex) Account(ctx context.Context, opts AccountOptions) (*protocol.GetAccountResponse, error)
- func (c *Codex) ArchiveThread(ctx context.Context, threadID string) (*protocol.ThreadArchiveResponse, error)
- func (c *Codex) CancelLogin(ctx context.Context, loginID string) (*protocol.CancelLoginAccountResponse, error)
- func (c *Codex) Client() *rpc.Client
- func (c *Codex) Close() error
- func (c *Codex) CompactThread(ctx context.Context, threadID string, opts ThreadCompactOptions) (*protocol.ThreadCompactStartResponse, error)
- func (c *Codex) ForkThread(ctx context.Context, threadID string, opts ThreadForkOptions) (*Thread, protocol.ThreadForkResponse, error)
- func (c *Codex) ListModels(ctx context.Context, opts ListModelsOptions) (*protocol.ModelListResponse, error)
- func (c *Codex) ListThreads(ctx context.Context, opts ThreadListOptions) (*protocol.ThreadListResponse, error)
- func (c *Codex) Logout(ctx context.Context) (*protocol.LogoutAccountResponse, error)
- func (c *Codex) ReadThread(ctx context.Context, threadID string, opts ThreadReadOptions) (*protocol.ThreadReadResponse, error)
- func (c *Codex) ResumeThread(ctx context.Context, options ThreadResumeOptions) (*Thread, error)
- func (c *Codex) SetThreadName(ctx context.Context, threadID, name string) (*protocol.ThreadSetNameResponse, error)
- func (c *Codex) StartLogin(ctx context.Context, params any) (*protocol.LoginAccountResponse, error)
- func (c *Codex) StartThread(ctx context.Context, options ThreadStartOptions) (*Thread, error)
- func (c *Codex) UnarchiveThread(ctx context.Context, threadID string) (*protocol.ThreadUnarchiveResponse, error)
- type CodexCompatibilityError
- type CompatibilityPolicy
- type Input
- type ListModelsOptions
- type Options
- type RawJSON
- type ReasoningEffort
- type RejectingApprovalHandler
- func (RejectingApprovalHandler) AccountChatgptAuthTokensRefresh(context.Context, protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
- func (RejectingApprovalHandler) ApplyPatchApproval(context.Context, protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
- func (RejectingApprovalHandler) AttestationGenerate(context.Context, protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
- func (RejectingApprovalHandler) ExecCommandApproval(context.Context, protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
- func (RejectingApprovalHandler) ItemCommandExecutionRequestApproval(context.Context, protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
- func (RejectingApprovalHandler) ItemFileChangeRequestApproval(context.Context, protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
- func (RejectingApprovalHandler) ItemPermissionsRequestApproval(context.Context, protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
- func (RejectingApprovalHandler) ItemToolCall(context.Context, protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
- func (RejectingApprovalHandler) ItemToolRequestUserInput(context.Context, protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
- func (RejectingApprovalHandler) MCPServerElicitationRequest(context.Context, protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
- func (h RejectingApprovalHandler) McpServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)deprecated
- type SandboxMode
- type ServerRequestCallbacks
- func (h ServerRequestCallbacks) AccountChatgptAuthTokensRefresh(ctx context.Context, params protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
- func (h ServerRequestCallbacks) ApplyPatchApproval(ctx context.Context, params protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
- func (h ServerRequestCallbacks) AttestationGenerate(ctx context.Context, params protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
- func (h ServerRequestCallbacks) ExecCommandApproval(ctx context.Context, params protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
- func (h ServerRequestCallbacks) ItemCommandExecutionRequestApproval(ctx context.Context, params protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
- func (h ServerRequestCallbacks) ItemFileChangeRequestApproval(ctx context.Context, params protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
- func (h ServerRequestCallbacks) ItemPermissionsRequestApproval(ctx context.Context, params protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
- func (h ServerRequestCallbacks) ItemToolCall(ctx context.Context, params protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
- func (h ServerRequestCallbacks) ItemToolRequestUserInput(ctx context.Context, params protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
- func (h ServerRequestCallbacks) MCPServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
- func (h ServerRequestCallbacks) McpServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)deprecated
- type SpawnOptions
- type Thread
- func (t *Thread) Archive(ctx context.Context) (*protocol.ThreadArchiveResponse, error)
- func (t *Thread) Compact(ctx context.Context, opts ThreadCompactOptions) (*protocol.ThreadCompactStartResponse, error)
- func (t *Thread) Fork(ctx context.Context, opts ThreadForkOptions) (*Thread, protocol.ThreadForkResponse, error)
- func (t *Thread) ID() string
- func (t *Thread) Read(ctx context.Context, opts ThreadReadOptions) (*protocol.ThreadReadResponse, error)
- func (t *Thread) Run(ctx context.Context, prompt string, opts *TurnOptions) (*TurnResult, error)
- func (t *Thread) RunInputs(ctx context.Context, inputs []Input, opts *TurnOptions) (*TurnResult, error)
- func (t *Thread) RunStreamed(ctx context.Context, inputs []Input, opts *TurnOptions) (*TurnStream, error)
- func (t *Thread) SetName(ctx context.Context, name string) (*protocol.ThreadSetNameResponse, error)
- func (t *Thread) StartTurn(ctx context.Context, inputs []Input, opts *TurnOptions) (*TurnHandle, error)
- func (t *Thread) Unarchive(ctx context.Context) (*protocol.ThreadUnarchiveResponse, error)
- type ThreadCompactOptions
- type ThreadForkOptions
- type ThreadListOptions
- type ThreadReadOptions
- type ThreadResumeHistoryElemdeprecated
- type ThreadResumeOptions
- type ThreadStartOptions
- type TurnError
- type TurnHandle
- func (h *TurnHandle) Close()
- func (h *TurnHandle) ID() string
- func (h *TurnHandle) Interrupt(ctx context.Context) (*protocol.TurnInterruptResponse, error)
- func (h *TurnHandle) Next(ctx context.Context) (rpc.Notification, error)
- func (h *TurnHandle) Run(ctx context.Context) (*TurnResult, error)
- func (h *TurnHandle) Steer(ctx context.Context, inputs []Input) (*protocol.TurnSteerResponse, error)
- func (h *TurnHandle) Stream() (*TurnStream, error)
- type TurnOptions
- type TurnResult
- type TurnStream
- type UnsafeLoggingAutoApproveHandler
- func (h UnsafeLoggingAutoApproveHandler) ApplyPatchApproval(ctx context.Context, params protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
- func (h UnsafeLoggingAutoApproveHandler) ExecCommandApproval(ctx context.Context, params protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
- func (h UnsafeLoggingAutoApproveHandler) ItemCommandExecutionRequestApproval(ctx context.Context, params protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
- func (h UnsafeLoggingAutoApproveHandler) ItemFileChangeRequestApproval(ctx context.Context, params protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
- func (h UnsafeLoggingAutoApproveHandler) ItemPermissionsRequestApproval(ctx context.Context, params protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
Constants ¶
const ( // InputTypeText represents a plain text input. InputTypeText = "text" // InputTypeImage represents a remote image input. InputTypeImage = "image" // InputTypeLocalImage represents a local image input. InputTypeLocalImage = "localImage" // InputTypeAudio represents a remote audio input. InputTypeAudio = "audio" // InputTypeLocalAudio represents a local audio input. InputTypeLocalAudio = "localAudio" // InputTypeSkill represents a skill invocation input. InputTypeSkill = "skill" )
Variables ¶
var ErrOverloaded = errors.New("codex overloaded")
ErrOverloaded identifies retryable overload or server-busy failures.
var ErrTurnConsumptionMode = errors.New("turn handle already has a consumer")
ErrTurnConsumptionMode identifies attempts to mix Run, Next, and Stream on the same TurnHandle or to consume it concurrently.
var ErrTurnFailed = errors.New("turn failed")
ErrTurnFailed identifies a terminal turn failure.
Functions ¶
func IsOverloaded ¶
IsOverloaded reports whether err indicates an overload or server-busy failure.
func IsRetryable
deprecated
IsRetryable reports whether err is classified as an overload failure. It does not determine whether retrying a particular operation is safe.
Deprecated: use IsOverloaded and decide retry safety based on whether the operation is idempotent or has an application-level idempotency key.
Types ¶
type AccountOptions ¶
type AccountOptions struct {
// RefreshToken requests a proactive token refresh before account data is returned.
RefreshToken bool
}
AccountOptions configures an account/read request.
type ApprovalCallbackHandler ¶ added in v0.147.0
type ApprovalCallbackHandler interface {
ApplyPatchApproval(context.Context, protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
ExecCommandApproval(context.Context, protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
ItemCommandExecutionRequestApproval(context.Context, protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
ItemFileChangeRequestApproval(context.Context, protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
ItemPermissionsRequestApproval(context.Context, protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
}
ApprovalCallbackHandler is the stable subset needed to adapt approval policies to ServerRequestCallbacks. Both AutoApproveHandler and UnsafeLoggingAutoApproveHandler implement it.
type ApprovalPolicy ¶
type ApprovalPolicy = string
ApprovalPolicy is a typed alias for common approval policy values.
const ( ApprovalPolicyNever ApprovalPolicy = "never" ApprovalPolicyOnFailure ApprovalPolicy = "on-failure" ApprovalPolicyOnRequest ApprovalPolicy = "on-request" ApprovalPolicyUntrusted ApprovalPolicy = "untrusted" )
type AutoApproveHandler ¶
AutoApproveHandler accepts every approval request it can. Use it only in a trusted environment. Logger controls redacted approval logging. Command bodies, paths, working directories, and permission payloads are never logged. When Logger is nil, logs are discarded.
func (AutoApproveHandler) AccountChatgptAuthTokensRefresh ¶
func (h AutoApproveHandler) AccountChatgptAuthTokensRefresh(ctx context.Context, params protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
AccountChatgptAuthTokensRefresh returns an error for auth refresh requests.
func (AutoApproveHandler) ApplyPatchApproval ¶
func (h AutoApproveHandler) ApplyPatchApproval(ctx context.Context, params protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
ApplyPatchApproval approves legacy patch requests.
func (AutoApproveHandler) AttestationGenerate ¶
func (h AutoApproveHandler) AttestationGenerate(ctx context.Context, params protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
AttestationGenerate returns an error for attestation generation requests.
func (AutoApproveHandler) ExecCommandApproval ¶
func (h AutoApproveHandler) ExecCommandApproval(ctx context.Context, params protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
ExecCommandApproval approves legacy command requests.
func (AutoApproveHandler) ItemCommandExecutionRequestApproval ¶
func (h AutoApproveHandler) ItemCommandExecutionRequestApproval(ctx context.Context, params protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
ItemCommandExecutionRequestApproval approves command execution requests.
func (AutoApproveHandler) ItemFileChangeRequestApproval ¶
func (h AutoApproveHandler) ItemFileChangeRequestApproval(ctx context.Context, params protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
ItemFileChangeRequestApproval approves file change requests.
func (AutoApproveHandler) ItemPermissionsRequestApproval ¶
func (h AutoApproveHandler) ItemPermissionsRequestApproval(ctx context.Context, params protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
ItemPermissionsRequestApproval approves permission escalation requests.
func (AutoApproveHandler) ItemToolCall ¶
func (h AutoApproveHandler) ItemToolCall(ctx context.Context, params protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
ItemToolCall returns an error for dynamic tool calls.
func (AutoApproveHandler) ItemToolRequestUserInput ¶
func (h AutoApproveHandler) ItemToolRequestUserInput(ctx context.Context, params protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
ItemToolRequestUserInput returns an error for tool user input prompts.
func (AutoApproveHandler) MCPServerElicitationRequest ¶ added in v0.147.0
func (h AutoApproveHandler) MCPServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
MCPServerElicitationRequest returns an error for MCP elicitation prompts.
func (AutoApproveHandler) McpServerElicitationRequest
deprecated
func (h AutoApproveHandler) McpServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
McpServerElicitationRequest preserves the legacy method spelling.
Deprecated: use MCPServerElicitationRequest.
type Codex ¶
type Codex struct {
// contains filtered or unexported fields
}
Codex is the main entrypoint for the Go SDK.
func (*Codex) Account ¶
func (c *Codex) Account(ctx context.Context, opts AccountOptions) (*protocol.GetAccountResponse, error)
Account returns account state from the app-server.
func (*Codex) ArchiveThread ¶
func (c *Codex) ArchiveThread(ctx context.Context, threadID string) (*protocol.ThreadArchiveResponse, error)
ArchiveThread archives a thread by id.
func (*Codex) CancelLogin ¶
func (c *Codex) CancelLogin(ctx context.Context, loginID string) (*protocol.CancelLoginAccountResponse, error)
CancelLogin cancels an in-progress account login flow.
func (*Codex) CompactThread ¶
func (c *Codex) CompactThread(ctx context.Context, threadID string, opts ThreadCompactOptions) (*protocol.ThreadCompactStartResponse, error)
CompactThread starts compaction for a thread by id.
func (*Codex) ForkThread ¶
func (c *Codex) ForkThread(ctx context.Context, threadID string, opts ThreadForkOptions) (*Thread, protocol.ThreadForkResponse, error)
ForkThread forks a thread by id and returns the newly forked thread.
func (*Codex) ListModels ¶
func (c *Codex) ListModels(ctx context.Context, opts ListModelsOptions) (*protocol.ModelListResponse, error)
ListModels returns available models from the app-server.
func (*Codex) ListThreads ¶
func (c *Codex) ListThreads(ctx context.Context, opts ThreadListOptions) (*protocol.ThreadListResponse, error)
ListThreads returns persisted threads visible to the app-server.
func (*Codex) ReadThread ¶
func (c *Codex) ReadThread(ctx context.Context, threadID string, opts ThreadReadOptions) (*protocol.ThreadReadResponse, error)
ReadThread reads a persisted thread by id.
func (*Codex) ResumeThread ¶
ResumeThread resumes an existing thread.
func (*Codex) SetThreadName ¶
func (c *Codex) SetThreadName(ctx context.Context, threadID, name string) (*protocol.ThreadSetNameResponse, error)
SetThreadName sets the display name for a thread by id.
func (*Codex) StartLogin ¶
StartLogin starts an app-server account login flow using JSON-marshalable protocol login params.
func (*Codex) StartThread ¶
StartThread starts a new thread using the app-server.
func (*Codex) UnarchiveThread ¶
func (c *Codex) UnarchiveThread(ctx context.Context, threadID string) (*protocol.ThreadUnarchiveResponse, error)
UnarchiveThread unarchives a thread by id.
type CodexCompatibilityError ¶ added in v0.145.0
type CodexCompatibilityError struct {
Path string
RuntimeVersion string
GeneratedVersion string
GeneratedCommit string
Reason string
Hint string
Cause error
}
CodexCompatibilityError reports why a spawned Codex CLI could not be proven compatible with the generated protocol package.
func (*CodexCompatibilityError) Error ¶ added in v0.145.0
func (e *CodexCompatibilityError) Error() string
func (*CodexCompatibilityError) Unwrap ¶ added in v0.145.0
func (e *CodexCompatibilityError) Unwrap() error
Unwrap exposes a version-probe failure, when present.
type CompatibilityPolicy ¶ added in v0.145.0
type CompatibilityPolicy uint8
CompatibilityPolicy controls spawned Codex CLI version validation.
const ( // RequireMajorMinor requires the runtime and generated protocol to have the // same major and minor version. Patch differences are allowed. RequireMajorMinor CompatibilityPolicy = iota // Warn logs compatibility failures and continues. Supply Options.Logger to // observe the warning. Warn // Ignore disables the Codex CLI version probe. Ignore )
type Input ¶
type Input struct {
// Type must be one of the InputType* constants.
Type string `json:"type"`
Text string `json:"text,omitempty"`
TextElements []protocol.TextElement `json:"text_elements,omitempty"`
URL string `json:"url,omitempty"`
Path string `json:"path,omitempty"`
Name string `json:"name,omitempty"`
}
Input represents a structured user input message.
func AudioInput ¶ added in v0.147.0
AudioInput creates a remote audio input entry.
func LocalAudioInput ¶ added in v0.147.0
LocalAudioInput creates a local audio input entry.
func LocalImageInput ¶
LocalImageInput creates a local image input entry.
func MentionInput ¶
MentionInput creates a text input containing a single mention placeholder.
type ListModelsOptions ¶
type ListModelsOptions struct {
// Cursor continues listing after a previous response cursor.
Cursor string
// IncludeHidden includes models hidden from the default picker list.
IncludeHidden *bool
// Limit caps the number of models returned by the app-server.
Limit *int
}
ListModelsOptions configures a model/list request.
type Options ¶
type Options struct {
// Transport overrides the default stdio spawn.
Transport rpc.Transport
// Spawn controls how the default stdio process is launched.
Spawn SpawnOptions
// Logger receives SDK logs. If nil, logging is disabled.
Logger *slog.Logger
// ClientInfo identifies this SDK to the app-server.
ClientInfo protocol.ClientInfo
// ApprovalHandler handles server approval requests.
//
// Deprecated: use RequestHandler. ApprovalHandler requires the broad legacy
// rpc.ServerRequestHandler interface.
//lint:ignore SA1019 retained for source compatibility during the deprecation window
ApprovalHandler rpc.ServerRequestHandler
// RequestHandler provides optional, forward-compatible app-server callbacks.
// It conflicts with ApprovalHandler when both are configured. The client may
// invoke different callbacks concurrently, so callbacks that share state must
// synchronize access to it.
RequestHandler *ServerRequestCallbacks
// CompatibilityPolicy controls validation of a spawned Codex CLI. The zero
// value, RequireMajorMinor, rejects binaries whose major/minor version cannot
// be verified against the generated protocol. Custom transports are not probed.
CompatibilityPolicy CompatibilityPolicy
}
Options configures the Codex client.
type ReasoningEffort ¶
type ReasoningEffort = protocol.ReasoningEffort
ReasoningEffort is a typed alias for standard effort values.
const ( ReasoningEffortNone ReasoningEffort = "none" ReasoningEffortMinimal ReasoningEffort = "minimal" ReasoningEffortLow ReasoningEffort = "low" ReasoningEffortMedium ReasoningEffort = "medium" ReasoningEffortHigh ReasoningEffort = "high" ReasoningEffortXHigh ReasoningEffort = "xhigh" )
type RejectingApprovalHandler ¶ added in v0.145.0
type RejectingApprovalHandler struct{}
RejectingApprovalHandler rejects approval requests and returns errors for interactive requests that require an application-specific policy. Its zero value is ready for use.
func (RejectingApprovalHandler) AccountChatgptAuthTokensRefresh ¶ added in v0.145.0
func (RejectingApprovalHandler) AccountChatgptAuthTokensRefresh(context.Context, protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
func (RejectingApprovalHandler) ApplyPatchApproval ¶ added in v0.145.0
func (RejectingApprovalHandler) ApplyPatchApproval(context.Context, protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
func (RejectingApprovalHandler) AttestationGenerate ¶ added in v0.145.0
func (RejectingApprovalHandler) AttestationGenerate(context.Context, protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
func (RejectingApprovalHandler) ExecCommandApproval ¶ added in v0.145.0
func (RejectingApprovalHandler) ExecCommandApproval(context.Context, protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
func (RejectingApprovalHandler) ItemCommandExecutionRequestApproval ¶ added in v0.145.0
func (RejectingApprovalHandler) ItemCommandExecutionRequestApproval(context.Context, protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
func (RejectingApprovalHandler) ItemFileChangeRequestApproval ¶ added in v0.145.0
func (RejectingApprovalHandler) ItemFileChangeRequestApproval(context.Context, protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
func (RejectingApprovalHandler) ItemPermissionsRequestApproval ¶ added in v0.145.0
func (RejectingApprovalHandler) ItemPermissionsRequestApproval(context.Context, protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
func (RejectingApprovalHandler) ItemToolCall ¶ added in v0.145.0
func (RejectingApprovalHandler) ItemToolCall(context.Context, protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
func (RejectingApprovalHandler) ItemToolRequestUserInput ¶ added in v0.145.0
func (RejectingApprovalHandler) ItemToolRequestUserInput(context.Context, protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
func (RejectingApprovalHandler) MCPServerElicitationRequest ¶ added in v0.147.0
func (RejectingApprovalHandler) MCPServerElicitationRequest(context.Context, protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
func (RejectingApprovalHandler) McpServerElicitationRequest
deprecated
added in
v0.145.0
func (h RejectingApprovalHandler) McpServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
McpServerElicitationRequest preserves the legacy method spelling.
Deprecated: use MCPServerElicitationRequest.
type SandboxMode ¶
type SandboxMode = protocol.SandboxMode
SandboxMode is a typed alias for simple sandbox mode values.
const ( SandboxModeReadOnly SandboxMode = protocol.SandboxModeReadOnly SandboxModeWorkspaceWrite SandboxMode = protocol.SandboxModeWorkspaceWrite SandboxModeDangerFullAccess SandboxMode = protocol.SandboxModeDangerFullAccess )
type ServerRequestCallbacks ¶ added in v0.147.0
type ServerRequestCallbacks struct {
// RefreshAuthTokens handles account/chatgptAuthTokens/refresh.
RefreshAuthTokens func(context.Context, protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
// ApprovePatch handles the legacy applyPatchApproval request.
ApprovePatch func(context.Context, protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
// GenerateAttestation handles attestation/generate.
GenerateAttestation func(context.Context, protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
// ApproveCommand handles the legacy execCommandApproval request.
ApproveCommand func(context.Context, protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
// ApproveCommandExecution handles item/commandExecution/requestApproval.
ApproveCommandExecution func(context.Context, protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
// ApproveFileChange handles item/fileChange/requestApproval.
ApproveFileChange func(context.Context, protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
// ApprovePermissions handles item/permissions/requestApproval.
ApprovePermissions func(context.Context, protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
// CallTool handles item/tool/call.
CallTool func(context.Context, protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
// RequestUserInput handles item/tool/requestUserInput.
RequestUserInput func(context.Context, protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
// RequestMCPServerElicitation handles mcpServer/elicitation/request.
RequestMCPServerElicitation func(context.Context, protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
}
ServerRequestCallbacks is a forward-compatible set of optional callbacks for requests initiated by the app-server. Unset callbacks report rpc.ErrServerRequestUnsupported. The client may invoke different callbacks concurrently; callbacks that share state must synchronize access to it.
func AutoApproveCallbacks ¶ added in v0.147.0
func AutoApproveCallbacks(handler ApprovalCallbackHandler) *ServerRequestCallbacks
AutoApproveCallbacks adapts the approval methods of handler to the preferred optional-callback API. Non-approval server requests remain unsupported.
func RejectingApprovalCallbacks ¶ added in v0.147.0
func RejectingApprovalCallbacks() *ServerRequestCallbacks
RejectingApprovalCallbacks returns preferred optional callbacks that reject command, patch, file-change, and permission approval requests.
func (ServerRequestCallbacks) AccountChatgptAuthTokensRefresh ¶ added in v0.147.0
func (h ServerRequestCallbacks) AccountChatgptAuthTokensRefresh(ctx context.Context, params protocol.ChatgptAuthTokensRefreshParams) (*protocol.ChatgptAuthTokensRefreshResponse, error)
func (ServerRequestCallbacks) ApplyPatchApproval ¶ added in v0.147.0
func (h ServerRequestCallbacks) ApplyPatchApproval(ctx context.Context, params protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
func (ServerRequestCallbacks) AttestationGenerate ¶ added in v0.147.0
func (h ServerRequestCallbacks) AttestationGenerate(ctx context.Context, params protocol.AttestationGenerateParams) (*protocol.AttestationGenerateResponse, error)
func (ServerRequestCallbacks) ExecCommandApproval ¶ added in v0.147.0
func (h ServerRequestCallbacks) ExecCommandApproval(ctx context.Context, params protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
func (ServerRequestCallbacks) ItemCommandExecutionRequestApproval ¶ added in v0.147.0
func (h ServerRequestCallbacks) ItemCommandExecutionRequestApproval(ctx context.Context, params protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
func (ServerRequestCallbacks) ItemFileChangeRequestApproval ¶ added in v0.147.0
func (h ServerRequestCallbacks) ItemFileChangeRequestApproval(ctx context.Context, params protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
func (ServerRequestCallbacks) ItemPermissionsRequestApproval ¶ added in v0.147.0
func (h ServerRequestCallbacks) ItemPermissionsRequestApproval(ctx context.Context, params protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
func (ServerRequestCallbacks) ItemToolCall ¶ added in v0.147.0
func (h ServerRequestCallbacks) ItemToolCall(ctx context.Context, params protocol.DynamicToolCallParams) (*protocol.DynamicToolCallResponse, error)
func (ServerRequestCallbacks) ItemToolRequestUserInput ¶ added in v0.147.0
func (h ServerRequestCallbacks) ItemToolRequestUserInput(ctx context.Context, params protocol.ToolRequestUserInputParams) (*protocol.ToolRequestUserInputResponse, error)
func (ServerRequestCallbacks) MCPServerElicitationRequest ¶ added in v0.147.0
func (h ServerRequestCallbacks) MCPServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
func (ServerRequestCallbacks) McpServerElicitationRequest
deprecated
added in
v0.147.0
func (h ServerRequestCallbacks) McpServerElicitationRequest(ctx context.Context, params protocol.MCPServerElicitationRequestParams) (*protocol.MCPServerElicitationRequestResponse, error)
McpServerElicitationRequest preserves the legacy method spelling.
Deprecated: use MCPServerElicitationRequest.
type SpawnOptions ¶
type SpawnOptions struct {
// CodexPath is the path to the codex binary (defaults to "codex").
CodexPath string
// ConfigOverrides are passed as --config key=value flags.
ConfigOverrides []string
// ExtraArgs are appended to the command line.
ExtraArgs []string
// Stderr captures stderr from the codex process (defaults to os.Stderr).
Stderr io.Writer
}
SpawnOptions configures the spawned codex app-server process.
type Thread ¶
type Thread struct {
// contains filtered or unexported fields
}
Thread represents an active conversation thread.
func (*Thread) Compact ¶
func (t *Thread) Compact(ctx context.Context, opts ThreadCompactOptions) (*protocol.ThreadCompactStartResponse, error)
Compact starts compaction for this thread.
func (*Thread) Fork ¶
func (t *Thread) Fork(ctx context.Context, opts ThreadForkOptions) (*Thread, protocol.ThreadForkResponse, error)
Fork forks this thread and returns the newly forked thread.
func (*Thread) Read ¶
func (t *Thread) Read(ctx context.Context, opts ThreadReadOptions) (*protocol.ThreadReadResponse, error)
Read reads this thread from the app-server.
func (*Thread) Run ¶
func (t *Thread) Run(ctx context.Context, prompt string, opts *TurnOptions) (*TurnResult, error)
Run sends a text prompt and waits for the turn to finish.
func (*Thread) RunInputs ¶
func (t *Thread) RunInputs(ctx context.Context, inputs []Input, opts *TurnOptions) (*TurnResult, error)
RunInputs sends structured inputs and waits for the turn to finish. If ctx is canceled or expires, it best-effort interrupts the remote turn before returning the original context error. Use RunStreamed to retain manual control over whether remote work is interrupted.
func (*Thread) RunStreamed ¶
func (t *Thread) RunStreamed(ctx context.Context, inputs []Input, opts *TurnOptions) (*TurnStream, error)
RunStreamed sends structured inputs and returns a streaming iterator. The iterator includes thread-scoped events and any notifications that omit threadId (for example account/session updates).
func (*Thread) StartTurn ¶
func (t *Thread) StartTurn(ctx context.Context, inputs []Input, opts *TurnOptions) (*TurnHandle, error)
StartTurn sends structured inputs and returns a handle for the running turn.
type ThreadCompactOptions ¶
type ThreadCompactOptions struct{}
ThreadCompactOptions configures a thread/compact/start request.
type ThreadForkOptions ¶
type ThreadForkOptions struct {
Model string
ModelProvider string
ServiceTier string
LastTurnID string
Cwd string
ApprovalPolicy any
Sandbox any
Config map[string]any
BaseInstructions string
DeveloperInstructions string
Ephemeral *bool
// Deprecated: exclude turns is no longer supported by the app-server protocol.
ExcludeTurns *bool
}
ThreadForkOptions configures a thread/fork request.
type ThreadListOptions ¶
type ThreadListOptions struct {
Archived *bool
Cursor string
Cwd any
// IsPinned is retained for source compatibility with Codex versions before
// 0.147. Codex 0.147 replaces pinned-thread organization with sections.
//
// Deprecated: use SectionID or Unsectioned.
IsPinned *bool
Limit *int
ModelProviders []string
SearchTerm string
// SectionID limits results to one persisted section. It cannot be combined
// with Unsectioned.
SectionID string
SortDirection protocol.SortDirection
SortKey protocol.ThreadSortKey
SourceKinds []protocol.ThreadSourceKind
// Unsectioned limits results to threads that do not belong to a section. It
// cannot be combined with SectionID.
Unsectioned bool
UseStateDBOnly *bool
}
ThreadListOptions configures a thread/list request.
type ThreadReadOptions ¶
type ThreadReadOptions struct {
IncludeTurns bool
}
ThreadReadOptions configures a thread/read request.
type ThreadResumeHistoryElem
deprecated
type ThreadResumeHistoryElem = json.RawMessage
ThreadResumeHistoryElem keeps the old unstable history field compilable for callers, but the current app-server protocol no longer accepts history-based thread resume.
Deprecated: history-based thread resume is no longer supported.
type ThreadResumeOptions ¶
type ThreadResumeOptions struct {
// ThreadID resumes a persisted thread by id.
ThreadID string
// History is retained for source compatibility, but the current app-server
// protocol no longer supports history-based resume. Passing History returns an
// error from toParams.
//
// Deprecated: history-based thread resume is no longer supported.
History []ThreadResumeHistoryElem
// Path is retained for source compatibility, but the current app-server
// protocol no longer supports path-based resume. Passing Path returns an error
// from toParams.
//
// Deprecated: path-based thread resume is no longer supported.
Path string
Model string
ModelProvider string
ServiceTier string
Cwd string
// ApprovalPolicy is marshaled as JSON and sent as "approvalPolicy".
// Prefer ApprovalPolicy* constants for simple policies.
ApprovalPolicy any
// Sandbox is marshaled as JSON and sent as "sandbox".
// Prefer SandboxMode* constants for simple policies.
Sandbox any
Config map[string]any
BaseInstructions string
DeveloperInstructions string
}
ThreadResumeOptions configures a thread/resume request.
type ThreadStartOptions ¶
type ThreadStartOptions struct {
Model string
ModelProvider string
ServiceTier string
Cwd string
// ApprovalPolicy is marshaled as JSON and sent as "approvalPolicy".
// Prefer ApprovalPolicy* constants for simple policies.
ApprovalPolicy any
// SandboxPolicy is marshaled as JSON and sent as "sandbox".
// Prefer SandboxMode* constants for simple policies.
SandboxPolicy any
Config map[string]any
ServiceName string
BaseInstructions string
DeveloperInstructions string
Ephemeral *bool
// ExperimentalRawEvents is retained for source compatibility, but the current
// app-server protocol no longer supports this option. Setting it returns an
// error from toParams.
//
// Deprecated: raw events are no longer supported by the app-server protocol.
ExperimentalRawEvents bool
}
ThreadStartOptions configures a thread/start request.
type TurnError ¶ added in v0.147.0
type TurnError struct {
Result *TurnResult
Method string
Detail *protocol.TurnError
WillRetry bool
Raw json.RawMessage
}
TurnError describes a terminal turn failure and retains the partial result and complete structured wire details available at failure time.
type TurnHandle ¶
type TurnHandle struct {
// contains filtered or unexported fields
}
TurnHandle controls a running turn.
func (*TurnHandle) Close ¶
func (h *TurnHandle) Close()
Close releases the handle's notification subscription.
func (*TurnHandle) ID ¶ added in v0.145.0
func (h *TurnHandle) ID() string
ID returns the server-assigned turn ID when it is known.
func (*TurnHandle) Interrupt ¶
func (h *TurnHandle) Interrupt(ctx context.Context) (*protocol.TurnInterruptResponse, error)
Interrupt interrupts the active turn.
func (*TurnHandle) Next ¶
func (h *TurnHandle) Next(ctx context.Context) (rpc.Notification, error)
Next returns the next notification for this turn and updates the handle state.
func (*TurnHandle) Run ¶
func (h *TurnHandle) Run(ctx context.Context) (*TurnResult, error)
Run waits for this turn to complete and returns its aggregated result. It best-effort interrupts remote work after context cancellation, deadline, or notification overflow; cleanup is bounded and the original error is returned.
func (*TurnHandle) Steer ¶
func (h *TurnHandle) Steer(ctx context.Context, inputs []Input) (*protocol.TurnSteerResponse, error)
Steer sends additional input to the active turn.
func (*TurnHandle) Stream ¶
func (h *TurnHandle) Stream() (*TurnStream, error)
Stream returns the handle's notification stream.
type TurnOptions ¶
type TurnOptions struct {
ClientUserMessageID string
Cwd string
// ApprovalPolicy is marshaled as JSON and sent as "approvalPolicy".
// Prefer ApprovalPolicy* constants for simple policies.
ApprovalPolicy any
// SandboxPolicy is marshaled as JSON and sent as "sandboxPolicy".
// Prefer SandboxMode* constants for simple policies.
SandboxPolicy any
Model string
ServiceTier string
// Effort is marshaled as JSON and sent as "effort".
// Prefer ReasoningEffort* constants for standard values.
Effort any
// Summary is marshaled as JSON and sent as "summary".
Summary any
// OutputSchema is marshaled as JSON and sent as "outputSchema".
OutputSchema any
// CollaborationMode is retained for source compatibility, but the current
// app-server protocol no longer supports this option. Setting it returns an
// error from buildTurnParams.
//
// Deprecated: collaboration mode is no longer supported by the app-server protocol.
CollaborationMode any
}
TurnOptions configures a turn/start request.
type TurnResult ¶
type TurnResult struct {
TurnID string
Status string
ErrorMessage string
Notifications []rpc.Notification
// Items holds the raw JSON payloads for completed items.
Items []json.RawMessage
FinalResponse string
TokenUsage *protocol.ThreadTokenUsage
CreatedAt *time.Time
CompletedAt *time.Time
}
TurnResult aggregates notifications for a completed turn.
type TurnStream ¶
type TurnStream struct {
// contains filtered or unexported fields
}
TurnStream iterates notifications for a running turn. Notifications that omit threadId are still emitted to avoid dropping global events sent during the turn.
func (*TurnStream) Next ¶
func (s *TurnStream) Next(ctx context.Context) (rpc.Notification, error)
Next returns the next notification for this turn. Notifications without threadId are treated as belonging to the active stream.
type UnsafeLoggingAutoApproveHandler ¶ added in v0.145.0
type UnsafeLoggingAutoApproveHandler struct {
AutoApproveHandler
}
UnsafeLoggingAutoApproveHandler opts into logging sensitive approval payloads. Use only when logs have access controls appropriate for command text and paths.
func NewUnsafeLoggingAutoApproveHandler ¶ added in v0.145.0
func NewUnsafeLoggingAutoApproveHandler(logger *slog.Logger) UnsafeLoggingAutoApproveHandler
NewUnsafeLoggingAutoApproveHandler returns an auto-approver that logs sensitive command and path details.
func (UnsafeLoggingAutoApproveHandler) ApplyPatchApproval ¶ added in v0.145.0
func (h UnsafeLoggingAutoApproveHandler) ApplyPatchApproval(ctx context.Context, params protocol.ApplyPatchApprovalParams) (*protocol.ApplyPatchApprovalResponse, error)
func (UnsafeLoggingAutoApproveHandler) ExecCommandApproval ¶ added in v0.145.0
func (h UnsafeLoggingAutoApproveHandler) ExecCommandApproval(ctx context.Context, params protocol.ExecCommandApprovalParams) (*protocol.ExecCommandApprovalResponse, error)
func (UnsafeLoggingAutoApproveHandler) ItemCommandExecutionRequestApproval ¶ added in v0.145.0
func (h UnsafeLoggingAutoApproveHandler) ItemCommandExecutionRequestApproval(ctx context.Context, params protocol.CommandExecutionRequestApprovalParams) (*protocol.CommandExecutionRequestApprovalResponse, error)
func (UnsafeLoggingAutoApproveHandler) ItemFileChangeRequestApproval ¶ added in v0.145.0
func (h UnsafeLoggingAutoApproveHandler) ItemFileChangeRequestApproval(ctx context.Context, params protocol.FileChangeRequestApprovalParams) (*protocol.FileChangeRequestApprovalResponse, error)
func (UnsafeLoggingAutoApproveHandler) ItemPermissionsRequestApproval ¶ added in v0.145.0
func (h UnsafeLoggingAutoApproveHandler) ItemPermissionsRequestApproval(ctx context.Context, params protocol.PermissionsRequestApprovalParams) (*protocol.PermissionsRequestApprovalResponse, error)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
approvals
command
|
|
|
lifecycle
command
|
|
|
low_level_rpc
command
|
|
|
quickstart
command
|
|
|
streaming
command
|
|
|
structured_output
command
|
|
|
internal
|
|
|
codegen
command
|
|
|
Package protocol contains the app-server wire model generated from the Codex release identified by GeneratedCodexVersion and GeneratedCodexCommit.
|
Package protocol contains the app-server wire model generated from the Codex release identified by GeneratedCodexVersion and GeneratedCodexCommit. |
|
Package rpc provides a minimal JSON-RPC client tailored to the Codex app-server.
|
Package rpc provides a minimal JSON-RPC client tailored to the Codex app-server. |