Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix(docs): support canonical public toolkit slugs
jkomyno committed
Aug 25, 2026 at 04:33 UTC
cfc5be7a5de6d7a7580bbd30a00f762418ae3912
3 files changed
+19
-4
docs/app/(home)/toolkits/[[...slug]]/page.tsx
+3
-3
@@ -239,9 +239,9 @@ export default async function ToolkitsPage({ params }: { params: Promise<{ slug?
239
if (toolkit) {
240
// Fetch detailed tool/trigger info and FAQ content in parallel
241
const [detailedTools, detailedTriggers, faq] = await Promise.all([
242
- fetchDetailedTools(toolkitSlug, toolkit.version),
243
- fetchDetailedTriggers(toolkitSlug, toolkit.version),
244
- readToolkitFaq(toolkitSlug),
242
+ fetchDetailedTools(toolkit.slug, toolkit.version),
243
+ fetchDetailedTriggers(toolkit.slug, toolkit.version),
244
+ readToolkitFaq(toolkit.slug),
245
]);
246
247
// Use detailed data if fetch succeeded, otherwise fall back to static data
docs/lib/toolkit-api.ts
+2
-1
@@ -7,7 +7,8 @@ const NEGATIVE_CACHE_TTL_MS = 60_000;
7
const NEGATIVE_CACHE_MAX_ENTRIES = 1_024;
8
const IN_FLIGHT_LOOKUP_MAX_ENTRIES = 1_024;
9
const PRODUCTION_REQUEST_TIMEOUT_MS = 15_000;
10
-const TOOLKIT_SLUG_PATTERN = /^[a-z0-9][a-z0-9_-]{0,63}$/;
10
+// Production includes public toolkit slugs such as `_1password`.
11
+const TOOLKIT_SLUG_PATTERN = /^[a-z0-9_][a-z0-9_-]{0,63}$/;
12
13
const negativeCache = new Map<string, number>();
14
const inFlightLookups = new Map<string, Promise<Toolkit | null>>();
docs/tests/static/toolkit-api.test.ts
+14
@@ -240,6 +240,20 @@ describe('fetchToolkitFromProduction', () => {
240
}
241
);
242
243
+ test('accepts a leading underscore used by production toolkit slugs', async () => {
244
+ useApiKey();
245
+ const fetcher = mock(async () =>
246
+ Response.json({ ...productionPayload, slug: '_1password', name: '1Password' })
247
+ );
248
+ globalThis.fetch = fetcher;
249
+
250
+ expect(await fetchToolkitFromProduction('_1password')).toMatchObject({
251
+ slug: '_1password',
252
+ name: '1Password',
253
+ });
254
+ expect(fetcher).toHaveBeenCalledTimes(1);
255
+ });
256
+
257
test('rejects excluded public toolkit slugs before fetch', async () => {
258
useApiKey();
259
const fetcher = mock(async () => Response.json(productionPayload));