Drop per-task port blocks; previews use any free loopback port

This commit is contained in:
Ian Gulliver
2026-10-21 20:49:00 -07:00
parent d88fd66c68
commit f0213e2aed
18 changed files with 441 additions and 425 deletions
+2 -4
View File
@@ -88,6 +88,7 @@ type Manager struct {
auditMu sync.Mutex
exposeMu sync.Mutex
previewMu sync.Mutex
previewListeners map[int]*previewListener
@@ -880,7 +881,6 @@ func (m *Manager) startLive(ctx context.Context, sess api.AgentSession, task api
g += stageGuidance(frozen, l.stage)
tools = append(tools, m.finishStageTool(l))
}
env := portEnv(task)
stdio := []mcp.Stdio{}
if sess.Role == api.Implementer {
media := MediaDir(task.WorktreePath)
@@ -904,7 +904,6 @@ func (m *Manager) startLive(ctx context.Context, sess api.AgentSession, task api
l.dir = m.reviewDir(task.ProjectId, r.Id)
g = reviewGuidance
tools = []mcp.Tool{m.submitReviewTool(l)}
env = nil
stdio = []mcp.Stdio{playwrightMCP(m.reviewMediaDir(task.ProjectId, r.Id))}
}
if l.owner != "" {
@@ -920,9 +919,8 @@ func (m *Manager) startLive(ctx context.Context, sess api.AgentSession, task api
}
l.notes = "\n\n" + notes
tools = append(m.leadTools(l), m.readKnowledgeTool(), m.renderDiagramTool())
env = nil
}
env = append(git.IdentityEnv(l.gitName, l.gitEmail), env...)
env := git.IdentityEnv(l.gitName, l.gitEmail)
servers := []*mcp.Server{{Name: "byre", Version: "0.0.0", Tools: tools}}
sctx, cancel := context.WithTimeout(ctx, 60*time.Second)