Technical specifications for the agent system interfaces. These are the actual implemented interfaces in packages/core/src/application/ports/output/agents/.
The primary interface for executing prompts against AI coding agents.
export interface AgentExecutionOptions {
cwd?: string;
sessionId?: string;
// Additional execution options
}
export interface AgentExecutionResult {
result: string;
// Additional result metadata
}
export interface IAgentExecutor {
execute(prompt: string, options?: AgentExecutionOptions): Promise<AgentExecutionResult>;
}
Creates executor instances for specific agent types.
export interface AgentCliInfo {
// CLI tool metadata for the agent
}
export interface IAgentExecutorFactory {
createExecutor(agentType: AgentType, config: AgentConfig): IAgentExecutor;
}
Resolves the current agent executor from settings. This is the primary entry point for getting an executor – all code should use this rather than calling the factory directly.
export interface IAgentExecutorProvider {
getExecutor(): IAgentExecutor;
}
ARCHITECTURAL RULE: The
settings.agent.typefield is the single source of truth for which agent executor runs. All code paths that need anIAgentExecutorMUST go throughIAgentExecutorProvider.getExecutor().
Registers and discovers agent definitions.
export interface AgentDefinitionWithFactory {
// Agent definition metadata with factory function
}
export interface IAgentRegistry {
// Registry operations for agent discovery
}
Runs agent workflows with lifecycle management.
export interface AgentRunOptions {
// Options for running an agent workflow
}
export interface IAgentRunner {
// Run management operations
}
Validates that an AI coding tool is available on the system.
export interface AgentValidationResult {
// Validation outcome
}
export interface IAgentValidator {
// Validates agent binary availability
}
Manages feature agent background processes (start, stop, heartbeat monitoring).
export interface IFeatureAgentProcessService {
// Process lifecycle management
}
Makes structured (typed) calls to agents with schema validation.
export interface StructuredCallOptions {
// Options for structured calls
}
export interface IStructuredAgentCaller {
// Typed agent invocation
}
Persists agent execution run records.
Tracks SDLC phase durations per agent run.
Manages agent sessions.
export interface ListSessionsOptions {
// Filtering options for listing sessions
}
export interface GetSessionOptions {
// Options for retrieving a specific session
}
export interface IAgentSessionRepository {
list(options?: ListSessionsOptions): Promise<AgentSession[]>;
get(options: GetSessionOptions): Promise<AgentSession | null>;
}
From packages/core/src/application/ports/output/agents/index.ts:
export type {
IAgentExecutor,
AgentExecutionResult,
AgentExecutionStreamEvent,
AgentExecutionOptions,
};
export type { IAgentExecutorFactory, AgentCliInfo };
export type { IAgentExecutorProvider };
export type { IAgentRegistry, AgentDefinitionWithFactory };
export type { IAgentRunner, AgentRunOptions };
export type { IAgentRunRepository };
export type { IPhaseTimingRepository };
export type { IAgentValidator, AgentValidationResult };
export type { IFeatureAgentProcessService };
export type { IStructuredAgentCaller, StructuredCallOptions };
export { StructuredCallError };
export type { IAgentSessionRepository, ListSessionsOptions, GetSessionOptions };
Update when:
Related docs: