Versions in this module Expand all Collapse all v0 v0.5.3 Apr 3, 2026 v0.5.2 Mar 30, 2026 Changes in this version + const HookNamePreToolUse + const HookNameSessionStart + const HookNameStop + const HookNameUserPromptSubmit + const HooksFileName + func NewCodexAgent() agent.Agent + type CodexAgent struct + func (c *CodexAgent) AreHooksInstalled(ctx context.Context) bool + func (c *CodexAgent) CalculateTokenUsage(transcriptData []byte, fromOffset int) (*agent.TokenUsage, error) + func (c *CodexAgent) ChunkTranscript(_ context.Context, content []byte, maxSize int) ([][]byte, error) + func (c *CodexAgent) Description() string + func (c *CodexAgent) DetectPresence(ctx context.Context) (bool, error) + func (c *CodexAgent) ExtractModifiedFilesFromOffset(path string, startOffset int) (files []string, currentPosition int, err error) + func (c *CodexAgent) ExtractPrompts(sessionRef string, fromOffset int) ([]string, error) + func (c *CodexAgent) FormatResumeCommand(sessionID string) string + func (c *CodexAgent) GetSessionDir(_ string) (string, error) + func (c *CodexAgent) GetSessionID(input *agent.HookInput) string + func (c *CodexAgent) GetTranscriptPosition(path string) (int, error) + func (c *CodexAgent) HookNames() []string + func (c *CodexAgent) InstallHooks(ctx context.Context, localDev bool, force bool) (int, error) + func (c *CodexAgent) IsPreview() bool + func (c *CodexAgent) Name() types.AgentName + func (c *CodexAgent) ParseHookEvent(_ context.Context, hookName string, stdin io.Reader) (*agent.Event, error) + func (c *CodexAgent) ProtectedDirs() []string + func (c *CodexAgent) ReadSession(input *agent.HookInput) (*agent.AgentSession, error) + func (c *CodexAgent) ReadTranscript(sessionRef string) ([]byte, error) + func (c *CodexAgent) ReassembleTranscript(chunks [][]byte) ([]byte, error) + func (c *CodexAgent) ResolveSessionFile(sessionDir, agentSessionID string) string + func (c *CodexAgent) Type() types.AgentType + func (c *CodexAgent) UninstallHooks(ctx context.Context) error + func (c *CodexAgent) WriteHookResponse(message string) error + func (c *CodexAgent) WriteSession(_ context.Context, session *agent.AgentSession) error + type HookEntry struct + Command string + Timeout int + Type string + type HookEvents struct + PreToolUse []MatcherGroup + SessionStart []MatcherGroup + Stop []MatcherGroup + UserPromptSubmit []MatcherGroup + type HooksFile struct + Hooks HookEvents + type MatcherGroup struct + Hooks []HookEntry + Matcher *string