fix(mcp): register ticket import tools in the external MCP container

The external MCP server has its own DI container; TicketMcpTools could not
resolve TicketImportService there, so both tools failed at runtime. Also
surface a skipped import in the prime outcome and treat a sweep where every
project board fails as an error instead of an empty backlog.
This commit is contained in:
mika kuns
2026-10-01 08:49:31 +02:00
parent 7724f5eb70
commit 2b40ea2d2b
5 changed files with 28 additions and 3 deletions
+2
View File
@@ -367,6 +367,7 @@ if (cfg.ExternalMcpPort > 0)
Share<FindingsStore>();
Share<HandoffRoundTracker>();
Share<HandlerUsageGuard>();
Share<TicketImportService>();
externalBuilder.Services.AddScoped<ClaudeDoDbContext>(sp =>
sp.GetRequiredService<IDbContextFactory<ClaudeDoDbContext>>().CreateDbContext());
@@ -395,6 +396,7 @@ if (cfg.ExternalMcpPort > 0)
externalBuilder.Services.AddScoped<DailyNoteRepository>();
externalBuilder.Services.AddScoped<FindingsMcpTools>();
externalBuilder.Services.AddScoped<NotesMcpTools>();
externalBuilder.Services.AddScoped<TicketMcpTools>();
externalBuilder.Services.AddMcpServer()
.WithHttpTransport(o => o.Stateless = true)
.WithRequestFilters(f => f