claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
232 lines • 6.8 kB
TypeScript
import type { HTMLAttributes } from 'svelte/elements';
export type LifeAreaId = 'health-wellness' | 'home-admin' | 'learning-development' | 'relationships-social' | 'work-career' | 'hobbies-recreation';
export type WorkflowStatus = 'active' | 'paused' | 'completed' | 'failed';
export type TaskStatus = 'pending' | 'active' | 'completed' | 'failed';
export interface LifeArea {
id: LifeAreaId;
name: string;
description: string;
specializations: CrewSpecialization[];
expertise: string[];
tools: string[];
integrations?: string[];
activityLevel: number;
priority: number;
lastActive?: Date;
}
export interface CrewSpecialization {
id: string;
name: string;
description: string;
lifeAreaId: LifeAreaId;
expertise: string[];
agents: Array<{
role: string;
responsibilities: string[];
tools: string[];
}>;
workflows: string[];
successRate: number;
avgExecutionTime: number;
userSatisfaction: number;
}
export interface CrewWorkflow {
id: string;
name: string;
description: string;
lifeAreaId: LifeAreaId;
specializationId: string;
status: WorkflowStatus;
tasks: Array<{
id: string;
name: string;
description: string;
assignedAgent: string;
status: TaskStatus;
dependencies?: string[];
estimatedTime?: number;
tools?: string[];
}>;
startedAt?: Date;
completedAt?: Date;
pausedAt?: Date;
output?: any;
insights?: string[];
recommendations?: string[];
relatedLifeAreas?: LifeAreaId[];
synergies?: string[];
}
export interface CrossDomainInsight {
id: string;
domains: LifeAreaId[];
type: 'synergy' | 'conflict' | 'optimization' | 'dependency';
insight: string;
confidence: number;
actionable: boolean;
relatedWorkflows?: string[];
suggestedActions?: string[];
agentRecommendations?: Array<{
agent: 'architect' | 'scholar' | 'activities' | 'loop-diagnostic';
recommendation: string;
priority: number;
}>;
}
export interface LifeAreaCrewManagerProps extends HTMLAttributes<HTMLDivElement> {
/**
* Life areas with their specializations
*/
lifeAreas: LifeArea[];
/**
* Currently active crews
*/
activeCrews?: CrewSpecialization[];
/**
* Workflow history and active workflows
*/
workflows?: CrewWorkflow[];
/**
* Show cross-domain insights and synergies
* @default true
*/
showCrossDomainInsights?: boolean;
/**
* Show crew performance metrics
* @default true
*/
showCrewMetrics?: boolean;
/**
* Enable automatic routing to appropriate crews
* @default true
*/
enableAutoRouting?: boolean;
/**
* Callback when crew is invoked
*/
onCrewInvoke?: (lifeArea: LifeArea, specialization: CrewSpecialization) => void;
/**
* Callback when workflow starts
*/
onWorkflowStart?: (workflow: CrewWorkflow) => void;
/**
* Callback when cross-domain analysis is requested
*/
onCrossDomainAnalysis?: (insights: CrossDomainInsight[]) => void;
/**
* Callback when specialization is updated
*/
onSpecializationUpdate?: (lifeAreaId: string, specialization: CrewSpecialization) => void;
}
export interface HealthWellnessCrew extends CrewSpecialization {
lifeAreaId: 'health-wellness';
expertise: [
'fitness-planning',
'nutrition-guidance',
'mental-wellness',
'sleep-optimization',
'stress-management',
'medical-coordination'
];
}
export interface HomeAdminCrew extends CrewSpecialization {
lifeAreaId: 'home-admin';
expertise: [
'household-organization',
'financial-management',
'maintenance-scheduling',
'document-management',
'family-coordination',
'emergency-planning'
];
}
export interface LearningDevelopmentCrew extends CrewSpecialization {
lifeAreaId: 'learning-development';
expertise: [
'skill-assessment',
'learning-path-design',
'resource-curation',
'progress-tracking',
'certification-planning',
'knowledge-retention'
];
}
export interface RelationshipsSocialCrew extends CrewSpecialization {
lifeAreaId: 'relationships-social';
expertise: [
'communication-optimization',
'social-event-planning',
'relationship-maintenance',
'conflict-resolution',
'network-building',
'emotional-intelligence'
];
}
export interface WorkCareerCrew extends CrewSpecialization {
lifeAreaId: 'work-career';
expertise: [
'project-management',
'professional-development',
'career-planning',
'skill-building',
'networking',
'performance-optimization'
];
}
export interface HobbiesRecreationCrew extends CrewSpecialization {
lifeAreaId: 'hobbies-recreation';
expertise: [
'hobby-exploration',
'creative-project-planning',
'recreational-scheduling',
'skill-development',
'community-engagement',
'equipment-optimization'
];
}
export interface LifeAreaAgentIntegration {
/**
* Architect agent uses crew expertise for planning
*/
requestArchitecturalGuidance: (lifeArea: LifeAreaId, context: any) => Promise<string[]>;
/**
* Scholar agent analyzes semantic relationships across domains
*/
analyzeSemanticConnections: (domains: LifeAreaId[]) => Promise<CrossDomainInsight[]>;
/**
* Activities agent provides interest-based enrichment
*/
enrichWithInterests: (lifeArea: LifeAreaId, activities: any[]) => Promise<string[]>;
/**
* Loop Diagnostic agent provides behavioral insights
*/
getBehavioralInsights: (lifeArea: LifeAreaId) => Promise<Array<{
pattern: string;
insight: string;
recommendation: string;
}>>;
}
export interface CrewMCPIntegration {
/**
* Access specialized domain crews through MCP server
*/
invokeSpecializedCrew: (lifeArea: LifeAreaId, specialization: string, inputs: any) => Promise<any>;
/**
* Coordinate between crews for cross-domain workflows
*/
coordinateCrews: (crews: Array<{
lifeArea: LifeAreaId;
specialization: string;
}>, workflow: any) => Promise<any>;
/**
* Get crew status and metrics
*/
getCrewStatus: (lifeArea: LifeAreaId) => Promise<{
active: boolean;
currentWorkflows: string[];
performance: {
successRate: number;
avgExecutionTime: number;
userSatisfaction: number;
};
}>;
}
//# sourceMappingURL=types.d.ts.map