feat(server): add repository administration tools #13
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/repo-admin-tools-fjmcp-12"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expose the repository-admin operations from fj_core::repo as MCP tools, completing phase 2 of the tool-surface expansion (FJMCP-9). Each tool wraps the matching fj_core::repo::* function and gates writes through the FJMCP-10 tier system: read-only tools run unconditionally, EDIT-tier tools call self.require(Tier::Edit)? first, and DELETE-tier tools call self.require(Tier::Delete)? first.
Bump fj-core and fj-client from v0.6.0 to v0.8.1 (and refresh Cargo.lock); the deploy-key, branch-protection, collaborator, and webhook wrappers this phase needs only exist from v0.8.1. Both tags pin forgejo-api 0.10.0, and the existing issue/PR tool surface compiles and tests unchanged against the bump.
New tools: repo lifecycle (edit_repo, create_org_repo, create_user_repo, fork_repo, migrate_repo, delete_repo, star_repo, unstar_repo); contents (list_repo_contents, get_raw_file); labels (list_repo_labels, create_repo_label, edit_repo_label, delete_repo_label); deploy keys (list_deploy_keys, get_deploy_key, create_deploy_key, delete_deploy_key); branch protections (list_branch_protections, get_branch_protection, create_branch_protection, edit_branch_protection, delete_branch_protection); collaborators (list_collaborators, get_collaborator_permission, add_collaborator, remove_collaborator); webhooks (list_hooks, get_hook, create_hook, edit_hook, test_hook, delete_hook).
get_raw_file decodes the file bytes as UTF-8 and returns a "[binary file: N bytes ...]" note for non-UTF-8 content. The forgejo-api option structs have no Default impl, so each Parameters-to-option builder spells out the unused fields as None. Tier::Delete is now reached by shipped tools, so its dead_code allowance is dropped. The get_info instructions and the README tool tables (including a new DELETE-tier table) list every added tool.
#FJMCP-12