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 ¶
- Variables
- func Watch(ctx context.Context, wsURL string, logger *slog.Logger) (<-chan bridge.Interaction, error)
- type ResponseClient
- func (c *ResponseClient) Decide(ctx context.Context, pendingID, decision string) error
- func (c *ResponseClient) Instruct(ctx context.Context, text string) error
- func (c *ResponseClient) Observe(after uint64, events, bytes int) bridge.ActivityWindow
- func (c *ResponseClient) Respond(ctx context.Context, pendingID, text string) error
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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