Add a lightweight SummaryFileDiff derived from FileDiff via
Struct.omit(["patch"]) to keep session summary DB payloads small.
Replace inline anonymous object types in session.sql.ts, revert.ts,
and session.ts with the new schema. Cast SessionPrompt input in
remote-sender to satisfy narrowed PromptInput type, guard against
null in permission normalizeInput, and switch remaining bare .parse
calls to .zod.parse for Effect Schema compatibility.
Include unit tests verifying SummaryFileDiff field exclusion and
round-trip parsing behavior.
* core: fix revert diff showing incorrect changes after file restore
When reverting a session, the diff was computed after files were already
reverted to their pre-change state, producing an empty or wrong diff.
By computing the diff before restoring files, the revert summary now
correctly reflects what was actually undone for the user.
* core: reduce revert diff size in DB to save storage
Full file contents were being stored in the session summary diffs,
causing unnecessary database bloat. The webview RevertBanner only
needs file path, line counts, and status — not the full diff content.
* chore(cli): add kilocode_change markers to revert diff changes
---------
Co-authored-by: Marius <marius@kilocode.ai>