feat(ext/sw): GitHost.lastCommit() for vault-presence metadata

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-27 17:48:24 -04:00
parent 7588a75bdc
commit 2c94dfaf90
4 changed files with 103 additions and 2 deletions

View File

@@ -17,6 +17,11 @@ export interface GitHost {
/// List file names in a directory (non-recursive).
listDir(path: string): Promise<string[]>;
/// Best-effort: returns metadata for the most recent commit touching `path`.
/// Returns null if the path has no commits, the API fails, or the host
/// doesn't support the lookup. Callers must tolerate null.
lastCommit(path: string): Promise<{ sha: string; author: string; date: string } | null>;
/// Write an opaque binary blob to the repo. Optimized for large
/// attachments — implementations switch from Contents API to Git
/// Data API when content exceeds BLOB_THRESHOLD_BYTES.