feat: add bulk operations - 4 new MCP tools for repo/file management #1

Open
chaim wants to merge 3 commits from feat/bulk-operations into main

3 Commits

Author SHA1 Message Date
chaim 8f4f8f3a14 feat(repo): add upload_release_attachment tool
Upload a file as an asset to an existing release.
Completes the publishing workflow for extension .zip packages.

Uses multipart form POST to Gitea's release assets endpoint.

Safety: 100MB cap, requires absolute file_path, supports custom
asset name (defaults to filename basename).

Closes the gap in the release workflow:
1. create_release  (existing) - creates the release
2. upload_release_attachment (NEW) - uploads the .zip/binary asset
2026-05-13 16:19:52 +00:00
chaim d0f9de5923 feat(repo): add get_files_batch and commit_multiple_files tools
Two new tools for efficient multi-file operations:

1. get_files_batch: Fetch up to 20 files in parallel via goroutines.
   Replaces N individual get_file_contents calls.
   Built-in safety cap on total response size (default 500KB).

2. commit_multiple_files: Atomic multi-file commit (create/update/delete).
   Uses Gitea SDK ChangeFiles API. Max 50 files per commit.
   Enables proper feature commits with single git history entry.

Both tools follow Security by Design: input validation, size limits,
proper error handling, no path traversal.
2026-05-13 16:19:24 +00:00
chaim 4131a99256 feat(repo): add download_repo_archive tool
Download an entire repository as zip/tar.gz in a single MCP call.
Replaces N+ get_file_contents calls when fetching whole repos.

Calls Gitea's GET /repos/{owner}/{repo}/archive/{ref}.{format} endpoint,
saves bytes to disk at output_path, returns sha256 for integrity.

Safety: 500MB cap, requires absolute output_path, parent dir auto-created.

Performance impact: ~250 calls → 1 call for typical extension repo.
2026-05-13 16:18:42 +00:00