Documentation
¶
Index ¶
- Variables
- type Codex
- func (c *Codex) ActiveSessions() []string
- func (c *Codex) CLICommands() []string
- func (c *Codex) Close(userID string) error
- func (c *Codex) CloseAll() error
- func (c *Codex) Control(_ context.Context, userID string, action types.Action) (bool, error)
- func (c *Codex) Name() string
- func (c *Codex) RawInput(_ context.Context, _ string, _ string) error
- func (c *Codex) RespawnSession(_ context.Context, userID, workDir, _ string) (bool, error)
- func (c *Codex) Restart(_ context.Context, userID string, flags map[string]string) (bool, error)
- func (c *Codex) Send(ctx context.Context, userID string, msg agent.Message) error
- func (c *Codex) Subscribe(userID string) <-chan *agent.Response
- type Option
Constants ¶
This section is empty.
Variables ¶
var PromptMD string
Functions ¶
This section is empty.
Types ¶
type Codex ¶
type Codex struct {
// contains filtered or unexported fields
}
Codex implements agent.Agent by spawning codex mcp-server subprocesses.
func (*Codex) ActiveSessions ¶
func (*Codex) CLICommands ¶
func (*Codex) Close ¶
Close terminates a user's session without clearing userFlags or threadId file.
func (*Codex) RespawnSession ¶
RespawnSession switches the user's session to a different working directory. resumeOpt is ignored — codex threadId is process-local and cannot survive respawn.
func (*Codex) Restart ¶
Restart updates the session's approval policy without killing the process. approval-policy and sandbox are per-call parameters, so no process restart needed.
type Option ¶
type Option func(*Codex)
Option configures a Codex agent.
func WithCodexCmd ¶
WithCodexCmd sets the path to the codex CLI binary.
func WithInitPrompt ¶
WithInitPrompt sets the init prompt content written to each session workdir.
func WithRuntime ¶
WithRuntime sets the runtime container (tmux, screen, etc.).
func WithWorkDir ¶
WithWorkDir sets the base working directory for sessions.