chittycan
Version:
Your completely autonomous network that grows with you - DNA ownership platform with encrypted vaults, PDX portability, and ChittyFoundation governance
67 lines • 1.95 kB
TypeScript
/**
* Workflow Auto-Generation
*
* Detects repeated command sequences and automatically suggests
* creating workflows from them.
*
* Example:
* You run: git add . → git commit → git push (3 times in a week)
* ChittyCan suggests: Create "deploy" workflow?
*/
import { type CommandUsage } from "./usage-tracker.js";
import { type WorkflowStep } from "./custom-workflows.js";
export interface CommandSequence {
commands: string[];
frequency: number;
lastSeen: string;
avgTimeBetween: number;
suggestedName?: string;
suggestedTrigger?: string;
}
export interface WorkflowSuggestion {
name: string;
trigger: string;
description: string;
steps: WorkflowStep[];
reason: string;
frequency: number;
}
/**
* Analyze usage and detect repeated command sequences
*/
export declare function detectRepeatedSequences(): CommandSequence[];
/**
* Generate workflow suggestions from repeated sequences
*/
export declare function generateWorkflowSuggestions(): WorkflowSuggestion[];
/**
* Save workflow suggestions to file
*/
export declare function saveSuggestions(suggestions: WorkflowSuggestion[]): void;
/**
* Load saved workflow suggestions
*/
export declare function loadSuggestions(): WorkflowSuggestion[];
/**
* Accept a workflow suggestion and create the workflow
*/
export declare function acceptSuggestion(suggestion: WorkflowSuggestion): void;
/**
* Dismiss a workflow suggestion
*/
export declare function dismissSuggestion(trigger: string): void;
/**
* Check for new suggestions and notify user
*/
export declare function checkForNewSuggestions(): WorkflowSuggestion[];
/**
* Smart learning: Track command sequences in real-time
*/
export declare class SequenceTracker {
private currentSequence;
private lastCommandTime;
trackCommand(command: CommandUsage): void;
private checkForSuggestion;
reset(): void;
}
//# sourceMappingURL=workflow-generator.d.ts.map