@codervisor/devlog-core
Version:
Core devlog management functionality
58 lines • 1.84 kB
TypeScript
/**
* Utilities for querying and analyzing devlog change history
*/
import type { DevlogEntry, ChangeRecord, FieldChange } from '../types/index.js';
/**
* Extract change records from devlog notes
*/
export declare function extractChangeRecords(entry: DevlogEntry): ChangeRecord[];
/**
* Get field change history for a specific field
*/
export declare function getFieldHistory(entry: DevlogEntry, fieldName: keyof DevlogEntry): Array<{
timestamp: string;
previousValue: any;
newValue: any;
source: string;
reason?: string;
}>;
/**
* Get all field changes for an entry, grouped by timestamp
*/
export declare function getChangeTimeline(entry: DevlogEntry): Array<{
timestamp: string;
changeType: string;
source: string;
reason?: string;
changes: FieldChange[];
}>;
/**
* Find the most recent value for a field at a specific timestamp
*/
export declare function getFieldValueAtTime(entry: DevlogEntry, fieldName: keyof DevlogEntry, targetTimestamp: string): any;
/**
* Generate a summary of changes made by different sources
*/
export declare function getChangesSummary(entry: DevlogEntry): {
totalChanges: number;
changesBySource: Record<string, number>;
mostActiveField: string;
fieldChangeCounts: Record<string, number>;
};
/**
* Generate human-readable change summary for display
*/
export declare function formatChangeSummary(entry: DevlogEntry): string;
/**
* Check if a devlog entry has any tracked changes
*/
export declare function hasTrackedChanges(entry: DevlogEntry): boolean;
/**
* Get the last person/system that modified a specific field
*/
export declare function getLastModifier(entry: DevlogEntry, fieldName: keyof DevlogEntry): {
source: string;
timestamp: string;
reason?: string;
} | null;
//# sourceMappingURL=change-history.d.ts.map