@sudocode-ai/cli
Version:
Git-native spec and issue management CLI for AI-assisted software development
47 lines • 1.56 kB
TypeScript
/**
* Bidirectional sync between Markdown files and JSONL/SQLite
*/
import type Database from "better-sqlite3";
export interface SyncResult {
success: boolean;
action: "created" | "updated" | "no-change";
entityId: string;
entityType: "spec" | "issue";
error?: string;
}
export interface SyncOptions {
/**
* Directory for JSONL output (default: .sudocode)
*/
outputDir?: string;
/**
* Whether to auto-export to JSONL after sync (default: true)
*/
autoExport?: boolean;
/**
* User performing the sync
*/
user?: string;
/**
* Auto-initialize missing frontmatter fields (default: true)
* If true, generates missing IDs and provides default values
* If false, rejects files with missing required fields
*/
autoInitialize?: boolean;
/**
* Whether to write back initialized frontmatter to the file (default: true)
* Only applies when autoInitialize is true
*/
writeBackFrontmatter?: boolean;
}
/**
* Sync a markdown file to JSONL and SQLite
* Parses markdown, updates database, optionally exports to JSONL
*/
export declare function syncMarkdownToJSONL(db: Database.Database, mdPath: string, options?: SyncOptions): Promise<SyncResult>;
/**
* Sync from JSONL/SQLite to markdown file
* Updates markdown frontmatter while preserving content
*/
export declare function syncJSONLToMarkdown(db: Database.Database, entityId: string, entityType: "spec" | "issue", mdPath: string): Promise<SyncResult>;
//# sourceMappingURL=sync.d.ts.map