claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
179 lines • 4.75 kB
TypeScript
import type { HTMLAttributes } from 'svelte/elements';
export type WorkflowStage = 'inbox' | 'review' | 'planning' | 'execution' | 'completed';
export type SuggestionPriority = 'urgent' | 'high' | 'normal' | 'low';
export type SuggestionType = 'task' | 'project' | 'idea' | 'improvement' | 'research' | 'reminder' | 'connection' | 'insight';
export type ApprovalAction = 'approve' | 'reject' | 'defer' | 'review' | 'execute' | 'complete' | 'pause' | 'archive';
export type BulkAction = 'approve-all' | 'reject-all' | 'defer-all' | 'move-to-stage' | 'assign-tags' | 'change-priority';
export interface Suggestion {
id: string;
title: string;
description: string;
type: SuggestionType;
priority: SuggestionPriority;
stage: WorkflowStage;
tags: string[];
source: {
type: 'oracle' | 'scribe' | 'architect' | 'user' | 'integration';
name: string;
avatar?: string;
agentId?: string;
};
metadata?: {
confidence?: number;
estimatedTime?: string;
complexity?: number;
dependencies?: string[];
relatedConcepts?: string[];
workflowChain?: string[];
processingTime?: number;
};
context?: {
captureId?: string;
projectId?: string;
conversationId?: string;
parentSuggestionId?: string;
};
createdAt: Date;
updatedAt: Date;
processedAt?: Date;
completedAt?: Date;
}
export interface SuggestionWorkflowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onStageChange'> {
/**
* List of suggestions to display
*/
suggestions: Suggestion[];
/**
* Currently active workflow stage
* @default 'inbox'
*/
activeStage?: WorkflowStage;
/**
* Show workflow statistics
* @default true
*/
showStats?: boolean;
/**
* Show visual timeline/progress
* @default true
*/
showTimeline?: boolean;
/**
* Enable bulk actions on suggestions
* @default true
*/
enableBulkActions?: boolean;
/**
* Automatically progress suggestions through stages
* @default false
*/
autoProgress?: boolean;
/**
* Delay before auto-progressing (milliseconds)
* @default 5000
*/
progressDelay?: number;
/**
* Callback when a suggestion action is taken
*/
onSuggestionAction?: (data: {
suggestion: Suggestion;
action: ApprovalAction;
}) => void;
/**
* Callback when workflow stage changes
*/
onStageChange?: (data: {
from: WorkflowStage;
to: WorkflowStage;
}) => void;
/**
* Callback when bulk action is performed
*/
onBulkAction?: (data: {
suggestions: Suggestion[];
action: BulkAction;
}) => void;
/**
* Callback when workflow is completed
*/
onWorkflowComplete?: (suggestions: Suggestion[]) => void;
}
export interface OracleAnalysis {
intent: string;
confidence: number;
suggestedWorkflow: string[];
extractedEntities: Array<{
type: string;
value: string;
}>;
delegationTargets: Array<{
agent: string;
task: string;
priority: number;
}>;
}
export interface ScribeStructure {
formattedContent: {
title: string;
summary: string;
sections: Array<{
heading: string;
content: string;
type: 'text' | 'list' | 'table' | 'code';
}>;
};
extractedData: {
keyPoints: string[];
actionItems: string[];
questions: string[];
references: string[];
};
}
export interface ArchitectPlan {
projectStructure: {
name: string;
description: string;
phases: Array<{
name: string;
tasks: string[];
duration: string;
}>;
};
resourceRequirements: {
tools: string[];
skills: string[];
integrations: string[];
};
implementation: {
steps: Array<{
order: number;
description: string;
complexity: number;
}>;
};
}
export interface WorkflowContext {
suggestionId: string;
stage: WorkflowStage;
history: Array<{
stage: WorkflowStage;
action: ApprovalAction;
timestamp: Date;
actor: string;
notes?: string;
}>;
activeAgents: Array<{
name: string;
status: 'idle' | 'working' | 'completed' | 'error';
progress?: number;
result?: any;
}>;
metadata: {
startTime: Date;
lastUpdate: Date;
totalProcessingTime: number;
errorCount: number;
};
}
//# sourceMappingURL=types.d.ts.map