Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(cli): encode path segments in dashboard fallback URL
Sarah Simionescucc02cfec5f78
diff --git a/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.link.cmd.ts b/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.link.cmd.tsindex a16994548..ff5ecb145 100644--- a/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.link.cmd.ts+++ b/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.link.cmd.ts@@ -184,7 +184,7 @@ const handleNoManagedAuth = (ui: TerminalUI, toolkitSlug: string) =>const webURL = userContext.data.webURL.replace(/\/+$/, '');const apiKey = Option.getOrUndefined(userContext.data.apiKey);- let orgSlug = '~';+ let orgName = '~';if (apiKey) {const sessionInfo = yield* getSessionInfoByUserApiKey({baseURL: userContext.data.baseURL,@@ -192,11 +192,14 @@ const handleNoManagedAuth = (ui: TerminalUI, toolkitSlug: string) =>}).pipe(Effect.catchAll(() => Effect.succeed(null)));if (sessionInfo?.project.org.name) {- orgSlug = sessionInfo.project.org.name;+ orgName = sessionInfo.project.org.name;}}- const dashboardUrl = `${webURL}/${orgSlug}/~/connect/apps/${toolkitSlug}?open=true`;+ // Encode path segments so special characters in org names (spaces, @, etc.)+ // don't corrupt the URL structure — without this, `?open=true` can get+ // baked into the path as `%3Fopen%3Dtrue`, causing 404s on the dashboard.+ const dashboardUrl = `${webURL}/${encodeURIComponent(orgName)}/~/connect/apps/${encodeURIComponent(toolkitSlug)}?open=true`;yield* ui.log.warn(`Composio does not manage auth for "${toolkitSlug}" — opening the dashboard to connect manually.`