/** * Project-local action history — tracks add/remove/update actions. * Stored at .skaile/history.yaml within the project directory. */ /** * A single record in the project's asset action history. * * @docLink packages/asset-manager/api-reference#history */ export interface HistoryEntry { /** Asset ref in `kind:name` form (e.g. `skill:my-skill`). */ ref: string; /** Action performed on the asset. */ action: "add" | "remove" | "update"; /** ISO 8601 timestamp of when the action was recorded. */ timestamp: string; /** Whether this action was performed in project scope or global-install scope. */ context: "project" | "global"; } /** * Load all history entries from `.skaile/history.yaml` in the project directory. * * @param projectDir - Absolute path to the workspace root. * @returns Array of history entries, oldest first. Returns `[]` when the file does not exist. * @docLink packages/asset-manager/api-reference#history */ export declare function loadHistory(projectDir: string): HistoryEntry[]; /** * Append a single action to the history log, capping the total at 500 entries. * * @param projectDir - Absolute path to the workspace root. * @param entry - The history entry to record. * @docLink packages/asset-manager/api-reference#history */ export declare function appendHistory(projectDir: string, entry: HistoryEntry): void; /** * Return the most recent history entries, newest first. * * @param projectDir - Absolute path to the workspace root. * @param limit - Maximum number of entries to return. Defaults to `20`. * @returns Most recent entries in reverse-chronological order. * @docLink packages/asset-manager/api-reference#history */ export declare function getRecentHistory(projectDir: string, limit?: number): HistoryEntry[]; /** * Erase all history entries by writing an empty list to `.skaile/history.yaml`. * * @param projectDir - Absolute path to the workspace root. * @docLink packages/asset-manager/api-reference#history */ export declare function clearHistory(projectDir: string): void; //# sourceMappingURL=history.d.ts.map