Documentation
¶
Index ¶
- type Event
- type Message
- type Process
- func (p *Process) Close() error
- func (p *Process) InterruptTurn(threadID, turnID string) error
- func (p *Process) IsThreadInitialized(threadID string) bool
- func (p *Process) MarkThreadInitialized(threadID string)
- func (p *Process) StartThread(cwd, model string) (string, error)
- func (p *Process) StartTurn(threadID string, input []map[string]any, effort string) error
- func (p *Process) Subscribe(threadID string) chan *Event
- func (p *Process) Unsubscribe(threadID string, ch chan *Event)
- type RPCError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Method string `json:"method"`
Params json.RawMessage `json:"params"`
}
Event is a notification forwarded to SSE subscribers.
type Message ¶
type Message struct {
Method string `json:"method,omitempty"`
ID *int64 `json:"id,omitempty"`
Params json.RawMessage `json:"params,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
Message is a JSON-RPC 2.0 message on the wire.
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process manages a codex app-server subprocess via stdio JSON-RPC.
func New ¶
New creates a process manager. The subprocess is started lazily. logDir specifies where to write per-session JSONL event logs. Empty disables logging.
func (*Process) InterruptTurn ¶
InterruptTurn cancels the active turn.
func (*Process) IsThreadInitialized ¶
IsThreadInitialized returns true if the thread has had its first turn.
func (*Process) MarkThreadInitialized ¶
MarkThreadInitialized marks a thread as having received its first turn.
func (*Process) StartThread ¶
StartThread creates a new codex thread.
func (*Process) StartTurn ¶
StartTurn sends a user message to an existing thread. effort controls reasoning intensity ("low", "medium", "high"); empty means server default.
func (*Process) Unsubscribe ¶
Unsubscribe removes a subscriber channel for a thread.