@devries-cameron20 / composio Mirror · read-only / commits / a1408e887
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, 07:00 UTC

fix(cli): make filter case-insensitive and drop deprecated API params

- Restore case-insensitive matching in matchesTriggerListenFilters so the function is self-contained regardless of caller normalization - Remove deprecated camelCase params (connectedAccountIds, authConfigIds, triggerIds, triggerNames, showDisabled) from TriggerInstancesListActiveParams and the listActive passthrough — CLI only uses snake_case variants

jkomyno committed Feb 24, 2026 at 16:57 UTC a1408e8870ed6ae2b3370d4f23993b1e6976f0ec
4 files changed +8 -33
ts/packages/cli/src/commands/triggers/commands/triggers.listen.cmd.ts
+2 -6
@@ -189,14 +189,10 @@ export const triggersCmd$Listen = Command.make(
189 }
190
191 const filters: TriggerListenFilters = {
192 - toolkits: Option.isSome(toolkits)
193 - ? parseCsv(toolkits.value).map(x => x.toLowerCase())
194 - : undefined,
192 + toolkits: Option.isSome(toolkits) ? [...parseCsv(toolkits.value)] : undefined,
193 triggerId: Option.getOrUndefined(triggerId),
194 connectedAccountId: Option.getOrUndefined(connectedAccountId),
197 - triggerSlug: Option.isSome(triggerSlug)
198 - ? parseCsv(triggerSlug.value).map(x => x.toLowerCase())
199 - : undefined,
195 + triggerSlug: Option.isSome(triggerSlug) ? [...parseCsv(triggerSlug.value)] : undefined,
196 userId: Option.getOrUndefined(userId),
197 };
198
ts/packages/cli/src/commands/triggers/filter.ts
+6 -6
@@ -2,16 +2,16 @@ import type { TriggerListenEvent, TriggerListenFilters } from './types';
2
3 /**
4 * Check if a trigger event matches the provided filters.
5 - *
6 - * IMPORTANT: `filters.toolkits` and `filters.triggerSlug` must be pre-normalized
7 - * to lowercase at construction time. This avoids per-event allocation from
8 - * repeated `.map(x => x.toLowerCase())` calls in long-running listen sessions.
5 + * All string comparisons on `toolkits` and `triggerSlug` are case-insensitive.
6 */
7 export const matchesTriggerListenFilters = (
8 filters: TriggerListenFilters,
9 data: TriggerListenEvent
10 ): boolean => {
14 - if (filters.toolkits?.length && !filters.toolkits.includes(data.toolkitSlug.toLowerCase())) {
11 + if (
12 + filters.toolkits?.length &&
13 + !filters.toolkits.some(t => t.toLowerCase() === data.toolkitSlug.toLowerCase())
14 + ) {
15 return false;
16 }
17
@@ -28,7 +28,7 @@ export const matchesTriggerListenFilters = (
28
29 if (
30 filters.triggerSlug?.length &&
31 - !filters.triggerSlug.includes(data.triggerSlug.toLowerCase())
31 + !filters.triggerSlug.some(s => s.toLowerCase() === data.triggerSlug.toLowerCase())
32 ) {
33 return false;
34 }
ts/packages/cli/src/services/composio-clients.ts
-14
@@ -342,14 +342,7 @@ export interface TriggerInstancesListActiveParams {
342 auth_config_ids?: string[];
343 trigger_ids?: string[];
344 trigger_names?: string[];
345 - connectedAccountIds?: string[];
346 - authConfigIds?: string[];
347 - triggerIds?: string[];
348 - triggerNames?: string[];
345 show_disabled?: boolean;
350 - showDisabled?: boolean;
351 - deprecatedConnectedAccountUuids?: string[];
352 - deprecatedAuthConfigUuids?: string[];
346 limit?: number;
347 }
348
@@ -380,14 +373,7 @@ function buildTriggerInstancesNamespace(
373 auth_config_ids: params.auth_config_ids,
374 trigger_ids: params.trigger_ids,
375 trigger_names: params.trigger_names,
383 - connectedAccountIds: params.connectedAccountIds,
384 - authConfigIds: params.authConfigIds,
385 - triggerIds: params.triggerIds,
376 show_disabled: params.show_disabled,
387 - triggerNames: params.triggerNames,
388 - showDisabled: params.showDisabled,
389 - deprecatedConnectedAccountUuids: params.deprecatedConnectedAccountUuids,
390 - deprecatedAuthConfigUuids: params.deprecatedAuthConfigUuids,
377 limit: params.limit,
378 }),
379 TriggerInstancesListActiveResponse
ts/packages/cli/test/__utils__/services/test-layer.ts
-7
@@ -569,14 +569,7 @@ export const TestLayer = (input?: TestLiveInput) =>
569 auth_config_ids?: string[];
570 trigger_ids?: string[];
571 trigger_names?: string[];
572 - connectedAccountIds?: string[];
573 - authConfigIds?: string[];
574 - triggerIds?: string[];
575 - triggerNames?: string[];
572 show_disabled?: boolean;
577 - showDisabled?: boolean;
578 - deprecatedConnectedAccountUuids?: string[];
579 - deprecatedAuthConfigUuids?: string[];
573 limit?: number;
574 }) => {
575 let results = [...triggersData.items];