Skip to content

Commit 26afe7e

Browse files
committed
refactor(providers): remove unused ITokenExchanger interface
The interface was introduced alongside CopilotTokenExchanger with an aspirational doc-comment about "future providers needing transparent token refresh", but every consumer (ProviderDescriptorCatalog, GitHubCopilotDescriptor, GitHubCopilotProviderPlugin, CopilotRequestPolicy) depends on the concrete CopilotTokenExchanger class. The interface had zero implementations besides Copilot and no callers polymorphic over it. Delete it. We can reintroduce a token-exchange contract when a second provider actually needs one (OpenAI Codex doesn't — its OAuth tokens go straight to api.openai.com). Per the Copilot review item netclaw-dev#5 and the YAGNI guidance in CLAUDE.md.
1 parent 1c81c99 commit 26afe7e

2 files changed

Lines changed: 0 additions & 50 deletions

File tree

src/Netclaw.Providers/GitHubCopilot/CopilotTokenExchanger.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ namespace Netclaw.Providers.GitHubCopilot;
2727
/// only credential that hits the secrets store.
2828
/// </remarks>
2929
public sealed class CopilotTokenExchanger(HttpClient httpClient, TimeProvider? timeProvider = null)
30-
: ITokenExchanger
3130
{
3231
private static readonly Uri TokenEndpoint =
3332
new("https://api.github.com/copilot_internal/v2/token");

src/Netclaw.Providers/ITokenExchanger.cs

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)