Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mcp): agents can write and read pull request review guides #18143

Mergedjuliusmarmingemerged 6 commits intomain fromrefs/pull/18143/headmerged by juliusmarminge View on GitHub

Showing 13 changed files with 189 additions and 1 deletion (loading 12).

x
0 of 13 viewed, 13 left
189 additions and 1 deletionapps/server/src/mcp/toolkits/pullRequests/handlers.test.tsModified
View file
@@ -4,7 +4,10 @@
ProviderInstanceId,
ThreadId,
type OrchestrationV2ServerCommand as OrchestrationCommand,
+ PullRequestOperationError,
type OrchestrationProjectShell,
+ type PullRequestRef,
+ type PullRequestReviewGuideResult,
type ThreadPullRequestLink,
} from "@t3tools/contracts";
import { describe, expect, it } from "@effect/vitest";
@@ -22,6 +25,7 @@
v2PullRequestThread,
} from "../../../orchestration-v2/testkit/pullRequestFixtures.ts";
import * as ProjectService from "../../../project/ProjectService.ts";
+import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts";
import * as McpInvocationContext from "../../McpInvocationContext.ts";
import * as McpToolAccess from "../../McpToolAccess.ts";
import * as McpToolAccessTestkit from "../../McpToolAccess.testkit.ts";
@@ -135,12 +139,24 @@
readonly project?: OrchestrationProjectShell | null;
/** A rejection the orchestrator reports as the dispatch error's cause. */
readonly reject?: (command: OrchestrationCommand) => string | null;
+ /** Every project in the environment; defaults to the thread's own. */
+ readonly projects?: ReadonlyArray<OrchestrationProjectShell>;
+ /** What the guide service answers for a pull request it is asked to write. */
+ readonly generate?: (
+ input: PullRequestRef,