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
Merge branch 'next' into plen-1580-cli-local-trigger-development-experience-listen
jkomynofcd9c1e672d1
diff --cc ts/packages/cli/src/bin.tsindex 23f8f116a,7e9db25b6..c88b384a2--- a/ts/packages/cli/src/bin.ts+++ b/ts/packages/cli/src/bin.ts@@@ -21,7 -21,8 +21,9 @@@ import { JsPackageManagerDetector } froimport { ComposioUserContextLive as _ComposioUserContextLive } from 'src/services/user-context';import { UpgradeBinary } from 'src/services/upgrade-binary';import { TerminalUILive } from 'src/services/terminal-ui';+import { TriggersRealtime } from 'src/services/triggers-realtime';+ import { ToolsExecutorLive as _ToolsExecutorLive } from 'src/services/tools-executor';+ import { StdinLive } from 'src/services/stdin';/*** Concrete Effect layer compositions for the Composio CLI runtime.@@@ -66,11 -67,11 +68,16 @@@ export const UpgradeBinaryLive = Layer.Layer.mergeAll(BunFileSystem.layer, FetchHttpClient.layer)) satisfies RequiredLayer;+export const TriggersRealtimeLive = Layer.provide(+ TriggersRealtime.Default,+ Layer.mergeAll(BunFileSystem.layer, NodeOs.Default)+) satisfies RequiredLayer;++ export const ToolsExecutorLive = Layer.provide(+ _ToolsExecutorLive,+ ComposioUserContextLive+ ) satisfies RequiredLayer;+const layers = Layer.mergeAll(CliConfigLive.pipe(Layer.provide(ConfigLive)),NodeOs.Default,@@@ -79,11 -80,12 +86,13 @@@ComposioUserContextLive,ComposioSessionRepositoryLive,ComposioToolkitsRepositoryCachedLive, // Use the cached layer instead of the regular one+ ToolsExecutorLive,EnvLangDetector.Default,JsPackageManagerDetector.Default,+ TriggersRealtimeLive,BunContext.layer,BunFileSystem.layer,+ StdinLive,TerminalUILive,Logger.pretty) satisfies RequiredLayer;diff --cc ts/packages/cli/test/__utils__/services/test-layer.tsindex a8d61b5b7,3e5a38178..77618aad1--- a/ts/packages/cli/test/__utils__/services/test-layer.ts+++ b/ts/packages/cli/test/__utils__/services/test-layer.ts@@@ -40,7 -40,9 +40,10 @@@ import type { ToolkitVersionSpec } froimport { ComposioUserContextLive } from 'src/services/user-context';import { UpgradeBinary } from 'src/services/upgrade-binary';import { NodeOs } from 'src/services/node-os';+import { TriggersRealtime } from 'src/services/triggers-realtime';+ import type { ToolExecuteResponse } from '@composio/core';+ import { ToolsExecutor } from 'src/services/tools-executor';+ import { Stdin } from 'src/services/stdin';export interface TestLiveInput {/**@@@ -82,12 -84,24 +85,31 @@@linkResponse?: LinkCreateResponse;};+ /**+ * Mock realtime trigger data to use in test.+ */+ realtimeData?: {+ events?: ReadonlyArray<Record<string, unknown>>;+ };+++ /**+ * Mock stdin for commands that read input.+ */+ stdin?: {+ isTTY: boolean;+ data: string;+ };++ /**+ * Override tools executor behavior for tests.+ *+ * - `failWith`: The executor rejects with this value (hard failure, e.g. API throw).+ * - `respondWith`: The executor resolves with this response (for soft failures like `{ successful: false }`).+ */+ toolsExecutor?: {+ failWith?: unknown;+ respondWith?: ToolExecuteResponse;+ };}/**diff --cc ts/packages/cli/test/src/commands/$default.cmd.test.tsindex fb0fc5e43,798e762a0..d6f2662c0--- a/ts/packages/cli/test/src/commands/$default.cmd.test.ts+++ b/ts/packages/cli/test/src/commands/$default.cmd.test.ts@@@ -84,47 -84,45 +84,49 @@@ describe('CLI: composio', () =>COMPOSIO_TOOLKIT_VERSION_<TOOLKIT> Override toolkit version (e.g., COMPOSIO_TOOLKIT_VERSION_GMAIL=20250901_00)Use "latest" or unset to use the latest version.- - toolkits Discover and inspect Composio toolkits.+ - toolkits Discover and inspect Composio toolkits.- - toolkits list [--query text] [--limit integer] List available toolkits.+ - toolkits list [--query text] [--limit integer] List available toolkits.- - toolkits info [<slug>] View details of a specific toolkit.+ - toolkits info [<slug>] View details of a specific toolkit.- - toolkits search [--limit integer] <query> Search toolkits by use case.+ - toolkits search [--limit integer] <query> Search toolkits by use case.- - tools Discover and inspect Composio tools.+ - tools Discover and inspect Composio tools.- - tools list [--query text] [--toolkits text] [--tags text] [--limit integer] List available tools.+ - tools list [--query text] [--toolkits text] [--tags text] [--limit integer] List available tools.- - tools info [<slug>] View details of a specific tool.++ - tools execute [(-d, --data text)] [--user-id text] [--connected-account-id text] [--toolkit-version text] <slug> Execute a tool by slug with JSON arguments.+- - tools search [--toolkits text] [--limit integer] <query> Search tools by use case.+ - tools info [<slug>] View details of a specific tool.- - tools execute [(-d, --data text)] [--user-id text] [--connected-account-id text] [--toolkit-version text] <slug> Execute a tool by slug with JSON arguments.+ - tools search [--toolkits text] [--limit integer] <query> Search tools by use case.- - auth-configs View and manage Composio auth configs.+ - auth-configs View and manage Composio auth configs.- - auth-configs list [--toolkits text] [--query text] [--limit integer] List auth configs.+ - auth-configs list [--toolkits text] [--query text] [--limit integer] List auth configs.- - auth-configs info [<id>] View details of a specific auth config.+ - auth-configs info [<id>] View details of a specific auth config.- - auth-configs create --toolkit text [--auth-scheme text] [--scopes text] [--custom-credentials text] [<name>] Create a new auth config.+ - auth-configs create --toolkit text [--auth-scheme text] [--scopes text] [--custom-credentials text] [<name>] Create a new auth config.- - auth-configs delete [(-y, --yes)] [<id>] Delete an auth config.+ - auth-configs delete [(-y, --yes)] [<id>] Delete an auth config.- - connected-accounts View and manage Composio connected accounts.+ - connected-accounts View and manage Composio connected accounts.- - connected-accounts list [--toolkits text] [--user-id text] [--status INITIALIZING | INITIATED | ACTIVE | FAILED | EXPIRED | INACTIVE] [--limit integer] List connected accounts.+ - connected-accounts list [--toolkits text] [--user-id text] [--status INITIALIZING | INITIATED | ACTIVE | FAILED | EXPIRED | INACTIVE] [--limit integer] List connected accounts.- - connected-accounts info [<id>] View details of a specific connected account.+ - connected-accounts info [<id>] View details of a specific connected account.- - connected-accounts whoami [<id>] Show the external account profile for a connected account.+ - connected-accounts whoami [<id>] Show the external account profile for a connected account.- - connected-accounts delete [(-y, --yes)] [<id>] Delete a connected account.+ - connected-accounts delete [(-y, --yes)] [<id>] Delete a connected account.- - connected-accounts link --auth-config text [--user-id text] [--no-browser] Link an external account via OAuth redirect.+ - connected-accounts link --auth-config text [--user-id text] [--no-browser] Link an external account via OAuth redirect.++ - triggers Subscribe to realtime trigger events.++ - triggers listen [--toolkits text] [--trigger-id text] [--connected-account-id text] [--trigger-slug text] [--user-id text] [--json] [--table] [--max-events integer] [--forward text] [--out text] Listen to realtime trigger events for your project."`);})