feat(server): add repository administration tools #13

Merged
David merged 1 commit from feat/repo-admin-tools-fjmcp-12 into main 2026-06-14 20:45:19 +02:00
Owner

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

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
feat(server): add repository administration tools
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 35s
Create release / Create release from merged PR (pull_request) Has been skipped
fe7d506592
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
David merged commit 0c156f3dce into main 2026-06-14 20:45:19 +02:00
David deleted branch feat/repo-admin-tools-fjmcp-12 2026-06-14 20:45:20 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/forgejo-mcp!13
No description provided.