feat(ext/sw): extend GitHost interface with putBlob/getBlob/deleteBlob

Adds the three blob ops to the interface and a BLOB_THRESHOLD_BYTES
constant. Both GitHubHost and GiteaHost ship temporary stubs so the
build stays green until tasks 3-4 fill in real implementations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-25 09:46:24 -04:00
parent 71c182af9a
commit 511d533de0
3 changed files with 44 additions and 0 deletions

View File

@@ -105,4 +105,16 @@ export class GitHubHost implements GitHost {
if (!Array.isArray(json)) return [];
return json.map((item: { name: string }) => item.name);
}
async putBlob(_path: string, _content: Uint8Array, _message: string): Promise<string> {
throw new Error(`GitHubHost.putBlob not implemented — Task 3`);
}
async getBlob(path: string): Promise<Uint8Array> {
return this.readFile(path);
}
async deleteBlob(path: string, message: string): Promise<void> {
return this.deleteFile(path, message);
}
}