codex

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 20 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(baseFolder, statePath string) *Manager

func (*Manager) Active

func (m *Manager) Active() (*chat.Session, bool)

func (*Manager) AdoptSession added in v0.22.0

func (m *Manager) AdoptSession(threadID string) (*chat.Session, error)

func (*Manager) BaseFolder

func (m *Manager) BaseFolder() string

func (*Manager) ConfigurePermissionMode

func (m *Manager) ConfigurePermissionMode(permissionMode string)

func (*Manager) CreateSession added in v0.7.0

func (m *Manager) CreateSession(folder string) (*chat.Session, error)

func (*Manager) DeleteSession added in v0.7.0

func (m *Manager) DeleteSession(id string) error

func (*Manager) GetSession added in v0.7.0

func (m *Manager) GetSession(id string) (*chat.Session, bool)

func (*Manager) ID added in v0.7.0

func (m *Manager) ID() string

func (*Manager) ListAdoptableSessions added in v0.22.0

func (m *Manager) ListAdoptableSessions() ([]provider.AdoptableSession, error)

func (*Manager) ListSessions added in v0.7.0

func (m *Manager) ListSessions() []*chat.Session

func (*Manager) Metadata added in v0.17.0

func (m *Manager) Metadata() provider.Metadata

func (*Manager) ResolveActive

func (m *Manager) ResolveActive() (*chat.Session, error)

func (*Manager) Restore

func (m *Manager) Restore() error

func (*Manager) Run added in v0.7.0

func (m *Manager) Run(ctx context.Context, id, command string) (*chat.Session, bashcmd.Result, error)

func (*Manager) RunCommand

func (m *Manager) RunCommand(ctx context.Context, id, command string) error

func (*Manager) Send

func (m *Manager) Send(ctx context.Context, id, prompt string, attachments []chat.Attachment) (*chat.Session, string, error)

func (*Manager) SendMessage added in v0.7.0

func (m *Manager) SendMessage(ctx context.Context, id, prompt string, attachments []chat.Attachment) error

func (*Manager) SetActive

func (m *Manager) SetActive(id string) (*chat.Session, error)

func (*Manager) SetDangerouslyBypassSandbox

func (m *Manager) SetDangerouslyBypassSandbox(enabled bool)

func (*Manager) SetModel

func (m *Manager) SetModel(model string)

func (*Manager) SetSandbox

func (m *Manager) SetSandbox(sandbox string)

func (*Manager) Shutdown

func (m *Manager) Shutdown()

Shutdown waits for in-flight Send() calls to finish.

func (*Manager) Subscribe

func (m *Manager) Subscribe(fn func(chat.Event)) func()

Subscribe registers a callback for codex events. fn MUST be non-blocking (push to channel or spawn goroutine). Returns an unsubscribe function.

type StreamCallback added in v0.8.0

type StreamCallback struct {
	OnTextDelta  func(delta string)
	OnToolStart  func(index int, id, name string)
	OnToolDelta  func(index int, partialJSON string)
	OnToolFinish func(index int)
}

StreamCallback receives structured events from Codex exec JSONL output.

Jump to

Keyboard shortcuts

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