@oomol-lab/open-connector 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/assets/open-connector/catalog/apps/allratestoday.json +174 -0
- package/assets/open-connector/catalog/apps/slackbot.json +20 -1
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/package.json +1 -1
- package/src/connection-error.d.ts +7 -0
- package/src/connection-error.js +10 -0
- package/src/connection-service.d.ts +2 -50
- package/src/connection-service.js +6 -130
- package/src/connection-store.d.ts +41 -0
- package/src/connection-store.js +1 -0
- package/src/core/guarded-fetch.d.ts +3 -0
- package/src/core/guarded-fetch.js +8 -1
- package/src/core/provider-network-policy.d.ts +15 -0
- package/src/core/provider-network-policy.js +11 -0
- package/src/core/request.d.ts +18 -14
- package/src/core/request.js +11 -35
- package/src/credential-resolver.d.ts +24 -0
- package/src/credential-resolver.js +131 -0
- package/src/mcp.js +1 -1
- package/src/oauth/oauth-client-config-service.d.ts +1 -1
- package/src/oauth/oauth-client-config-service.js +14 -2
- package/src/oauth/oauth-credential-refresh-service.js +1 -1
- package/src/oauth/oauth-flow-service.d.ts +9 -1
- package/src/oauth/oauth-flow-service.js +11 -1
- package/src/providers/abuseipdb/executors.js +3 -4
- package/src/providers/action-contracts.generated.d.ts +1 -0
- package/src/providers/addressfinder/executors.js +2 -3
- package/src/providers/aeroleads/executors.js +3 -3
- package/src/providers/affinity/runtime.js +6 -7
- package/src/providers/aftership/executors.js +2 -2
- package/src/providers/agent_mail/runtime.js +2 -2
- package/src/providers/agentql/runtime.js +2 -2
- package/src/providers/agenty/runtime.js +5 -6
- package/src/providers/agiled/runtime.d.ts +0 -1
- package/src/providers/agiled/runtime.js +2 -3
- package/src/providers/agility/runtime.js +2 -3
- package/src/providers/ahrefs/runtime.js +3 -3
- package/src/providers/aifinmarket/runtime.js +6 -7
- package/src/providers/airtable/executors.js +3 -3
- package/src/providers/alchemy/runtime.js +2 -2
- package/src/providers/algolia/runtime.js +3 -3
- package/src/providers/aliyun_oss/executors.js +7 -7
- package/src/providers/allratestoday/executors.d.ts +3 -0
- package/src/providers/allratestoday/executors.js +18 -0
- package/src/providers/allratestoday/runtime.d.ts +17 -0
- package/src/providers/allratestoday/runtime.js +104 -0
- package/src/providers/alpaca/runtime.js +2 -3
- package/src/providers/alpha_vantage/runtime.js +2 -2
- package/src/providers/alt_text_ai/runtime.js +2 -2
- package/src/providers/altiria/executors.js +3 -3
- package/src/providers/amap/runtime.js +3 -3
- package/src/providers/ambee/runtime.js +2 -2
- package/src/providers/ambivo/executors.js +3 -3
- package/src/providers/amilia/runtime.js +1 -1
- package/src/providers/amplemarket/runtime.js +2 -2
- package/src/providers/amplitude/runtime.js +3 -3
- package/src/providers/anysearch/runtime.js +4 -4
- package/src/providers/apaleo/runtime.js +2 -2
- package/src/providers/api_sports/executors.js +3 -4
- package/src/providers/apiverve/executors.js +2 -3
- package/src/providers/apollo/executors.js +2 -3
- package/src/providers/appcircle/runtime.js +5 -5
- package/src/providers/appdrag/executors.js +2 -3
- package/src/providers/arcgis_online/executors.js +2 -2
- package/src/providers/auth0_management/runtime.js +2 -3
- package/src/providers/autoblogger/executors.js +3 -3
- package/src/providers/baidu_maps/runtime.js +3 -3
- package/src/providers/baidu_netdisk/runtime-mcp.js +3 -4
- package/src/providers/bark/executors.js +5 -5
- package/src/providers/bitrise/runtime.js +3 -3
- package/src/providers/bouncer/executors.js +3 -4
- package/src/providers/browse_ai/runtime.js +3 -4
- package/src/providers/browserstack/executors.js +6 -7
- package/src/providers/buildkite/runtime.js +3 -3
- package/src/providers/bunnycdn/runtime.js +3 -3
- package/src/providers/businessmap/runtime.js +6 -7
- package/src/providers/buttondown/runtime.js +2 -2
- package/src/providers/byteforms/runtime.js +2 -2
- package/src/providers/calendly/runtime.js +2 -2
- package/src/providers/captainbi/runtime.js +6 -6
- package/src/providers/castingwords/runtime.js +1 -1
- package/src/providers/chatpdf/runtime.js +4 -4
- package/src/providers/check/executors.js +3 -4
- package/src/providers/checkly/executors.js +3 -4
- package/src/providers/chengxin/runtime.js +3 -3
- package/src/providers/cincopa/executors.js +3 -4
- package/src/providers/circle/executors.js +3 -4
- package/src/providers/clearout/executors.js +1 -2
- package/src/providers/clickhelp/runtime.js +5 -5
- package/src/providers/clickhouse/runtime.js +4 -4
- package/src/providers/clinicalkey/runtime.js +3 -3
- package/src/providers/clinicaltrials_gov/runtime.js +4 -5
- package/src/providers/clockify/runtime.js +4 -4
- package/src/providers/close/runtime.js +3 -3
- package/src/providers/cloudconvert/runtime.js +8 -9
- package/src/providers/cloudflare_dns/runtime.js +2 -2
- package/src/providers/cloudflare_email_routing/runtime.js +2 -2
- package/src/providers/cloudflare_r2/runtime.js +5 -5
- package/src/providers/cloudflare_worker/runtime.js +10 -10
- package/src/providers/cloudinary/runtime.js +4 -4
- package/src/providers/cloudlayer/runtime.js +5 -5
- package/src/providers/codacy/runtime.js +2 -2
- package/src/providers/codemagic/runtime.js +2 -2
- package/src/providers/confluence/executors.js +4 -4
- package/src/providers/confluence/runtime.d.ts +0 -1
- package/src/providers/confluence/runtime.js +6 -7
- package/src/providers/contactout/runtime.js +5 -5
- package/src/providers/contentful/runtime.js +2 -2
- package/src/providers/contentstack_content_delivery/runtime.js +1 -1
- package/src/providers/cronly/runtime.js +2 -2
- package/src/providers/crossref/runtime.js +3 -3
- package/src/providers/cutt_ly/runtime.js +3 -3
- package/src/providers/cyberimpact/runtime.js +3 -3
- package/src/providers/dachser/executors.js +2 -2
- package/src/providers/dailybot/runtime.js +1 -1
- package/src/providers/databox/runtime.js +2 -2
- package/src/providers/databricks/runtime.js +2 -2
- package/src/providers/datacite/runtime.js +1 -1
- package/src/providers/datadog/executors.js +3 -4
- package/src/providers/datascope/runtime.js +2 -2
- package/src/providers/daytona/executors.js +3 -3
- package/src/providers/deepgram/runtime.js +2 -2
- package/src/providers/deepl/runtime.js +4 -4
- package/src/providers/detrack/executors.js +5 -5
- package/src/providers/deutschlandgpt/runtime.js +2 -2
- package/src/providers/dialmycalls/runtime.js +4 -4
- package/src/providers/diffbot/executors.js +4 -4
- package/src/providers/digistore24/executors.js +3 -3
- package/src/providers/dingtalk_bot/executors.js +1 -1
- package/src/providers/discourse/executors.d.ts +0 -1
- package/src/providers/discourse/executors.js +6 -7
- package/src/providers/docugenerate/runtime.js +3 -3
- package/src/providers/doppler/runtime.shared.js +3 -3
- package/src/providers/doppler_marketing_automation/runtime.js +4 -4
- package/src/providers/dovetail/runtime.js +2 -2
- package/src/providers/dropcontact/runtime.js +3 -3
- package/src/providers/dub/executors.js +6 -6
- package/src/providers/dumplingai/runtime.js +2 -2
- package/src/providers/elevenlabs/executors.js +4 -4
- package/src/providers/elevenreader/runtime.js +1 -1
- package/src/providers/emailoctopus/runtime.js +4 -4
- package/src/providers/embase/runtime.js +3 -3
- package/src/providers/emelia/executors.js +2 -2
- package/src/providers/enigma/executors.js +3 -3
- package/src/providers/eodhd_apis/executors.js +2 -2
- package/src/providers/eventzilla/runtime.js +3 -4
- package/src/providers/evervault/runtime.js +1 -1
- package/src/providers/excalidraw_mcp/runtime.js +3 -4
- package/src/providers/excel/runtime.js +6 -6
- package/src/providers/expofp/runtime.js +2 -2
- package/src/providers/faktoora/runtime.js +5 -5
- package/src/providers/fast_note_sync/runtime.js +2 -2
- package/src/providers/feathery/executors.js +2 -3
- package/src/providers/feishu_app_bot/executors.js +2 -3
- package/src/providers/feishu_custom_bot/executors.js +2 -3
- package/src/providers/ffhub/executors.js +2 -3
- package/src/providers/fidel_api/executors.js +2 -3
- package/src/providers/files_com/executors.js +2 -3
- package/src/providers/fireberry/runtime.d.ts +0 -1
- package/src/providers/fireberry/runtime.js +3 -4
- package/src/providers/firehydrant/executors.js +2 -3
- package/src/providers/float/executors.js +2 -3
- package/src/providers/flomo/executors.js +5 -6
- package/src/providers/flowiseai/executors.js +2 -3
- package/src/providers/fluxguard/executors.js +2 -3
- package/src/providers/folk/executors.js +2 -3
- package/src/providers/football_data/executors.js +2 -3
- package/src/providers/forem/executors.js +2 -3
- package/src/providers/formbricks/executors.js +2 -3
- package/src/providers/formsite/executors.js +3 -4
- package/src/providers/formspree/executors.js +2 -2
- package/src/providers/freshdesk/executors.js +3 -4
- package/src/providers/freshservice/executors.js +3 -4
- package/src/providers/freshteam/runtime.js +3 -4
- package/src/providers/full_contact/executors.js +3 -3
- package/src/providers/fusion-api/runtime.js +2 -3
- package/src/providers/gagelist/executors.js +3 -3
- package/src/providers/gainsight_nxt/executors.js +2 -2
- package/src/providers/gamma/executors.js +4 -3
- package/src/providers/gangtise/runtime.js +3 -4
- package/src/providers/gatherup/runtime.js +1 -1
- package/src/providers/geckoboard/executors.js +2 -3
- package/src/providers/gemini/runtime.d.ts +0 -1
- package/src/providers/gemini/runtime.js +5 -6
- package/src/providers/genpage/runtime.js +2 -2
- package/src/providers/geokeo/executors.js +4 -4
- package/src/providers/getnote/runtime.js +2 -3
- package/src/providers/github/runtime-shared.js +2 -2
- package/src/providers/glyphic/runtime.js +3 -4
- package/src/providers/gmail/executors.js +125 -27
- package/src/providers/gong/runtime.js +6 -7
- package/src/providers/googlecalendar/runtime-shared.js +3 -4
- package/src/providers/googledrive/runtime-request.js +2 -3
- package/src/providers/googlesheets/runtime-shared.js +3 -4
- package/src/providers/gorgias/runtime.js +4 -4
- package/src/providers/gotify/executors.js +7 -8
- package/src/providers/greenhouse/executors.js +3 -3
- package/src/providers/gumloop/executors.js +2 -3
- package/src/providers/gumroad/executors.js +2 -3
- package/src/providers/habitica/executors.js +2 -3
- package/src/providers/hackerrank_work/executors.js +2 -3
- package/src/providers/harvest/executors.js +3 -4
- package/src/providers/haveibeenpwned/executors.js +2 -3
- package/src/providers/headout/executors.js +3 -4
- package/src/providers/healthchecks_io/executors.js +2 -3
- package/src/providers/helium10/runtime.js +4 -5
- package/src/providers/helpdesk/runtime.js +4 -4
- package/src/providers/home_assistant/runtime-ws.js +9 -10
- package/src/providers/hotjar/executors.js +4 -4
- package/src/providers/httpsms/runtime.js +3 -4
- package/src/providers/hub_planner/executors.js +3 -3
- package/src/providers/hubspot/runtime.js +3 -4
- package/src/providers/humaans/runtime.js +3 -3
- package/src/providers/hunter/runtime.js +3 -3
- package/src/providers/icypeas/executors.js +3 -4
- package/src/providers/ima/runtime.js +7 -7
- package/src/providers/infolobby/runtime.js +6 -6
- package/src/providers/instabot/runtime.js +6 -6
- package/src/providers/instatus/runtime.js +4 -4
- package/src/providers/intuiface/executors.js +3 -3
- package/src/providers/iplocate/runtime.js +4 -5
- package/src/providers/ipregistry/executors.js +2 -2
- package/src/providers/jiminny/runtime.js +4 -4
- package/src/providers/jin10/executors.js +4 -5
- package/src/providers/jira/executors.js +4 -4
- package/src/providers/kaleido/runtime.js +2 -2
- package/src/providers/kandji/runtime.js +2 -2
- package/src/providers/keygen/executors.js +4 -4
- package/src/providers/keyword/runtime.js +2 -2
- package/src/providers/kie_ai/executors.js +1 -1
- package/src/providers/kintone/runtime.js +1 -1
- package/src/providers/kit/runtime.js +2 -2
- package/src/providers/klangio/runtime.js +4 -4
- package/src/providers/klaviyo/executors.js +1 -1
- package/src/providers/klazify/executors.js +3 -3
- package/src/providers/klipfolio/runtime.js +3 -3
- package/src/providers/knack/executors.js +1 -1
- package/src/providers/kommo/runtime.js +2 -2
- package/src/providers/kontent_ai/executors.js +3 -4
- package/src/providers/l2s/executors.js +3 -4
- package/src/providers/latchshot/executors.js +2 -2
- package/src/providers/leadboxer/runtime.js +4 -4
- package/src/providers/leadiq/runtime.js +4 -4
- package/src/providers/linguapop/runtime.js +1 -1
- package/src/providers/lingvanex_translation_api/runtime.js +5 -6
- package/src/providers/lingxing_mcp/runtime.js +3 -4
- package/src/providers/linkup/runtime.js +5 -6
- package/src/providers/liveagent/executors.js +6 -6
- package/src/providers/loops/executors.js +2 -2
- package/src/providers/loyjoy/runtime.js +2 -2
- package/src/providers/loyverse/executors.js +4 -4
- package/src/providers/lusha/runtime.js +3 -3
- package/src/providers/mailbluster/runtime.js +3 -4
- package/src/providers/mailcoach/runtime.js +4 -4
- package/src/providers/mailgenius/executors.js +3 -4
- package/src/providers/mailjet/runtime.js +3 -3
- package/src/providers/mails_so/runtime.js +1 -1
- package/src/providers/mailsoftly/runtime.js +5 -5
- package/src/providers/mailtrap/runtime.js +4 -5
- package/src/providers/manus/runtime.js +3 -3
- package/src/providers/mautic/runtime.js +3 -3
- package/src/providers/megaventory/runtime.js +3 -3
- package/src/providers/memberstack/runtime.js +2 -2
- package/src/providers/mendeley/executors.js +2 -3
- package/src/providers/mindbody/runtime.js +3 -3
- package/src/providers/minerstat/executors.js +3 -3
- package/src/providers/mintlify/runtime.js +3 -3
- package/src/providers/missive/executors.js +3 -5
- package/src/providers/mixpanel/executors.js +3 -3
- package/src/providers/mobile_text_alerts/runtime.js +3 -3
- package/src/providers/mocean/executors.js +3 -3
- package/src/providers/moco/executors.js +5 -5
- package/src/providers/moesif/runtime.js +4 -4
- package/src/providers/monday/runtime-common.js +3 -3
- package/src/providers/monica_crm/runtime.js +4 -4
- package/src/providers/moorcheh/runtime.js +3 -3
- package/src/providers/more_trees/runtime.d.ts +0 -1
- package/src/providers/more_trees/runtime.js +7 -8
- package/src/providers/moxie/runtime.js +2 -2
- package/src/providers/msg91/runtime.js +4 -4
- package/src/providers/mx/runtime.js +1 -1
- package/src/providers/needle/runtime.js +3 -4
- package/src/providers/netlify/runtime.js +2 -3
- package/src/providers/niftyimages/executors.js +2 -2
- package/src/providers/northbeam/runtime.js +1 -1
- package/src/providers/nozbe_teams/executors.js +4 -4
- package/src/providers/npm/runtime.js +4 -4
- package/src/providers/nusii_proposals/runtime.js +2 -2
- package/src/providers/ocr_web_service/executors.js +4 -4
- package/src/providers/octopus_deploy/executors.js +3 -3
- package/src/providers/oksign/runtime.js +3 -4
- package/src/providers/one_drive/executors.js +6 -6
- package/src/providers/one_password_events/runtime.js +1 -1
- package/src/providers/onfleet/runtime.js +3 -3
- package/src/providers/onlyoffice_docspace/runtime.js +4 -4
- package/src/providers/oomnitza/runtime.js +3 -4
- package/src/providers/otter_ai/executors.js +2 -2
- package/src/providers/oura/runtime.js +1 -1
- package/src/providers/paddle/executors.js +3 -3
- package/src/providers/pagerduty/runtime.js +2 -2
- package/src/providers/paradym/runtime.js +4 -4
- package/src/providers/parallel/runtime.js +3 -3
- package/src/providers/partner_stack_partner/runtime.js +1 -1
- package/src/providers/payrexx/runtime.js +5 -6
- package/src/providers/permit_io/runtime.js +2 -2
- package/src/providers/pinboard/executors.js +5 -6
- package/src/providers/pinpoint/runtime.js +2 -2
- package/src/providers/placid/runtime.js +3 -3
- package/src/providers/plain/runtime.js +5 -5
- package/src/providers/planetscale/runtime.js +2 -2
- package/src/providers/planhat/executors.js +6 -6
- package/src/providers/plausible_analytics/runtime.js +3 -3
- package/src/providers/posthog/runtime.js +3 -3
- package/src/providers/predis_ai/executors.js +3 -3
- package/src/providers/printavo/runtime.js +2 -2
- package/src/providers/prospeo/runtime.js +2 -3
- package/src/providers/provider-runtime.d.ts +13 -1
- package/src/providers/provider-runtime.js +25 -10
- package/src/providers/push_by_techulus/executors.js +3 -4
- package/src/providers/pushover/runtime.js +4 -5
- package/src/providers/pushsafer/runtime.js +4 -5
- package/src/providers/pylon/runtime.js +2 -2
- package/src/providers/qase/runtime.js +3 -3
- package/src/providers/qdrant/runtime.js +1 -1
- package/src/providers/qichacha/runtime.js +2 -2
- package/src/providers/qingflow/runtime.js +2 -2
- package/src/providers/quickchart/runtime.js +2 -2
- package/src/providers/quintadb/runtime.js +2 -2
- package/src/providers/quo/runtime.js +2 -2
- package/src/providers/rawg/runtime.js +4 -4
- package/src/providers/razorpay/runtime.js +4 -5
- package/src/providers/readme/runtime.js +6 -6
- package/src/providers/referralhero/runtime.js +3 -3
- package/src/providers/registry.generated.js +1 -0
- package/src/providers/render/executors.js +3 -3
- package/src/providers/respond_io/executors.js +3 -3
- package/src/providers/reversecontact/runtime.js +3 -3
- package/src/providers/ritekit/executors.js +2 -2
- package/src/providers/riveter/executors.js +2 -3
- package/src/providers/rocket_chat/executors.js +3 -4
- package/src/providers/rocket_reach/executors.js +3 -4
- package/src/providers/saucelabs/runtime.js +4 -4
- package/src/providers/scopus/runtime.js +3 -3
- package/src/providers/scrape_do/executors.js +2 -2
- package/src/providers/scraperapi/runtime.js +4 -4
- package/src/providers/scrapfly/executors.js +2 -2
- package/src/providers/scrapingant/executors.js +6 -7
- package/src/providers/scrapingbee/executors.js +3 -3
- package/src/providers/scrapingdog/executors.js +1 -1
- package/src/providers/screenshot_fyi/executors.js +3 -4
- package/src/providers/screenshotbase/runtime.js +3 -3
- package/src/providers/search_api/runtime.js +2 -2
- package/src/providers/securitytrails/executors.js +2 -2
- package/src/providers/semantic_scholar/executors.js +2 -2
- package/src/providers/sendbird/executors.js +2 -2
- package/src/providers/sendfox/executors.js +3 -3
- package/src/providers/sendgrid/executors.js +5 -5
- package/src/providers/sendmator/runtime.js +3 -4
- package/src/providers/seqera/runtime.js +3 -4
- package/src/providers/serveravatar/executors.js +3 -3
- package/src/providers/sheetdb/runtime.js +2 -2
- package/src/providers/short_menu/runtime.js +3 -3
- package/src/providers/shortcut/runtime.js +3 -3
- package/src/providers/shortpixel/runtime.js +2 -2
- package/src/providers/shotstack/runtime.js +4 -4
- package/src/providers/signpath/runtime.js +2 -2
- package/src/providers/signwell/runtime.js +5 -6
- package/src/providers/similarweb_digitalrank_api/runtime.js +3 -3
- package/src/providers/simla/runtime.js +5 -5
- package/src/providers/simplybook_me/executors.js +6 -6
- package/src/providers/sitespeakai/runtime.js +3 -3
- package/src/providers/slickdeals/runtime.js +2 -3
- package/src/providers/smartsuite/runtime.js +3 -3
- package/src/providers/sonarcloud/runtime.js +5 -5
- package/src/providers/sorftime/runtime.js +8 -8
- package/src/providers/spider/runtime.js +2 -2
- package/src/providers/splunk_http_event_collector/runtime.js +7 -8
- package/src/providers/sportsdata/runtime.js +4 -4
- package/src/providers/spyfu/runtime.js +4 -5
- package/src/providers/square/runtime.js +4 -4
- package/src/providers/stannp/runtime.js +2 -2
- package/src/providers/stripe/executors.js +2 -2
- package/src/providers/supermemory/runtime.js +3 -3
- package/src/providers/survey_monkey/runtime.js +3 -3
- package/src/providers/taiga/runtime.js +4 -4
- package/src/providers/talenox/executors.js +4 -4
- package/src/providers/tally/runtime.js +3 -3
- package/src/providers/tavily/runtime.js +3 -4
- package/src/providers/teamcamp/executors.js +2 -2
- package/src/providers/teamtailor/executors.js +2 -2
- package/src/providers/telegram/executors.js +6 -7
- package/src/providers/teltel/executors.js +2 -2
- package/src/providers/templated/executors.js +3 -3
- package/src/providers/tencent_docs/runtime.js +4 -4
- package/src/providers/tencent_maps/runtime.js +3 -3
- package/src/providers/textcortex/runtime.js +3 -3
- package/src/providers/the_cat_api/runtime.js +3 -3
- package/src/providers/the_colony/runtime.js +3 -3
- package/src/providers/the_odds_api/runtime.js +3 -4
- package/src/providers/the_official_board/runtime.js +4 -4
- package/src/providers/thehive/runtime.js +1 -1
- package/src/providers/tikhub/endpoint-catalog.js +2 -3
- package/src/providers/tiktok_business/runtime.js +2 -2
- package/src/providers/timecamp/runtime.js +2 -2
- package/src/providers/timelink/runtime.js +2 -2
- package/src/providers/totp/runtime.js +4 -5
- package/src/providers/trawlingweb/runtime.js +2 -2
- package/src/providers/trilium/runtime.js +2 -2
- package/src/providers/triple_whale/runtime.js +3 -3
- package/src/providers/truvera/runtime.js +2 -2
- package/src/providers/tuskr/runtime.js +2 -2
- package/src/providers/typebot/runtime.js +2 -2
- package/src/providers/typeform/runtime.js +2 -2
- package/src/providers/uptimerobot/executors.js +3 -4
- package/src/providers/v2ex/runtime.js +8 -9
- package/src/providers/valyu/runtime.js +3 -3
- package/src/providers/vapi/runtime.js +4 -4
- package/src/providers/vectorshift/runtime.js +3 -3
- package/src/providers/venafitlsprotectcloud/runtime.js +2 -3
- package/src/providers/venafitlsprotectdatacenter/runtime.js +2 -3
- package/src/providers/vida/runtime.js +4 -4
- package/src/providers/vonage/runtime.js +3 -3
- package/src/providers/walmart_marketplace/runtime.js +5 -5
- package/src/providers/weatherapi/executors.js +3 -4
- package/src/providers/web_of_science/runtime.js +4 -4
- package/src/providers/web_of_science_expanded/runtime.js +9 -9
- package/src/providers/webex/runtime.js +3 -3
- package/src/providers/webinarjam/runtime.js +4 -4
- package/src/providers/webscraping_ai/runtime.js +3 -3
- package/src/providers/webvizio/runtime.js +3 -4
- package/src/providers/wecom_bot/smart-runtime.js +4 -5
- package/src/providers/wecom_mcp/runtime.js +3 -4
- package/src/providers/wejam_ai/runtime.js +3 -3
- package/src/providers/wolfram_alpha_api/runtime.js +3 -3
- package/src/providers/woocommerce/runtime.js +1 -1
- package/src/providers/woodpecker_co/executors.js +3 -4
- package/src/providers/woot/runtime.js +6 -6
- package/src/providers/workable/runtime.js +3 -3
- package/src/providers/workday/runtime.js +4 -4
- package/src/providers/workiom/runtime.js +2 -2
- package/src/providers/workiz/runtime.js +2 -2
- package/src/providers/workpath/executors.js +3 -4
- package/src/providers/worksnaps/executors.js +2 -2
- package/src/providers/y_gy/runtime.js +2 -2
- package/src/providers/zenscrape/runtime.js +3 -3
- package/src/providers/zep/runtime.js +4 -4
- package/src/providers/zeplin/runtime.js +2 -2
- package/src/providers/zhihu/executors.js +6 -6
- package/src/providers/zylvie/runtime.js +4 -4
- package/src/saas/saas-cleanup-service.d.ts +2 -0
- package/src/saas/saas-cleanup-service.js +2 -1
- package/src/saas/saas-execution-service.d.ts +1 -1
- package/src/server/actions/action-runner.js +1 -1
- package/src/server/api/auth.js +3 -0
- package/src/server/api/connection-routes.js +1 -1
- package/src/server/api/console-catalog-routes.js +1 -1
- package/src/server/api/console-oauth-routes.d.ts +3 -1
- package/src/server/api/console-oauth-routes.js +22 -9
- package/src/server/api/oauth-completion-page.d.ts +57 -0
- package/src/server/api/oauth-completion-page.js +135 -10
- package/src/server/api/openapi.d.ts +5 -0
- package/src/server/api/openapi.js +62 -2
- package/src/server/api/runtime-api.d.ts +2 -1
- package/src/server/api/runtime-app-routes.js +1 -1
- package/src/server/api/runtime-execution-routes.js +2 -1
- package/src/server/connect-app.d.ts +4 -0
- package/src/server/connect-app.js +14 -1
- package/src/server/connect-server.d.ts +6 -0
- package/src/server/connect-server.js +114 -4
- package/src/server/connector-runtime.d.ts +6 -8
- package/src/server/connector-runtime.js +8 -28
- package/src/server/proxy/proxy-runner.js +1 -1
- package/src/server/slack-event-verification.d.ts +37 -0
- package/src/server/slack-event-verification.js +91 -0
- package/src/server/storage/connection-request-store.d.ts +1 -1
- package/src/server/storage/connection-store.d.ts +1 -1
- package/src/server/storage/postgres/runtime-store.d.ts +1 -1
- package/src/server/storage/runtime-database.d.ts +1 -1
- package/src/server/storage/saas-project-store.d.ts +1 -1
- package/src/triggers/maintenance.d.ts +2 -0
- package/src/triggers/maintenance.js +2 -1
- package/src/triggers/sources/slack-signature.d.ts +10 -0
- package/src/triggers/sources/slack-signature.js +13 -0
- package/src/triggers/sources/slack.js +9 -11
- package/src/triggers/trigger-runner.js +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalRecord, optionalString, rawStringOrNull, requiredString, } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, providerUserAgent, ProviderRequestError, requiredResponseRecord, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, providerUserAgent, ProviderRequestError, requiredResponseRecord, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "haveibeenpwned";
|
|
4
4
|
const haveibeenpwnedApiBaseUrl = "https://haveibeenpwned.com/api/v3";
|
|
5
|
-
const haveibeenpwnedDefaultRequestTimeoutMs = 30_000;
|
|
6
5
|
export const haveibeenpwnedActionHandlers = {
|
|
7
6
|
list_breaches(input, context) {
|
|
8
7
|
return executeListBreaches(input, context);
|
|
@@ -165,7 +164,7 @@ async function executeGetSubscriptionStatus(context) {
|
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
166
|
async function requestHaveIBeenPwnedJson(input) {
|
|
168
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
167
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
169
168
|
const signal = input.signal ? AbortSignal.any([input.signal, timeoutSignal]) : timeoutSignal;
|
|
170
169
|
try {
|
|
171
170
|
const response = await input.fetcher(buildHaveIBeenPwnedUrl(input.path, input.query ?? {}), {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalBooleanOrNull, optionalInteger, optionalNumber, optionalRecord, optionalString, requiredString, } from "../../core/cast.js";
|
|
2
|
-
import { defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, requiredResponseRecord, } from "../provider-runtime.js";
|
|
2
|
+
import { defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, requiredResponseRecord, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "headout";
|
|
4
4
|
const headoutProductionApiBaseUrl = "https://www.headout.com/api/public/v1";
|
|
5
5
|
const headoutSandboxApiBaseUrl = "https://sandbox.api.test-headout.com/api/public/v1";
|
|
6
6
|
const headoutValidationPath = "/booking";
|
|
7
|
-
const headoutDefaultTimeoutMs = 30_000;
|
|
8
7
|
export const headoutActionHandlers = {
|
|
9
8
|
async list_cities(input, context) {
|
|
10
9
|
const payload = await requestHeadoutJson({
|
|
@@ -199,7 +198,7 @@ export const credentialValidators = {
|
|
|
199
198
|
async function requestHeadoutJson(input) {
|
|
200
199
|
const apiBaseUrl = input.context.apiBaseUrl ?? resolveHeadoutApiBaseUrl(input.context.apiKey);
|
|
201
200
|
const url = buildHeadoutUrl(apiBaseUrl, input.path, input.query);
|
|
202
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
201
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
203
202
|
const signal = input.context.signal ? AbortSignal.any([input.context.signal, timeoutSignal]) : timeoutSignal;
|
|
204
203
|
try {
|
|
205
204
|
const response = await input.context.fetcher(url, {
|
|
@@ -222,7 +221,7 @@ async function requestHeadoutJson(input) {
|
|
|
222
221
|
throw error;
|
|
223
222
|
}
|
|
224
223
|
if (isAbortLikeError(error)) {
|
|
225
|
-
throw new ProviderRequestError(502, `headout ${input.path} request timed out after ${Math.ceil(
|
|
224
|
+
throw new ProviderRequestError(502, `headout ${input.path} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
226
225
|
}
|
|
227
226
|
throw new ProviderRequestError(502, error instanceof Error ? error.message : `headout ${input.path} request failed`);
|
|
228
227
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalRecord, optionalString, requiredString, } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, ProviderRequestError, providerUserAgent, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, ProviderRequestError, providerUserAgent, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "healthchecks_io";
|
|
4
4
|
const healthchecksIoApiBaseUrl = "https://healthchecks.io/api/v3";
|
|
5
|
-
const healthchecksIoDefaultRequestTimeoutMs = 30_000;
|
|
6
5
|
export const healthchecksIoActionHandlers = {
|
|
7
6
|
async list_checks(input, context) {
|
|
8
7
|
const payload = await requestHealthchecksIoJson({
|
|
@@ -165,7 +164,7 @@ export const credentialValidators = {
|
|
|
165
164
|
},
|
|
166
165
|
};
|
|
167
166
|
async function requestHealthchecksIoJson(input) {
|
|
168
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
167
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
169
168
|
const signal = input.context.signal ? AbortSignal.any([input.context.signal, timeoutSignal]) : timeoutSignal;
|
|
170
169
|
try {
|
|
171
170
|
const response = await input.context.fetcher(buildHealthchecksIoUrl(input.path, input.query), {
|
|
@@ -5,9 +5,8 @@ import { CfWorkerJsonSchemaValidator } from "@modelcontextprotocol/client/valida
|
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { optionalRecord, requiredString } from "../../core/cast.js";
|
|
7
7
|
import { withMcpClient } from "../mcp-client.js";
|
|
8
|
-
import { providerInputError, providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
8
|
+
import { providerInputError, providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
9
9
|
export const helium10McpEndpoint = "https://mcp.helium10.com/mcp";
|
|
10
|
-
const requestTimeoutMs = 30_000;
|
|
11
10
|
const validator = new CfWorkerJsonSchemaValidator();
|
|
12
11
|
const readOnlyTools = new Set([
|
|
13
12
|
"get_keywords_by_keyword",
|
|
@@ -65,14 +64,14 @@ export const helium10ActionHandlers = {
|
|
|
65
64
|
throw new ProviderRequestError(400, `Helium 10 MCP tool is not available for this account: ${toolName}`);
|
|
66
65
|
validateArguments(tool, args);
|
|
67
66
|
const result = await withClient(context, (client) => client.callTool({ name: toolName, arguments: args }, {
|
|
68
|
-
timeout:
|
|
67
|
+
timeout: defaultProviderRequestTimeoutMs,
|
|
69
68
|
signal: context.signal,
|
|
70
69
|
}));
|
|
71
70
|
return { result: normalizeResult(result) };
|
|
72
71
|
},
|
|
73
72
|
};
|
|
74
73
|
export async function validateHelium10Credential(accessToken, fetcher, signal) {
|
|
75
|
-
const result = await withClient({ accessToken, fetcher, signal }, (client) => client.listTools({}, { timeout:
|
|
74
|
+
const result = await withClient({ accessToken, fetcher, signal }, (client) => client.listTools({}, { timeout: defaultProviderRequestTimeoutMs, signal }));
|
|
76
75
|
if (!result.tools.some((tool) => readOnlyTools.has(tool.name))) {
|
|
77
76
|
throw new ProviderRequestError(502, "Helium 10 MCP did not expose any approved read-only tools");
|
|
78
77
|
}
|
|
@@ -84,7 +83,7 @@ export async function validateHelium10Credential(accessToken, fetcher, signal) {
|
|
|
84
83
|
};
|
|
85
84
|
}
|
|
86
85
|
async function listTools(context) {
|
|
87
|
-
const result = await withClient(context, (client) => client.listTools({}, { timeout:
|
|
86
|
+
const result = await withClient(context, (client) => client.listTools({}, { timeout: defaultProviderRequestTimeoutMs, signal: context.signal }));
|
|
88
87
|
return result.tools.filter((tool) => readOnlyTools.has(tool.name));
|
|
89
88
|
}
|
|
90
89
|
async function withClient(context, run) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString, requiredString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, ProviderRequestError, providerUserAgent, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, ProviderRequestError, providerUserAgent, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
export const helpdeskApiBaseUrl = "https://api.helpdesk.com";
|
|
4
4
|
const helpdeskValidationEndpoint = "/v1/licenses";
|
|
5
5
|
export const helpdeskActionHandlers = {
|
|
@@ -29,7 +29,7 @@ export const helpdeskActionHandlers = {
|
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
export async function validateHelpdeskCredential(input, fetcher) {
|
|
32
|
-
const apiKey = requiredString(input.apiKey, "apiKey",
|
|
32
|
+
const apiKey = requiredString(input.apiKey, "apiKey", providerInputError);
|
|
33
33
|
const accountId = requireHelpdeskAccountId(input);
|
|
34
34
|
const { payload } = await requestHelpdesk({
|
|
35
35
|
path: helpdeskValidationEndpoint,
|
|
@@ -356,13 +356,13 @@ function createHelpdeskError(status, payload, phase) {
|
|
|
356
356
|
return new ProviderRequestError(429, message);
|
|
357
357
|
}
|
|
358
358
|
if (phase === "validate" && status >= 400 && status < 500) {
|
|
359
|
-
return
|
|
359
|
+
return providerInputError(message);
|
|
360
360
|
}
|
|
361
361
|
if (phase === "execute" && (status === 401 || status === 403)) {
|
|
362
362
|
return new ProviderRequestError(401, message);
|
|
363
363
|
}
|
|
364
364
|
if (phase === "execute" && (status === 400 || status === 404 || status === 422)) {
|
|
365
|
-
return
|
|
365
|
+
return providerInputError(message);
|
|
366
366
|
}
|
|
367
367
|
return new ProviderRequestError(status || 500, message);
|
|
368
368
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { compactObject, objectArray, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { openGuardedWebSocket } from "../../core/guarded-websocket.js";
|
|
3
3
|
import { isPrivateNetworkAccessAllowed } from "../../core/request.js";
|
|
4
|
-
import { ProviderRequestError } from "../provider-runtime.js";
|
|
4
|
+
import { ProviderRequestError, providerInputError, providerResponseError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
5
5
|
import { homeAssistantRegistryNames } from "./actions.js";
|
|
6
6
|
import { readInputString } from "./runtime.js";
|
|
7
7
|
/**
|
|
8
8
|
* Deadline covering the whole session: handshake, authentication, and every
|
|
9
9
|
* command in the batch. Matches the REST action timeout.
|
|
10
10
|
*/
|
|
11
|
-
const homeAssistantWebSocketTimeoutMs = 30_000;
|
|
12
11
|
const registryCommandTypes = {
|
|
13
12
|
entities: "config/entity_registry/list",
|
|
14
13
|
devices: "config/device_registry/list",
|
|
@@ -57,7 +56,7 @@ export const homeAssistantWebSocketActionHandlers = {
|
|
|
57
56
|
const [payload] = await runHomeAssistantCommands(context, [
|
|
58
57
|
{
|
|
59
58
|
type: "execute_script",
|
|
60
|
-
sequence: objectArray(input.sequence, "sequence",
|
|
59
|
+
sequence: objectArray(input.sequence, "sequence", providerInputError),
|
|
61
60
|
...compactObject({ variables: optionalRecord(input.variables) }),
|
|
62
61
|
},
|
|
63
62
|
]);
|
|
@@ -92,12 +91,12 @@ async function runHomeAssistantCommands(context, commands) {
|
|
|
92
91
|
// One deadline for the whole session. The handshake may use all of it, and the
|
|
93
92
|
// command phase then gets whatever is left, so a slow instance cannot spend the
|
|
94
93
|
// budget twice.
|
|
95
|
-
const deadline = Date.now() +
|
|
94
|
+
const deadline = Date.now() + defaultProviderRequestTimeoutMs;
|
|
96
95
|
const socket = await openGuardedWebSocket(buildWebSocketUrl(context.baseUrl), {
|
|
97
96
|
allowPrivateNetwork: isPrivateNetworkAccessAllowed,
|
|
98
|
-
createError:
|
|
97
|
+
createError: providerInputError,
|
|
99
98
|
createFailure: createConnectionError,
|
|
100
|
-
connectTimeoutMs:
|
|
99
|
+
connectTimeoutMs: defaultProviderRequestTimeoutMs,
|
|
101
100
|
signal: context.signal,
|
|
102
101
|
fieldName: "Home Assistant base URL",
|
|
103
102
|
});
|
|
@@ -260,7 +259,7 @@ function createConnectionError(kind, message) {
|
|
|
260
259
|
if (kind === "timeout") {
|
|
261
260
|
return new ProviderRequestError(504, "Home Assistant WebSocket connection timed out");
|
|
262
261
|
}
|
|
263
|
-
return
|
|
262
|
+
return providerResponseError(message);
|
|
264
263
|
}
|
|
265
264
|
/**
|
|
266
265
|
* Map a Home Assistant command error onto the runtime status codes callers
|
|
@@ -277,9 +276,9 @@ function createCommandError(error, commandType) {
|
|
|
277
276
|
return new ProviderRequestError(404, message);
|
|
278
277
|
}
|
|
279
278
|
if (code === "invalid_format" || code === "id_reuse") {
|
|
280
|
-
return
|
|
279
|
+
return providerInputError(message);
|
|
281
280
|
}
|
|
282
|
-
return
|
|
281
|
+
return providerResponseError(message);
|
|
283
282
|
}
|
|
284
283
|
function readRegistryNames(value) {
|
|
285
284
|
if (value === undefined || value === null) {
|
|
@@ -307,7 +306,7 @@ function readOptionalConfigList(value, fieldName) {
|
|
|
307
306
|
if (value === undefined || value === null) {
|
|
308
307
|
return undefined;
|
|
309
308
|
}
|
|
310
|
-
return objectArray(value, fieldName,
|
|
309
|
+
return objectArray(value, fieldName, providerInputError);
|
|
311
310
|
}
|
|
312
311
|
function closeQuietly(socket) {
|
|
313
312
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderFetch, createProviderProxyUrl, createProviderTimeout, defineProviderExecutors, normalizeProviderProxyHeaders, providerUserAgent, ProviderRequestError, readProviderProxyErrorMessage, readProviderProxyResponse, readProviderTextBody, requireCustomCredential, toProviderProxyError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderFetch, createProviderProxyUrl, createProviderTimeout, defineProviderExecutors, normalizeProviderProxyHeaders, providerUserAgent, ProviderRequestError, readProviderProxyErrorMessage, readProviderProxyResponse, readProviderTextBody, requireCustomCredential, toProviderProxyError, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
const hotjarApiBaseUrl = "https://api.hotjar.io";
|
|
4
4
|
const hotjarTokenUrl = `${hotjarApiBaseUrl}/v1/oauth/token`;
|
|
5
5
|
const hotjarMaxResponseBytes = 10 * 1024 * 1024;
|
|
@@ -252,7 +252,7 @@ function readHotjarPage(payload, label) {
|
|
|
252
252
|
function requireObject(value, message) {
|
|
253
253
|
const object = optionalRecord(value);
|
|
254
254
|
if (!object) {
|
|
255
|
-
throw
|
|
255
|
+
throw providerResponseError(message);
|
|
256
256
|
}
|
|
257
257
|
return object;
|
|
258
258
|
}
|
|
@@ -282,7 +282,7 @@ function requiredString(value, fieldName) {
|
|
|
282
282
|
function mapHotjarError(status, payload, phase, operation) {
|
|
283
283
|
const message = readHotjarErrorMessage(payload) ?? `Hotjar ${operation} failed with status ${status}`;
|
|
284
284
|
if (phase == "validate" && (status == 400 || status == 401 || status == 403)) {
|
|
285
|
-
return
|
|
285
|
+
return providerInputError(message);
|
|
286
286
|
}
|
|
287
287
|
else if (status == 401 || (operation == "access token exchange" && (status == 400 || status == 403))) {
|
|
288
288
|
return new ProviderRequestError(401, message);
|
|
@@ -297,7 +297,7 @@ function mapHotjarError(status, payload, phase, operation) {
|
|
|
297
297
|
return new ProviderRequestError(status == 404 ? 404 : 400, message);
|
|
298
298
|
}
|
|
299
299
|
else {
|
|
300
|
-
return
|
|
300
|
+
return providerResponseError(message);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
function readHotjarErrorMessage(payload) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Validator } from "@cfworker/json-schema";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { compactObject, objectArray, optionalRecord, optionalString } from "../../core/cast.js";
|
|
4
|
-
import { createProviderTimeout, providerUserAgent, ProviderRequestError, readProviderJsonBody, } from "../provider-runtime.js";
|
|
5
|
-
const httpsmsRequestTimeoutMs = 30_000;
|
|
4
|
+
import { createProviderTimeout, providerUserAgent, ProviderRequestError, readProviderJsonBody, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
6
5
|
const httpsmsEmailValidator = new Validator({ type: "string", format: "email" }, "2020-12");
|
|
7
6
|
export const httpsmsApiBaseUrl = "https://api.httpsms.com/v1";
|
|
8
7
|
export const httpsmsActionHandlers = {
|
|
@@ -187,7 +186,7 @@ async function requestHttpsmsJson(input) {
|
|
|
187
186
|
return payload;
|
|
188
187
|
}
|
|
189
188
|
async function requestHttpsmsRaw(input) {
|
|
190
|
-
const timeout = createProviderTimeout(input.signal
|
|
189
|
+
const timeout = createProviderTimeout(input.signal);
|
|
191
190
|
try {
|
|
192
191
|
return await input.fetcher(buildHttpsmsUrl(input.path, input.query), {
|
|
193
192
|
method: input.method,
|
|
@@ -201,7 +200,7 @@ async function requestHttpsmsRaw(input) {
|
|
|
201
200
|
throw error;
|
|
202
201
|
}
|
|
203
202
|
if (timeout.didTimeout()) {
|
|
204
|
-
throw new ProviderRequestError(504, `httpSMS ${input.path} request timed out after ${Math.ceil(
|
|
203
|
+
throw new ProviderRequestError(504, `httpSMS ${input.path} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
205
204
|
}
|
|
206
205
|
const message = error instanceof Error && error.message.trim() ? error.message : "request failed";
|
|
207
206
|
throw new ProviderRequestError(502, `httpSMS ${input.path} request failed: ${message}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, readProviderTextBody, requiredInputString, runProviderRequest, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, readProviderTextBody, requiredInputString, runProviderRequest, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "hub_planner";
|
|
4
4
|
const hubPlannerApiBaseUrl = "https://api.hubplanner.com/v1";
|
|
5
5
|
const hubPlannerValidationPath = "/project";
|
|
@@ -213,9 +213,9 @@ function buildHubPlannerError(status, payload, phase) {
|
|
|
213
213
|
return new ProviderRequestError(status, message);
|
|
214
214
|
}
|
|
215
215
|
if (status >= 400 && status < 500) {
|
|
216
|
-
return
|
|
216
|
+
return providerInputError(message);
|
|
217
217
|
}
|
|
218
|
-
return
|
|
218
|
+
return providerResponseError(message);
|
|
219
219
|
}
|
|
220
220
|
function extractHubPlannerErrorMessage(payload) {
|
|
221
221
|
if (typeof payload === "string" && payload.trim()) {
|
|
@@ -4,9 +4,8 @@ import { ProtocolError } from "@modelcontextprotocol/client";
|
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { compactObject } from "../../core/cast.js";
|
|
6
6
|
import { withMcpClient } from "../mcp-client.js";
|
|
7
|
-
import { providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
7
|
+
import { providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs } from "../provider-runtime.js";
|
|
8
8
|
export const hubspotMcpEndpoint = "https://mcp.hubspot.com/";
|
|
9
|
-
const hubspotMcpRequestTimeoutMs = 30_000;
|
|
10
9
|
const actionSpecs = new Map([
|
|
11
10
|
["search_contacts", { objectType: "contacts", operation: "search" }],
|
|
12
11
|
["get_contact", { objectType: "contacts", operation: "get" }],
|
|
@@ -306,7 +305,7 @@ async function listHubspotMcpTools(input) {
|
|
|
306
305
|
headers,
|
|
307
306
|
mapError: (error) => mapHubspotMcpError("hubspot", error),
|
|
308
307
|
}, async (client) => {
|
|
309
|
-
const result = await client.listTools({}, { timeout:
|
|
308
|
+
const result = await client.listTools({}, { timeout: defaultProviderRequestTimeoutMs });
|
|
310
309
|
if (!result.tools.some((tool) => directMcpToolNames.has(tool.name) || tool.name === "get_user_details")) {
|
|
311
310
|
throw new ProviderRequestError(502, "hubspot MCP did not advertise any supported tools");
|
|
312
311
|
}
|
|
@@ -319,7 +318,7 @@ async function callHubspotMcpTool(input) {
|
|
|
319
318
|
bearerToken: input.accessToken,
|
|
320
319
|
service: "hubspot",
|
|
321
320
|
fetcher: input.fetcher,
|
|
322
|
-
requestTimeoutMs:
|
|
321
|
+
requestTimeoutMs: defaultProviderRequestTimeoutMs,
|
|
323
322
|
toolName: input.toolName,
|
|
324
323
|
arguments: input.arguments,
|
|
325
324
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
export const humaansApiBaseUrl = "https://app.humaans.io/api";
|
|
4
4
|
export const humaansValidationPath = "/token-info";
|
|
5
5
|
export const humaansActionHandlers = {
|
|
@@ -123,7 +123,7 @@ async function readResponsePayload(response) {
|
|
|
123
123
|
function mapHumaansError(status, payload, phase, inputErrorStatuses) {
|
|
124
124
|
const message = extractErrorMessage(payload) ?? `Humaans API request failed with status ${status}`;
|
|
125
125
|
if (status === 401) {
|
|
126
|
-
return phase === "validate" ?
|
|
126
|
+
return phase === "validate" ? providerInputError(message) : new ProviderRequestError(401, message);
|
|
127
127
|
}
|
|
128
128
|
if (status === 403)
|
|
129
129
|
return new ProviderRequestError(403, message);
|
|
@@ -132,7 +132,7 @@ function mapHumaansError(status, payload, phase, inputErrorStatuses) {
|
|
|
132
132
|
}
|
|
133
133
|
if (status === 429)
|
|
134
134
|
return new ProviderRequestError(429, message);
|
|
135
|
-
return
|
|
135
|
+
return providerResponseError(message);
|
|
136
136
|
}
|
|
137
137
|
function extractErrorMessage(payload) {
|
|
138
138
|
if (typeof payload === "string" && payload.trim())
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString, positiveInteger } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
export const hunterApiBaseUrl = "https://api.hunter.io/v2";
|
|
4
4
|
export const hunterActionHandlers = {
|
|
5
5
|
account_information(_input, context) {
|
|
@@ -237,7 +237,7 @@ function buildListLeadsQuery(input) {
|
|
|
237
237
|
return query;
|
|
238
238
|
}
|
|
239
239
|
function readHunterId(input) {
|
|
240
|
-
return positiveInteger(input.id, "id",
|
|
240
|
+
return positiveInteger(input.id, "id", providerInputError);
|
|
241
241
|
}
|
|
242
242
|
function omitFields(input, fields) {
|
|
243
243
|
const omitted = new Set(fields);
|
|
@@ -261,7 +261,7 @@ async function readHunterErrorMessage(response) {
|
|
|
261
261
|
}
|
|
262
262
|
function mapHunterError(status, message, phase) {
|
|
263
263
|
if (phase === "validate" && (status === 400 || status === 401 || status === 403)) {
|
|
264
|
-
return
|
|
264
|
+
return providerInputError(message);
|
|
265
265
|
}
|
|
266
266
|
return new ProviderRequestError(status, message);
|
|
267
267
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { jsonObject } from "../../core/request.js";
|
|
3
|
-
import { createProviderTimeout, defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requiredInputString, } from "../provider-runtime.js";
|
|
3
|
+
import { createProviderTimeout, defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requiredInputString, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
const service = "icypeas";
|
|
5
5
|
const icypeasApiBaseUrl = "https://app.icypeas.com/api";
|
|
6
|
-
const icypeasRequestTimeoutMs = 30_000;
|
|
7
6
|
const icypeasValidationPath = "/bulk-single-searchs/read";
|
|
8
7
|
export const icypeasActionHandlers = {
|
|
9
8
|
async get_subscription_information(input, context) {
|
|
@@ -111,7 +110,7 @@ async function validateIcypeasCredential(input, fetcher, signal) {
|
|
|
111
110
|
};
|
|
112
111
|
}
|
|
113
112
|
async function requestIcypeasJson(input, context, mode) {
|
|
114
|
-
const timeout = createProviderTimeout(context.signal
|
|
113
|
+
const timeout = createProviderTimeout(context.signal);
|
|
115
114
|
try {
|
|
116
115
|
const response = await context.fetcher(buildIcypeasUrl(input.path), {
|
|
117
116
|
method: "POST",
|
|
@@ -135,7 +134,7 @@ async function requestIcypeasJson(input, context, mode) {
|
|
|
135
134
|
throw error;
|
|
136
135
|
}
|
|
137
136
|
if (timeout.didTimeout() || isAbortLikeError(error)) {
|
|
138
|
-
throw new ProviderRequestError(504, `Icypeas request timed out after ${Math.ceil(
|
|
137
|
+
throw new ProviderRequestError(504, `Icypeas request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
139
138
|
}
|
|
140
139
|
const message = error instanceof Error && error.message.trim() ? error.message : "request failed";
|
|
141
140
|
throw new ProviderRequestError(502, `Icypeas request failed: ${message}`, error);
|
|
@@ -3,7 +3,7 @@ import { createHash, createHmac } from "node:crypto";
|
|
|
3
3
|
import { basename, extname } from "node:path";
|
|
4
4
|
import { compactObject, looseArray, optionalBoolean, optionalIntegerLike, optionalRecord, optionalString, } from "../../core/cast.js";
|
|
5
5
|
import { assertPublicHttpUrl, readBoundedResponseBytes } from "../../core/request.js";
|
|
6
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
6
|
+
import { ProviderRequestError, providerUserAgent, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
7
7
|
export const imaApiBaseUrl = "https://ima.qq.com";
|
|
8
8
|
const defaultListLimit = 20;
|
|
9
9
|
const maxImaDownloadBytes = 200 * 1024 * 1024;
|
|
@@ -440,7 +440,7 @@ async function uploadImaFileToKnowledgeBase(input, context) {
|
|
|
440
440
|
const contentType = optionalString(input.contentType);
|
|
441
441
|
const sourceUrl = assertPublicHttpUrl(requireImaField(input.fileUrl, "fileUrl"), {
|
|
442
442
|
fieldName: "fileUrl",
|
|
443
|
-
createError:
|
|
443
|
+
createError: providerInputError,
|
|
444
444
|
});
|
|
445
445
|
const duplicatePolicy = optionalString(input.duplicatePolicy) ?? "fail";
|
|
446
446
|
const downloaded = await downloadUrlBytes(sourceUrl, context);
|
|
@@ -628,7 +628,7 @@ async function getImaKnowledgeItemOriginal(input, context) {
|
|
|
628
628
|
const bytes = await readBoundedResponseBytes(response, {
|
|
629
629
|
maxBytes: maxImaDownloadBytes,
|
|
630
630
|
fieldName: "IMA media URL",
|
|
631
|
-
createError:
|
|
631
|
+
createError: providerInputError,
|
|
632
632
|
});
|
|
633
633
|
const mimeType = response.headers.get("content-type") ?? "application/octet-stream";
|
|
634
634
|
const name = optionalString(input.fileName) ?? inferFileNameFromUrl(mediaInfo.url, mimeType);
|
|
@@ -665,7 +665,7 @@ async function downloadUrlBytes(sourceUrl, context) {
|
|
|
665
665
|
bytes: await readBoundedResponseBytes(response, {
|
|
666
666
|
maxBytes: maxImaDownloadBytes,
|
|
667
667
|
fieldName: "IMA upload source",
|
|
668
|
-
createError:
|
|
668
|
+
createError: providerInputError,
|
|
669
669
|
}),
|
|
670
670
|
contentType: response.headers.get("content-type") ?? undefined,
|
|
671
671
|
};
|
|
@@ -714,9 +714,9 @@ function mapImaError(code, message, phase) {
|
|
|
714
714
|
return new ProviderRequestError(phase === "validate" ? 400 : 401, message);
|
|
715
715
|
}
|
|
716
716
|
if (code != null && imaInvalidInputCodes.has(code)) {
|
|
717
|
-
return
|
|
717
|
+
return providerInputError(message);
|
|
718
718
|
}
|
|
719
|
-
return
|
|
719
|
+
return providerResponseError(message);
|
|
720
720
|
}
|
|
721
721
|
function parseImaResponse(value) {
|
|
722
722
|
if (!value) {
|
|
@@ -757,7 +757,7 @@ function requireImaText(value, fieldName) {
|
|
|
757
757
|
throw new ProviderRequestError(400, `${fieldName} is required`);
|
|
758
758
|
}
|
|
759
759
|
function readInteger(value) {
|
|
760
|
-
return optionalIntegerLike(value, "integer",
|
|
760
|
+
return optionalIntegerLike(value, "integer", providerResponseError);
|
|
761
761
|
}
|
|
762
762
|
function mapNoteSortType(value) {
|
|
763
763
|
switch (optionalString(value)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { compactObject, requiredString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
export const infolobbyApiBaseUrl = "https://infolobby.com/api";
|
|
4
4
|
export async function validateInfolobbyCredential(input, fetcher) {
|
|
5
|
-
const apiKey = requiredString(input.apiKey, "apiKey",
|
|
5
|
+
const apiKey = requiredString(input.apiKey, "apiKey", providerInputError);
|
|
6
6
|
const payload = await requestInfolobby({
|
|
7
7
|
path: "/spaces/list",
|
|
8
8
|
apiKey,
|
|
@@ -128,18 +128,18 @@ async function requestInfolobby(options) {
|
|
|
128
128
|
function mapInfolobbyError(status, text, mode) {
|
|
129
129
|
const message = text.trim() || `InfoLobby API request failed with status ${status}`;
|
|
130
130
|
if (status === 401) {
|
|
131
|
-
return mode === "validate" ?
|
|
131
|
+
return mode === "validate" ? providerInputError(message) : new ProviderRequestError(401, message);
|
|
132
132
|
}
|
|
133
133
|
if (status === 403 || status === 405) {
|
|
134
|
-
return
|
|
134
|
+
return providerInputError(message);
|
|
135
135
|
}
|
|
136
136
|
if (status === 500 && isDocumentedClientError(message)) {
|
|
137
|
-
return
|
|
137
|
+
return providerInputError(message);
|
|
138
138
|
}
|
|
139
139
|
if (status === 429) {
|
|
140
140
|
return new ProviderRequestError(429, message);
|
|
141
141
|
}
|
|
142
|
-
return
|
|
142
|
+
return providerResponseError(message);
|
|
143
143
|
}
|
|
144
144
|
function isDocumentedClientError(message) {
|
|
145
145
|
const exactMessages = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString, requiredString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent, runProviderRequest } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, runProviderRequest, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
const instabotApiBaseUrl = "https://api.instabot.io/v1";
|
|
4
4
|
export const instabotActionHandlers = {
|
|
5
5
|
async create_user(input, credential, fetcher) {
|
|
@@ -98,7 +98,7 @@ export async function executeInstabotAction(input, fetcher) {
|
|
|
98
98
|
throw new ProviderRequestError(500, `instabot action is not implemented yet: ${input.actionName}`);
|
|
99
99
|
}
|
|
100
100
|
return handler(input.input, readInstabotCredential({
|
|
101
|
-
apiKey: requiredString(input.apiKey, "apiKey",
|
|
101
|
+
apiKey: requiredString(input.apiKey, "apiKey", providerInputError),
|
|
102
102
|
masterApiKey: input.values?.masterApiKey ?? "",
|
|
103
103
|
}), fetcher);
|
|
104
104
|
}
|
|
@@ -182,7 +182,7 @@ function createInstabotError(status, payload, phase) {
|
|
|
182
182
|
return new ProviderRequestError(429, message);
|
|
183
183
|
}
|
|
184
184
|
if (phase === "validate" && status >= 400 && status < 500) {
|
|
185
|
-
return
|
|
185
|
+
return providerInputError(message);
|
|
186
186
|
}
|
|
187
187
|
if (phase === "execute" && status === 401) {
|
|
188
188
|
return new ProviderRequestError(401, message);
|
|
@@ -203,7 +203,7 @@ function normalizeStatus(payload) {
|
|
|
203
203
|
}
|
|
204
204
|
function readInstabotCredential(input) {
|
|
205
205
|
return {
|
|
206
|
-
apiKey: requiredString(input.apiKey, "apiKey",
|
|
206
|
+
apiKey: requiredString(input.apiKey, "apiKey", providerInputError),
|
|
207
207
|
masterApiKey: readRequiredString(input.masterApiKey, "masterApiKey"),
|
|
208
208
|
};
|
|
209
209
|
}
|
|
@@ -212,7 +212,7 @@ function readUserId(value) {
|
|
|
212
212
|
}
|
|
213
213
|
function requirePositiveInteger(value, message) {
|
|
214
214
|
if (typeof value !== "number" || !Number.isInteger(value) || value < 1) {
|
|
215
|
-
throw
|
|
215
|
+
throw providerInputError(message);
|
|
216
216
|
}
|
|
217
217
|
return value;
|
|
218
218
|
}
|
|
@@ -237,7 +237,7 @@ function readResolve(value) {
|
|
|
237
237
|
function requireObject(value, message) {
|
|
238
238
|
const record = optionalRecord(value);
|
|
239
239
|
if (!record) {
|
|
240
|
-
throw
|
|
240
|
+
throw providerResponseError(message);
|
|
241
241
|
}
|
|
242
242
|
return record;
|
|
243
243
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString, requiredString } from "../../core/cast.js";
|
|
2
|
-
import { providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { providerUserAgent, ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
export const instatusApiBaseUrl = "https://api.instatus.com";
|
|
4
4
|
export const instatusActionHandlers = {
|
|
5
5
|
list_status_pages(input, context) {
|
|
@@ -111,7 +111,7 @@ let incidentBodyFields = [
|
|
|
111
111
|
let incidentEditBodyFields = ["name", "components", "started", "status", "notify", "statuses", "translations"];
|
|
112
112
|
let incidentUpdateBodyFields = ["message", "components", "started", "status", "notify", "statuses", "translations"];
|
|
113
113
|
export async function validateInstatusCredential(input, fetcher, signal) {
|
|
114
|
-
let apiKey = requiredString(input.apiKey, "apiKey",
|
|
114
|
+
let apiKey = requiredString(input.apiKey, "apiKey", providerInputError);
|
|
115
115
|
let payload = await requestInstatusJson("/v1/user", { method: "GET" }, { apiKey, fetcher, signal }, "validate");
|
|
116
116
|
let profile = optionalRecord(payload);
|
|
117
117
|
let email = optionalString(profile?.email);
|
|
@@ -200,13 +200,13 @@ function createInstatusError(response, payload, phase) {
|
|
|
200
200
|
return new ProviderRequestError(429, message);
|
|
201
201
|
}
|
|
202
202
|
if (phase === "validate" && (response.status === 401 || response.status === 403)) {
|
|
203
|
-
return
|
|
203
|
+
return providerInputError(message);
|
|
204
204
|
}
|
|
205
205
|
if (phase === "execute" && (response.status === 401 || response.status === 403)) {
|
|
206
206
|
return new ProviderRequestError(401, message);
|
|
207
207
|
}
|
|
208
208
|
if ([400, 404, 422].includes(response.status)) {
|
|
209
|
-
return
|
|
209
|
+
return providerInputError(message);
|
|
210
210
|
}
|
|
211
211
|
return new ProviderRequestError(response.status || 500, message);
|
|
212
212
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "intuiface";
|
|
4
4
|
const intuifaceApiOrigin = "https://api.intuiface.com";
|
|
5
5
|
const intuifaceWebTriggersBaseUrl = `${intuifaceApiOrigin}/webtriggers/v1`;
|
|
@@ -142,13 +142,13 @@ function toIntuifaceError(response, payload, phase) {
|
|
|
142
142
|
return new ProviderRequestError(429, message);
|
|
143
143
|
}
|
|
144
144
|
else if (phase === "validate" && (response.status === 401 || response.status === 403)) {
|
|
145
|
-
return
|
|
145
|
+
return providerInputError(message);
|
|
146
146
|
}
|
|
147
147
|
else if (phase === "execute" && (response.status === 401 || response.status === 403)) {
|
|
148
148
|
return new ProviderRequestError(401, message);
|
|
149
149
|
}
|
|
150
150
|
else if (response.status === 400) {
|
|
151
|
-
return
|
|
151
|
+
return providerInputError(message);
|
|
152
152
|
}
|
|
153
153
|
else {
|
|
154
154
|
return new ProviderRequestError(response.status || 500, message);
|