trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
36 lines • 1.19 kB
TypeScript
/**
* Git Importer
*
* Converts a Git repository's commit history into TrellisVCS operations.
* Each Git commit becomes:
* 1. A sequence of Tier 0 file-level ops (vcs:fileAdd, vcs:fileModify, etc.)
* 2. A vcs:milestoneCreate op (commit message → milestone)
*
* The importer reads from the Git repo, writes into a TrellisVCS engine,
* and leaves the original Git repo untouched.
*/
export interface ImportOptions {
/** Path to the source Git repository. */
from: string;
/** Path to the target TrellisVCS repository (defaults to cwd). */
to: string;
/** Agent ID for the import. Defaults to Git author info. */
agentId?: string;
/** Callback for progress reporting. */
onProgress?: (progress: ImportProgress) => void;
}
export interface ImportProgress {
phase: 'reading' | 'importing' | 'done';
current: number;
total: number;
message: string;
}
export interface ImportResult {
commitsImported: number;
opsCreated: number;
filesTracked: number;
branches: string[];
duration: number;
}
export declare function importFromGit(opts: ImportOptions): Promise<ImportResult>;
//# sourceMappingURL=git-importer.d.ts.map