Agent class abstract

Abstract base class for AI editor agents

Implementers

Constructors

Agent()

Properties

configPath String
Config file path relative to project root
no setter
defaultMcpConfig Map<String, dynamic>
Get default MCP configuration structure
no setter
displayName String
Display name for UI
no setter
hashCode int
The hash code for this object.
no setterinherited
mcpConfigKey String
Get key for MCP configuration (usually 'mcpServers')
no setter
name String
Agent name (e.g., 'claude-code', 'opencode')
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedFileTypes List<String>
List supported file types
no setter
userConfigPath String?
Config file path relative to user home (optional)
no setter

Methods

detectByCommand(String command) Future<bool>
Detect if agent is installed on system using command
detectByFiles(String basePath, Map<String, dynamic> config) Future<bool>
Detect if agent is in project by checking files/directories
generateMcpConfig(ServerPodProject project) Map<String, dynamic>
Generate MCP config for this agent
getConfigPath(String projectRoot) String
Get absolute path to config file
getUserConfigPath() String?
Get absolute path to user config file (if applicable)
isInProject(String basePath) Future<bool>
Check if agent is used in the current project
isInstalled() Future<bool>
Check if agent is installed on the system
mergeConfig(Map<String, dynamic> existing, Map<String, dynamic> generated) Map<String, dynamic>
Merge new config with existing config
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
projectDetectionConfig() Map<String, dynamic>
Get detection config for project-specific detection
systemDetectionConfig() Map<String, dynamic>
Get detection config for system-wide installation
toString() String
A string representation of this object.
inherited
writeMcpConfig(ServerPodProject project, Map<String, dynamic> config) Future<void>
Write MCP config to project
writeMcpConfigToFile(String configFilePath, Map<String, dynamic> config) Future<void>
Write MCP configuration to file

Operators

operator ==(Object other) bool
The equality operator.
inherited