import { type PromptLineChange } from '../prompts/diff.js'; import type { ContextBundle } from './hub.js'; /** One entry that differs between two bundle versions. */ export interface ContextChange { /** The part of the bundle. */ section: 'description' | 'prompts' | 'instructions' | 'tools' | 'skills' | 'config'; /** The entry within it: a prompt role, an instruction or skill name, a tool name, or a config key. */ key: string; /** Whether the entry was added, removed, or changed. */ change: 'added' | 'removed' | 'changed'; /** Line by line, for text: an instruction, a skill's instructions, or the description. */ lines?: PromptLineChange[]; /** The entry before, for anything that is not text. */ before?: unknown; /** The entry after, for anything that is not text. */ after?: unknown; } /** What changed between two versions of a bundle. */ export interface ContextDiff { /** The bundle. */ name: string; /** The earlier version. */ from: string; /** The later version. */ to: string; /** Every entry that differs, section by section. */ changes: ContextChange[]; } /** Compares two versions of a bundle, entry by entry, with line diffs for text. */ export declare function diffContexts(from: ContextBundle, to: ContextBundle): ContextDiff; /** A diff as text, one line per change and `+`/`-` lines for text, for a terminal or a pull request. */ export declare function formatContextDiff(diff: ContextDiff): string;