Documentation
¶
Index ¶
- Constants
- type CodexTool
- func (t *CodexTool) ApplyResponseSizeLimit(output string, logger *logrus.Logger) string
- func (t *CodexTool) Definition() mcp.Tool
- func (t *CodexTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, ...) (*mcp.CallToolResult, error)
- func (t *CodexTool) GetMaxResponseSize() int
- func (t *CodexTool) GetTimeout() int
- func (t *CodexTool) ProcessJSONLOutput(output string, logger *logrus.Logger) (string, error)
- func (t *CodexTool) ProvideExtendedInfo() *tools.ExtendedHelp
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 ¶
ApplyResponseSizeLimit truncates the response if it exceeds the configured size limit
func (*CodexTool) Definition ¶
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 ¶
GetMaxResponseSize returns the configured maximum response size
func (*CodexTool) GetTimeout ¶
GetTimeout returns the configured timeout or default
func (*CodexTool) ProcessJSONLOutput ¶
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
Click to show internal directories.
Click to hide internal directories.