@devries-cameron20 / composio Mirror · read-only / commits / 7ef89854e
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

refactor(cli): clean up rough edges and add toolkit version display

- Fix --toolkit → --toolkits typo in toolkits info hint - Extend handleHttpServerError with optional searchForSuggestions callback, replacing duplicated inline "Did you mean?" logic in toolkits info and tools info commands - Move formatToolkitInfo/formatFields from toolkits.info.cmd.ts to toolkits/format.ts; create formatConnectedAccountWhoami in connected-accounts/format.ts - Unify count display: "Fetched" → "Listing" in tools list; add pagination info to tools search - Add "Version" column to toolkits list/search tables and "Latest Version" line to toolkits info; add latest_version to piped JSON output - Update test fixtures with available_versions data and assertions

jkomyno committed Feb 23, 2026 at 12:22 UTC 7ef89854e54ea961d330071eee0fc32c3fb48f88
12 files changed +187 -162
ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.whoami.cmd.ts
+2 -14
@@ -4,8 +4,7 @@ import { ComposioToolkitsRepository } from 'src/services/composio-clients';
4 import { TerminalUI } from 'src/services/terminal-ui';
5 import { requireAuth } from 'src/effects/require-auth';
6 import { handleHttpServerError } from 'src/effects/handle-http-error';
7 -import { bold, gray } from 'src/ui/colors';
8 -import { redact } from 'src/ui/redact';
7 +import { formatConnectedAccountWhoami } from '../format';
8
9 const id = Args.text({ name: 'id' }).pipe(
10 Args.withDescription('Connected account ID (nanoid)'),
@@ -67,18 +66,7 @@ export const connectedAccountsCmd$Whoami = Command.make('whoami', { id }, ({ id
66 yield* ui.log.warn(`This connected account has status ${item.status}.`);
67 }
68
70 - const redactedId = redact({ value: item.id, prefix: 'con_' });
71 - const redactedAuthConfigId = redact({ value: item.auth_config.id, prefix: 'ac_' });
72 -
73 - const lines: string[] = [];
74 - lines.push(`${bold('Id:')} ${redactedId}`);
75 - lines.push(`${bold('Toolkit:')} ${item.toolkit.slug}`);
76 - lines.push(`${bold('User Id:')} ${item.user_id}`);
77 - lines.push(`${bold('Status:')} ${item.status === 'ACTIVE' ? item.status : gray(item.status)}`);
78 - lines.push(`${bold('Auth Config:')} ${redactedAuthConfigId}`);
79 - lines.push(`${bold('Auth Scheme:')} ${item.auth_config.auth_scheme}`);
80 -
81 - yield* ui.note(lines.join('\n'), `whoami: ${item.toolkit.slug}`);
69 + yield* ui.note(formatConnectedAccountWhoami(item), `whoami: ${item.toolkit.slug}`);
70
71 yield* ui.output(
72 JSON.stringify(
ts/packages/cli/src/commands/connected-accounts/format.ts
+14
@@ -72,3 +72,17 @@ export function formatConnectedAccountInfo(item: ConnectedAccountItem): string {
72
73 return lines.join('\n');
74 }
75 +
76 +/**
77 + * Format a connected account for the whoami display (compact 6-field subset).
78 + */
79 +export function formatConnectedAccountWhoami(item: ConnectedAccountItem): string {
80 + const lines: string[] = [];
81 + lines.push(`${bold('Id:')} ${redact({ value: item.id, prefix: 'con_' })}`);
82 + lines.push(`${bold('Status:')} ${item.status === 'ACTIVE' ? item.status : gray(item.status)}`);
83 + lines.push(`${bold('Toolkit:')} ${item.toolkit.slug}`);
84 + lines.push(`${bold('User Id:')} ${item.user_id}`);
85 + lines.push(`${bold('Auth Config:')} ${redact({ value: item.auth_config.id, prefix: 'ac_' })}`);
86 + lines.push(`${bold('Auth Scheme:')} ${item.auth_config.auth_scheme}`);
87 + return lines.join('\n');
88 +}
ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
+19 -106
@@ -1,90 +1,16 @@
1 import { Args, Command } from '@effect/cli';
2 import { Effect, Option } from 'effect';
3 -import { ComposioToolkitsRepository, HttpServerError } from 'src/services/composio-clients';
3 +import { ComposioToolkitsRepository } from 'src/services/composio-clients';
4 import { TerminalUI } from 'src/services/terminal-ui';
5 import { requireAuth } from 'src/effects/require-auth';
6 -import type { ToolkitDetailed, AuthConfigDetail } from 'src/models/toolkits';
7 -import { bold, gray } from 'src/ui/colors';
6 +import { handleHttpServerError } from 'src/effects/handle-http-error';
7 +import { formatToolkitInfo } from '../format';
8
9 const slug = Args.text({ name: 'slug' }).pipe(
10 Args.withDescription('Toolkit slug (e.g. "gmail")'),
11 Args.optional
12 );
13
14 -/**
15 - * Format auth config fields for display.
16 - */
17 -function formatFields(fields: ReadonlyArray<AuthConfigDetail['fields']['auth_config_creation']>) {
18 - const lines: string[] = [];
19 -
20 - for (const group of fields) {
21 - const allFields = [
22 - ...group.required.map(f => ({ ...f, label: 'required' })),
23 - ...group.optional.map(f => ({ ...f, label: 'optional' })),
24 - ];
25 -
26 - if (allFields.length === 0) {
27 - lines.push(' (none)');
28 - } else {
29 - const nameWidth = Math.max(...allFields.map(f => f.name.length));
30 - const labelWidth = Math.max(...allFields.map(f => f.label.length));
31 - const typeWidth = Math.max(...allFields.map(f => f.type.length));
32 -
33 - for (const field of allFields) {
34 - const desc = field.description ? ` ${gray(`"${field.description}"`)}` : '';
35 - lines.push(
36 - ` ${field.name.padEnd(nameWidth)} ${field.label.padEnd(labelWidth)} ${field.type.padEnd(typeWidth)}${desc}`
37 - );
38 - }
39 - }
40 - }
41 -
42 - return lines.join('\n');
43 -}
44 -
45 -/**
46 - * Format a detailed toolkit for interactive display.
47 - */
48 -function formatToolkitInfo(toolkit: ToolkitDetailed): string {
49 - const lines: string[] = [];
50 -
51 - lines.push(`${bold('Name:')} ${toolkit.name}`);
52 - lines.push(`${bold('Slug:')} ${toolkit.slug}`);
53 - lines.push(`${bold('Description:')} ${toolkit.meta.description || '(none)'}`);
54 -
55 - // Derive auth schemes from auth_config_details
56 - const authSchemes = toolkit.auth_config_details.map(d => d.mode);
57 - if (toolkit.no_auth) {
58 - lines.push(`${bold('Auth:')} No authentication required`);
59 - } else if (authSchemes.length > 0) {
60 - lines.push(`${bold('Auth Schemes:')} ${authSchemes.join(', ')}`);
61 - if (toolkit.composio_managed_auth_schemes.length > 0) {
62 - lines.push(
63 - `${bold('Composio Managed Auth Schemes:')} ${toolkit.composio_managed_auth_schemes.join(', ')}`
64 - );
65 - }
66 - }
67 -
68 - // Auth config creation fields
69 - if (toolkit.auth_config_details.length > 0) {
70 - lines.push('');
71 - lines.push(bold('Fields Required for AuthConfig creation:'));
72 - for (const detail of toolkit.auth_config_details) {
73 - lines.push(` ${detail.name} (${detail.mode}):`);
74 - lines.push(formatFields([detail.fields.auth_config_creation]));
75 - }
76 -
77 - lines.push('');
78 - lines.push(bold('Fields Required for Connected Account creation:'));
79 - for (const detail of toolkit.auth_config_details) {
80 - lines.push(` ${detail.name} (${detail.mode}):`);
81 - lines.push(formatFields([detail.fields.connected_account_initiation]));
82 - }
83 - }
84 -
85 - return lines.join('\n');
86 -}
87 -
14 /**
15 * View details of a specific toolkit including auth schemes and required fields.
16 *
@@ -113,34 +39,21 @@ export const toolkitsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
39 .withSpinner(`Fetching toolkit "${slugValue}"...`, repo.getToolkitDetailed(slugValue))
40 .pipe(
41 Effect.asSome,
116 - Effect.catchTag('services/HttpServerError', (e: HttpServerError) =>
117 - Effect.gen(function* () {
118 - // Show structured error message and suggested fix from the API
119 - if (e.details) {
120 - yield* ui.log.error(e.details.message);
121 - yield* ui.log.step(e.details.suggestedFix);
122 - } else {
123 - yield* ui.log.error(`Failed to fetch toolkit "${slugValue}".`);
124 - }
125 -
126 - // Try to suggest similar toolkits
127 - const suggestions = yield* repo.searchToolkits({ search: slugValue, limit: 3 }).pipe(
128 - Effect.map(r => r.items),
129 - Effect.catchAll(() => Effect.succeed([]))
130 - );
131 -
132 - if (suggestions.length > 0) {
133 - const suggestionLines = suggestions
134 - .map(s => ` ${s.slug} — ${s.meta.description}`)
135 - .join('\n');
136 - yield* ui.log.step(
137 - `Did you mean?\n${suggestionLines}\n\n> composio toolkits info "${suggestions[0]!.slug}"`
138 - );
139 - } else {
140 - yield* ui.log.step('Browse available toolkits:\n> composio toolkits list');
141 - }
142 -
143 - return Option.none();
42 + Effect.catchTag(
43 + 'services/HttpServerError',
44 + handleHttpServerError(ui, {
45 + fallbackMessage: `Failed to fetch toolkit "${slugValue}".`,
46 + hint: 'Browse available toolkits:\n> composio toolkits list',
47 + fallbackValue: Option.none(),
48 + searchForSuggestions: () =>
49 + repo.searchToolkits({ search: slugValue, limit: 3 }).pipe(
50 + Effect.map(r =>
51 + r.items.map(s => ({
52 + label: `${s.slug} — ${s.meta.description}`,
53 + command: `> composio toolkits info "${s.slug}"`,
54 + }))
55 + )
56 + ),
57 })
58 )
59 );
@@ -155,7 +68,7 @@ export const toolkitsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
68
69 // Next step hint
70 yield* ui.log.step(
158 - `To list tools in this toolkit:\n> composio tools list --toolkit "${toolkit.slug}"`
71 + `To list tools in this toolkit:\n> composio tools list --toolkits "${toolkit.slug}"`
72 );
73
74 yield* ui.output(JSON.stringify(toolkit, null, 2));
ts/packages/cli/src/commands/toolkits/format.ts
+82 -3
@@ -1,4 +1,4 @@
1 -import type { Toolkit } from 'src/models/toolkits';
1 +import type { Toolkit, ToolkitDetailed, AuthConfigDetail } from 'src/models/toolkits';
2 import { bold, gray } from 'src/ui/colors';
3 import { truncate } from 'src/ui/truncate';
4
@@ -6,15 +6,16 @@ import { truncate } from 'src/ui/truncate';
6 * Format a list of toolkits as a human-readable table.
7 */
8 export function formatToolkitsTable(toolkits: ReadonlyArray<Toolkit>): string {
9 - const header = `${bold('Name'.padEnd(20))} ${bold('Slug'.padEnd(20))} ${bold('Tools'.padEnd(7))} ${bold('Triggers'.padEnd(10))} ${bold('Description')}`;
9 + const header = `${bold('Name'.padEnd(20))} ${bold('Slug'.padEnd(20))} ${bold('Version'.padEnd(12))} ${bold('Tools'.padEnd(7))} ${bold('Triggers'.padEnd(10))} ${bold('Description')}`;
10
11 const rows = toolkits.map(t => {
12 const name = t.name.padEnd(20);
13 const slug = t.slug.padEnd(20);
14 + const version = (t.meta.available_versions.at(-1) ?? '-').padEnd(12);
15 const tools = String(t.meta.tools_count).padEnd(7);
16 const triggers = String(t.meta.triggers_count).padEnd(10);
17 const desc = gray(truncate(t.meta.description, 50));
17 - return `${name} ${slug} ${tools} ${triggers} ${desc}`;
18 + return `${name} ${slug} ${version} ${tools} ${triggers} ${desc}`;
19 });
20
21 return [header, ...rows].join('\n');
@@ -28,6 +29,7 @@ export function formatToolkitsJson(toolkits: ReadonlyArray<Toolkit>): string {
29 toolkits.map(t => ({
30 name: t.name,
31 slug: t.slug,
32 + latest_version: t.meta.available_versions.at(-1) ?? null,
33 tools_count: t.meta.tools_count,
34 triggers_count: t.meta.triggers_count,
35 description: t.meta.description,
@@ -36,3 +38,80 @@ export function formatToolkitsJson(toolkits: ReadonlyArray<Toolkit>): string {
38 2
39 );
40 }
41 +
42 +/**
43 + * Format auth config fields for display.
44 + */
45 +function formatFields(group: AuthConfigDetail['fields']['auth_config_creation']) {
46 + const allFields = [
47 + ...group.required.map(f => ({ ...f, label: 'required' })),
48 + ...group.optional.map(f => ({ ...f, label: 'optional' })),
49 + ];
50 +
51 + if (allFields.length === 0) {
52 + return ' (none)';
53 + }
54 +
55 + const nameWidth = Math.max(...allFields.map(f => f.name.length));
56 + const labelWidth = Math.max(...allFields.map(f => f.label.length));
57 + const typeWidth = Math.max(...allFields.map(f => f.type.length));
58 +
59 + return allFields
60 + .map(field => {
61 + const desc = field.description ? ` ${gray(`"${field.description}"`)}` : '';
62 + return ` ${field.name.padEnd(nameWidth)} ${field.label.padEnd(labelWidth)} ${field.type.padEnd(typeWidth)}${desc}`;
63 + })
64 + .join('\n');
65 +}
66 +
67 +/**
68 + * Format a detailed toolkit for interactive display.
69 + */
70 +export function formatToolkitInfo(toolkit: ToolkitDetailed): string {
71 + const lines: string[] = [];
72 +
73 + lines.push(`${bold('Name:')} ${toolkit.name}`);
74 + lines.push(`${bold('Slug:')} ${toolkit.slug}`);
75 +
76 + const versions = toolkit.meta.available_versions;
77 + const latest = versions.at(-1);
78 + if (latest) {
79 + lines.push(`${bold('Latest Version:')} ${latest} (${versions.length} available)`);
80 + } else {
81 + lines.push(`${bold('Latest Version:')} -`);
82 + }
83 +
84 + lines.push(`${bold('Description:')} ${toolkit.meta.description || '(none)'}`);
85 +
86 + // Derive auth schemes from auth_config_details
87 + const authSchemes = toolkit.auth_config_details.map(d => d.mode);
88 + if (toolkit.no_auth) {
89 + lines.push(`${bold('Auth:')} No authentication required`);
90 + } else if (authSchemes.length > 0) {
91 + lines.push(`${bold('Auth Schemes:')} ${authSchemes.join(', ')}`);
92 + if (toolkit.composio_managed_auth_schemes.length > 0) {
93 + lines.push(
94 + `${bold('Composio Managed Auth Schemes:')} ${toolkit.composio_managed_auth_schemes.join(', ')}`
95 + );
96 + }
97 + }
98 +
99 + // Auth config creation fields
100 + if (toolkit.auth_config_details.length > 0) {
101 + lines.push('');
102 + lines.push(bold('Fields Required for AuthConfig creation:'));
103 + for (const detail of toolkit.auth_config_details) {
104 + lines.push(` ${detail.name} (${detail.mode}):`);
105 + lines.push(formatFields(detail.fields.auth_config_creation));
106 + }
107 +
108 + lines.push('');
109 + lines.push(bold('Fields Required for Connected Account creation:'));
110 + for (const detail of toolkit.auth_config_details) {
111 + lines.push(` ${detail.name} (${detail.mode}):`);
112 + lines.push(formatFields(detail.fields.connected_account_initiation));
113 + }
114 + }
115 +
116 + return lines.join('\n');
117 +}
ts/packages/cli/src/commands/tools/commands/tools.info.cmd.ts
+17 -29
@@ -1,8 +1,9 @@
1 import { Args, Command } from '@effect/cli';
2 import { Effect, Option } from 'effect';
3 -import { ComposioToolkitsRepository, HttpServerError } from 'src/services/composio-clients';
3 +import { ComposioToolkitsRepository } from 'src/services/composio-clients';
4 import { TerminalUI } from 'src/services/terminal-ui';
5 import { requireAuth } from 'src/effects/require-auth';
6 +import { handleHttpServerError } from 'src/effects/handle-http-error';
7 import { formatToolInfo } from '../format';
8
9 const slug = Args.text({ name: 'slug' }).pipe(
@@ -40,34 +41,21 @@ export const toolsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
41 .withSpinner(`Fetching tool "${slugValue}"...`, repo.getToolDetailed(slugValue))
42 .pipe(
43 Effect.asSome,
43 - Effect.catchTag('services/HttpServerError', (e: HttpServerError) =>
44 - Effect.gen(function* () {
45 - // Show structured error message and suggested fix from the API
46 - if (e.details) {
47 - yield* ui.log.error(e.details.message);
48 - yield* ui.log.step(e.details.suggestedFix);
49 - } else {
50 - yield* ui.log.error(`Tool "${slugValue}" not found.`);
51 - }
52 -
53 - // Try to suggest similar tools
54 - const suggestions = yield* repo.searchTools({ search: slugValue, limit: 3 }).pipe(
55 - Effect.map(r => r.items),
56 - Effect.catchAll(() => Effect.succeed([]))
57 - );
58 -
59 - if (suggestions.length > 0) {
60 - const suggestionLines = suggestions
61 - .map(s => ` ${s.slug} — ${s.description}`)
62 - .join('\n');
63 - yield* ui.log.step(
64 - `Did you mean?\n${suggestionLines}\n\n> composio tools info "${suggestions[0]!.slug}"`
65 - );
66 - } else {
67 - yield* ui.log.step('Browse available tools:\n> composio tools list');
68 - }
69 -
70 - return Option.none();
44 + Effect.catchTag(
45 + 'services/HttpServerError',
46 + handleHttpServerError(ui, {
47 + fallbackMessage: `Tool "${slugValue}" not found.`,
48 + hint: 'Browse available tools:\n> composio tools list',
49 + fallbackValue: Option.none(),
50 + searchForSuggestions: () =>
51 + repo.searchTools({ search: slugValue, limit: 3 }).pipe(
52 + Effect.map(r =>
53 + r.items.map(s => ({
54 + label: `${s.slug} — ${s.description}`,
55 + command: `> composio tools info "${s.slug}"`,
56 + }))
57 + )
58 + ),
59 })
60 )
61 );
ts/packages/cli/src/commands/tools/commands/tools.list.cmd.ts
+1 -1
@@ -74,7 +74,7 @@ export const toolsCmd$List = Command.make(
74 yield* ui.log.info(
75 totalPages > 1
76 ? `Listing ${showing} tools (page 1 of ${totalPages})\n\n${formatToolsTable(result.items)}`
77 - : `Fetched ${showing} tools\n\n${formatToolsTable(result.items)}`
77 + : `Listing ${showing} tools\n\n${formatToolsTable(result.items)}`
78 );
79
80 // Next step hint
ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
+7 -1
@@ -56,7 +56,13 @@ export const toolsCmd$Search = Command.make(
56 return;
57 }
58
59 - yield* ui.log.info(`Found ${result.items.length} tools\n\n${formatToolsTable(result.items)}`);
59 + const showing = result.items.length;
60 + const totalPages = result.total_pages;
61 + yield* ui.log.info(
62 + totalPages > 1
63 + ? `Found ${showing} tools (page 1 of ${totalPages})\n\n${formatToolsTable(result.items)}`
64 + : `Found ${showing} tools\n\n${formatToolsTable(result.items)}`
65 + );
66
67 // Next step hint
68 const firstSlug = result.items[0]?.slug;
ts/packages/cli/src/effects/handle-http-error.ts
+29
@@ -2,12 +2,23 @@ import { Effect } from 'effect';
2 import type { HttpServerError } from 'src/services/composio-clients';
3 import type { TerminalUI } from 'src/services/terminal-ui';
4
5 +export interface Suggestion {
6 + readonly label: string;
7 + readonly command: string;
8 +}
9 +
10 +const noSuggestions: ReadonlyArray<Suggestion> = [];
11 +
12 /**
13 * Create an HttpServerError handler that logs the structured error details
14 * (or a fallback message) and a contextual hint, then returns a fallback value.
15 *
16 * Used by info/delete/create commands that share the same error-handling shape.
17 *
18 + * When `searchForSuggestions` is provided, the handler will attempt to find
19 + * similar items and display "Did you mean?" suggestions instead of the generic hint.
20 + * Suggestion search failures are silently swallowed — the handler always completes.
21 + *
22 * @example
23 * ```ts
24 * .pipe(
@@ -28,6 +39,11 @@ export const handleHttpServerError =
39 readonly fallbackMessage: string;
40 readonly hint: string;
41 readonly fallbackValue: A;
42 + readonly searchForSuggestions?: () => Effect.Effect<
43 + ReadonlyArray<Suggestion>,
44 + unknown,
45 + never
46 + >;
47 }
48 ) =>
49 (e: HttpServerError) =>
@@ -39,6 +55,19 @@ export const handleHttpServerError =
55 yield* ui.log.error(opts.fallbackMessage);
56 }
57
58 + if (opts.searchForSuggestions) {
59 + const suggestions = yield* opts
60 + .searchForSuggestions()
61 + .pipe(Effect.catchAll(() => Effect.succeed(noSuggestions)));
62 +
63 + const [first] = suggestions;
64 + if (first) {
65 + const lines = suggestions.map(s => ` ${s.label}`).join('\n');
66 + yield* ui.log.step(`Did you mean?\n${lines}\n\n${first.command}`);
67 + return opts.fallbackValue;
68 + }
69 + }
70 +
71 yield* ui.log.step(opts.hint);
72 return opts.fallbackValue;
73 });
ts/packages/cli/test/src/commands/toolkits/toolkits.info.cmd.test.ts
+6 -2
@@ -18,7 +18,7 @@ const testToolkits: Toolkits = [
18 categories: [],
19 created_at: new Date('2024-05-03T11:44:32.061Z') as any,
20 updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
21 - available_versions: [],
21 + available_versions: ['20250101', '20250601', '20250909'],
22 tools_count: 36,
23 triggers_count: 2,
24 },
@@ -37,7 +37,7 @@ const detailedToolkits: ToolkitDetailed[] = [
37 categories: [],
38 created_at: new Date('2024-05-03T11:44:32.061Z') as any,
39 updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
40 - available_versions: [],
40 + available_versions: ['20250101', '20250601', '20250909'],
41 tools_count: 36,
42 triggers_count: 2,
43 },
@@ -125,6 +125,8 @@ describe('CLI: composio toolkits info', () => {
125 expect(output).toContain('Gmail');
126 expect(output).toContain('gmail');
127 expect(output).toContain('Email service to send and receive emails');
128 + expect(output).toContain('20250909');
129 + expect(output).toContain('3 available');
130 expect(output).toContain('OAUTH2');
131 expect(output).toContain('BEARER_TOKEN');
132 expect(output).toContain('apiKey');
@@ -145,6 +147,8 @@ describe('CLI: composio toolkits info', () => {
147 const output = lines.join('\n');
148
149 expect(output).toContain('Code Interpreter');
150 + expect(output).toContain('Latest Version:');
151 + expect(output).toContain('-');
152 expect(output).toContain('No authentication required');
153 })
154 );
ts/packages/cli/test/src/commands/toolkits/toolkits.list.cmd.test.ts
+6 -2
@@ -18,7 +18,7 @@ const testToolkits: Toolkits = [
18 categories: [],
19 created_at: new Date('2024-05-03T11:44:32.061Z') as any,
20 updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
21 - available_versions: [],
21 + available_versions: ['20250101', '20250909'],
22 tools_count: 36,
23 triggers_count: 2,
24 },
@@ -52,7 +52,7 @@ const testToolkits: Toolkits = [
52 categories: [],
53 created_at: new Date('2024-05-03T11:44:32.061Z') as any,
54 updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
55 - available_versions: [],
55 + available_versions: ['20260101'],
56 tools_count: 50,
57 triggers_count: 10,
58 },
@@ -81,6 +81,10 @@ describe('CLI: composio toolkits list', () => {
81 expect(output).toContain('gmail');
82 expect(output).toContain('Slack');
83 expect(output).toContain('GitHub');
84 + // Version column
85 + expect(output).toContain('Version');
86 + expect(output).toContain('20250909');
87 + expect(output).toContain('20260101');
88 expect(output).toContain('Listing 3 of 3 toolkits');
89 })
90 );
ts/packages/cli/test/src/commands/toolkits/toolkits.search.cmd.test.ts
+2 -2
@@ -18,7 +18,7 @@ const testToolkits: Toolkits = [
18 categories: [],
19 created_at: new Date('2024-05-03T11:44:32.061Z') as any,
20 updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
21 - available_versions: [],
21 + available_versions: ['20250909'],
22 tools_count: 36,
23 triggers_count: 2,
24 },
@@ -52,7 +52,7 @@ const testToolkits: Toolkits = [
52 categories: [],
53 created_at: new Date('2024-05-03T11:44:32.061Z') as any,
54 updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
55 - available_versions: [],
55 + available_versions: ['20250101', '20260101'],
56 tools_count: 42,
57 triggers_count: 5,
58 },
ts/packages/cli/test/src/commands/tools/tools.list.cmd.test.ts
+2 -2
@@ -67,7 +67,7 @@ describe('CLI: composio tools list', () => {
67
68 expect(output).toContain('GMAIL_SEND_EMAIL');
69 expect(output).toContain('SLACK_SEND_MESSAGE');
70 - expect(output).toContain('Fetched 3 tools');
70 + expect(output).toContain('Listing 3 tools');
71 })
72 );
73 }
@@ -85,7 +85,7 @@ describe('CLI: composio tools list', () => {
85 expect(output).toContain('GMAIL_SEND_EMAIL');
86 expect(output).toContain('GMAIL_CREATE_DRAFT');
87 expect(output).not.toContain('SLACK_SEND_MESSAGE');
88 - expect(output).toContain('Fetched 2 tools');
88 + expect(output).toContain('Listing 2 tools');
89 })
90 );
91 }