Module output

Module output 

Source
Expand description

Context-aware output structures for AGCodex tools

This module provides unified, rich output structures that give agents and LLMs comprehensive context about tool operations. All tools should use these common structures to ensure consistent, analyzable results.

§Design Principles

  • Context-first: Every operation includes before/after context
  • Location-aware: Precise file:line:column information for all changes
  • Semantic understanding: Impact analysis beyond text-level changes
  • LLM-optimized: Structured data with human-readable summaries
  • Serializable: Full serde support for persistence and transmission

Structs§

ApiCompatibility
API compatibility assessment
BreakingChange
Breaking change analysis
CacheStats
Caching statistics
Change
Represents a single change made during an operation
ChangeBuilder
Builder for constructing Change instances
ComplexityChange
Complexity analysis changes
ComplexityMetrics
Code complexity metrics
ComprehensiveAstSummary
Comprehensive AST summary for structural understanding
ComprehensivePerformanceImpact
Comprehensive performance impact analysis
ComprehensiveSemanticImpact
Comprehensive semantic impact analysis of changes
ComprehensiveSymbol
Comprehensive symbol information
ComprehensiveToolOutput
Primary comprehensive output structure for all AGCodex tools
ContextLine
A line of context with metadata
ContextSnapshot
Snapshot of state at a specific point in time
CoverageImpact
Test coverage impact
CpuUsage
CPU usage statistics
DependencyInfo
Dependency information
Diagnostic
Diagnostic information (warnings, errors, info)
HalsteadMetrics
Halstead complexity metrics
IoStats
I/O statistics
LanguageContext
Language-specific context information
MemoryImpact
Memory usage impact
MemoryUsage
Memory usage statistics
OperationContext
Rich contextual information about a tool operation
OperationMetadata
Comprehensive operation metadata
OperationScope
Scope of an operation
OutputBuilder
Builder for constructing ComprehensiveToolOutput instances
PerformanceMetrics
Performance metrics for operations
PerformanceTimer
Performance timing helper for measuring tool operations
ProjectContext
Project-level context information
SecurityImpact
Security impact analysis
SecurityVulnerability
Security vulnerability description
SourceLocation
Source location with precise file:line:column metadata
TestImpact
Test impact analysis

Enums§

BreakingSeverity
Severity of breaking changes
ChangeKind
Types of changes with rich semantic information
ContextLineType
Types of context lines
DiagnosticLevel
Levels of diagnostics
ImpactLevel
Levels of impact
ImpactScope
Scope of impact
ImportChangeType
Import/dependency changes
ModificationType
Types of modifications
PerformanceChange
Expected performance changes
RefactorType
Types of refactoring
ScopeType
Types of operation scopes
SecurityLevel
Security impact levels
SymbolType
Types of symbols
TestCategory
Categories of tests
VersionImpact
Version impact levels
Visibility
Symbol visibility levels

Traits§

ResultExt
Extension trait for Result<T, E> to easily convert to ComprehensiveToolOutput

Functions§

multi_file_changes
Create an output with multiple file changes
simple_error
Create a simple error output for tools that encounter failures
simple_success
Create a simple successful output for tools that don’t need complex analysis
single_file_modification
Create an output with a single file modification