Expand description
Shared runtime types for the VT Code tool system.
This module provides types shared between the LLM and tools subsystems, breaking the circular dependency that would otherwise exist between them.
§Overview
The key types here are:
CompactStr- stack-allocated string for short tool namesEnhancedToolResult- tool result with quality metadataResultMetadata- quality/confidence scoring for tool results- [
ToolResultConstants] - tool name constants used across subsystems
Modules§
- tool_
names - Canonical tool name constants used by both LLM and tools subsystems.
These match the values defined in
vtcode-config::constants::tools.
Structs§
- Enhanced
Tool Result - Enhanced tool result with metadata
- Result
Metadata - Quality metadata for tool results
Enums§
- Result
Completeness - Result completeness level
Constants§
- DEFAULT_
HASHMAP_ CAPACITY - DEFAULT_
STRING_ CAPACITY - DEFAULT_
VEC_ CAPACITY - Default capacity hints for common collections
- ERROR_
DETECTION_ PATTERNS - Standard error patterns used for error detection across tools
- MAX_
CONTEXT_ LINES - MAX_
FILE_ SIZE_ FOR_ PROCESSING - Common tool operation limits
- MAX_
LIST_ ITEMS_ SUMMARY - MAX_
OUTPUT_ TOKENS - MAX_
SEARCH_ RESULTS - Context optimization constants following AGENTS.md guidelines
- NETWORK_
ERROR_ PATTERNS - Network-related error patterns for more specific error detection
- OVERFLOW_
INDICATOR_ PREFIX - OVERFLOW_
INDICATOR_ SUFFIX
Traits§
- Result
Scorer - Trait for scoring tool results
Functions§
- canonical_
tool_ name - Use direct tool name without alias resolution. Alias resolution is now handled by the tool registry inventory which maintains a mapping of aliases to canonical tool names.
- empty_
object_ schema - Reusable empty JSON object schema
{"type": "object"}for tool parameter definitions. Used by tools that accept no parameters or only optional parameters.
Type Aliases§
- Compact
Str - Compact inline string – stack-allocated for strings up to 24 bytes.
Drop-in replacement for
Stringwith zero heap allocation for short strings.