54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
|
|
// ============================================================================
|
|||
|
|
// Agent Status Types
|
|||
|
|
// Per spec Section 7.3: Agent Card Component Interface
|
|||
|
|
// ============================================================================
|
|||
|
|
|
|||
|
|
export type AgentStatus = 'active' | 'idle' | 'thinking' | 'error' | 'offline';
|
|||
|
|
|
|||
|
|
export interface AgentCardData {
|
|||
|
|
/** Short agent ID, e.g., "otto" */
|
|||
|
|
id: string;
|
|||
|
|
|
|||
|
|
/** Display name, e.g., "Otto" */
|
|||
|
|
displayName: string;
|
|||
|
|
|
|||
|
|
/** Role description, e.g., "Orchestrator Agent" */
|
|||
|
|
role: string;
|
|||
|
|
|
|||
|
|
/** Current agent status */
|
|||
|
|
status: AgentStatus;
|
|||
|
|
|
|||
|
|
/** Current task description, e.g., "Reviewing PR #42" */
|
|||
|
|
currentTask?: string;
|
|||
|
|
|
|||
|
|
/** Task progress percentage 0–100 */
|
|||
|
|
taskProgress?: number;
|
|||
|
|
|
|||
|
|
/** Elapsed time string, e.g., "04m 12s" */
|
|||
|
|
taskElapsed?: string;
|
|||
|
|
|
|||
|
|
/** Full session key, e.g., "agent:otto:telegram:direct:8787..." */
|
|||
|
|
sessionKey: string;
|
|||
|
|
|
|||
|
|
/** Communication channel, e.g., "telegram" */
|
|||
|
|
channel: string;
|
|||
|
|
|
|||
|
|
/** Timestamp of last activity */
|
|||
|
|
lastActivity: Date;
|
|||
|
|
|
|||
|
|
/** Error message (populated only on error status) */
|
|||
|
|
errorMessage?: string;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
export interface AgentStatusUpdate {
|
|||
|
|
agentId: string;
|
|||
|
|
status: AgentStatus;
|
|||
|
|
timestamp: Date;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
export interface TaskProgressUpdate {
|
|||
|
|
agentId: string;
|
|||
|
|
taskName?: string;
|
|||
|
|
progress: number;
|
|||
|
|
elapsed?: string;
|
|||
|
|
}
|