import type { IStreamLogger } from '../../PSAgentLogger'; export interface IAgentResponse { data: { agent_id: string; correlation_id: string; [key: string]: unknown; }; [key: string]: unknown; } export interface IAgentInstructResponse { data: { correlation_id: string; [key: string]: unknown; }; error_message?: string; } export interface IAgentResumeResponse extends IAgentInstructResponse { } export interface IAgentEvent { agentId: string; correlationId: string; agentStatus: AgentStatus; message: string; postCompletionTasks?: unknown | null; toolInput?: unknown | null; toolOutput?: unknown | null; tokenUsage: ITokenUsage; input?: unknown | null; output?: unknown | null; toolType?: string | null; industryId: string; timestamp: number; } export interface ITokenUsage { tokensUsed: number; contextWindow: number; cacheReadTokens: number; inputTokensUsed: number; outputTokensUsed: number; cacheCreationTokens: number; costIncurredInDollars: number; contextRemainingPercentage: number; } type AgentStatus = 'in-progress' | 'completed' | 'failed' | 'pending'; export type AgentEventResponse = IAgentEvent[]; export interface IAgentEvaluationResponse { data: IAgentEvaluation; } export interface IAgentEvaluation { id: number; correlationId: string; createdAt: string; agentId: string; reasoningAndPlanning: number; reasoningAndPlanningComment?: string; errorRecovery: number; errorRecoveryComment?: string; toolEfficiency: number; toolEfficiencyComment?: string; taskSuccess: number; taskSuccessComment?: string; responseQuality: number; responseQualityComment?: string; biasMitigation: number; biasMitigationComment?: string; } /** * Stateless agent-lifecycle API. Callers hold agentId/correlationId and pass * them explicitly; payload construction stays with the caller (PSAgent). */ export interface IAgent { /** Starts an agent run with a provider-ready payload. */ start(payload: Record, log?: IStreamLogger): Promise; instruct(agentId: string, correlationId: string | undefined, instruction: string): Promise; resume(agentId: string, correlationId: string | undefined, toolOutput: Record): Promise; delete(agentId: string, log?: IStreamLogger): Promise; getEvents(correlationId: string): Promise; getEvaluationResults(agentId: string): Promise; } export {};