Documentation
¶
Overview ¶
Package codexappserver provides the narrow Codex protocol boundary used by Atlas evaluations.
Index ¶
- type Client
- func (client *Client) Close(ctx context.Context) error
- func (client *Client) InterruptTurn(ctx context.Context, threadID string, turnID string) error
- func (client *Client) Notifications() <-chan Notification
- func (client *Client) NotificationsDropped() uint64
- func (client *Client) NotificationsDroppedBytes() uint64
- func (client *Client) StartThread(ctx context.Context, options ThreadOptions) (Thread, error)
- func (client *Client) StartTurn(ctx context.Context, threadID string, prompt string) (Turn, error)
- func (client *Client) Stderr() string
- func (client *Client) StderrDropped() uint64
- func (client *Client) UserAgent() string
- type Notification
- type PreparedLauncher
- type StartOptions
- type Thread
- type ThreadOptions
- type Turn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client owns one initialized app-server connection and the local process cleanup boundary available on this host.
func Start ¶
func Start(ctx context.Context, options StartOptions) (*Client, error)
Start checks the prepared Codex launcher digest immediately before starting and initializes one app-server connection.
func (*Client) Close ¶
Close terminates the app-server leader and every descendant qualified by the host tracker with a fresh cleanup budget.
func (*Client) InterruptTurn ¶
InterruptTurn asks Codex to cancel an active turn before process-group cleanup begins.
func (*Client) Notifications ¶
func (client *Client) Notifications() <-chan Notification
Notifications returns normalized server notifications in protocol order.
func (*Client) NotificationsDropped ¶
NotificationsDropped returns the number of lifecycle notifications discarded because the telemetry queue exceeded its message or byte limit.
func (*Client) NotificationsDroppedBytes ¶
NotificationsDroppedBytes returns the encoded lifecycle bytes discarded by the bounded telemetry queue.
func (*Client) StartThread ¶
StartThread creates a new thread and returns the effective identity reported by Codex.
func (*Client) StartTurn ¶
StartTurn submits one natural-language task to a fresh evaluation thread.
func (*Client) Stderr ¶
Stderr returns a snapshot of app-server diagnostics captured outside the candidate Project.
func (*Client) StderrDropped ¶
StderrDropped returns the number of stderr bytes omitted from retained diagnostics.
type Notification ¶
type Notification struct {
Method string
Params json.RawMessage
}
Notification is one app-server lifecycle message not paired with a client request.
type PreparedLauncher ¶
PreparedLauncher binds the configured launcher name to the path and bytes resolved during preparation.
func ResolveLauncher ¶
func ResolveLauncher(candidate string) (PreparedLauncher, error)
ResolveLauncher returns the resolved launcher path and SHA-256 digest of its current bytes.
type StartOptions ¶
type StartOptions struct {
Launcher PreparedLauncher
Arguments []string
Dir string
Env []string
}
StartOptions configures one private Codex app-server process.
type Thread ¶
type Thread struct {
ID string
Model string
ModelProvider string
ApprovalPolicy string
Sandbox string
InstructionSources []string
Ephemeral bool
}
Thread describes the effective identity and guidance returned by Codex.