codexcontrol

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 21 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 codexcontrol connects only to the verified Codex ancestor's local daemon. A failed exchange closes the connection; it never reconnects or resends.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProtocol = errors.New("codex control protocol failure")
	ErrClosed   = errors.New("codex control connection closed")
)
View Source
var ErrMethod = errors.New("codex control method is not allowed")
View Source
var ErrNotDaemonHost = errors.New("not a Codex daemon host")

Only a positively identified non-daemon host permits a mode-switch fallback.

View Source
var ErrQueue = errors.New("invalid Codex queue response")
View Source
var ErrTooLarge = errors.New("codex control message exceeds limit")
View Source
var ErrTransport = errors.New("codex control transport failed")
View Source
var ErrUnverifiedHost = errors.New("unverified-host")

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Call

func (c *Client) Call(ctx context.Context, method string, params any) (json.RawMessage, error)

Call permits only steering/control discovery methods. MCP tools have their own explicit entry below, so a steering caller cannot select them by name.

func (*Client) CallMCPTool

func (c *Client) CallMCPTool(ctx context.Context, params any) (json.RawMessage, error)

func (*Client) CheckQueue

func (c *Client) CheckQueue(ctx context.Context, thread string) error

The experimental read API must work before a new durable steer intent exists.

func (*Client) Close

func (c *Client) Close() error

type Host

type Host struct {
	// contains filtered or unexported fields
}

Host captures the binding's already-observed nearest Codex ancestor. key is the existing process-key reader (channel's kimiProcessKey), not a new probe.

func Bind

func Bind(pid int, key func(int) (string, error)) (*Host, error)

func (*Host) Dial

func (h *Host) Dial(ctx context.Context) (*Client, error)

type Launcher

type Launcher struct {
	// contains filtered or unexported fields
}

Launcher pins one explicit daemon endpoint, rather than a Codex MCP ancestor.

func BindLauncher

func BindLauncher(home, path string, inode uint64, thread string, key func(int) (string, error)) (*Launcher, error)

func (*Launcher) Dial

func (l *Launcher) Dial(ctx context.Context) (*LauncherClient, error)

type LauncherClient

type LauncherClient struct {
	// contains filtered or unexported fields
}

Typed methods fix the launcher allowlist, server, tool and thread at binding.

func (*LauncherClient) AuthStatus

func (c *LauncherClient) AuthStatus(ctx context.Context) (json.RawMessage, error)

func (*LauncherClient) Close

func (c *LauncherClient) Close() error

func (*LauncherClient) Connected

func (c *LauncherClient) Connected(ctx context.Context) (bool, error)

func (*LauncherClient) Loaded

func (c *LauncherClient) Loaded(ctx context.Context) (bool, error)

type QueuePage

type QueuePage struct {
	Count    int
	Cursor   string
	Complete bool
}

func ParseQueuePage

func ParseQueuePage(raw []byte) (QueuePage, error)

type RPCError

type RPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

RPCError retains the rejection for explicit classification. Error is safe to log; Message is untrusted peer data and must not be copied into diagnostics.

func (*RPCError) Error

func (e *RPCError) Error() string

Jump to

Keyboard shortcuts

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