codexapp

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 16 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 codexapp adapts Codex app-server interaction state and request-bound input responses and explicit instructions. Proxy observes the real TUI owner connection; pending replies stay request-bound, while explicit instructions use turn/start or turn/steer on that existing thread. Watch remains read-only. See docs/pending-input-response.md for protocol and ownership boundaries.

Index

Constants

This section is empty.

Variables

View Source
var Capabilities = bridge.InteractionCapabilities{
	InteractionStateSupported: true,
	ApprovalStateSupported:    true,
	PendingSummarySupported:   true,
}

Capabilities is what this client can authoritatively report for a Codex session observed through app-server: full interaction state, approval state, and a privacy-safe pending-request summary derived from the approval/input request's own structured fields (never raw PTY output).

Functions

func Watch

func Watch(ctx context.Context, wsURL string, logger *slog.Logger) (<-chan bridge.Interaction, error)

Watch provides a read-only secondary status subscription. The provider uses Proxy instead so pending requests are observed on the owning connection.

Types

type ResponseClient

type ResponseClient struct {
	Updates <-chan bridge.Interaction
	// contains filtered or unexported fields
}

ResponseClient shares request identity with the observer's single reader. Pending responses are JSON-RPC answers to an outstanding request. Instruct is a separate explicit operation; no remote operation writes terminal bytes.

func Proxy

func Proxy(ctx context.Context, upstream string) (string, *ResponseClient, error)

Proxy keeps the real TUI as the protocol owner. Codex sends pending requests only to that owner, not to a second status observer. Forwarding its connection gives responses the original RPC request identity and lets the TUI receive the provider's subsequent resolution notification. Picker and reconnect clients may use separate connections. Only a successful non-ephemeral thread start/resume/fork selects the response owner.

func (*ResponseClient) Decide

func (c *ResponseClient) Decide(ctx context.Context, pendingID, decision string) error

Decide answers only an explicitly supported command approval, once.

func (*ResponseClient) Instruct

func (c *ResponseClient) Instruct(ctx context.Context, text string) error

Instruct sends to the existing owner thread. It waits for the actual RPC result; an uncertain write/result remains unknown in the command ledger.

func (*ResponseClient) Observe

func (c *ResponseClient) Observe(after uint64, events, bytes int) bridge.ActivityWindow

func (*ResponseClient) Respond

func (c *ResponseClient) Respond(ctx context.Context, pendingID, text string) error

Jump to

Keyboard shortcuts

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