feat(server): add issue and pull-request tools #12
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issues-prs-tools-fjmcp-11"
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 issue-management and pull-request operations from fj_core::issues and fj_core::prs as MCP tools, each tagged with its FJMCP-10 permission tier. Read-only tools run unconditionally; every mutating tool calls self.require(Tier::Edit)? as its first line and returns the gating error when EDIT is disabled.
Issue tools: list_all_issues, create_issue, edit_issue, list_issue_comments, create_issue_comment, edit_issue_comment, get_issue_templates, get_issue_config, set_issue_labels. The existing list_issues and the new list_all_issues share a query builder that now exposes labels, milestones, and assignee filters on top of state. set_issue_labels takes add/rm label names and returns the unknown names under unknown_labels. create_issue and create_pull_request accept label names and resolve them to ids via the internal maybe_label_names_to_ids helper.
Pull-request tools: get_pull_request, get_pull_request_by_base_head, find_pull_request_by_branch, list_pull_request_files, list_pull_request_commits, compare_refs, get_pull_request_diff, list_pull_request_reviews, get_pull_request_review_comments, get_pull_request_commit_statuses, get_pull_request_template, create_pull_request, merge_pull_request. get_pull_request_diff returns the raw diff/patch string rather than JSON; get_pull_request_template decodes the template bytes to text and includes the is_yaml flag.
get_pull_request_commit_statuses projects the deserialize-only CommitStatusLenient (FJ-2 relative-URL tolerance) into JSON by hand. find_pull_request_by_branch drives fj_core's boxed_local (!Send) wrapper on a current-thread runtime via spawn_blocking so the tool handler's Send bound is satisfied; this bridge can be removed once fj-core switches the wrapper to boxed().
get_info instructions and the README tool tables are updated to list every new tool and its tier.
#FJMCP-11