feat(ext/sw): get_vault_status handler + cached sync state (Plan C Phase 6)

Returns cached ahead/behind/lastSyncAt from the GitHost plus a live count of
active (non-trashed) manifest items. No network call — sync is user-initiated;
the sync handler records lastSyncAt (unix seconds). ahead/behind stay 0 in the
extension (writes go straight to the host, no local commit graph) and exist
for parity with relicario status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-05-31 15:24:02 -04:00
parent 3121431a7e
commit 61275574d4
6 changed files with 105 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ export class GiteaHost implements GitHost {
private keysUrl: string;
private branch: string = 'main';
private headers: Record<string, string>;
lastSyncAt: number | null = null;
ahead = 0;
behind = 0;
constructor(hostUrl: string, repoPath: string, apiToken: string) {
// Remove trailing slash from hostUrl