codexagent

package
v0.59.5 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout             = 300             // 5 minutes default timeout
	DefaultMaxResponseSize     = 2 * 1024 * 1024 // 2MB default limit
	AgentMaxResponseSizeEnvVar = "AGENT_MAX_RESPONSE_SIZE"
	AgentTimeoutEnvVar         = "AGENT_TIMEOUT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CodexTool

type CodexTool struct{}

CodexTool implements the tools.Tool interface for Codex CLI

func (*CodexTool) ApplyResponseSizeLimit

func (t *CodexTool) ApplyResponseSizeLimit(output string, logger *logrus.Logger) string

ApplyResponseSizeLimit truncates the response if it exceeds the configured size limit

func (*CodexTool) Definition

func (t *CodexTool) Definition() mcp.Tool

Definition returns the tool's definition for MCP registration

func (*CodexTool) Execute

func (t *CodexTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)

Execute executes the tool's logic by calling the Codex CLI

func (*CodexTool) GetMaxResponseSize

func (t *CodexTool) GetMaxResponseSize() int

GetMaxResponseSize returns the configured maximum response size

func (*CodexTool) GetTimeout

func (t *CodexTool) GetTimeout() int

GetTimeout returns the configured timeout or default

func (*CodexTool) ProcessJSONLOutput

func (t *CodexTool) ProcessJSONLOutput(output string, logger *logrus.Logger) (string, error)

ProcessJSONLOutput parses and formats JSONL output from Codex Exported for testing

func (*CodexTool) ProvideExtendedInfo

func (t *CodexTool) ProvideExtendedInfo() *tools.ExtendedHelp

ProvideExtendedInfo provides detailed usage information for the Codex agent tool

Jump to

Keyboard shortcuts

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