From c18f13b47c8f96fe637ae531db8bd37415f6101b Mon Sep 17 00:00:00 2001 From: Keith Kowal Date: Fri, 11 Sep 2026 15:19:08 -0700 Subject: [PATCH] refactor(server): name import parameter types --- .../server/src/server/agent/agent-manager.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/server/src/server/agent/agent-manager.ts b/packages/server/src/server/agent/agent-manager.ts index b88f2abdcc..ed0f5ffa08 100644 --- a/packages/server/src/server/agent/agent-manager.ts +++ b/packages/server/src/server/agent/agent-manager.ts @@ -154,6 +154,21 @@ interface TimeoutOptions { onLateError?: (error: unknown) => void; } +interface ImportProviderSessionInput { + provider: AgentProvider; + providerHandleId: string; + cwd: string; + workspaceId: string; + labels?: Record; + modeId?: string; +} + +interface UnarchiveSnapshotUpdates { + workspaceId?: string; + labels?: AgentLabelPatch; + modeId?: string; +} + function formatProviderList(providers: readonly string[]): string { return providers.length > 0 ? providers.join(", ") : "none"; } @@ -1351,25 +1366,13 @@ export class AgentManager { }); } - importProviderSession(input: { - provider: AgentProvider; - providerHandleId: string; - cwd: string; - workspaceId: string; - labels?: Record; - modeId?: string; - }): Promise { + importProviderSession(input: ImportProviderSessionInput): Promise { return this.trackAgentRegistrationOperation(this.importProviderSessionInternal(input)); } - private async importProviderSessionInternal(input: { - provider: AgentProvider; - providerHandleId: string; - cwd: string; - workspaceId: string; - labels?: Record; - modeId?: string; - }): Promise { + private async importProviderSessionInternal( + input: ImportProviderSessionInput, + ): Promise { this.assertAcceptingAgentRegistrations(); const resolvedAgentId = validateAgentId(this.idFactory(), "importProviderSession"); this.requireEnabledProvider(input.provider); @@ -2144,10 +2147,7 @@ export class AgentManager { return nextRecord; } - async unarchiveSnapshot( - agentId: string, - updates?: { workspaceId?: string; labels?: AgentLabelPatch; modeId?: string }, - ): Promise { + async unarchiveSnapshot(agentId: string, updates?: UnarchiveSnapshotUpdates): Promise { const registry = this.requireRegistry(); const record = await registry.get(agentId); if (!record || !record.archivedAt) {