@devries-cameron20 / composio Mirror · read-only / commits / 4657112bb
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 04:30 UTC

fix(cli): apply --connected filter client-side after catalog+session merge

The --connected flag was only passed to the session API, but after unifying the output the catalog API drives the result set and doesn't support is_connected. Apply the filter client-side on the merged data.

jkomyno committed Mar 9, 2026 at 15:46 UTC 4657112bbdcc4e928798614dbb02f8cca8ae6573
1 file changed +13 -1
ts/packages/cli/src/commands/toolkits/commands/toolkits.list.cmd.ts
+13 -1
@@ -130,7 +130,19 @@ export const toolkitsCmd$List = Command.make(
130 if (sessionItems.length === 0) sessionItems = undefined;
131 }
132
133 - const unified = mergeToolkitData(catalogResult.items, sessionItems);
133 + let unified = mergeToolkitData(catalogResult.items, sessionItems);
134 +
135 + // Apply --connected filter client-side: only keep toolkits with an active connection.
136 + const isConnectedFilter = Option.getOrUndefined(connected);
137 + if (isConnectedFilter && sessionItems) {
138 + unified = unified.filter(t => t.connected?.status === 'ACTIVE');
139 + }
140 +
141 + if (unified.length === 0) {
142 + yield* ui.log.warn('No connected toolkits found. Try without --connected.');
143 + yield* ui.output('[]');
144 + return;
145 + }
146
147 const showing = unified.length;
148 const total = catalogResult.total_items;