claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
271 lines • 8.9 kB
TypeScript
/**
* Agent Status Monitor Types
* Defines types for the agent status monitoring system
*/
export interface AgentMetrics {
/** Agent uptime in seconds */
uptime: number;
/** CPU usage as a decimal (0.0 to 1.0) */
cpuUsage: number;
/** Memory usage in bytes */
memoryUsage: number;
/** Number of active tasks */
taskCount: number;
/** Requests processed per minute */
requestsPerMinute?: number;
/** Average response time in milliseconds */
averageResponseTime?: number;
/** Error rate as a decimal (0.0 to 1.0) */
errorRate?: number;
}
export interface AgentHealthIssue {
/** Unique identifier for the issue */
id: string;
/** Severity level of the issue */
severity: 'critical' | 'warning' | 'info';
/** Human-readable description of the issue */
message: string;
/** Timestamp when the issue was detected */
timestamp: string;
/** Additional context about the issue */
details?: Record<string, any>;
}
export interface AgentHealth {
/** Overall health status */
status: 'healthy' | 'warning' | 'critical' | 'unknown';
/** List of current health issues */
issues?: AgentHealthIssue[];
/** Last health check timestamp */
lastCheck: string;
/** Health score (0-100) */
score?: number;
}
export interface AgentStatus {
/** Unique identifier for the agent */
id: string;
/** Human-readable name of the agent */
name: string;
/** Type/category of the agent */
type: string;
/** Current operational status */
status: 'active' | 'idle' | 'busy' | 'error' | 'offline';
/** URL to agent's avatar image */
avatar?: string;
/** List of agent capabilities */
capabilities?: string[];
/** Current performance metrics */
metrics?: AgentMetrics;
/** Health status information */
health?: AgentHealth;
/** Agent version */
version?: string;
/** Agent configuration */
config?: Record<string, any>;
/** Last activity timestamp */
lastActivity?: string;
/** Agent location/environment */
environment?: string;
}
export interface AgentTeam {
/** Unique identifier for the team */
id: string;
/** Team name */
name: string;
/** Team description */
description?: string;
/** List of agent IDs in the team */
agentIds: string[];
/** Team lead agent ID */
leadAgentId?: string;
/** Team creation timestamp */
createdAt: string;
/** Team configuration */
config?: Record<string, any>;
}
export interface AgentStatusMonitorProps {
/** Array of agent statuses to monitor */
agents: AgentStatus[];
/** Additional CSS classes */
class?: string;
/** Refresh interval in milliseconds (default: 30000) */
refreshInterval?: number;
/** Whether to show performance metrics */
showMetrics?: boolean;
/** Whether to show health information */
showHealth?: boolean;
/** Whether to show agent capabilities */
showCapabilities?: boolean;
/** Whether to enable real-time updates */
enableRealtime?: boolean;
/** Callback when an agent is clicked */
onAgentClick?: (agent: AgentStatus) => void;
/** Callback when refresh is triggered */
onRefresh?: () => void;
/** Callback when agent restart is requested */
onAgentRestart?: (agent: AgentStatus) => void;
/** Callback when agent stop is requested */
onAgentStop?: (agent: AgentStatus) => void;
}
export interface AgentOrchestrationProps {
/** List of available agents */
agents: AgentStatus[];
/** List of agent teams */
teams?: AgentTeam[];
/** Additional CSS classes */
class?: string;
/** Whether to show team management */
showTeamManagement?: boolean;
/** Whether to show workflow automation */
showWorkflowAutomation?: boolean;
/** Callback when a new team is created */
onCreateTeam?: (team: Omit<AgentTeam, 'id' | 'createdAt'>) => void;
/** Callback when a team is updated */
onUpdateTeam?: (team: AgentTeam) => void;
/** Callback when a team is deleted */
onDeleteTeam?: (teamId: string) => void;
/** Callback when agents are assigned to a team */
onAssignAgents?: (teamId: string, agentIds: string[]) => void;
}
export interface WorkflowStep {
/** Unique identifier for the step */
id: string;
/** Step name */
name: string;
/** Agent ID responsible for this step */
agentId: string;
/** Step type */
type: 'sequential' | 'parallel' | 'conditional';
/** Step configuration */
config?: Record<string, any>;
/** Dependencies on other steps */
dependencies?: string[];
/** Timeout in milliseconds */
timeout?: number;
}
export interface AgentWorkflow {
/** Unique identifier for the workflow */
id: string;
/** Workflow name */
name: string;
/** Workflow description */
description?: string;
/** List of workflow steps */
steps: WorkflowStep[];
/** Workflow status */
status: 'draft' | 'active' | 'paused' | 'completed' | 'failed';
/** Creation timestamp */
createdAt: string;
/** Last execution timestamp */
lastExecuted?: string;
/** Workflow configuration */
config?: Record<string, any>;
}
export interface PlanNode {
/** Unique identifier for the node */
id: string;
/** Node title */
title: string;
/** Node description */
description?: string;
/** Node type */
type: 'task' | 'milestone' | 'decision' | 'parallel' | 'sequence';
/** Node status */
status: 'pending' | 'in_progress' | 'completed' | 'blocked' | 'failed';
/** Agent assigned to this node */
assignedAgent?: string;
/** Child node IDs */
children?: string[];
/** Parent node ID */
parent?: string;
/** Node position in visualization */
position?: {
x: number;
y: number;
};
/** Node metadata */
metadata?: Record<string, any>;
/** Estimated duration in minutes */
estimatedDuration?: number;
/** Actual duration in minutes */
actualDuration?: number;
/** Progress percentage (0-100) */
progress?: number;
}
export interface PlanVisualizationProps {
/** Plan nodes to visualize */
nodes: PlanNode[];
/** Additional CSS classes */
class?: string;
/** Whether the plan is editable */
editable?: boolean;
/** Whether to show progress indicators */
showProgress?: boolean;
/** Whether to show agent assignments */
showAgents?: boolean;
/** Whether to show dependency lines */
showDependencies?: boolean;
/** Layout algorithm to use */
layout?: 'hierarchical' | 'force' | 'manual';
/** Callback when a node is clicked */
onNodeClick?: (node: PlanNode) => void;
/** Callback when a node is updated */
onNodeUpdate?: (node: PlanNode) => void;
/** Callback when nodes are connected */
onConnect?: (sourceId: string, targetId: string) => void;
/** Callback when a connection is removed */
onDisconnect?: (sourceId: string, targetId: string) => void;
}
export interface CognitiveLoadIndicator {
/** Current cognitive load level (0-100) */
level: number;
/** Factors contributing to cognitive load */
factors: {
/** Information complexity */
complexity: number;
/** Task switching frequency */
taskSwitching: number;
/** Time pressure */
timePressure: number;
/** Uncertainty level */
uncertainty: number;
};
/** Recommendations for reducing load */
recommendations?: string[];
/** Trend over time */
trend?: 'increasing' | 'decreasing' | 'stable';
}
export interface ADHDOptimizationConfig {
/** Whether to enable break reminders */
enableBreakReminders: boolean;
/** Break reminder interval in minutes */
breakInterval: number;
/** Whether to use simplified interfaces */
useSimplifiedUI: boolean;
/** Whether to highlight important actions */
highlightImportantActions: boolean;
/** Whether to reduce motion and animations */
reduceMotion: boolean;
/** Whether to enable focus mode */
enableFocusMode: boolean;
/** Custom color scheme for better focus */
focusColorScheme?: string;
}
export interface CollaborativeSession {
/** Unique identifier for the session */
id: string;
/** Session name */
name: string;
/** List of participant user IDs */
participants: string[];
/** Active agents in the session */
activeAgents: string[];
/** Session type */
type: 'brainstorming' | 'planning' | 'execution' | 'review';
/** Session status */
status: 'active' | 'paused' | 'completed';
/** Session creation timestamp */
createdAt: string;
/** Session configuration */
config?: Record<string, any>;
}
//# sourceMappingURL=types.d.ts.map