refactor mode selection into delegate tool that spawns subagents (#265)

This commit is contained in:
David Blass
2026-02-12 19:34:47 +00:00
committed by pullfrog[bot]
parent dda1d6b1de
commit 9071c0ae6c
20 changed files with 1486 additions and 455 deletions
+7 -2
View File
@@ -140,7 +140,8 @@ export async function main(): Promise<MainResult> {
const modes = [...computeModes(), ...runContext.repoSettings.modes];
await using mcpHttpServer = await startMcpHttpServer({
// mcpServerUrl and tmpdir are set after server starts — delegate tool reads them at call time
const toolContext = {
repo: runContext.repo,
payload,
octokit,
@@ -153,7 +154,11 @@ export async function main(): Promise<MainResult> {
toolState,
runId: runInfo.runId,
jobId: runInfo.jobId,
});
mcpServerUrl: "",
tmpdir,
};
await using mcpHttpServer = await startMcpHttpServer(toolContext);
toolContext.mcpServerUrl = mcpHttpServer.url;
log.info(`» MCP server started at ${mcpHttpServer.url}`);
timer.checkpoint("mcpServer");