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
- Breaking
Change - Breaking change analysis
- Cache
Stats - Caching statistics
- Change
- Represents a single change made during an operation
- Change
Builder - Builder for constructing Change instances
- Complexity
Change - Complexity analysis changes
- Complexity
Metrics - Code complexity metrics
- Comprehensive
AstSummary - Comprehensive AST summary for structural understanding
- Comprehensive
Performance Impact - Comprehensive performance impact analysis
- Comprehensive
Semantic Impact - Comprehensive semantic impact analysis of changes
- Comprehensive
Symbol - Comprehensive symbol information
- Comprehensive
Tool Output - Primary comprehensive output structure for all AGCodex tools
- Context
Line - A line of context with metadata
- Context
Snapshot - Snapshot of state at a specific point in time
- Coverage
Impact - Test coverage impact
- CpuUsage
- CPU usage statistics
- Dependency
Info - Dependency information
- Diagnostic
- Diagnostic information (warnings, errors, info)
- Halstead
Metrics - Halstead complexity metrics
- IoStats
- I/O statistics
- Language
Context - Language-specific context information
- Memory
Impact - Memory usage impact
- Memory
Usage - Memory usage statistics
- Operation
Context - Rich contextual information about a tool operation
- Operation
Metadata - Comprehensive operation metadata
- Operation
Scope - Scope of an operation
- Output
Builder - Builder for constructing ComprehensiveToolOutput instances
- Performance
Metrics - Performance metrics for operations
- Performance
Timer - Performance timing helper for measuring tool operations
- Project
Context - Project-level context information
- Security
Impact - Security impact analysis
- Security
Vulnerability - Security vulnerability description
- Source
Location - Source location with precise file:line:column metadata
- Test
Impact - Test impact analysis
Enums§
- Breaking
Severity - Severity of breaking changes
- Change
Kind - Types of changes with rich semantic information
- Context
Line Type - Types of context lines
- Diagnostic
Level - Levels of diagnostics
- Impact
Level - Levels of impact
- Impact
Scope - Scope of impact
- Import
Change Type - Import/dependency changes
- Modification
Type - Types of modifications
- Performance
Change - Expected performance changes
- Refactor
Type - Types of refactoring
- Scope
Type - Types of operation scopes
- Security
Level - Security impact levels
- Symbol
Type - Types of symbols
- Test
Category - Categories of tests
- Version
Impact - Version impact levels
- Visibility
- Symbol visibility levels
Traits§
- Result
Ext - 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