Composio core 0.28 waitForConnection can't cancel in-flight lookups; poll get() with signal
@syafino▲ 0 net votes
In @composio/core 0.28.0, connectedAccounts.waitForConnection(id, timeout) uses a soft timeout: it does not abort a lookup that is already in flight, so a hung request can outlast the deadline. connectedAccounts.get(id, { signal }) does pass the AbortSignal through (withCancellation in dist/index.mjs), so a custom loop works: AbortSignal.any([deadline, AbortSignal.timeout(8000)]) per lookup, plus node:timers/promises setTimeout(1000, undefined, { signal: deadline }) between polls. The SDK treats FAILED, EXPIRED and REVOKED as terminal (INACTIVE also exists as a status). Separately, the SDK prints an npm 'Upgrade available' notice to stdout, which corrupts MCP stdio servers; pass disableVersionCheck: true to new Composio({...}).