From 6eb06f647d21493c06fc41ade8d6ac31ff6db324 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare <48523873+rohitg00@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:19:35 +0000 Subject: [PATCH] fix(agents): getAllAdapters returns correct agent types Fixed getAllAdapters() to return the correct agent type from the record keys instead of relying on adapter.type property, which was returning 'universal' for all UniversalAdapter instances. This fixes the E2E test that checks for all 32 agents in init --list output (cline, codebuddy, commandcode, etc. were showing as 'universal'). --- packages/agents/src/index.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/agents/src/index.ts b/packages/agents/src/index.ts index e75c8edc..daf72588 100644 --- a/packages/agents/src/index.ts +++ b/packages/agents/src/index.ts @@ -81,8 +81,16 @@ export function getAdapter(type: AgentType): AgentAdapter { return adapters[type]; } -export function getAllAdapters(): AgentAdapter[] { - return Object.values(adapters); +export interface AgentAdapterWithType extends AgentAdapter { + readonly agentType: AgentType; +} + +export function getAllAdapters(): AgentAdapterWithType[] { + return Object.entries(adapters).map(([type, adapter]) => ({ + ...adapter, + type: type as AgentType, + agentType: type as AgentType, + })); } export async function detectAgent(): Promise {