Skip to content

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

Merge remote-tracking branch 'origin/next' into claude/cli-adoption-funnel-d95660

Kshitij Jhunjhunwalabf87709d92b5
diff --cc ts/packages/cli/CHANGELOG.md
index fd8e8a8a7,85d6306f3..667a49507
--- a/ts/packages/cli/CHANGELOG.md
+++ b/ts/packages/cli/CHANGELOG.md
@@@ -10,7 -10,7 +10,8 @@@
### Minor Changes
+- Telemetry now delivers directly to PostHog, so pre-login `install`/`setup` events are captured. Opt-outs are unchanged.
+ - Make headless `composio login` agent-friendly (PRDE-1138): the non-interactive instructions now offer the unattended `composio login --agent` path, and a machine with a stored READY agent identity (`~/.composio/agent.json`) completes plain headless `composio login` unattended by reusing it. Reuse only — a human piping `composio login` still gets the URL + poll instructions and never has an account auto-created.
- a0bef5d: Bump `@composio/client` to `0.1.0-alpha.74`.
- 025a657: Drop CommonJS entrypoints and publish the TypeScript SDK packages as ESM-only packages. This is a breaking change within the existing 0.x release line: consumers must use Node.js 22.22.3 or newer. CommonJS callers can only rely on Node's native `require(esm)` interop, and the SDK no longer ships custom CommonJS compatibility machinery or `.cjs` artifacts.
diff --cc ts/packages/cli/test/src/commands/login.cmd.test.ts
index 7373eeb11,433f74ee7..310195f0d
--- a/ts/packages/cli/test/src/commands/login.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/login.cmd.test.ts
@@@ -9,27 -9,13 +9,32 @@@ import { terminalUITestImpl } from 'tes
import * as constants from 'src/constants';
import { setupCacheDir } from 'src/effects/setup-cache-dir';
import { getTerminalCapabilities, TerminalUI } from 'src/services/terminal-ui';
+ import { writeStoredAgentIdentity } from 'src/services/agents';
import { ComposioUserContext } from 'src/services/user-context';
+ vi.mock('open', () => ({
+ default: vi.fn(async () => undefined),
+ }));
+
+const analyticsMocks = vi.hoisted(() => ({
+ linkCalls: [] as Array<{ apolloUserId: string; loggedInAtLinkTime: boolean }>,
+}));
+
+// Records each identity link and whether the credential had already been
+// stored via ctx.login at call time — the link-after-persistence ordering.
+vi.mock('src/analytics/dispatch', async importOriginal => {
+ const actual = await importOriginal<typeof import('src/analytics/dispatch')>();
+ const { Effect } = await import('effect');
+ const { ComposioUserContext } = await import('src/services/user-context');
+ return {
+ ...actual,
+ linkApolloIdentityForAnalytics: ((apolloUserId: string) =>
+ Effect.map(ComposioUserContext, ctx => {
+ analyticsMocks.linkCalls.push({ apolloUserId, loggedInAtLinkTime: ctx.isLoggedIn() });
+ })) as unknown as typeof actual.linkApolloIdentityForAnalytics,
+ };
+});
+
const mockFetchResponse = (body: unknown, status = 200) =>
new Response(JSON.stringify(body), {
status,