refactor(worker): OnlineTokenStore zu DpapiTokenStore verallgemeinert
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Threading;
|
||||
using ClaudeDo.Data;
|
||||
using ClaudeDo.Data.Git;
|
||||
using ClaudeDo.Data.Repositories;
|
||||
using ClaudeDo.Worker;
|
||||
using ClaudeDo.Worker.Agents;
|
||||
using ClaudeDo.Worker.Config;
|
||||
using ClaudeDo.Worker.External;
|
||||
@@ -206,12 +207,13 @@ builder.Services.AddMcpServer()
|
||||
.WithTools<TaskRunMcpService>()
|
||||
.WithTools<TaskRunFindingsMcpTools>();
|
||||
|
||||
// OnlineInboxConfig and OnlineTokenStore are always registered so hub methods work
|
||||
// OnlineInboxConfig and the refresh-token store are always registered so hub methods work
|
||||
// even when sync is disabled. The sync stack (api client, auth, hosted service) is
|
||||
// only registered when enabled.
|
||||
builder.Services.AddSingleton(cfg.OnlineInbox);
|
||||
#pragma warning disable CA1416 // ClaudeDo.Worker is Windows-only; DPAPI is fine here.
|
||||
builder.Services.AddSingleton<OnlineTokenStore>();
|
||||
builder.Services.AddSingleton(new OnlineRefreshTokenStore(DpapiTokenStore.InAppData("online-inbox.token")));
|
||||
builder.Services.AddSingleton(new TicketPatStore(DpapiTokenStore.InAppData("ticket.pat")));
|
||||
#pragma warning restore CA1416
|
||||
|
||||
if (cfg.OnlineInbox.Enabled)
|
||||
|
||||
Reference in New Issue
Block a user