@hasna/connectors 1.4.4 → 1.4.6
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 +57 -15
- package/bin/index.js +2076 -1601
- package/bin/mcp.js +757 -344
- package/bin/serve.js +960 -1206
- package/connectors/3scribe/package.json +1 -1
- package/connectors/7todos/package.json +1 -1
- package/connectors/ably/package.json +1 -1
- package/connectors/abstract/package.json +1 -1
- package/connectors/abuselpdb/package.json +1 -1
- package/connectors/accelo/package.json +1 -1
- package/connectors/accredible/package.json +1 -1
- package/connectors/accurai/package.json +1 -1
- package/connectors/accuranker/package.json +1 -1
- package/connectors/acquire/package.json +1 -1
- package/connectors/actionnetwork/package.json +1 -1
- package/connectors/activecampaign/package.json +1 -1
- package/connectors/activetrail/package.json +1 -1
- package/connectors/adalo/package.json +1 -1
- package/connectors/adobe/package.json +1 -1
- package/connectors/adroll/package.json +1 -1
- package/connectors/affinity/package.json +1 -1
- package/connectors/agent/package.json +1 -1
- package/connectors/agilecrm/package.json +1 -1
- package/connectors/aiagenttool/package.json +1 -1
- package/connectors/airbrake/package.json +1 -1
- package/connectors/airnow/package.json +1 -1
- package/connectors/airtable/package.json +1 -1
- package/connectors/airtop/package.json +1 -1
- package/connectors/aitableai/package.json +1 -1
- package/connectors/alchemy/package.json +1 -1
- package/connectors/alerty/package.json +1 -1
- package/connectors/alienvault/package.json +1 -1
- package/connectors/alphamoon/package.json +1 -1
- package/connectors/alttextai/package.json +1 -1
- package/connectors/amadeus/package.json +1 -1
- package/connectors/amazon/package.json +1 -1
- package/connectors/amilia/package.json +1 -1
- package/connectors/amplitude/package.json +1 -1
- package/connectors/amqpsender/package.json +1 -1
- package/connectors/announcekit/package.json +1 -1
- package/connectors/anthropic/package.json +1 -1
- package/connectors/anyscale/package.json +1 -1
- package/connectors/apiary/package.json +1 -1
- package/connectors/apiflash/package.json +1 -1
- package/connectors/apitemplateio/package.json +1 -1
- package/connectors/apptivegrid/package.json +1 -1
- package/connectors/arxiv/package.json +1 -1
- package/connectors/asana/package.json +1 -1
- package/connectors/assemblyai/package.json +1 -1
- package/connectors/auth0/package.json +1 -1
- package/connectors/autom/package.json +1 -1
- package/connectors/automizy/package.json +1 -1
- package/connectors/autopilot/package.json +1 -1
- package/connectors/aws/package.json +2 -2
- package/connectors/awscognito/package.json +1 -1
- package/connectors/azureaisearchvectorstore/package.json +1 -1
- package/connectors/azurecosmosdb/package.json +1 -1
- package/connectors/azureopenaichatmodel/package.json +1 -1
- package/connectors/azurestorage/package.json +1 -1
- package/connectors/badgermaps/package.json +1 -1
- package/connectors/bamboohr/package.json +1 -1
- package/connectors/bandwidth/package.json +1 -1
- package/connectors/bannerbear/package.json +1 -1
- package/connectors/baserow/package.json +1 -1
- package/connectors/baseten/package.json +1 -1
- package/connectors/beeminder/package.json +1 -1
- package/connectors/benchmarkemail/package.json +1 -1
- package/connectors/betterproposals/package.json +1 -1
- package/connectors/bigcartel/package.json +1 -1
- package/connectors/bigdatacloud/package.json +1 -1
- package/connectors/bigml/package.json +1 -1
- package/connectors/bitly/package.json +1 -1
- package/connectors/bitrix24/package.json +1 -1
- package/connectors/bitwarden/package.json +1 -1
- package/connectors/blaze/package.json +1 -1
- package/connectors/blockchainexchange/package.json +1 -1
- package/connectors/bloock/package.json +1 -1
- package/connectors/bluesky/package.json +1 -1
- package/connectors/bot9/package.json +1 -1
- package/connectors/botbaba/package.json +1 -1
- package/connectors/botifier/package.json +1 -1
- package/connectors/botiumbox/package.json +1 -1
- package/connectors/botsonic/package.json +1 -1
- package/connectors/botstar/package.json +1 -1
- package/connectors/box/package.json +1 -1
- package/connectors/brainpodai/package.json +1 -1
- package/connectors/brandblast/package.json +1 -1
- package/connectors/brandfetch/package.json +1 -1
- package/connectors/brandmentions/package.json +1 -1
- package/connectors/brandsight/package.json +1 -1
- package/connectors/breezyhr/package.json +1 -1
- package/connectors/brevo/package.json +1 -1
- package/connectors/brex/package.json +1 -1
- package/connectors/browseai/package.json +1 -1
- package/connectors/browserless/package.json +1 -1
- package/connectors/browserstack/package.json +1 -1
- package/connectors/browseruse/package.json +1 -1
- package/connectors/bubble/package.json +1 -1
- package/connectors/bugbug/package.json +1 -1
- package/connectors/bugfender/package.json +1 -1
- package/connectors/bugherd/package.json +1 -1
- package/connectors/bugpilot/package.json +1 -1
- package/connectors/bugreplay/package.json +1 -1
- package/connectors/bugshot/package.json +1 -1
- package/connectors/buildkite/package.json +1 -1
- package/connectors/bunnycdn/package.json +1 -1
- package/connectors/calendarhero/package.json +1 -1
- package/connectors/calendly/package.json +1 -1
- package/connectors/canvas/package.json +1 -1
- package/connectors/capsule/package.json +1 -1
- package/connectors/carbonblack/package.json +1 -1
- package/connectors/cerebras/package.json +1 -1
- package/connectors/chaindesk/package.json +1 -1
- package/connectors/chargebee/package.json +1 -1
- package/connectors/chargeover/package.json +1 -1
- package/connectors/chargify/package.json +1 -1
- package/connectors/chatbase/package.json +1 -1
- package/connectors/chatling/package.json +1 -1
- package/connectors/chatmasters/package.json +1 -1
- package/connectors/chatrace/package.json +1 -1
- package/connectors/chatsonic/package.json +1 -1
- package/connectors/chekhub/package.json +1 -1
- package/connectors/chromavectorstore/package.json +1 -1
- package/connectors/circleci/package.json +1 -1
- package/connectors/ciscomeraki/package.json +1 -1
- package/connectors/ciscosecureendpoint/package.json +1 -1
- package/connectors/ciscoumbrella/package.json +1 -1
- package/connectors/ciscowebex/package.json +1 -1
- package/connectors/citrixadc/package.json +1 -1
- package/connectors/clappia/package.json +1 -1
- package/connectors/clarifai/package.json +1 -1
- package/connectors/clearbit/package.json +1 -1
- package/connectors/cleverreach/package.json +1 -1
- package/connectors/clickbank/package.json +2 -2
- package/connectors/clicksendsms/package.json +1 -1
- package/connectors/clickup/package.json +1 -1
- package/connectors/clockify/package.json +1 -1
- package/connectors/cloozo/package.json +1 -1
- package/connectors/cloud66/package.json +1 -1
- package/connectors/cloudboost/package.json +1 -1
- package/connectors/cloudconvert/package.json +1 -1
- package/connectors/cloudflare/package.json +1 -1
- package/connectors/cloudflare-workers/package.json +1 -1
- package/connectors/cloudlayer/package.json +1 -1
- package/connectors/cloudshare/package.json +1 -1
- package/connectors/cloze/package.json +1 -1
- package/connectors/cockpit/package.json +1 -1
- package/connectors/coda/package.json +1 -1
- package/connectors/codeclimate/package.json +1 -1
- package/connectors/codefresh/package.json +1 -1
- package/connectors/cody/package.json +1 -1
- package/connectors/cohere/package.json +1 -1
- package/connectors/coinbase/package.json +1 -1
- package/connectors/coingecko/package.json +1 -1
- package/connectors/collegefootballdata/package.json +1 -1
- package/connectors/configcat/package.json +1 -1
- package/connectors/confluence/package.json +1 -1
- package/connectors/confluent/package.json +1 -1
- package/connectors/connect-twocaptcha/package.json +1 -1
- package/connectors/connect-voxel-energy/package.json +1 -1
- package/connectors/contactout/package.json +1 -1
- package/connectors/contentful/package.json +1 -1
- package/connectors/convertapi/package.json +1 -1
- package/connectors/convertkit/package.json +1 -1
- package/connectors/convi/package.json +1 -1
- package/connectors/copper/package.json +1 -1
- package/connectors/copyai/package.json +1 -1
- package/connectors/corsizio/package.json +1 -1
- package/connectors/cortex/package.json +1 -1
- package/connectors/cradlai/package.json +1 -1
- package/connectors/craftdraft/package.json +1 -1
- package/connectors/cratedb/package.json +1 -1
- package/connectors/crisp/package.json +1 -1
- package/connectors/cronly/package.json +1 -1
- package/connectors/crossmint/package.json +1 -1
- package/connectors/crowddev/package.json +1 -1
- package/connectors/crowdin/package.json +1 -1
- package/connectors/crowdpower/package.json +1 -1
- package/connectors/crowdstrike/package.json +1 -1
- package/connectors/cryptolens/package.json +1 -1
- package/connectors/currents/package.json +1 -1
- package/connectors/customerio/package.json +1 -1
- package/connectors/customeriq/package.json +1 -1
- package/connectors/daffy/package.json +1 -1
- package/connectors/danteai/package.json +1 -1
- package/connectors/darkskyapi/package.json +1 -1
- package/connectors/dasha/package.json +1 -1
- package/connectors/databox/package.json +1 -1
- package/connectors/databricks/package.json +1 -1
- package/connectors/datadog/package.json +1 -1
- package/connectors/datarobot/package.json +1 -1
- package/connectors/datasoap/package.json +1 -1
- package/connectors/datumbox/package.json +1 -1
- package/connectors/dayschedule/package.json +1 -1
- package/connectors/deepgram/package.json +1 -1
- package/connectors/deepinfra/package.json +1 -1
- package/connectors/deepl/package.json +1 -1
- package/connectors/deepseek/package.json +1 -1
- package/connectors/demio/package.json +1 -1
- package/connectors/descript/package.json +1 -1
- package/connectors/detrack/package.json +1 -1
- package/connectors/devcycle/package.json +1 -1
- package/connectors/dhl/package.json +1 -1
- package/connectors/dialzara/package.json +1 -1
- package/connectors/diddoai/package.json +1 -1
- package/connectors/diffy/package.json +1 -1
- package/connectors/digicert/package.json +1 -1
- package/connectors/digitalocean/package.json +1 -1
- package/connectors/discord/package.json +1 -1
- package/connectors/discourse/package.json +1 -1
- package/connectors/disqus/package.json +1 -1
- package/connectors/dockcerts/package.json +1 -1
- package/connectors/docker/package.json +1 -1
- package/connectors/docparser/package.json +1 -1
- package/connectors/docsbotai/package.json +1 -1
- package/connectors/docupilot/package.json +1 -1
- package/connectors/docusign/package.json +1 -1
- package/connectors/docuwriter/package.json +1 -1
- package/connectors/dokan/package.json +1 -1
- package/connectors/domo/package.json +1 -1
- package/connectors/draftable/package.json +1 -1
- package/connectors/drift/package.json +1 -1
- package/connectors/dropbox/package.json +1 -1
- package/connectors/dropcontact/package.json +1 -1
- package/connectors/droxy/package.json +1 -1
- package/connectors/dynatrace/package.json +1 -1
- package/connectors/e2b/package.json +1 -1
- package/connectors/eartho/package.json +1 -1
- package/connectors/easyship/package.json +1 -1
- package/connectors/echowin/package.json +1 -1
- package/connectors/ecwid/package.json +1 -1
- package/connectors/edenai/package.json +1 -1
- package/connectors/egoi/package.json +1 -1
- package/connectors/elasticsearch/package.json +1 -1
- package/connectors/elasticsecurity/package.json +1 -1
- package/connectors/elevenlabs/package.json +1 -1
- package/connectors/elmah/package.json +1 -1
- package/connectors/embedai/package.json +1 -1
- package/connectors/emelia/package.json +1 -1
- package/connectors/empsing/package.json +1 -1
- package/connectors/engati/package.json +1 -1
- package/connectors/enormail/package.json +1 -1
- package/connectors/enterpret/package.json +1 -1
- package/connectors/envoy/package.json +1 -1
- package/connectors/epo/package.json +1 -1
- package/connectors/erpnext/package.json +1 -1
- package/connectors/esendex/package.json +1 -1
- package/connectors/evervault/package.json +1 -1
- package/connectors/evolphinzoom/package.json +1 -1
- package/connectors/exa/package.json +1 -1
- package/connectors/f5bigip/package.json +1 -1
- package/connectors/fal/package.json +1 -1
- package/connectors/faraday/package.json +1 -1
- package/connectors/faros/package.json +1 -1
- package/connectors/fastbots/package.json +1 -1
- package/connectors/fathom/package.json +1 -1
- package/connectors/figma/package.json +1 -1
- package/connectors/filemaker/package.json +1 -1
- package/connectors/filescan/package.json +1 -1
- package/connectors/firecrawl/README.md +10 -0
- package/connectors/firecrawl/package.json +1 -1
- package/connectors/firecrawl/src/cli/extraction.test.ts +46 -0
- package/connectors/firecrawl/src/cli/extraction.ts +36 -0
- package/connectors/firecrawl/src/cli/index.ts +5 -0
- package/connectors/fireworks/package.json +1 -1
- package/connectors/firmao/package.json +1 -1
- package/connectors/fitbit/package.json +1 -1
- package/connectors/flagship/package.json +1 -1
- package/connectors/float/package.json +1 -1
- package/connectors/flotiq/package.json +1 -1
- package/connectors/flow/package.json +1 -1
- package/connectors/fluentsupport/package.json +1 -1
- package/connectors/focuster/package.json +1 -1
- package/connectors/formcarry/package.json +1 -1
- package/connectors/formdesk/package.json +1 -1
- package/connectors/formsite/package.json +1 -1
- package/connectors/formsonfire/package.json +1 -1
- package/connectors/formstackdocuments/package.json +1 -1
- package/connectors/fortinetfortigate/package.json +1 -1
- package/connectors/foursquare/package.json +1 -1
- package/connectors/freedictionary/package.json +1 -1
- package/connectors/freshdesk/package.json +1 -1
- package/connectors/freshping/package.json +1 -1
- package/connectors/freshservice/package.json +1 -1
- package/connectors/freshworkscrm/package.json +1 -1
- package/connectors/fullcontact/package.json +1 -1
- package/connectors/fusioo/package.json +1 -1
- package/connectors/gali/package.json +1 -1
- package/connectors/gatekeeper/package.json +1 -1
- package/connectors/genderapi/package.json +1 -1
- package/connectors/getresponse/package.json +1 -1
- package/connectors/getscreenshot/package.json +1 -1
- package/connectors/ghost/package.json +1 -1
- package/connectors/giphy/package.json +1 -1
- package/connectors/gitea/package.json +1 -1
- package/connectors/github/package.json +1 -1
- package/connectors/gitlab/package.json +1 -1
- package/connectors/gleap/package.json +1 -1
- package/connectors/gmail/package.json +1 -1
- package/connectors/gocanvas/package.json +1 -1
- package/connectors/godaddy/package.json +1 -1
- package/connectors/gong/package.json +1 -1
- package/connectors/google/package.json +1 -1
- package/connectors/googleads/package.json +1 -1
- package/connectors/googleanalytics/package.json +1 -1
- package/connectors/googlebigquery/package.json +1 -1
- package/connectors/googlebooks/package.json +1 -1
- package/connectors/googlebusinessprofile/package.json +1 -1
- package/connectors/googlecalendar/package.json +1 -1
- package/connectors/googlechat/package.json +1 -1
- package/connectors/googlecloud/package.json +1 -1
- package/connectors/googlecontacts/package.json +1 -1
- package/connectors/googledocs/package.json +1 -1
- package/connectors/googledrive/package.json +1 -1
- package/connectors/googleforms/package.json +1 -1
- package/connectors/googlegemini/package.json +1 -1
- package/connectors/googlemaps/package.json +1 -1
- package/connectors/googleperspective/package.json +1 -1
- package/connectors/googlephotos/package.json +1 -1
- package/connectors/googlesheets/package.json +1 -1
- package/connectors/googleslides/package.json +1 -1
- package/connectors/googletables/package.json +1 -1
- package/connectors/googletasks/package.json +1 -1
- package/connectors/googletranslate/package.json +1 -1
- package/connectors/googlevertexai/package.json +1 -1
- package/connectors/gotify/package.json +1 -1
- package/connectors/gotowebinar/package.json +1 -1
- package/connectors/gptea/package.json +1 -1
- package/connectors/grafana/package.json +1 -1
- package/connectors/grain/package.json +1 -1
- package/connectors/gravityforms/package.json +1 -1
- package/connectors/grist/package.json +1 -1
- package/connectors/groq/package.json +1 -1
- package/connectors/growbots/package.json +1 -1
- package/connectors/gumroad/package.json +1 -1
- package/connectors/gupshup/package.json +1 -1
- package/connectors/guru/package.json +1 -1
- package/connectors/hackernews/package.json +1 -1
- package/connectors/halopsa/package.json +1 -1
- package/connectors/handwrytten/package.json +1 -1
- package/connectors/hansei/package.json +1 -1
- package/connectors/harrypotterapi/package.json +1 -1
- package/connectors/harvest/package.json +1 -1
- package/connectors/headlesstesting/package.json +1 -1
- package/connectors/hedra/package.json +1 -1
- package/connectors/helcim/package.json +1 -1
- package/connectors/hellosign/package.json +1 -1
- package/connectors/helpscout/package.json +1 -1
- package/connectors/heygen/package.json +1 -1
- package/connectors/heysummit/package.json +1 -1
- package/connectors/highlevel/package.json +1 -1
- package/connectors/homeassistant/package.json +1 -1
- package/connectors/hubplanner/package.json +1 -1
- package/connectors/hubspot/package.json +1 -1
- package/connectors/huggingface/package.json +1 -1
- package/connectors/humanticai/package.json +1 -1
- package/connectors/hunter/package.json +1 -1
- package/connectors/hybridanalysis/package.json +1 -1
- package/connectors/iauditorbysafetyculture/package.json +1 -1
- package/connectors/icons8/package.json +1 -1
- package/connectors/idealpostcodes/package.json +1 -1
- package/connectors/idealspot/package.json +1 -1
- package/connectors/ideogram/package.json +1 -1
- package/connectors/ideta/package.json +1 -1
- package/connectors/imessage/package.json +1 -1
- package/connectors/imgbb/package.json +1 -1
- package/connectors/imgur/package.json +1 -1
- package/connectors/impervawaf/package.json +1 -1
- package/connectors/impira/package.json +1 -1
- package/connectors/industryselect/package.json +1 -1
- package/connectors/influxdbcloud/package.json +1 -1
- package/connectors/infolobby/package.json +1 -1
- package/connectors/instabot/package.json +1 -1
- package/connectors/instabug/package.json +1 -1
- package/connectors/intakeq/package.json +1 -1
- package/connectors/intercom/package.json +1 -1
- package/connectors/invoiced/package.json +1 -1
- package/connectors/invoiceninja/package.json +1 -1
- package/connectors/ip2location/package.json +1 -1
- package/connectors/ipinfo/package.json +1 -1
- package/connectors/ipregistry/package.json +1 -1
- package/connectors/irisdfir/package.json +1 -1
- package/connectors/isn/package.json +1 -1
- package/connectors/iterable/package.json +1 -1
- package/connectors/jama/package.json +1 -1
- package/connectors/jasper/package.json +1 -1
- package/connectors/jenkins/package.json +1 -1
- package/connectors/jinaai/package.json +1 -1
- package/connectors/jira/package.json +1 -1
- package/connectors/kadoa/package.json +1 -1
- package/connectors/kafka/package.json +1 -1
- package/connectors/kaggle/package.json +1 -1
- package/connectors/kanbantool/package.json +1 -1
- package/connectors/karbon/package.json +1 -1
- package/connectors/keap/package.json +1 -1
- package/connectors/keygen/package.json +1 -1
- package/connectors/keyzy/package.json +1 -1
- package/connectors/kibana/package.json +1 -1
- package/connectors/kitemaker/package.json +1 -1
- package/connectors/klaviyo/package.json +1 -1
- package/connectors/klazify/package.json +1 -1
- package/connectors/kling/package.json +1 -1
- package/connectors/knack/package.json +1 -1
- package/connectors/knowbe4/package.json +1 -1
- package/connectors/kobotoolbox/package.json +1 -1
- package/connectors/kraftful/package.json +1 -1
- package/connectors/lagrowthmachine/package.json +1 -1
- package/connectors/lambdatest/package.json +1 -1
- package/connectors/landbot/package.json +1 -1
- package/connectors/laposta/package.json +1 -1
- package/connectors/launch27/package.json +1 -1
- package/connectors/launchdarkly/package.json +1 -1
- package/connectors/ldap/package.json +1 -1
- package/connectors/leadboxer/package.json +1 -1
- package/connectors/leadpops/package.json +1 -1
- package/connectors/lemlist/package.json +1 -1
- package/connectors/lemonsqueezy/package.json +1 -1
- package/connectors/leonardo/package.json +1 -1
- package/connectors/lepton/package.json +1 -1
- package/connectors/letsenhance/package.json +1 -1
- package/connectors/libraria/package.json +1 -1
- package/connectors/lighthouse/package.json +1 -1
- package/connectors/limego/package.json +1 -1
- package/connectors/line/package.json +1 -1
- package/connectors/linear/package.json +1 -1
- package/connectors/lingvanex/package.json +1 -1
- package/connectors/linkedin/package.json +1 -1
- package/connectors/linkish/package.json +1 -1
- package/connectors/linode/package.json +1 -1
- package/connectors/liveagent/package.json +1 -1
- package/connectors/localazy/package.json +1 -1
- package/connectors/loginradius/package.json +1 -1
- package/connectors/lokalise/package.json +1 -1
- package/connectors/lonescale/package.json +1 -1
- package/connectors/lucidchart/package.json +1 -1
- package/connectors/luma/package.json +1 -1
- package/connectors/magento2/package.json +1 -1
- package/connectors/mailcheck/package.json +1 -1
- package/connectors/mailchimp/package.json +1 -1
- package/connectors/mailerlite/package.json +1 -1
- package/connectors/mailersend/package.json +1 -1
- package/connectors/mailgun/package.json +1 -1
- package/connectors/mailify/package.json +1 -1
- package/connectors/mailjet/package.json +1 -1
- package/connectors/mailmodo/package.json +1 -1
- package/connectors/malcore/package.json +1 -1
- package/connectors/mandrill/package.json +1 -1
- package/connectors/marcomrobot/package.json +1 -1
- package/connectors/marketingmasterio/package.json +1 -1
- package/connectors/marketplacer/package.json +1 -1
- package/connectors/marketstack/package.json +1 -1
- package/connectors/maropost/package.json +1 -1
- package/connectors/mastodon/package.json +1 -1
- package/connectors/matrix/package.json +1 -1
- package/connectors/mattermost/package.json +1 -1
- package/connectors/mautic/package.json +1 -1
- package/connectors/mav/package.json +1 -1
- package/connectors/maverick/package.json +1 -1
- package/connectors/medium/package.json +1 -1
- package/connectors/mem/package.json +1 -1
- package/connectors/mercury/package.json +1 -1
- package/connectors/messagebird/package.json +1 -1
- package/connectors/meta/package.json +1 -1
- package/connectors/metabase/package.json +1 -1
- package/connectors/mews/package.json +1 -1
- package/connectors/microsoftazuremonitor/package.json +1 -1
- package/connectors/microsoftdynamics365businesscentralapi/package.json +1 -1
- package/connectors/microsoftdynamicscrm/package.json +1 -1
- package/connectors/microsoftentraid/package.json +1 -1
- package/connectors/microsoftentraidazureactivedirectory/package.json +1 -1
- package/connectors/microsoftexcel/package.json +1 -1
- package/connectors/microsoftgraphsecurity/package.json +1 -1
- package/connectors/microsoftonedrive/package.json +1 -1
- package/connectors/microsoftoutlook/package.json +1 -1
- package/connectors/microsoftsharepoint/package.json +1 -1
- package/connectors/microsoftsql/package.json +1 -1
- package/connectors/microsoftteams/package.json +1 -1
- package/connectors/microsoftteamsadmin/package.json +1 -1
- package/connectors/microsofttodo/package.json +1 -1
- package/connectors/midjourney/package.json +1 -1
- package/connectors/miestro/package.json +1 -1
- package/connectors/mindee/package.json +1 -1
- package/connectors/minimax/package.json +1 -1
- package/connectors/miro/package.json +1 -1
- package/connectors/misp/package.json +1 -1
- package/connectors/missive/package.json +1 -1
- package/connectors/mist/package.json +1 -1
- package/connectors/mistral/package.json +1 -1
- package/connectors/mixpanel/package.json +1 -1
- package/connectors/mocean/package.json +1 -1
- package/connectors/modal/package.json +1 -1
- package/connectors/monday/package.json +1 -1
- package/connectors/mongodb/package.json +1 -1
- package/connectors/monicacrm/package.json +1 -1
- package/connectors/moonclerk/package.json +1 -1
- package/connectors/moonmail/package.json +1 -1
- package/connectors/morph/package.json +1 -1
- package/connectors/mqtt/package.json +1 -1
- package/connectors/msg91/package.json +1 -1
- package/connectors/mubert/package.json +1 -1
- package/connectors/murf/package.json +1 -1
- package/connectors/mux/package.json +1 -1
- package/connectors/mxtoolbox/package.json +1 -1
- package/connectors/myaskai/package.json +1 -1
- package/connectors/myphoner/package.json +1 -1
- package/connectors/mysql/package.json +1 -1
- package/connectors/namecheap/package.json +1 -1
- package/connectors/nanonetsocr/package.json +1 -1
- package/connectors/nasa/package.json +1 -1
- package/connectors/ncscale/package.json +1 -1
- package/connectors/netlify/package.json +1 -1
- package/connectors/nextcloud/package.json +1 -1
- package/connectors/nightfallai/package.json +1 -1
- package/connectors/ninox/package.json +1 -1
- package/connectors/nmkr/package.json +1 -1
- package/connectors/nocodb/package.json +1 -1
- package/connectors/notion/package.json +1 -1
- package/connectors/npm/package.json +1 -1
- package/connectors/nuclia/package.json +1 -1
- package/connectors/nusiiproposals/package.json +1 -1
- package/connectors/nyckel/package.json +1 -1
- package/connectors/nyota/package.json +1 -1
- package/connectors/occasion/package.json +1 -1
- package/connectors/ocrspace/package.json +1 -1
- package/connectors/octoai/package.json +1 -1
- package/connectors/odoo/package.json +1 -1
- package/connectors/offalerts/package.json +1 -1
- package/connectors/okta/package.json +1 -1
- package/connectors/ollama/package.json +1 -1
- package/connectors/omeda/package.json +1 -1
- package/connectors/omniconvert/package.json +1 -1
- package/connectors/omnimind/package.json +1 -1
- package/connectors/on2air/package.json +1 -1
- package/connectors/oneai/package.json +1 -1
- package/connectors/onesimpleapi/package.json +1 -1
- package/connectors/onfleet/package.json +1 -1
- package/connectors/openai/AGENTS.md +0 -1
- package/connectors/openai/README.md +3 -3
- package/connectors/openai/package.json +3 -2
- package/connectors/opencti/package.json +1 -1
- package/connectors/openthesaurus/package.json +1 -1
- package/connectors/openweathermap/package.json +1 -1
- package/connectors/opnformerlyomise/package.json +1 -1
- package/connectors/oracledatabase/package.json +1 -1
- package/connectors/orbit/package.json +1 -1
- package/connectors/orderdesk/package.json +1 -1
- package/connectors/ortto/package.json +1 -1
- package/connectors/oura/package.json +1 -1
- package/connectors/paddle/package.json +1 -1
- package/connectors/pagerduty/package.json +1 -1
- package/connectors/pandadoc/package.json +1 -1
- package/connectors/paperform/package.json +1 -1
- package/connectors/papyrs/package.json +1 -1
- package/connectors/parsehub/package.json +1 -1
- package/connectors/parseprompt/package.json +1 -1
- package/connectors/passcreator/package.json +1 -1
- package/connectors/passslot/package.json +1 -1
- package/connectors/patentsview/package.json +1 -1
- package/connectors/patreon/package.json +1 -1
- package/connectors/paymo/package.json +1 -1
- package/connectors/paypal/package.json +1 -1
- package/connectors/peekalink/package.json +1 -1
- package/connectors/perplexity/package.json +1 -1
- package/connectors/persio/package.json +1 -1
- package/connectors/personalai/package.json +1 -1
- package/connectors/phantombuster/package.json +1 -1
- package/connectors/philipshue/package.json +1 -1
- package/connectors/phrase/package.json +1 -1
- package/connectors/pika/package.json +1 -1
- package/connectors/pinata/package.json +1 -1
- package/connectors/pinboard/package.json +1 -1
- package/connectors/pinterest/package.json +1 -1
- package/connectors/pipedrive/package.json +1 -1
- package/connectors/pipefy/package.json +1 -1
- package/connectors/pirateweather/package.json +1 -1
- package/connectors/pitchly/package.json +1 -1
- package/connectors/pivotaltracker/package.json +1 -1
- package/connectors/plaid/package.json +1 -1
- package/connectors/planviewleankit/package.json +1 -1
- package/connectors/planyoonlinebooking/package.json +1 -1
- package/connectors/platformly/package.json +1 -1
- package/connectors/playht/package.json +1 -1
- package/connectors/plecto/package.json +1 -1
- package/connectors/plivo/package.json +1 -1
- package/connectors/postgres/package.json +1 -1
- package/connectors/posthog/package.json +1 -1
- package/connectors/practitest/package.json +1 -1
- package/connectors/predisai/package.json +1 -1
- package/connectors/prodia/package.json +1 -1
- package/connectors/producthunt/package.json +1 -1
- package/connectors/profitwell/package.json +1 -1
- package/connectors/projectbubbleproprofsproject/package.json +1 -1
- package/connectors/prompthub/package.json +1 -1
- package/connectors/prospeai/package.json +1 -1
- package/connectors/pulsetic/package.json +1 -1
- package/connectors/pushbullet/package.json +1 -1
- package/connectors/pushcut/package.json +1 -1
- package/connectors/pusher/package.json +1 -1
- package/connectors/pushover/package.json +1 -1
- package/connectors/qradar/package.json +1 -1
- package/connectors/qualaroo/package.json +1 -1
- package/connectors/qualys/package.json +1 -1
- package/connectors/quentn/package.json +1 -1
- package/connectors/questdb/package.json +1 -1
- package/connectors/quickbase/package.json +1 -1
- package/connectors/quickbooksonline/package.json +1 -1
- package/connectors/quickchart/package.json +1 -1
- package/connectors/quintadb/package.json +1 -1
- package/connectors/quo/package.json +1 -1
- package/connectors/rabbitmq/package.json +1 -1
- package/connectors/radar/package.json +1 -1
- package/connectors/raindrop/package.json +1 -1
- package/connectors/rapid7insightvm/package.json +1 -1
- package/connectors/raventools/package.json +1 -1
- package/connectors/rawgvideogamesdatabase/package.json +1 -1
- package/connectors/rdstationcrm/package.json +1 -1
- package/connectors/readai/package.json +1 -1
- package/connectors/realphonevalidation/package.json +1 -1
- package/connectors/recharge/package.json +1 -1
- package/connectors/recordedfuture/package.json +1 -1
- package/connectors/redash/package.json +1 -1
- package/connectors/reddit/package.json +1 -1
- package/connectors/redis/package.json +1 -1
- package/connectors/reducto/package.json +1 -1
- package/connectors/relevanceai/package.json +1 -1
- package/connectors/relinkurlshortener/package.json +1 -1
- package/connectors/relysia/package.json +1 -1
- package/connectors/replicate/package.json +1 -1
- package/connectors/reply/package.json +1 -1
- package/connectors/replyio/package.json +1 -1
- package/connectors/resemble/package.json +1 -1
- package/connectors/resend/package.json +1 -1
- package/connectors/retable/package.json +1 -1
- package/connectors/reversecontact/package.json +1 -1
- package/connectors/revolut/package.json +1 -1
- package/connectors/rewardful/package.json +1 -1
- package/connectors/ritekit/package.json +1 -1
- package/connectors/roboflow/package.json +1 -1
- package/connectors/robolytix/package.json +1 -1
- package/connectors/roboresponseai/package.json +1 -1
- package/connectors/rocketchat/package.json +1 -1
- package/connectors/rollbar/package.json +1 -1
- package/connectors/rootly/package.json +1 -1
- package/connectors/route4me/package.json +1 -1
- package/connectors/rundeck/package.json +1 -1
- package/connectors/runpod/package.json +1 -1
- package/connectors/runway/package.json +1 -1
- package/connectors/s3/package.json +1 -1
- package/connectors/salesforce/package.json +1 -1
- package/connectors/salesmaa/package.json +1 -1
- package/connectors/salesmate/package.json +1 -1
- package/connectors/salesmsg/package.json +1 -1
- package/connectors/salesrocks/package.json +1 -1
- package/connectors/salessimplify/package.json +1 -1
- package/connectors/samsungsmartthings/package.json +1 -1
- package/connectors/scrapeitcloud/package.json +1 -1
- package/connectors/scrapeninja/package.json +1 -1
- package/connectors/screenshotone/package.json +1 -1
- package/connectors/seamlessai/package.json +1 -1
- package/connectors/searchandsave/package.json +1 -1
- package/connectors/searxng/package.json +1 -1
- package/connectors/seatable/package.json +1 -1
- package/connectors/securityscorecard/package.json +1 -1
- package/connectors/sedo/package.json +1 -1
- package/connectors/segment/package.json +1 -1
- package/connectors/sekoia/package.json +1 -1
- package/connectors/sellix/package.json +1 -1
- package/connectors/semblyai/package.json +1 -1
- package/connectors/sendgrid/package.json +1 -1
- package/connectors/sendy/package.json +1 -1
- package/connectors/sentry/package.json +1 -1
- package/connectors/servicenow/package.json +1 -1
- package/connectors/shadcn/package.json +1 -1
- package/connectors/sharlyai/package.json +1 -1
- package/connectors/shiphero/package.json +1 -1
- package/connectors/shipstation/package.json +1 -1
- package/connectors/shopify/package.json +1 -1
- package/connectors/shortio/package.json +1 -1
- package/connectors/shuffler/package.json +1 -1
- package/connectors/sierrainteractive/package.json +1 -1
- package/connectors/sifter/package.json +1 -1
- package/connectors/signaturit/package.json +1 -1
- package/connectors/signl4/package.json +1 -1
- package/connectors/simpleem/package.json +1 -1
- package/connectors/simplehash/package.json +1 -1
- package/connectors/simplekpi/package.json +1 -1
- package/connectors/simplelocalize/package.json +1 -1
- package/connectors/simplero/package.json +1 -1
- package/connectors/simpletexting/package.json +1 -1
- package/connectors/sitecreatorio/package.json +1 -1
- package/connectors/sitespeakai/package.json +1 -1
- package/connectors/slack/package.json +1 -1
- package/connectors/smaily/package.json +1 -1
- package/connectors/smartreach/package.json +1 -1
- package/connectors/smartrecruiters/package.json +1 -1
- package/connectors/smartsheet/package.json +1 -1
- package/connectors/smartsuite/package.json +1 -1
- package/connectors/smile-io/package.json +1 -1
- package/connectors/smol-machines/package.json +1 -1
- package/connectors/sms77/package.json +1 -1
- package/connectors/smsit/package.json +1 -1
- package/connectors/smsmagic/package.json +1 -1
- package/connectors/smtp2go/package.json +1 -1
- package/connectors/snap/package.json +1 -1
- package/connectors/snapdocs/package.json +1 -1
- package/connectors/snatchbot/package.json +1 -1
- package/connectors/snipcart/package.json +1 -1
- package/connectors/snov-io/package.json +1 -1
- package/connectors/snowflake/package.json +1 -1
- package/connectors/solcast/package.json +1 -1
- package/connectors/solvedata/package.json +1 -1
- package/connectors/sonarqube/package.json +1 -1
- package/connectors/sparkpost/package.json +1 -1
- package/connectors/speakeasy-api/package.json +1 -1
- package/connectors/specific/package.json +1 -1
- package/connectors/specter/package.json +1 -1
- package/connectors/speechify/package.json +1 -1
- package/connectors/spike/package.json +1 -1
- package/connectors/split-in-batches/package.json +1 -1
- package/connectors/split-io/package.json +1 -1
- package/connectors/splunk/package.json +1 -1
- package/connectors/splunk-cloud/package.json +1 -1
- package/connectors/spondyr/package.json +1 -1
- package/connectors/sponge/package.json +1 -1
- package/connectors/spontit/package.json +1 -1
- package/connectors/sportsdata/package.json +1 -1
- package/connectors/spotify/package.json +1 -1
- package/connectors/spotify-ads/package.json +1 -1
- package/connectors/spotpay/package.json +1 -1
- package/connectors/spreadsheet-file/package.json +1 -1
- package/connectors/sprig/package.json +1 -1
- package/connectors/sprinklr/package.json +1 -1
- package/connectors/sprout-social/package.json +1 -1
- package/connectors/spydra/package.json +1 -1
- package/connectors/square/package.json +1 -1
- package/connectors/squarespace/package.json +1 -1
- package/connectors/squid/package.json +1 -1
- package/connectors/sse-trigger/package.json +1 -1
- package/connectors/ssh/package.json +1 -1
- package/connectors/sslmatecertspotterapi/package.json +1 -1
- package/connectors/stability-api-platform/package.json +1 -1
- package/connectors/stabilityai/package.json +1 -1
- package/connectors/stablebrowse/package.json +1 -1
- package/connectors/stackadapt/package.json +1 -1
- package/connectors/stackby/package.json +1 -1
- package/connectors/stackexchange/package.json +1 -1
- package/connectors/stage/package.json +1 -1
- package/connectors/stagehand/package.json +1 -1
- package/connectors/stainlessapi/package.json +1 -1
- package/connectors/stammerai/package.json +1 -1
- package/connectors/stampedio/package.json +1 -1
- package/connectors/standard-signal/package.json +1 -1
- package/connectors/standout/package.json +1 -1
- package/connectors/starton/package.json +1 -1
- package/connectors/statsig/package.json +1 -1
- package/connectors/statuscake/package.json +1 -1
- package/connectors/statuspage/package.json +1 -1
- package/connectors/steel-dev/package.json +1 -1
- package/connectors/sticky-note/package.json +1 -1
- package/connectors/stilta/package.json +1 -1
- package/connectors/stitch-data/package.json +1 -1
- package/connectors/stop-and-error/package.json +1 -1
- package/connectors/stoplight/package.json +1 -1
- package/connectors/stoplight-api-platform/package.json +1 -1
- package/connectors/storyblok/package.json +1 -1
- package/connectors/strand-ai/package.json +1 -1
- package/connectors/strapi/package.json +1 -1
- package/connectors/strava/package.json +1 -1
- package/connectors/streak/package.json +1 -1
- package/connectors/streamable/package.json +1 -1
- package/connectors/stripe/package.json +1 -1
- package/connectors/stripe-billing-advanced/package.json +1 -1
- package/connectors/stripe-connect-platform/package.json +1 -1
- package/connectors/stripe-financial-connections/package.json +1 -1
- package/connectors/stripe-issuing/package.json +1 -1
- package/connectors/stripe-reporting-advanced/package.json +1 -1
- package/connectors/stripe-sigma/package.json +1 -1
- package/connectors/stripe-tax-advanced/package.json +1 -1
- package/connectors/stripe-terminal/package.json +1 -1
- package/connectors/stripe-webhooks-advanced/package.json +1 -1
- package/connectors/stripeapps/package.json +1 -1
- package/connectors/stripeatlas/package.json +1 -1
- package/connectors/stripecapital/package.json +1 -1
- package/connectors/stripeclimate/package.json +1 -1
- package/connectors/stripeidentity/package.json +1 -1
- package/connectors/stripetreasury/package.json +1 -1
- package/connectors/studiobyai21labs/package.json +1 -1
- package/connectors/stytch/package.json +1 -1
- package/connectors/substack/package.json +1 -1
- package/connectors/sucuri/package.json +1 -1
- package/connectors/sucuri-api-platform/package.json +1 -1
- package/connectors/sugarcrm/package.json +1 -1
- package/connectors/suitedash/package.json +1 -1
- package/connectors/sumo-logic/package.json +1 -1
- package/connectors/suno/package.json +1 -1
- package/connectors/supabase/package.json +1 -1
- package/connectors/supabase-api-platform/package.json +1 -1
- package/connectors/supadata/package.json +1 -1
- package/connectors/supernormal/package.json +1 -1
- package/connectors/superpowered/package.json +1 -1
- package/connectors/superset/package.json +1 -1
- package/connectors/supportbee/package.json +1 -1
- package/connectors/supportivekoala/package.json +1 -1
- package/connectors/surtrdefensesystems/package.json +1 -1
- package/connectors/surveysparrow/package.json +1 -1
- package/connectors/survicate/package.json +1 -1
- package/connectors/swagup/package.json +1 -1
- package/connectors/switchboard/package.json +1 -1
- package/connectors/syncly/package.json +1 -1
- package/connectors/syncromsp/package.json +1 -1
- package/connectors/synphony/package.json +1 -1
- package/connectors/synthesia/package.json +1 -1
- package/connectors/syntheticsciences/package.json +1 -1
- package/connectors/syntropy/package.json +1 -1
- package/connectors/sysdig/package.json +1 -1
- package/connectors/tableau/package.json +1 -1
- package/connectors/taboola/package.json +1 -1
- package/connectors/taiga/package.json +1 -1
- package/connectors/takecareos/package.json +1 -1
- package/connectors/talend-api-platform/package.json +1 -1
- package/connectors/talentlms/package.json +1 -1
- package/connectors/talkdesk/package.json +1 -1
- package/connectors/talknotes/package.json +1 -1
- package/connectors/tapfiliate/package.json +1 -1
- package/connectors/tave/package.json +1 -1
- package/connectors/tdameritrade/package.json +1 -1
- package/connectors/teachable/package.json +1 -1
- package/connectors/teamdeck/package.json +1 -1
- package/connectors/teamgate/package.json +1 -1
- package/connectors/teamtailor/package.json +1 -1
- package/connectors/teamup/package.json +1 -1
- package/connectors/teamwork/package.json +1 -1
- package/connectors/teknoir/package.json +1 -1
- package/connectors/telegram/package.json +1 -1
- package/connectors/teleport/package.json +1 -1
- package/connectors/telnyx/package.json +1 -1
- package/connectors/telnyx/src/utils/config.ts +1 -1
- package/connectors/tenable/package.json +1 -1
- package/connectors/tenor/package.json +1 -1
- package/connectors/tensorboard/package.json +1 -1
- package/connectors/tepali/package.json +1 -1
- package/connectors/terminal-use/package.json +1 -1
- package/connectors/terminus/package.json +1 -1
- package/connectors/terraform-cloud/package.json +1 -1
- package/connectors/testerarmy/package.json +1 -1
- package/connectors/testim/package.json +1 -1
- package/connectors/testmo/package.json +1 -1
- package/connectors/testmonitor/package.json +1 -1
- package/connectors/testrail/package.json +1 -1
- package/connectors/testrigor/package.json +1 -1
- package/connectors/tettra/package.json +1 -1
- package/connectors/tettra-api-platform/package.json +1 -1
- package/connectors/textcortex/package.json +1 -1
- package/connectors/textcortexai/package.json +1 -1
- package/connectors/textgain/package.json +1 -1
- package/connectors/textit/package.json +1 -1
- package/connectors/textkit/package.json +1 -1
- package/connectors/textmagic/package.json +1 -1
- package/connectors/textrazor/package.json +1 -1
- package/connectors/textsidekick/package.json +1 -1
- package/connectors/thankster/package.json +1 -1
- package/connectors/the-company-company/package.json +1 -1
- package/connectors/the-hive-project/package.json +1 -1
- package/connectors/the-token-company/package.json +1 -1
- package/connectors/the-trade-desk/package.json +1 -1
- package/connectors/thecustomerfactor/package.json +1 -1
- package/connectors/thehive/package.json +1 -1
- package/connectors/thehive5/package.json +1 -1
- package/connectors/theleap/package.json +1 -1
- package/connectors/thoughtfulgpt/package.json +1 -1
- package/connectors/thoughtspot/package.json +1 -1
- package/connectors/thousandeyes/package.json +1 -1
- package/connectors/thrivecart/package.json +1 -1
- package/connectors/ticket-tailor/package.json +1 -1
- package/connectors/ticketbud/package.json +1 -1
- package/connectors/ticketmaster/package.json +1 -1
- package/connectors/ticketsource/package.json +1 -1
- package/connectors/ticktick/package.json +1 -1
- package/connectors/tidbcloud/package.json +1 -1
- package/connectors/tidio/package.json +1 -1
- package/connectors/tierion/package.json +1 -1
- package/connectors/tiktok/package.json +1 -1
- package/connectors/tiktok-events-api/package.json +1 -1
- package/connectors/tiktokads/package.json +1 -1
- package/connectors/tilda/package.json +1 -1
- package/connectors/time-saved/package.json +1 -1
- package/connectors/timelinesai/package.json +1 -1
- package/connectors/timescaledb/package.json +1 -1
- package/connectors/timetonic/package.json +1 -1
- package/connectors/tines/package.json +1 -1
- package/connectors/tinker/package.json +1 -1
- package/connectors/tinybird/package.json +1 -1
- package/connectors/tinypng/package.json +1 -1
- package/connectors/tinyurl/package.json +1 -1
- package/connectors/tipalti/package.json +1 -1
- package/connectors/tisane/package.json +1 -1
- package/connectors/tisanelabs/package.json +1 -1
- package/connectors/tito/package.json +1 -1
- package/connectors/toast-pos/package.json +1 -1
- package/connectors/todoist/package.json +1 -1
- package/connectors/together/package.json +1 -1
- package/connectors/together-api-platform/package.json +1 -1
- package/connectors/toggl/package.json +1 -1
- package/connectors/toggl-track/package.json +1 -1
- package/connectors/tokenmetrics/package.json +1 -1
- package/connectors/toket/package.json +1 -1
- package/connectors/tomtom/package.json +1 -1
- package/connectors/topaz-labs/package.json +1 -1
- package/connectors/totalis/package.json +1 -1
- package/connectors/totango/package.json +1 -1
- package/connectors/totp/package.json +1 -1
- package/connectors/trackjs/package.json +1 -1
- package/connectors/trackvia/package.json +1 -1
- package/connectors/transform/package.json +1 -1
- package/connectors/transifex/package.json +1 -1
- package/connectors/transload/package.json +1 -1
- package/connectors/traverse/package.json +1 -1
- package/connectors/travisci/package.json +1 -1
- package/connectors/travo/package.json +1 -1
- package/connectors/travo-ai/package.json +1 -1
- package/connectors/travo-real-estate/package.json +1 -1
- package/connectors/tray-api-platform/package.json +1 -1
- package/connectors/trellistech/package.json +1 -1
- package/connectors/trellixepo/package.json +1 -1
- package/connectors/trello/package.json +1 -1
- package/connectors/trengo/package.json +1 -1
- package/connectors/trevorio/package.json +1 -1
- package/connectors/tricentis/package.json +1 -1
- package/connectors/trigger-dev/package.json +1 -1
- package/connectors/trigger-dev-api-platform/package.json +1 -1
- package/connectors/triggercmd/package.json +1 -1
- package/connectors/triple-whale/package.json +1 -1
- package/connectors/truelayer/package.json +1 -1
- package/connectors/trustpilot/package.json +1 -1
- package/connectors/trustpilot-business/package.json +1 -1
- package/connectors/trybloom/package.json +1 -1
- package/connectors/trycardinal-ai/package.json +1 -1
- package/connectors/tryprism/package.json +1 -1
- package/connectors/tumblr/package.json +1 -1
- package/connectors/turbohire/package.json +1 -1
- package/connectors/turbot-pipes/package.json +1 -1
- package/connectors/turso/package.json +1 -1
- package/connectors/turso-api-platform/package.json +1 -1
- package/connectors/tuskr/package.json +1 -1
- package/connectors/tuulio/package.json +1 -1
- package/connectors/twake/package.json +1 -1
- package/connectors/twelve-data/package.json +1 -1
- package/connectors/twilio/package.json +1 -1
- package/connectors/twilio/src/utils/config.ts +1 -1
- package/connectors/twilio-api-platform/package.json +1 -1
- package/connectors/twist/package.json +1 -1
- package/connectors/twitch/package.json +1 -1
- package/connectors/tyk/package.json +1 -1
- package/connectors/tyk-api-platform/package.json +1 -1
- package/connectors/typeform/package.json +1 -1
- package/connectors/typesense/package.json +1 -1
- package/connectors/typless/package.json +1 -1
- package/connectors/udio/package.json +1 -1
- package/connectors/ultimate-ai/package.json +1 -1
- package/connectors/umami/package.json +1 -1
- package/connectors/unbounce/package.json +1 -1
- package/connectors/unifold/package.json +1 -1
- package/connectors/unione/package.json +1 -1
- package/connectors/uniprot/package.json +1 -1
- package/connectors/unisender/package.json +1 -1
- package/connectors/unisson/package.json +1 -1
- package/connectors/uniswap-api/package.json +1 -1
- package/connectors/unit/package.json +1 -1
- package/connectors/unleash/package.json +1 -1
- package/connectors/unleashedsoftware/package.json +1 -1
- package/connectors/unpaywall/package.json +1 -1
- package/connectors/upcloud/package.json +1 -1
- package/connectors/updown-io/package.json +1 -1
- package/connectors/upkeep/package.json +1 -1
- package/connectors/uplead/package.json +1 -1
- package/connectors/uploadcare/package.json +1 -1
- package/connectors/uproc/package.json +1 -1
- package/connectors/ups/package.json +1 -1
- package/connectors/upstash/package.json +1 -1
- package/connectors/upstash-api-platform/package.json +1 -1
- package/connectors/uptimerobot/package.json +1 -1
- package/connectors/uptimetoolbox/package.json +1 -1
- package/connectors/urlscanio/package.json +1 -1
- package/connectors/usebidflow/package.json +1 -1
- package/connectors/usecrow/package.json +1 -1
- package/connectors/usereframe/package.json +1 -1
- package/connectors/userflow/package.json +1 -1
- package/connectors/userlens/package.json +1 -1
- package/connectors/userlist/package.json +1 -1
- package/connectors/userpilot/package.json +1 -1
- package/connectors/uservoice/package.json +1 -1
- package/connectors/usps/package.json +1 -1
- package/connectors/uspto/package.json +1 -1
- package/connectors/v0/package.json +1 -1
- package/connectors/valence/package.json +1 -1
- package/connectors/valgo/package.json +1 -1
- package/connectors/vanta/package.json +1 -1
- package/connectors/vapi/package.json +1 -1
- package/connectors/vault/package.json +1 -1
- package/connectors/vector-legal/package.json +1 -1
- package/connectors/vector-legal-api/package.json +1 -1
- package/connectors/vectorshift/package.json +1 -1
- package/connectors/vela/package.json +1 -1
- package/connectors/velum-data-quality/package.json +1 -1
- package/connectors/velum-labs/package.json +1 -1
- package/connectors/venafi/package.json +1 -1
- package/connectors/veo/package.json +1 -1
- package/connectors/veracode/package.json +1 -1
- package/connectors/vercel/package.json +1 -1
- package/connectors/vercel-ai-gateway/package.json +1 -1
- package/connectors/vercel-api-platform/package.json +1 -1
- package/connectors/vercel-blob/package.json +1 -1
- package/connectors/vercel-blob-platform/package.json +1 -1
- package/connectors/vercel-edge-config/package.json +1 -1
- package/connectors/vercel-edge-config-platform/package.json +1 -1
- package/connectors/verdex/package.json +1 -1
- package/connectors/verifalia/package.json +1 -1
- package/connectors/veriphone/package.json +1 -1
- package/connectors/vero/package.json +1 -1
- package/connectors/vertex-ai/package.json +1 -1
- package/connectors/vidyard/package.json +1 -1
- package/connectors/vimeo/package.json +1 -1
- package/connectors/virustotal/package.json +1 -1
- package/connectors/visibl-semiconductors/package.json +1 -1
- package/connectors/vitally/package.json +1 -1
- package/connectors/vivenu/package.json +1 -1
- package/connectors/vivifyscrum/package.json +1 -1
- package/connectors/voiceflow/package.json +1 -1
- package/connectors/voicit/package.json +1 -1
- package/connectors/voltair/package.json +1 -1
- package/connectors/vonage/package.json +1 -1
- package/connectors/voquill/package.json +1 -1
- package/connectors/vowel/package.json +1 -1
- package/connectors/voygr/package.json +1 -1
- package/connectors/vultr/package.json +1 -1
- package/connectors/vwo/package.json +1 -1
- package/connectors/waboxapp/package.json +1 -1
- package/connectors/wait/package.json +1 -1
- package/connectors/wakatime/package.json +1 -1
- package/connectors/walmart-marketplace/package.json +1 -1
- package/connectors/wandb/package.json +1 -1
- package/connectors/wappalyzer/package.json +1 -1
- package/connectors/watchsignals/package.json +1 -1
- package/connectors/wati/package.json +1 -1
- package/connectors/wato/package.json +1 -1
- package/connectors/wave-accounting/package.json +1 -1
- package/connectors/wavelineextract/package.json +1 -1
- package/connectors/wayco/package.json +1 -1
- package/connectors/weaviate/package.json +1 -1
- package/connectors/weaviate-api-platform/package.json +1 -1
- package/connectors/webengage/package.json +1 -1
- package/connectors/webex/package.json +1 -1
- package/connectors/webexbycisco/package.json +1 -1
- package/connectors/webflow/package.json +1 -1
- package/connectors/webhook/package.json +1 -1
- package/connectors/webhooks/package.json +1 -1
- package/connectors/webinarjam/package.json +1 -1
- package/connectors/webpagetest/package.json +1 -1
- package/connectors/webscraperio/package.json +1 -1
- package/connectors/weezevent/package.json +1 -1
- package/connectors/weights-biases/package.json +1 -1
- package/connectors/wekan/package.json +1 -1
- package/connectors/whal3s/package.json +1 -1
- package/connectors/whatconverts/package.json +1 -1
- package/connectors/whatsapp/package.json +1 -1
- package/connectors/whatsapp-cloud-api/package.json +1 -1
- package/connectors/wideframe/package.json +1 -1
- package/connectors/wikipedia/package.json +1 -1
- package/connectors/wildcard/package.json +1 -1
- package/connectors/windmill/package.json +1 -1
- package/connectors/windmill-api-platform/package.json +1 -1
- package/connectors/wipo/package.json +1 -1
- package/connectors/wise/package.json +1 -1
- package/connectors/wistia/package.json +1 -1
- package/connectors/withai/package.json +1 -1
- package/connectors/wix/package.json +1 -1
- package/connectors/wiz/package.json +1 -1
- package/connectors/wizychat/package.json +1 -1
- package/connectors/wolframoralpha/package.json +1 -1
- package/connectors/wonderchat/package.json +1 -1
- package/connectors/wondercraft/package.json +1 -1
- package/connectors/woocommerce/package.json +1 -1
- package/connectors/woodpecker/package.json +1 -1
- package/connectors/woodpeckerco/package.json +1 -1
- package/connectors/wordfence/package.json +1 -1
- package/connectors/wordfence-api-platform/package.json +1 -1
- package/connectors/wordpress/package.json +1 -1
- package/connectors/workable/package.json +1 -1
- package/connectors/workast/package.json +1 -1
- package/connectors/workato/package.json +1 -1
- package/connectors/workato-api-platform/package.json +1 -1
- package/connectors/workboard/package.json +1 -1
- package/connectors/workflow-trigger/package.json +1 -1
- package/connectors/workos/package.json +1 -1
- package/connectors/woxo/package.json +1 -1
- package/connectors/wrike/package.json +1 -1
- package/connectors/write-binary-file/package.json +1 -1
- package/connectors/writesonic/package.json +1 -1
- package/connectors/wubookratechecker/package.json +1 -1
- package/connectors/wufoo/package.json +1 -1
- package/connectors/x/package.json +1 -1
- package/connectors/xads/package.json +1 -1
- package/connectors/xai/package.json +1 -1
- package/connectors/xai-api-platform/package.json +1 -1
- package/connectors/xai-grok/package.json +1 -1
- package/connectors/xata/package.json +1 -1
- package/connectors/xero/package.json +1 -1
- package/connectors/xml/package.json +1 -1
- package/connectors/xray/package.json +1 -1
- package/connectors/xtractly/package.json +1 -1
- package/connectors/ybug/package.json +1 -1
- package/connectors/ycode/package.json +1 -1
- package/connectors/yesware/package.json +1 -1
- package/connectors/ynab/package.json +1 -1
- package/connectors/yodiz/package.json +1 -1
- package/connectors/yotpo/package.json +1 -1
- package/connectors/you-com/package.json +1 -1
- package/connectors/youart/package.json +1 -1
- package/connectors/yourls/package.json +1 -1
- package/connectors/yousearch/package.json +1 -1
- package/connectors/yousign/package.json +1 -1
- package/connectors/youtube/package.json +2 -1
- package/connectors/youtube/src/cli/index.test.ts +65 -0
- package/connectors/youtube/src/cli/index.ts +6 -3
- package/connectors/zabbix/package.json +1 -1
- package/connectors/zammad/package.json +1 -1
- package/connectors/zapier-api-platform/package.json +1 -1
- package/connectors/zatanna/package.json +1 -1
- package/connectors/zendesk/package.json +1 -1
- package/connectors/zendesk/server/index.js +1 -1
- package/connectors/zendesk/src/server/index.ts +1 -1
- package/connectors/zenodo/package.json +1 -1
- package/connectors/zenrows/package.json +1 -1
- package/connectors/zenserp/package.json +1 -1
- package/connectors/zerobounce/package.json +1 -1
- package/connectors/zerosettle/package.json +1 -1
- package/connectors/zerotier/package.json +1 -1
- package/connectors/zhipu-ai/package.json +1 -1
- package/connectors/zibra-labs/package.json +1 -1
- package/connectors/zipkin/package.json +1 -1
- package/connectors/zoho/package.json +1 -1
- package/connectors/zoho-analytics/package.json +1 -1
- package/connectors/zoho-bigin/package.json +1 -1
- package/connectors/zoho-campaigns/package.json +1 -1
- package/connectors/zoho-cliq/package.json +1 -1
- package/connectors/zoho-creator/package.json +1 -1
- package/connectors/zoho-inventory/package.json +1 -1
- package/connectors/zoho-meeting/package.json +1 -1
- package/connectors/zoho-people/package.json +1 -1
- package/connectors/zoho-sign/package.json +1 -1
- package/connectors/zoho-subscriptions/package.json +1 -1
- package/connectors/zoho-survey/package.json +1 -1
- package/connectors/zohobookings/package.json +1 -1
- package/connectors/zohobooks/package.json +1 -1
- package/connectors/zohocrm/package.json +1 -1
- package/connectors/zohodesk/package.json +1 -1
- package/connectors/zohoforms/package.json +1 -1
- package/connectors/zohoprojects/package.json +1 -1
- package/connectors/zohorecruit/package.json +1 -1
- package/connectors/zohovault/package.json +1 -1
- package/connectors/zohoworkdrive/package.json +1 -1
- package/connectors/zolvo/package.json +1 -1
- package/connectors/zonkafeedback/package.json +1 -1
- package/connectors/zoom/package.json +1 -1
- package/connectors/zoom-api/package.json +1 -1
- package/connectors/zoominfo/package.json +1 -1
- package/connectors/zotero/package.json +1 -1
- package/connectors/zscalerzia/package.json +1 -1
- package/connectors/zulip/package.json +1 -1
- package/connectors/zymbly/package.json +1 -1
- package/dist/db/database.d.ts +5 -2
- package/dist/index.js +242 -142
- package/dist/lib/paths.d.ts +37 -0
- package/dist/lib/strip.d.ts +1 -0
- package/dist/sdk/bundle-boundary.test.d.ts +1 -0
- package/dist/sdk/fixtures/platform-connectors.d.ts +20 -0
- package/dist/sdk/index.d.ts +696 -0
- package/dist/sdk/index.js +508 -0
- package/dist/sdk/index.test.d.ts +1 -0
- package/dist/sdk/platform-contract.test.d.ts +1 -0
- package/dist/server/auth.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/serve-auth.d.ts +54 -0
- package/dist/server/serve-auth.test.d.ts +1 -0
- package/dist/server/serve.d.ts +18 -6
- package/dist/server/server-auth-gate.test.d.ts +1 -0
- package/package.json +13 -10
- package/dashboard/dist/assets/index-8uoGZF7B.js +0 -280
- package/dashboard/dist/assets/index-D7ZVhmHr.css +0 -1
- package/dashboard/dist/index.html +0 -13
- package/dashboard/dist/logo.jpg +0 -0
- package/dist/server/dashboard.d.ts +0 -5
- /package/dist/{server/dashboard.test.d.ts → lib/paths.test.d.ts} +0 -0
package/bin/mcp.js
CHANGED
|
@@ -4999,10 +4999,110 @@ Commands:
|
|
|
4999
4999
|
});
|
|
5000
5000
|
});
|
|
5001
5001
|
|
|
5002
|
-
// src/
|
|
5003
|
-
import { existsSync as existsSync2
|
|
5002
|
+
// src/lib/paths.ts
|
|
5003
|
+
import { existsSync as existsSync2 } from "fs";
|
|
5004
5004
|
import { homedir } from "os";
|
|
5005
|
-
import {
|
|
5005
|
+
import { join as join2, resolve } from "path";
|
|
5006
|
+
import { homedir as pathsResolverHomedir } from "os";
|
|
5007
|
+
import { join as pathsResolverJoin } from "path";
|
|
5008
|
+
function pathsResolverAssertApp(app) {
|
|
5009
|
+
if (typeof app !== "string" || app.length === 0) {
|
|
5010
|
+
throw new TypeError("paths: app must be a non-empty string");
|
|
5011
|
+
}
|
|
5012
|
+
if (!PATHS_RESOLVER_APP_SLUG_RE.test(app)) {
|
|
5013
|
+
throw new TypeError(`paths: invalid app slug "${app}" \u2014 expected lowercase kebab-case ([a-z0-9]+(-[a-z0-9]+)*)`);
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
function pathsResolverAssertKind(kind) {
|
|
5017
|
+
if (!Object.keys(PATHS_RESOLVER_KIND_ENV).includes(kind)) {
|
|
5018
|
+
throw new TypeError(`paths: invalid path kind "${kind}" \u2014 expected one of ${Object.keys(PATHS_RESOLVER_KIND_ENV).join(", ")}`);
|
|
5019
|
+
}
|
|
5020
|
+
}
|
|
5021
|
+
function pathsResolverBaseDir(kind, options) {
|
|
5022
|
+
pathsResolverAssertKind(kind);
|
|
5023
|
+
const env = options.env ?? process.env;
|
|
5024
|
+
const override = env[PATHS_RESOLVER_KIND_ENV[kind]];
|
|
5025
|
+
if (typeof override === "string" && override.length > 0)
|
|
5026
|
+
return override;
|
|
5027
|
+
const home = options.home ?? pathsResolverHomedir();
|
|
5028
|
+
const platform = options.platform ?? process.platform;
|
|
5029
|
+
if (platform === "darwin") {
|
|
5030
|
+
switch (kind) {
|
|
5031
|
+
case "config":
|
|
5032
|
+
case "data":
|
|
5033
|
+
return pathsResolverJoin(home, "Library", "Application Support", "Hasna");
|
|
5034
|
+
case "cache":
|
|
5035
|
+
return pathsResolverJoin(home, "Library", "Caches", "Hasna");
|
|
5036
|
+
case "state":
|
|
5037
|
+
return pathsResolverJoin(home, "Library", "Logs", "Hasna");
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
switch (kind) {
|
|
5041
|
+
case "config":
|
|
5042
|
+
return pathsResolverJoin(home, ".config", "hasna");
|
|
5043
|
+
case "data":
|
|
5044
|
+
return pathsResolverJoin(home, ".local", "share", "hasna");
|
|
5045
|
+
case "state":
|
|
5046
|
+
return pathsResolverJoin(home, ".local", "state", "hasna");
|
|
5047
|
+
case "cache":
|
|
5048
|
+
return pathsResolverJoin(home, ".cache", "hasna");
|
|
5049
|
+
}
|
|
5050
|
+
}
|
|
5051
|
+
function pathsResolverResolve(kind, options) {
|
|
5052
|
+
pathsResolverAssertApp(options.app);
|
|
5053
|
+
const appSegment = options.internal === true ? pathsResolverJoin("internal", options.app) : options.app;
|
|
5054
|
+
return pathsResolverJoin(pathsResolverBaseDir(kind, options), appSegment);
|
|
5055
|
+
}
|
|
5056
|
+
function dataDir(options) {
|
|
5057
|
+
return pathsResolverResolve("data", options);
|
|
5058
|
+
}
|
|
5059
|
+
function envOr(name, fallback) {
|
|
5060
|
+
const value = process.env[name]?.trim();
|
|
5061
|
+
return value ? value : fallback;
|
|
5062
|
+
}
|
|
5063
|
+
function effectiveHome() {
|
|
5064
|
+
return process.env["HOME"] || process.env["USERPROFILE"] || homedir();
|
|
5065
|
+
}
|
|
5066
|
+
function legacyHomeDir() {
|
|
5067
|
+
return join2(effectiveHome(), ".hasna", "connectors");
|
|
5068
|
+
}
|
|
5069
|
+
function resolverHome() {
|
|
5070
|
+
return dataDir({
|
|
5071
|
+
app: "connectors",
|
|
5072
|
+
home: process.env["HOME"] || process.env["USERPROFILE"] || undefined
|
|
5073
|
+
});
|
|
5074
|
+
}
|
|
5075
|
+
function adoptResolverHome(resolved, env = process.env) {
|
|
5076
|
+
const dataOverride = env.HASNA_DATA_HOME;
|
|
5077
|
+
if (typeof dataOverride === "string" && dataOverride.trim().length > 0)
|
|
5078
|
+
return true;
|
|
5079
|
+
return existsSync2(join2(resolved, "connectors.db"));
|
|
5080
|
+
}
|
|
5081
|
+
function exactConnectorsHome() {
|
|
5082
|
+
const home = envOr("HASNA_CONNECTORS_DIR", "");
|
|
5083
|
+
return home ? home : undefined;
|
|
5084
|
+
}
|
|
5085
|
+
function connectorsHome() {
|
|
5086
|
+
const exact = exactConnectorsHome();
|
|
5087
|
+
if (exact)
|
|
5088
|
+
return resolve(exact);
|
|
5089
|
+
const resolved = resolverHome();
|
|
5090
|
+
return adoptResolverHome(resolved) ? resolve(resolved) : resolve(legacyHomeDir());
|
|
5091
|
+
}
|
|
5092
|
+
var PATHS_RESOLVER_KIND_ENV, PATHS_RESOLVER_APP_SLUG_RE;
|
|
5093
|
+
var init_paths = __esm(() => {
|
|
5094
|
+
PATHS_RESOLVER_KIND_ENV = {
|
|
5095
|
+
config: "HASNA_CONFIG_HOME",
|
|
5096
|
+
data: "HASNA_DATA_HOME",
|
|
5097
|
+
state: "HASNA_STATE_HOME",
|
|
5098
|
+
cache: "HASNA_CACHE_HOME"
|
|
5099
|
+
};
|
|
5100
|
+
PATHS_RESOLVER_APP_SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
5101
|
+
});
|
|
5102
|
+
|
|
5103
|
+
// src/core/connectors/gmail.ts
|
|
5104
|
+
import { existsSync as existsSync3, mkdirSync, readFileSync, readdirSync, writeFileSync } from "fs";
|
|
5105
|
+
import { basename, join as join3 } from "path";
|
|
5006
5106
|
async function modifyMessage(profile, messageId, addLabelIds, removeLabelIds) {
|
|
5007
5107
|
return requestJson(profile, `/users/me/messages/${encodeURIComponent(messageId)}/modify`, {}, {
|
|
5008
5108
|
method: "POST",
|
|
@@ -5039,7 +5139,7 @@ async function replyToMessage(profile, messageId, input) {
|
|
|
5039
5139
|
}
|
|
5040
5140
|
async function downloadAttachments(profile, input) {
|
|
5041
5141
|
const messageId = getMessageId(input);
|
|
5042
|
-
const outputDir = input.dir ?? input.outputDir ??
|
|
5142
|
+
const outputDir = input.dir ?? input.outputDir ?? join3(configDirs()[0], "attachments", messageId);
|
|
5043
5143
|
mkdirSync(outputDir, { recursive: true });
|
|
5044
5144
|
const attachments = input.attachmentId && input.filename ? [{
|
|
5045
5145
|
attachmentId: input.attachmentId,
|
|
@@ -5051,7 +5151,7 @@ async function downloadAttachments(profile, input) {
|
|
|
5051
5151
|
for (const attachment of attachments) {
|
|
5052
5152
|
const data = await requestJson(profile, `/users/me/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(attachment.attachmentId)}`, {});
|
|
5053
5153
|
const filename = safeFilename(attachment.filename);
|
|
5054
|
-
const path =
|
|
5154
|
+
const path = join3(outputDir, filename);
|
|
5055
5155
|
const buffer = Buffer.from(data.data, "base64url");
|
|
5056
5156
|
writeFileSync(path, buffer);
|
|
5057
5157
|
downloaded.push({
|
|
@@ -5121,7 +5221,7 @@ function gmailBackoffDelayMs(attempt, retryAfter = null) {
|
|
|
5121
5221
|
return Math.min(2 ** attempt * baseMs + jitterMs, 64000);
|
|
5122
5222
|
}
|
|
5123
5223
|
function sleep(ms) {
|
|
5124
|
-
return new Promise((
|
|
5224
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
5125
5225
|
}
|
|
5126
5226
|
async function getValidAccessToken(profile) {
|
|
5127
5227
|
if (process.env.GMAIL_ACCESS_TOKEN)
|
|
@@ -5168,8 +5268,8 @@ async function refreshAccessToken(profile, currentTokens) {
|
|
|
5168
5268
|
function listProfiles() {
|
|
5169
5269
|
const profiles = new Set;
|
|
5170
5270
|
for (const baseDir of configDirs()) {
|
|
5171
|
-
const profilesDir =
|
|
5172
|
-
if (!
|
|
5271
|
+
const profilesDir = join3(baseDir, "profiles");
|
|
5272
|
+
if (!existsSync3(profilesDir))
|
|
5173
5273
|
continue;
|
|
5174
5274
|
for (const entry of readdirSync(profilesDir, { withFileTypes: true })) {
|
|
5175
5275
|
if (entry.isDirectory())
|
|
@@ -5187,8 +5287,8 @@ function loadCredentials(profile) {
|
|
|
5187
5287
|
return { clientId: envClientId, clientSecret: envClientSecret };
|
|
5188
5288
|
for (const baseDir of configDirs()) {
|
|
5189
5289
|
const credentials = {
|
|
5190
|
-
...readJson(
|
|
5191
|
-
...readJson(
|
|
5290
|
+
...readJson(join3(baseDir, "credentials.json")),
|
|
5291
|
+
...readJson(join3(baseDir, "profiles", profile, "config.json"))
|
|
5192
5292
|
};
|
|
5193
5293
|
if (credentials.clientId || credentials.clientSecret)
|
|
5194
5294
|
return credentials;
|
|
@@ -5197,30 +5297,30 @@ function loadCredentials(profile) {
|
|
|
5197
5297
|
}
|
|
5198
5298
|
function loadTokens(profile) {
|
|
5199
5299
|
for (const baseDir of configDirs()) {
|
|
5200
|
-
const fromProfile = readJson(
|
|
5300
|
+
const fromProfile = readJson(join3(baseDir, "profiles", profile, "tokens.json"));
|
|
5201
5301
|
if (fromProfile)
|
|
5202
5302
|
return fromProfile;
|
|
5203
|
-
const flat = readJson(
|
|
5303
|
+
const flat = readJson(join3(baseDir, "profiles", `${profile}.json`));
|
|
5204
5304
|
if (flat)
|
|
5205
5305
|
return flat.tokens ?? (flat.accessToken || flat.refreshToken ? flat : null);
|
|
5206
5306
|
}
|
|
5207
5307
|
return null;
|
|
5208
5308
|
}
|
|
5209
5309
|
function saveTokens(profile, tokens) {
|
|
5210
|
-
const baseDir = configDirs().find((dir) =>
|
|
5211
|
-
const profileDir =
|
|
5310
|
+
const baseDir = configDirs().find((dir) => existsSync3(dir)) ?? configDirs()[0];
|
|
5311
|
+
const profileDir = join3(baseDir, "profiles", profile);
|
|
5212
5312
|
mkdirSync(profileDir, { recursive: true });
|
|
5213
|
-
writeFileSync(
|
|
5313
|
+
writeFileSync(join3(profileDir, "tokens.json"), JSON.stringify(tokens, null, 2), { mode: 384 });
|
|
5214
5314
|
}
|
|
5215
5315
|
function configDirs() {
|
|
5216
5316
|
const explicit = process.env.HASNA_GMAIL_CONNECTOR_DIR ?? process.env.GMAIL_CONNECTOR_DIR;
|
|
5217
5317
|
if (explicit)
|
|
5218
5318
|
return [explicit];
|
|
5219
|
-
const baseDir =
|
|
5220
|
-
return [
|
|
5319
|
+
const baseDir = connectorsHome();
|
|
5320
|
+
return [join3(baseDir, "gmail"), join3(baseDir, "connect-gmail")];
|
|
5221
5321
|
}
|
|
5222
5322
|
function readJson(path) {
|
|
5223
|
-
if (!
|
|
5323
|
+
if (!existsSync3(path))
|
|
5224
5324
|
return null;
|
|
5225
5325
|
try {
|
|
5226
5326
|
return JSON.parse(readFileSync(path, "utf8"));
|
|
@@ -5301,6 +5401,7 @@ function safeFilename(filename) {
|
|
|
5301
5401
|
}
|
|
5302
5402
|
var GMAIL_API_BASE = "https://gmail.googleapis.com/gmail/v1", TOKEN_URL = "https://oauth2.googleapis.com/token", REFRESH_BUFFER_MS, MAX_GMAIL_RETRIES = 5, listMessagesSchema, messageIdSchema, readMessageSchema, attachmentListSchema, attachmentDownloadSchema, historyListSchema, replySchema, gmailConnector;
|
|
5303
5403
|
var init_gmail = __esm(() => {
|
|
5404
|
+
init_paths();
|
|
5304
5405
|
init_zod();
|
|
5305
5406
|
init_connector();
|
|
5306
5407
|
REFRESH_BUFFER_MS = 5 * 60 * 1000;
|
|
@@ -5470,9 +5571,8 @@ var init_gmail = __esm(() => {
|
|
|
5470
5571
|
});
|
|
5471
5572
|
|
|
5472
5573
|
// src/core/connectors/googledrive.ts
|
|
5473
|
-
import { existsSync as
|
|
5474
|
-
import {
|
|
5475
|
-
import { basename as basename2, join as join3 } from "path";
|
|
5574
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync2, readdirSync as readdirSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
5575
|
+
import { basename as basename2, join as join4 } from "path";
|
|
5476
5576
|
async function requestJson2(profile, path, params) {
|
|
5477
5577
|
const response = await request(profile, path, params);
|
|
5478
5578
|
const text = await response.text();
|
|
@@ -5540,8 +5640,8 @@ async function refreshAccessToken2(profile, currentTokens) {
|
|
|
5540
5640
|
function listProfiles2() {
|
|
5541
5641
|
const profiles = new Set;
|
|
5542
5642
|
for (const baseDir of configDirs2()) {
|
|
5543
|
-
const profilesDir =
|
|
5544
|
-
if (!
|
|
5643
|
+
const profilesDir = join4(baseDir, "profiles");
|
|
5644
|
+
if (!existsSync4(profilesDir))
|
|
5545
5645
|
continue;
|
|
5546
5646
|
for (const entry of readdirSync2(profilesDir, { withFileTypes: true })) {
|
|
5547
5647
|
if (entry.isDirectory())
|
|
@@ -5588,8 +5688,8 @@ function loadCredentials2(profile) {
|
|
|
5588
5688
|
return { clientId: envClientId, clientSecret: envClientSecret };
|
|
5589
5689
|
for (const baseDir of configDirs2()) {
|
|
5590
5690
|
const credentials = {
|
|
5591
|
-
...readJson2(
|
|
5592
|
-
...readJson2(
|
|
5691
|
+
...readJson2(join4(baseDir, "credentials.json")),
|
|
5692
|
+
...readJson2(join4(baseDir, "profiles", profile, "config.json"))
|
|
5593
5693
|
};
|
|
5594
5694
|
if (credentials.clientId || credentials.clientSecret)
|
|
5595
5695
|
return credentials;
|
|
@@ -5598,30 +5698,30 @@ function loadCredentials2(profile) {
|
|
|
5598
5698
|
}
|
|
5599
5699
|
function loadTokens2(profile) {
|
|
5600
5700
|
for (const baseDir of configDirs2()) {
|
|
5601
|
-
const fromProfile = readJson2(
|
|
5701
|
+
const fromProfile = readJson2(join4(baseDir, "profiles", profile, "tokens.json"));
|
|
5602
5702
|
if (fromProfile)
|
|
5603
5703
|
return fromProfile;
|
|
5604
|
-
const flat = readJson2(
|
|
5704
|
+
const flat = readJson2(join4(baseDir, "profiles", `${profile}.json`));
|
|
5605
5705
|
if (flat)
|
|
5606
5706
|
return flat.tokens ?? (flat.accessToken || flat.refreshToken ? flat : null);
|
|
5607
5707
|
}
|
|
5608
5708
|
return null;
|
|
5609
5709
|
}
|
|
5610
5710
|
function saveTokens2(profile, tokens) {
|
|
5611
|
-
const baseDir = configDirs2().find((dir) =>
|
|
5612
|
-
const profileDir =
|
|
5711
|
+
const baseDir = configDirs2().find((dir) => existsSync4(dir)) ?? configDirs2()[0];
|
|
5712
|
+
const profileDir = join4(baseDir, "profiles", profile);
|
|
5613
5713
|
mkdirSync2(profileDir, { recursive: true });
|
|
5614
|
-
writeFileSync2(
|
|
5714
|
+
writeFileSync2(join4(profileDir, "tokens.json"), JSON.stringify(tokens, null, 2), { mode: 384 });
|
|
5615
5715
|
}
|
|
5616
5716
|
function configDirs2() {
|
|
5617
5717
|
const explicit = process.env.HASNA_GOOGLE_DRIVE_CONNECTOR_DIR ?? process.env.GOOGLE_DRIVE_CONNECTOR_DIR;
|
|
5618
5718
|
if (explicit)
|
|
5619
5719
|
return [explicit];
|
|
5620
|
-
const baseDir =
|
|
5621
|
-
return [
|
|
5720
|
+
const baseDir = connectorsHome();
|
|
5721
|
+
return [join4(baseDir, "googledrive"), join4(baseDir, "connect-googledrive")];
|
|
5622
5722
|
}
|
|
5623
5723
|
function readJson2(path) {
|
|
5624
|
-
if (!
|
|
5724
|
+
if (!existsSync4(path))
|
|
5625
5725
|
return null;
|
|
5626
5726
|
try {
|
|
5627
5727
|
return JSON.parse(readFileSync2(path, "utf8"));
|
|
@@ -5655,6 +5755,7 @@ function extractGoogleError(body) {
|
|
|
5655
5755
|
}
|
|
5656
5756
|
var DRIVE_API_BASE = "https://www.googleapis.com/drive/v3", TOKEN_URL2 = "https://oauth2.googleapis.com/token", REFRESH_BUFFER_MS2, DEFAULT_FILE_FIELDS, DEFAULT_EXPORT_FORMATS, EXPORT_EXTENSIONS, listFilesSchema, listDrivesSchema, fileIdSchema, downloadSchema, profilesStatusSchema, googleDriveConnector;
|
|
5657
5757
|
var init_googledrive = __esm(() => {
|
|
5758
|
+
init_paths();
|
|
5658
5759
|
init_zod();
|
|
5659
5760
|
init_connector();
|
|
5660
5761
|
REFRESH_BUFFER_MS2 = 5 * 60 * 1000;
|
|
@@ -5804,7 +5905,7 @@ var package_default;
|
|
|
5804
5905
|
var init_package = __esm(() => {
|
|
5805
5906
|
package_default = {
|
|
5806
5907
|
name: "@hasna/connectors",
|
|
5807
|
-
version: "1.4.
|
|
5908
|
+
version: "1.4.6",
|
|
5808
5909
|
description: "Open source connector library - Install API connectors with a single command",
|
|
5809
5910
|
type: "module",
|
|
5810
5911
|
bin: {
|
|
@@ -5815,7 +5916,6 @@ var init_package = __esm(() => {
|
|
|
5815
5916
|
files: [
|
|
5816
5917
|
"bin/",
|
|
5817
5918
|
"dist/",
|
|
5818
|
-
"dashboard/dist/",
|
|
5819
5919
|
"connectors/",
|
|
5820
5920
|
"README.md",
|
|
5821
5921
|
"!connectors/**/.test-home/**",
|
|
@@ -5835,20 +5935,23 @@ var init_package = __esm(() => {
|
|
|
5835
5935
|
"./social": {
|
|
5836
5936
|
import: "./dist/social/index.js",
|
|
5837
5937
|
types: "./dist/.types/src/social/index.d.ts"
|
|
5938
|
+
},
|
|
5939
|
+
"./sdk": {
|
|
5940
|
+
types: "./dist/sdk/index.d.ts",
|
|
5941
|
+
import: "./dist/sdk/index.js",
|
|
5942
|
+
default: "./dist/sdk/index.js"
|
|
5838
5943
|
}
|
|
5839
5944
|
},
|
|
5840
5945
|
main: "./dist/index.js",
|
|
5841
5946
|
types: "./dist/index.d.ts",
|
|
5842
5947
|
scripts: {
|
|
5843
|
-
build: "
|
|
5844
|
-
|
|
5845
|
-
postinstall: 'mkdir -p $HOME/.hasna/connectors 2>/dev/null || true; [ "$SKIP_DASHBOARD" = "1" ] || [ ! -f dashboard/package.json ] || [ -d dashboard/node_modules ] || (cd dashboard && bun install)',
|
|
5948
|
+
build: "bun build ./src/cli/index.tsx --outdir ./bin --target bun --external ink --external react --external chalk --external conf --external @hasna/events && bun build ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build ./src/server/index.ts --outfile ./bin/serve.js --target bun && bun build ./src/index.ts --outdir ./dist --target bun && bun build ./src/social/index.ts --outfile ./dist/social/index.js --target bun && bun build ./src/sdk/index.ts --outfile ./dist/sdk/index.js --target bun && tsc --emitDeclarationOnly --outDir ./dist && tsc -p tsconfig.social.json",
|
|
5949
|
+
postinstall: "mkdir -p $HOME/.hasna/connectors 2>/dev/null || true",
|
|
5846
5950
|
dev: "bun run ./src/cli/index.tsx",
|
|
5847
5951
|
"check:package-secrets": "bun run scripts/check-package-secrets.ts",
|
|
5848
5952
|
typecheck: "tsc --noEmit && tsc -p tsconfig.social.json --noEmit",
|
|
5849
5953
|
test: "bun run build && bun test",
|
|
5850
5954
|
"secrets:scan:npmrc": "bun run scripts/scan-npmrc-auth.mjs",
|
|
5851
|
-
"sdk:build": "cd sdk && bun run build",
|
|
5852
5955
|
prepublishOnly: "bun run secrets:scan:npmrc && bun run build && bun run check:package-secrets && bun test",
|
|
5853
5956
|
prepack: "bun run build && bun run check:package-secrets"
|
|
5854
5957
|
},
|
|
@@ -5868,7 +5971,7 @@ var init_package = __esm(() => {
|
|
|
5868
5971
|
author: "Hasna",
|
|
5869
5972
|
license: "Apache-2.0",
|
|
5870
5973
|
devDependencies: {
|
|
5871
|
-
"@types/bun": "
|
|
5974
|
+
"@types/bun": "1.3.14",
|
|
5872
5975
|
"@types/react": "^18.2.0",
|
|
5873
5976
|
"ink-testing-library": "^4.0.0",
|
|
5874
5977
|
typescript: "^5",
|
|
@@ -5898,11 +6001,12 @@ var init_package = __esm(() => {
|
|
|
5898
6001
|
},
|
|
5899
6002
|
repository: {
|
|
5900
6003
|
type: "git",
|
|
5901
|
-
url: "
|
|
6004
|
+
url: "https://github.com/hasna/apps.git",
|
|
6005
|
+
directory: "apps/connectors"
|
|
5902
6006
|
},
|
|
5903
|
-
homepage: "https://github.com/hasna/connectors#readme",
|
|
6007
|
+
homepage: "https://github.com/hasna/apps/tree/main/apps/connectors#readme",
|
|
5904
6008
|
bugs: {
|
|
5905
|
-
url: "https://github.com/hasna/
|
|
6009
|
+
url: "https://github.com/hasna/apps/issues"
|
|
5906
6010
|
}
|
|
5907
6011
|
};
|
|
5908
6012
|
});
|
|
@@ -5976,33 +6080,32 @@ __export(exports_database, {
|
|
|
5976
6080
|
closeDatabase: () => closeDatabase,
|
|
5977
6081
|
SqliteAdapter: () => SqliteAdapter
|
|
5978
6082
|
});
|
|
5979
|
-
import { dirname as dirname2, join as
|
|
5980
|
-
import {
|
|
5981
|
-
import { mkdirSync as mkdirSync3, existsSync as existsSync4, readdirSync as readdirSync3, copyFileSync, statSync } from "fs";
|
|
6083
|
+
import { dirname as dirname2, join as join5 } from "path";
|
|
6084
|
+
import { mkdirSync as mkdirSync3, existsSync as existsSync5, readdirSync as readdirSync3, copyFileSync, statSync } from "fs";
|
|
5982
6085
|
function mergeDirectoryContents(sourceDir, targetDir) {
|
|
5983
|
-
if (!
|
|
6086
|
+
if (!existsSync5(sourceDir)) {
|
|
5984
6087
|
return;
|
|
5985
6088
|
}
|
|
5986
6089
|
mkdirSync3(targetDir, { recursive: true });
|
|
5987
6090
|
for (const entry of readdirSync3(sourceDir)) {
|
|
5988
|
-
const sourcePath =
|
|
5989
|
-
const targetPath =
|
|
6091
|
+
const sourcePath = join5(sourceDir, entry);
|
|
6092
|
+
const targetPath = join5(targetDir, entry);
|
|
5990
6093
|
try {
|
|
5991
6094
|
const sourceStat = statSync(sourcePath);
|
|
5992
6095
|
if (sourceStat.isDirectory()) {
|
|
5993
6096
|
mergeDirectoryContents(sourcePath, targetPath);
|
|
5994
6097
|
continue;
|
|
5995
6098
|
}
|
|
5996
|
-
if (!
|
|
6099
|
+
if (!existsSync5(targetPath)) {
|
|
5997
6100
|
copyFileSync(sourcePath, targetPath);
|
|
5998
6101
|
}
|
|
5999
6102
|
} catch {}
|
|
6000
6103
|
}
|
|
6001
6104
|
}
|
|
6002
6105
|
function getConnectorsHome() {
|
|
6003
|
-
const
|
|
6004
|
-
const
|
|
6005
|
-
const legacyDirs = [
|
|
6106
|
+
const newDir = connectorsHome();
|
|
6107
|
+
const home = effectiveHome();
|
|
6108
|
+
const legacyDirs = [join5(home, ".connectors"), join5(home, ".connect")];
|
|
6006
6109
|
mkdirSync3(newDir, { recursive: true });
|
|
6007
6110
|
for (const legacyDir of legacyDirs) {
|
|
6008
6111
|
try {
|
|
@@ -6150,13 +6253,14 @@ var DB_DIR, DB_PATH, _db = null, _dbPath = null;
|
|
|
6150
6253
|
var init_database = __esm(() => {
|
|
6151
6254
|
init_sqlite_adapter();
|
|
6152
6255
|
init_sqlite_adapter();
|
|
6256
|
+
init_paths();
|
|
6153
6257
|
DB_DIR = getConnectorsHome();
|
|
6154
|
-
DB_PATH =
|
|
6258
|
+
DB_PATH = join5(DB_DIR, "connectors.db");
|
|
6155
6259
|
});
|
|
6156
6260
|
|
|
6157
6261
|
// src/lib/connector-resolver.ts
|
|
6158
|
-
import { existsSync as
|
|
6159
|
-
import { join as
|
|
6262
|
+
import { existsSync as existsSync6, readdirSync as readdirSync4, statSync as statSync2 } from "fs";
|
|
6263
|
+
import { join as join6 } from "path";
|
|
6160
6264
|
function stripLegacyPrefix(name) {
|
|
6161
6265
|
return name.startsWith(LEGACY_CONNECTOR_PREFIX) ? name.slice(LEGACY_CONNECTOR_PREFIX.length) : name;
|
|
6162
6266
|
}
|
|
@@ -6199,8 +6303,8 @@ function connectorPackageDirNames(name) {
|
|
|
6199
6303
|
function resolveConnectorPackagePath(connectorsDir, name) {
|
|
6200
6304
|
const resolution = resolveConnectorName(name);
|
|
6201
6305
|
const dirNames = connectorPackageDirNames(name);
|
|
6202
|
-
const checkedPaths = dirNames.map((dirName) =>
|
|
6203
|
-
const existingPath = checkedPaths.find((path) =>
|
|
6306
|
+
const checkedPaths = dirNames.map((dirName) => join6(connectorsDir, dirName));
|
|
6307
|
+
const existingPath = checkedPaths.find((path) => existsSync6(path)) ?? null;
|
|
6204
6308
|
const existingDirName = existingPath ? dirNames[checkedPaths.indexOf(existingPath)] : null;
|
|
6205
6309
|
return {
|
|
6206
6310
|
...resolution,
|
|
@@ -6216,16 +6320,16 @@ function getConnectorPackagePath(connectorsDir, name) {
|
|
|
6216
6320
|
const resolved = resolveConnectorPackagePath(connectorsDir, name);
|
|
6217
6321
|
return resolved.existingPath ?? resolved.preferredPath;
|
|
6218
6322
|
}
|
|
6219
|
-
function resolveConnectorConfigPaths(name,
|
|
6323
|
+
function resolveConnectorConfigPaths(name, connectorsHome2 = getConnectorsHome()) {
|
|
6220
6324
|
const resolution = resolveConnectorName(name);
|
|
6221
6325
|
const preferredDirName = resolution.canonicalName || resolution.legacyName;
|
|
6222
|
-
const preferredPath =
|
|
6223
|
-
const legacyPath =
|
|
6326
|
+
const preferredPath = join6(connectorsHome2, preferredDirName);
|
|
6327
|
+
const legacyPath = join6(connectorsHome2, resolution.legacyName);
|
|
6224
6328
|
const paths = preferredPath === legacyPath ? [preferredPath] : [preferredPath, legacyPath];
|
|
6225
|
-
const existingPaths = paths.filter((path) =>
|
|
6329
|
+
const existingPaths = paths.filter((path) => existsSync6(path));
|
|
6226
6330
|
return {
|
|
6227
6331
|
...resolution,
|
|
6228
|
-
connectorsHome,
|
|
6332
|
+
connectorsHome: connectorsHome2,
|
|
6229
6333
|
preferredDirName,
|
|
6230
6334
|
preferredPath,
|
|
6231
6335
|
legacyPath,
|
|
@@ -6233,11 +6337,11 @@ function resolveConnectorConfigPaths(name, connectorsHome = getConnectorsHome())
|
|
|
6233
6337
|
readPaths: paths
|
|
6234
6338
|
};
|
|
6235
6339
|
}
|
|
6236
|
-
function getConnectorConfigDir(name,
|
|
6237
|
-
return resolveConnectorConfigPaths(name,
|
|
6340
|
+
function getConnectorConfigDir(name, connectorsHome2 = getConnectorsHome()) {
|
|
6341
|
+
return resolveConnectorConfigPaths(name, connectorsHome2).preferredPath;
|
|
6238
6342
|
}
|
|
6239
|
-
function getConnectorConfigReadDirs(name,
|
|
6240
|
-
return resolveConnectorConfigPaths(name,
|
|
6343
|
+
function getConnectorConfigReadDirs(name, connectorsHome2 = getConnectorsHome()) {
|
|
6344
|
+
return resolveConnectorConfigPaths(name, connectorsHome2).readPaths;
|
|
6241
6345
|
}
|
|
6242
6346
|
var LEGACY_CONNECTOR_PREFIX = "connect-", CONNECTOR_SLUG_ALIASES, CONNECTOR_NAME_RE2;
|
|
6243
6347
|
var init_connector_resolver = __esm(() => {
|
|
@@ -6251,7 +6355,7 @@ var init_connector_resolver = __esm(() => {
|
|
|
6251
6355
|
|
|
6252
6356
|
// src/core/connectors/imessage.ts
|
|
6253
6357
|
import {
|
|
6254
|
-
existsSync as
|
|
6358
|
+
existsSync as existsSync7,
|
|
6255
6359
|
mkdirSync as mkdirSync4,
|
|
6256
6360
|
readFileSync as readFileSync3,
|
|
6257
6361
|
readdirSync as readdirSync5,
|
|
@@ -6259,7 +6363,7 @@ import {
|
|
|
6259
6363
|
statSync as statSync3,
|
|
6260
6364
|
writeFileSync as writeFileSync3
|
|
6261
6365
|
} from "fs";
|
|
6262
|
-
import { join as
|
|
6366
|
+
import { join as join7 } from "path";
|
|
6263
6367
|
function buildRootHelp(specs) {
|
|
6264
6368
|
const lines = [
|
|
6265
6369
|
"Usage: connect-imessage [options] [command]",
|
|
@@ -6310,12 +6414,12 @@ function getConfigReadDirs() {
|
|
|
6310
6414
|
return getConnectorConfigReadDirs(CONNECTOR_NAME);
|
|
6311
6415
|
}
|
|
6312
6416
|
function getProfilesDir() {
|
|
6313
|
-
return
|
|
6417
|
+
return join7(getConfigDir(), "profiles");
|
|
6314
6418
|
}
|
|
6315
6419
|
function getCurrentProfile() {
|
|
6316
6420
|
for (const configDir of getConfigReadDirs()) {
|
|
6317
|
-
const currentProfileFile =
|
|
6318
|
-
if (!
|
|
6421
|
+
const currentProfileFile = join7(configDir, "current_profile");
|
|
6422
|
+
if (!existsSync7(currentProfileFile))
|
|
6319
6423
|
continue;
|
|
6320
6424
|
try {
|
|
6321
6425
|
return readFileSync3(currentProfileFile, "utf-8").trim() || "default";
|
|
@@ -6328,16 +6432,16 @@ function getCurrentProfile() {
|
|
|
6328
6432
|
function setCurrentProfile(profile) {
|
|
6329
6433
|
const configDir = getConfigDir();
|
|
6330
6434
|
mkdirSync4(configDir, { recursive: true });
|
|
6331
|
-
writeFileSync3(
|
|
6435
|
+
writeFileSync3(join7(configDir, "current_profile"), profile);
|
|
6332
6436
|
}
|
|
6333
6437
|
function getFlatProfilePath(profile) {
|
|
6334
|
-
return
|
|
6438
|
+
return join7(getProfilesDir(), `${profile}.json`);
|
|
6335
6439
|
}
|
|
6336
6440
|
function getFlatProfileReadPaths(profile) {
|
|
6337
|
-
return getConfigReadDirs().map((dir) =>
|
|
6441
|
+
return getConfigReadDirs().map((dir) => join7(dir, "profiles", `${profile}.json`));
|
|
6338
6442
|
}
|
|
6339
6443
|
function getDirectoryProfileReadPaths(profile) {
|
|
6340
|
-
return getConfigReadDirs().map((dir) =>
|
|
6444
|
+
return getConfigReadDirs().map((dir) => join7(dir, "profiles", profile, "config.json"));
|
|
6341
6445
|
}
|
|
6342
6446
|
function loadJsonFile(path) {
|
|
6343
6447
|
try {
|
|
@@ -6357,8 +6461,8 @@ function sanitizeProfileConfig(config2) {
|
|
|
6357
6461
|
};
|
|
6358
6462
|
}
|
|
6359
6463
|
function loadProfile(profile = getCurrentProfile()) {
|
|
6360
|
-
const flatConfig = getFlatProfileReadPaths(profile).reverse().reduce((config2, path) => ({ ...config2, ...
|
|
6361
|
-
const directoryConfig = getDirectoryProfileReadPaths(profile).reverse().reduce((config2, path) => ({ ...config2, ...
|
|
6464
|
+
const flatConfig = getFlatProfileReadPaths(profile).reverse().reduce((config2, path) => ({ ...config2, ...existsSync7(path) ? loadJsonFile(path) : {} }), {});
|
|
6465
|
+
const directoryConfig = getDirectoryProfileReadPaths(profile).reverse().reduce((config2, path) => ({ ...config2, ...existsSync7(path) ? loadJsonFile(path) : {} }), {});
|
|
6362
6466
|
return sanitizeProfileConfig({
|
|
6363
6467
|
...flatConfig,
|
|
6364
6468
|
...directoryConfig
|
|
@@ -6374,17 +6478,17 @@ function profileExists(profile) {
|
|
|
6374
6478
|
if (profile === "default") {
|
|
6375
6479
|
return true;
|
|
6376
6480
|
}
|
|
6377
|
-
return getFlatProfileReadPaths(profile).some((path) =>
|
|
6481
|
+
return getFlatProfileReadPaths(profile).some((path) => existsSync7(path)) || getConfigReadDirs().some((dir) => existsSync7(join7(dir, "profiles", profile)));
|
|
6378
6482
|
}
|
|
6379
6483
|
function listProfiles3() {
|
|
6380
6484
|
const seen = new Set(["default"]);
|
|
6381
6485
|
for (const configDir of getConfigReadDirs()) {
|
|
6382
|
-
const profilesDir =
|
|
6383
|
-
if (!
|
|
6486
|
+
const profilesDir = join7(configDir, "profiles");
|
|
6487
|
+
if (!existsSync7(profilesDir))
|
|
6384
6488
|
continue;
|
|
6385
6489
|
try {
|
|
6386
6490
|
for (const entry of readdirSync5(profilesDir)) {
|
|
6387
|
-
const fullPath =
|
|
6491
|
+
const fullPath = join7(profilesDir, entry);
|
|
6388
6492
|
const stat = statSync3(fullPath);
|
|
6389
6493
|
if (stat.isDirectory()) {
|
|
6390
6494
|
seen.add(entry);
|
|
@@ -6406,11 +6510,11 @@ function createProfile(profile, config2 = {}) {
|
|
|
6406
6510
|
}
|
|
6407
6511
|
function clearProfile(profile = getCurrentProfile()) {
|
|
6408
6512
|
const flatPath = getFlatProfilePath(profile);
|
|
6409
|
-
const directoryPath =
|
|
6410
|
-
if (
|
|
6513
|
+
const directoryPath = join7(getProfilesDir(), profile);
|
|
6514
|
+
if (existsSync7(flatPath)) {
|
|
6411
6515
|
rmSync(flatPath);
|
|
6412
6516
|
}
|
|
6413
|
-
if (
|
|
6517
|
+
if (existsSync7(directoryPath)) {
|
|
6414
6518
|
rmSync(directoryPath, { recursive: true, force: true });
|
|
6415
6519
|
}
|
|
6416
6520
|
}
|
|
@@ -7043,7 +7147,7 @@ API Key authentication is optional and depends on the bridge deployment. A bridg
|
|
|
7043
7147
|
|
|
7044
7148
|
## Data Storage
|
|
7045
7149
|
|
|
7046
|
-
Connector state is stored under \`~/.hasna/connectors/imessage/\`. Profiles are read from both \`profiles/<name>.json\` and \`profiles/<name>/config.json\` so the connector stays compatible with the shared
|
|
7150
|
+
Connector state is stored under \`~/.hasna/connectors/imessage/\`. Profiles are read from both \`profiles/<name>.json\` and \`profiles/<name>/config.json\` so the connector stays compatible with the shared auth helpers while remaining fully internal to the one-product repo.
|
|
7047
7151
|
`, commandInputSchema, conversationListInputSchema, conversationGetInputSchema, messageListInputSchema, messageSendInputSchema, messageReplyInputSchema, imessageConnector;
|
|
7048
7152
|
var init_imessage = __esm(() => {
|
|
7049
7153
|
init_package();
|
|
@@ -7336,18 +7440,18 @@ var init_imessage = __esm(() => {
|
|
|
7336
7440
|
});
|
|
7337
7441
|
|
|
7338
7442
|
// src/core/connectors/stripe.ts
|
|
7339
|
-
import { existsSync as
|
|
7340
|
-
import { dirname as dirname3, join as
|
|
7443
|
+
import { existsSync as existsSync8 } from "fs";
|
|
7444
|
+
import { dirname as dirname3, join as join8 } from "path";
|
|
7341
7445
|
import { fileURLToPath as fileURLToPath2, pathToFileURL as pathToFileURL2 } from "url";
|
|
7342
7446
|
function resolveStripeConnectorDir() {
|
|
7343
7447
|
const candidates = [
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7448
|
+
join8(__dirname3, "..", "..", "..", "connectors", "stripe"),
|
|
7449
|
+
join8(__dirname3, "..", "..", "connectors", "stripe"),
|
|
7450
|
+
join8(__dirname3, "..", "connectors", "stripe"),
|
|
7451
|
+
join8(process.cwd(), "connectors", "stripe")
|
|
7348
7452
|
];
|
|
7349
7453
|
for (const candidate of candidates) {
|
|
7350
|
-
if (
|
|
7454
|
+
if (existsSync8(candidate)) {
|
|
7351
7455
|
return candidate;
|
|
7352
7456
|
}
|
|
7353
7457
|
}
|
|
@@ -7395,10 +7499,10 @@ function buildCommandHelp2(spec) {
|
|
|
7395
7499
|
`);
|
|
7396
7500
|
}
|
|
7397
7501
|
async function loadStripeApiModule() {
|
|
7398
|
-
return await import(pathToFileURL2(
|
|
7502
|
+
return await import(pathToFileURL2(join8(CONNECTOR_DIR2, "src", "api", "index.ts")).href);
|
|
7399
7503
|
}
|
|
7400
7504
|
async function loadStripeConfigModule() {
|
|
7401
|
-
return await import(pathToFileURL2(
|
|
7505
|
+
return await import(pathToFileURL2(join8(CONNECTOR_DIR2, "src", "utils", "config.ts")).href);
|
|
7402
7506
|
}
|
|
7403
7507
|
function extractGlobalArgs3(args) {
|
|
7404
7508
|
const remaining = [];
|
|
@@ -11119,7 +11223,7 @@ var require_compile = __commonJS((exports) => {
|
|
|
11119
11223
|
const schOrFunc = root.refs[ref];
|
|
11120
11224
|
if (schOrFunc)
|
|
11121
11225
|
return schOrFunc;
|
|
11122
|
-
let _sch =
|
|
11226
|
+
let _sch = resolve2.call(this, root, ref);
|
|
11123
11227
|
if (_sch === undefined) {
|
|
11124
11228
|
const schema = (_a = root.localRefs) === null || _a === undefined ? undefined : _a[ref];
|
|
11125
11229
|
const { schemaId } = this.opts;
|
|
@@ -11146,7 +11250,7 @@ var require_compile = __commonJS((exports) => {
|
|
|
11146
11250
|
function sameSchemaEnv(s1, s2) {
|
|
11147
11251
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
11148
11252
|
}
|
|
11149
|
-
function
|
|
11253
|
+
function resolve2(root, ref) {
|
|
11150
11254
|
let sch;
|
|
11151
11255
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
11152
11256
|
ref = sch;
|
|
@@ -11235,13 +11339,32 @@ var require_data = __commonJS((exports, module) => {
|
|
|
11235
11339
|
};
|
|
11236
11340
|
});
|
|
11237
11341
|
|
|
11238
|
-
// ../../node_modules/.bun/fast-uri@3.1.
|
|
11342
|
+
// ../../node_modules/.bun/fast-uri@3.1.7/node_modules/fast-uri/lib/utils.js
|
|
11239
11343
|
var require_utils = __commonJS((exports, module) => {
|
|
11240
11344
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
11241
11345
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
11346
|
+
var isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
11242
11347
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
11243
11348
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
11244
|
-
var isPathCharacter = RegExp.prototype.test.bind(/^[
|
|
11349
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
11350
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
11351
|
+
var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
11352
|
+
var BYTE_HEX = new Array(256);
|
|
11353
|
+
{
|
|
11354
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
11355
|
+
for (let i = 0;i < 256; i++) {
|
|
11356
|
+
BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
|
|
11357
|
+
}
|
|
11358
|
+
}
|
|
11359
|
+
function percentEncodeNonAscii(cp) {
|
|
11360
|
+
if (cp < 2048) {
|
|
11361
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
11362
|
+
}
|
|
11363
|
+
if (cp < 65536) {
|
|
11364
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
11365
|
+
}
|
|
11366
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
11367
|
+
}
|
|
11245
11368
|
function stringArrayToHexStripped(input) {
|
|
11246
11369
|
let acc = "";
|
|
11247
11370
|
let code = 0;
|
|
@@ -11266,91 +11389,122 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11266
11389
|
}
|
|
11267
11390
|
return acc;
|
|
11268
11391
|
}
|
|
11392
|
+
var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
11393
|
+
var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
11394
|
+
var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
11269
11395
|
var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
11270
|
-
function
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
} else {
|
|
11280
|
-
output.error = true;
|
|
11281
|
-
return false;
|
|
11396
|
+
function isZoneIdentifier(zone) {
|
|
11397
|
+
if (zone.length === 0)
|
|
11398
|
+
return false;
|
|
11399
|
+
for (let i = 0;i < zone.length; i++) {
|
|
11400
|
+
if (isZoneCharacter(zone[i]))
|
|
11401
|
+
continue;
|
|
11402
|
+
if (zone[i] === "%" && i + 2 < zone.length && isHexPair(zone.slice(i + 1, i + 3))) {
|
|
11403
|
+
i += 2;
|
|
11404
|
+
continue;
|
|
11282
11405
|
}
|
|
11283
|
-
|
|
11406
|
+
return false;
|
|
11284
11407
|
}
|
|
11285
11408
|
return true;
|
|
11286
11409
|
}
|
|
11287
|
-
function
|
|
11288
|
-
let
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
let
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
if (cursor === ":") {
|
|
11301
|
-
if (endipv6Encountered === true) {
|
|
11302
|
-
endIpv6 = true;
|
|
11303
|
-
}
|
|
11304
|
-
if (!consume(buffer, address, output)) {
|
|
11305
|
-
break;
|
|
11410
|
+
function compressIPv6ZeroRun(hextets) {
|
|
11411
|
+
let bestStart = -1;
|
|
11412
|
+
let bestLength = 0;
|
|
11413
|
+
let runStart = -1;
|
|
11414
|
+
let runLength = 0;
|
|
11415
|
+
for (let i = 0;i < hextets.length; i++) {
|
|
11416
|
+
if (hextets[i] === "0") {
|
|
11417
|
+
if (runStart === -1)
|
|
11418
|
+
runStart = i;
|
|
11419
|
+
runLength++;
|
|
11420
|
+
if (runLength > bestLength) {
|
|
11421
|
+
bestLength = runLength;
|
|
11422
|
+
bestStart = runStart;
|
|
11306
11423
|
}
|
|
11307
|
-
if (++tokenCount > 7) {
|
|
11308
|
-
output.error = true;
|
|
11309
|
-
break;
|
|
11310
|
-
}
|
|
11311
|
-
if (i > 0 && input[i - 1] === ":") {
|
|
11312
|
-
endipv6Encountered = true;
|
|
11313
|
-
}
|
|
11314
|
-
address.push(":");
|
|
11315
|
-
continue;
|
|
11316
|
-
} else if (cursor === "%") {
|
|
11317
|
-
if (!consume(buffer, address, output)) {
|
|
11318
|
-
break;
|
|
11319
|
-
}
|
|
11320
|
-
consume = consumeIsZone;
|
|
11321
11424
|
} else {
|
|
11322
|
-
|
|
11323
|
-
|
|
11425
|
+
runStart = -1;
|
|
11426
|
+
runLength = 0;
|
|
11324
11427
|
}
|
|
11325
11428
|
}
|
|
11326
|
-
if (
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11429
|
+
if (bestLength < 2)
|
|
11430
|
+
return hextets.join(":");
|
|
11431
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
11432
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
11433
|
+
return head + "::" + tail;
|
|
11434
|
+
}
|
|
11435
|
+
function normalizeIPv6Address(input) {
|
|
11436
|
+
const compression = input.indexOf("::");
|
|
11437
|
+
if (compression !== -1 && input.indexOf("::", compression + 1) !== -1)
|
|
11438
|
+
return;
|
|
11439
|
+
const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
|
|
11440
|
+
const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
|
|
11441
|
+
if (compression !== -1) {
|
|
11442
|
+
if (left.length === 1 && left[0] === "")
|
|
11443
|
+
left.length = 0;
|
|
11444
|
+
if (right.length === 1 && right[0] === "")
|
|
11445
|
+
right.length = 0;
|
|
11446
|
+
}
|
|
11447
|
+
const parts = left.concat(right);
|
|
11448
|
+
let hextetCount = 0;
|
|
11449
|
+
for (let i = 0;i < parts.length; i++) {
|
|
11450
|
+
const part = parts[i];
|
|
11451
|
+
if (part === "")
|
|
11452
|
+
return;
|
|
11453
|
+
if (part.indexOf(".") !== -1) {
|
|
11454
|
+
if (i !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part))
|
|
11455
|
+
return;
|
|
11456
|
+
hextetCount += 2;
|
|
11457
|
+
continue;
|
|
11333
11458
|
}
|
|
11459
|
+
if (!isHextet(part))
|
|
11460
|
+
return;
|
|
11461
|
+
parts[i] = parseInt(part, 16).toString(16);
|
|
11462
|
+
hextetCount++;
|
|
11334
11463
|
}
|
|
11335
|
-
|
|
11336
|
-
|
|
11464
|
+
if (compression === -1) {
|
|
11465
|
+
if (hextetCount !== 8)
|
|
11466
|
+
return;
|
|
11467
|
+
return compressIPv6ZeroRun(parts);
|
|
11468
|
+
}
|
|
11469
|
+
if (hextetCount >= 8)
|
|
11470
|
+
return;
|
|
11471
|
+
const expanded = parts.slice(0, left.length);
|
|
11472
|
+
for (let i = hextetCount;i < 8; i++)
|
|
11473
|
+
expanded.push("0");
|
|
11474
|
+
for (let i = left.length;i < parts.length; i++)
|
|
11475
|
+
expanded.push(parts[i]);
|
|
11476
|
+
return compressIPv6ZeroRun(expanded);
|
|
11337
11477
|
}
|
|
11338
11478
|
function normalizeIPv6(host) {
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
}
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11479
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
11480
|
+
const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
|
|
11481
|
+
if (hasBracket && !bracketed)
|
|
11482
|
+
return { host, isIPV6: false, error: true };
|
|
11483
|
+
let input = bracketed ? host.slice(1, -1) : host;
|
|
11484
|
+
if (bracketed && isIPvFuture(input)) {
|
|
11485
|
+
input = input.toLowerCase();
|
|
11486
|
+
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
11487
|
+
}
|
|
11488
|
+
if (findToken(input, ":") < 2) {
|
|
11489
|
+
return { host, isIPV6: false, error: bracketed };
|
|
11490
|
+
}
|
|
11491
|
+
let zoneIdentifier = "";
|
|
11492
|
+
const zoneSeparator = input.indexOf("%");
|
|
11493
|
+
if (zoneSeparator !== -1) {
|
|
11494
|
+
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
11495
|
+
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
11496
|
+
if (!isZoneIdentifier(zoneIdentifier))
|
|
11497
|
+
return { host, isIPV6: false, error: true };
|
|
11498
|
+
input = input.slice(0, zoneSeparator);
|
|
11499
|
+
}
|
|
11500
|
+
const address = normalizeIPv6Address(input);
|
|
11501
|
+
if (address === undefined)
|
|
11502
|
+
return { host, isIPV6: false, error: true };
|
|
11503
|
+
return {
|
|
11504
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
11505
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
11506
|
+
isIPV6: true
|
|
11507
|
+
};
|
|
11354
11508
|
}
|
|
11355
11509
|
function findToken(str, token) {
|
|
11356
11510
|
let ind = 0;
|
|
@@ -11470,7 +11624,8 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11470
11624
|
function normalizePathEncoding(input) {
|
|
11471
11625
|
let output = "";
|
|
11472
11626
|
for (let i = 0;i < input.length; i++) {
|
|
11473
|
-
|
|
11627
|
+
const ch = input[i];
|
|
11628
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
11474
11629
|
const hex = input.slice(i + 1, i + 3);
|
|
11475
11630
|
if (isHexPair(hex)) {
|
|
11476
11631
|
const normalizedHex = hex.toUpperCase();
|
|
@@ -11484,10 +11639,152 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11484
11639
|
continue;
|
|
11485
11640
|
}
|
|
11486
11641
|
}
|
|
11487
|
-
if (isPathCharacter(
|
|
11488
|
-
output +=
|
|
11642
|
+
if (isPathCharacter(ch)) {
|
|
11643
|
+
output += ch;
|
|
11489
11644
|
} else {
|
|
11490
|
-
|
|
11645
|
+
const code = input.charCodeAt(i);
|
|
11646
|
+
if (code < 128) {
|
|
11647
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
11648
|
+
} else if (code < 55296 || code > 57343) {
|
|
11649
|
+
output += percentEncodeNonAscii(code);
|
|
11650
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
11651
|
+
const low = input.charCodeAt(i + 1);
|
|
11652
|
+
if (low >= 56320 && low <= 57343) {
|
|
11653
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
11654
|
+
i++;
|
|
11655
|
+
} else {
|
|
11656
|
+
output += percentEncodeNonAscii(65533);
|
|
11657
|
+
}
|
|
11658
|
+
} else {
|
|
11659
|
+
output += percentEncodeNonAscii(65533);
|
|
11660
|
+
}
|
|
11661
|
+
}
|
|
11662
|
+
}
|
|
11663
|
+
return output;
|
|
11664
|
+
}
|
|
11665
|
+
function serializePathEncoding(input, pathNoScheme = false) {
|
|
11666
|
+
let output = "";
|
|
11667
|
+
let firstSegment = pathNoScheme && input[0] !== "/";
|
|
11668
|
+
for (let i = 0;i < input.length; i++) {
|
|
11669
|
+
const ch = input[i];
|
|
11670
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
11671
|
+
const hex = input.slice(i + 1, i + 3);
|
|
11672
|
+
if (isHexPair(hex)) {
|
|
11673
|
+
output += "%" + hex.toUpperCase();
|
|
11674
|
+
i += 2;
|
|
11675
|
+
continue;
|
|
11676
|
+
}
|
|
11677
|
+
}
|
|
11678
|
+
if (ch === "/") {
|
|
11679
|
+
firstSegment = false;
|
|
11680
|
+
}
|
|
11681
|
+
if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
|
|
11682
|
+
output += ch;
|
|
11683
|
+
} else {
|
|
11684
|
+
const code = input.charCodeAt(i);
|
|
11685
|
+
if (code < 128) {
|
|
11686
|
+
output += BYTE_HEX[code];
|
|
11687
|
+
} else if (code < 55296 || code > 57343) {
|
|
11688
|
+
output += percentEncodeNonAscii(code);
|
|
11689
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
11690
|
+
const low = input.charCodeAt(i + 1);
|
|
11691
|
+
if (low >= 56320 && low <= 57343) {
|
|
11692
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
11693
|
+
i++;
|
|
11694
|
+
} else {
|
|
11695
|
+
output += percentEncodeNonAscii(65533);
|
|
11696
|
+
}
|
|
11697
|
+
} else {
|
|
11698
|
+
output += percentEncodeNonAscii(65533);
|
|
11699
|
+
}
|
|
11700
|
+
}
|
|
11701
|
+
}
|
|
11702
|
+
return output;
|
|
11703
|
+
}
|
|
11704
|
+
function encodeComponent(input, isAllowed) {
|
|
11705
|
+
let output = "";
|
|
11706
|
+
for (let i = 0;i < input.length; i++) {
|
|
11707
|
+
const ch = input[i];
|
|
11708
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
11709
|
+
const hex = input.slice(i + 1, i + 3);
|
|
11710
|
+
if (isHexPair(hex)) {
|
|
11711
|
+
output += "%" + hex.toUpperCase();
|
|
11712
|
+
i += 2;
|
|
11713
|
+
continue;
|
|
11714
|
+
}
|
|
11715
|
+
}
|
|
11716
|
+
if (isAllowed(ch)) {
|
|
11717
|
+
output += ch;
|
|
11718
|
+
} else {
|
|
11719
|
+
const code = input.charCodeAt(i);
|
|
11720
|
+
if (code < 128) {
|
|
11721
|
+
output += BYTE_HEX[code];
|
|
11722
|
+
} else if (code < 55296 || code > 57343) {
|
|
11723
|
+
output += percentEncodeNonAscii(code);
|
|
11724
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
11725
|
+
const low = input.charCodeAt(i + 1);
|
|
11726
|
+
if (low >= 56320 && low <= 57343) {
|
|
11727
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
11728
|
+
i++;
|
|
11729
|
+
} else {
|
|
11730
|
+
output += percentEncodeNonAscii(65533);
|
|
11731
|
+
}
|
|
11732
|
+
} else {
|
|
11733
|
+
output += percentEncodeNonAscii(65533);
|
|
11734
|
+
}
|
|
11735
|
+
}
|
|
11736
|
+
}
|
|
11737
|
+
return output;
|
|
11738
|
+
}
|
|
11739
|
+
function encodeUserinfo(input) {
|
|
11740
|
+
return encodeComponent(input, isUserinfoCharacter);
|
|
11741
|
+
}
|
|
11742
|
+
function encodeQuery(input) {
|
|
11743
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
11744
|
+
}
|
|
11745
|
+
function encodeFragment(input) {
|
|
11746
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
11747
|
+
}
|
|
11748
|
+
function isEscapeSafe(cp) {
|
|
11749
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
11750
|
+
}
|
|
11751
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
11752
|
+
let output = "";
|
|
11753
|
+
for (let i = 0;i < input.length; i++) {
|
|
11754
|
+
const ch = input[i];
|
|
11755
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
11756
|
+
const hex = input.slice(i + 1, i + 3);
|
|
11757
|
+
if (isHexPair(hex)) {
|
|
11758
|
+
const normalizedHex = hex.toUpperCase();
|
|
11759
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
11760
|
+
if (isUnreserved(decoded)) {
|
|
11761
|
+
output += decoded;
|
|
11762
|
+
} else {
|
|
11763
|
+
output += "%" + normalizedHex;
|
|
11764
|
+
}
|
|
11765
|
+
i += 2;
|
|
11766
|
+
continue;
|
|
11767
|
+
}
|
|
11768
|
+
}
|
|
11769
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
11770
|
+
output += ch;
|
|
11771
|
+
} else {
|
|
11772
|
+
const code = input.charCodeAt(i);
|
|
11773
|
+
if (code < 128) {
|
|
11774
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
11775
|
+
} else if (code < 55296 || code > 57343) {
|
|
11776
|
+
output += percentEncodeNonAscii(code);
|
|
11777
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
11778
|
+
const low = input.charCodeAt(i + 1);
|
|
11779
|
+
if (low >= 56320 && low <= 57343) {
|
|
11780
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
11781
|
+
i++;
|
|
11782
|
+
} else {
|
|
11783
|
+
output += percentEncodeNonAscii(65533);
|
|
11784
|
+
}
|
|
11785
|
+
} else {
|
|
11786
|
+
output += percentEncodeNonAscii(65533);
|
|
11787
|
+
}
|
|
11491
11788
|
}
|
|
11492
11789
|
}
|
|
11493
11790
|
return output;
|
|
@@ -11510,14 +11807,18 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11510
11807
|
function recomposeAuthority(component) {
|
|
11511
11808
|
const uriTokens = [];
|
|
11512
11809
|
if (component.userinfo !== undefined) {
|
|
11513
|
-
uriTokens.push(component.userinfo);
|
|
11810
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
11514
11811
|
uriTokens.push("@");
|
|
11515
11812
|
}
|
|
11516
11813
|
if (component.host !== undefined) {
|
|
11517
|
-
let host =
|
|
11814
|
+
let host = component.host;
|
|
11518
11815
|
if (!isIPv4(host)) {
|
|
11519
|
-
|
|
11520
|
-
if (ipV6res.isIPV6
|
|
11816
|
+
let ipV6res = normalizeIPv6(host);
|
|
11817
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
11818
|
+
host = normalizePercentEncoding(host, true);
|
|
11819
|
+
ipV6res = normalizeIPv6(host);
|
|
11820
|
+
}
|
|
11821
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
11521
11822
|
host = `[${ipV6res.escapedHost}]`;
|
|
11522
11823
|
} else {
|
|
11523
11824
|
host = reescapeHostDelimiters(host, false);
|
|
@@ -11526,8 +11827,12 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11526
11827
|
uriTokens.push(host);
|
|
11527
11828
|
}
|
|
11528
11829
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
11830
|
+
const port = String(component.port);
|
|
11831
|
+
if (!isPort(port)) {
|
|
11832
|
+
throw new TypeError("URI port is malformed.");
|
|
11833
|
+
}
|
|
11529
11834
|
uriTokens.push(":");
|
|
11530
|
-
uriTokens.push(
|
|
11835
|
+
uriTokens.push(port);
|
|
11531
11836
|
}
|
|
11532
11837
|
return uriTokens.length ? uriTokens.join("") : undefined;
|
|
11533
11838
|
}
|
|
@@ -11537,6 +11842,11 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11537
11842
|
reescapeHostDelimiters,
|
|
11538
11843
|
normalizePercentEncoding,
|
|
11539
11844
|
normalizePathEncoding,
|
|
11845
|
+
serializePathEncoding,
|
|
11846
|
+
normalizeQueryFragmentEncoding,
|
|
11847
|
+
encodeUserinfo,
|
|
11848
|
+
encodeQuery,
|
|
11849
|
+
encodeFragment,
|
|
11540
11850
|
escapePreservingEscapes,
|
|
11541
11851
|
removeDotSegments,
|
|
11542
11852
|
isIPv4,
|
|
@@ -11546,10 +11856,10 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
11546
11856
|
};
|
|
11547
11857
|
});
|
|
11548
11858
|
|
|
11549
|
-
// ../../node_modules/.bun/fast-uri@3.1.
|
|
11859
|
+
// ../../node_modules/.bun/fast-uri@3.1.7/node_modules/fast-uri/lib/schemes.js
|
|
11550
11860
|
var require_schemes = __commonJS((exports, module) => {
|
|
11551
11861
|
var { isUUID } = require_utils();
|
|
11552
|
-
var URN_REG =
|
|
11862
|
+
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
11553
11863
|
var supportedSchemeNames = [
|
|
11554
11864
|
"http",
|
|
11555
11865
|
"https",
|
|
@@ -11604,9 +11914,10 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
11604
11914
|
wsComponent.secure = undefined;
|
|
11605
11915
|
}
|
|
11606
11916
|
if (wsComponent.resourceName) {
|
|
11607
|
-
const
|
|
11917
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
11918
|
+
const path = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
11608
11919
|
wsComponent.path = path && path !== "/" ? path : undefined;
|
|
11609
|
-
wsComponent.query =
|
|
11920
|
+
wsComponent.query = queryIndex === -1 ? undefined : wsComponent.resourceName.slice(queryIndex + 1);
|
|
11610
11921
|
wsComponent.resourceName = undefined;
|
|
11611
11922
|
}
|
|
11612
11923
|
wsComponent.fragment = undefined;
|
|
@@ -11618,7 +11929,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
11618
11929
|
return urnComponent;
|
|
11619
11930
|
}
|
|
11620
11931
|
const matches = urnComponent.path.match(URN_REG);
|
|
11621
|
-
if (matches) {
|
|
11932
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
11622
11933
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
11623
11934
|
urnComponent.nid = matches[1].toLowerCase();
|
|
11624
11935
|
urnComponent.nss = matches[2];
|
|
@@ -11720,10 +12031,19 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
11720
12031
|
};
|
|
11721
12032
|
});
|
|
11722
12033
|
|
|
11723
|
-
// ../../node_modules/.bun/fast-uri@3.1.
|
|
12034
|
+
// ../../node_modules/.bun/fast-uri@3.1.7/node_modules/fast-uri/index.js
|
|
11724
12035
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
11725
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding,
|
|
12036
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
11726
12037
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
12038
|
+
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
12039
|
+
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
12040
|
+
function decodeValidScheme(scheme) {
|
|
12041
|
+
const decodedScheme = unescape(String(scheme));
|
|
12042
|
+
if (!VALID_SCHEME.test(decodedScheme)) {
|
|
12043
|
+
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
12044
|
+
}
|
|
12045
|
+
return decodedScheme;
|
|
12046
|
+
}
|
|
11727
12047
|
function normalize(uri, options) {
|
|
11728
12048
|
if (typeof uri === "string") {
|
|
11729
12049
|
uri = normalizeString(uri, options);
|
|
@@ -11732,14 +12052,36 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11732
12052
|
}
|
|
11733
12053
|
return uri;
|
|
11734
12054
|
}
|
|
11735
|
-
function
|
|
12055
|
+
function resolve2(baseURI, relativeURI, options) {
|
|
11736
12056
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
11737
|
-
const {
|
|
11738
|
-
|
|
11739
|
-
|
|
12057
|
+
const {
|
|
12058
|
+
parsed: baseParsed,
|
|
12059
|
+
malformedAuthorityOrPort: baseMalformed,
|
|
12060
|
+
malformedPercentEncoding: baseMalformedPercentEncoding,
|
|
12061
|
+
malformedSchemeSpecific: baseMalformedSchemeSpecific,
|
|
12062
|
+
malformedHost: baseMalformedHost,
|
|
12063
|
+
malformedScheme: baseMalformedScheme
|
|
12064
|
+
} = parseWithStatus(baseURI, schemelessOptions);
|
|
12065
|
+
const {
|
|
12066
|
+
parsed: relativeParsed,
|
|
12067
|
+
malformedAuthorityOrPort: relativeMalformed,
|
|
12068
|
+
malformedPercentEncoding: relativeMalformedPercentEncoding,
|
|
12069
|
+
malformedSchemeSpecific: relativeMalformedSchemeSpecific,
|
|
12070
|
+
malformedHost: relativeMalformedHost,
|
|
12071
|
+
malformedScheme: relativeMalformedScheme
|
|
12072
|
+
} = parseWithStatus(relativeURI, schemelessOptions);
|
|
12073
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
|
|
11740
12074
|
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
11741
12075
|
}
|
|
11742
12076
|
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
12077
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
12078
|
+
const resolvedHost = resolved.host;
|
|
12079
|
+
const resolvedHostIsIP = resolvedHost !== undefined && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
12080
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
12081
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
|
|
12082
|
+
if (resolved.error && !encodedASCIIHost) {
|
|
12083
|
+
throw new Error(resolved.error);
|
|
12084
|
+
}
|
|
11743
12085
|
schemelessOptions.skipEscape = true;
|
|
11744
12086
|
return serialize(resolved, schemelessOptions);
|
|
11745
12087
|
}
|
|
@@ -11799,7 +12141,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11799
12141
|
function equal(uriA, uriB, options) {
|
|
11800
12142
|
const normalizedA = normalizeComparableURI(uriA, options);
|
|
11801
12143
|
const normalizedB = normalizeComparableURI(uriB, options);
|
|
11802
|
-
return normalizedA !== undefined && normalizedB !== undefined && normalizedA
|
|
12144
|
+
return normalizedA !== undefined && normalizedB !== undefined && normalizedA === normalizedB;
|
|
11803
12145
|
}
|
|
11804
12146
|
function serialize(cmpts, opts) {
|
|
11805
12147
|
const component = {
|
|
@@ -11820,20 +12162,23 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11820
12162
|
};
|
|
11821
12163
|
const options = Object.assign({}, opts);
|
|
11822
12164
|
const uriTokens = [];
|
|
12165
|
+
if (component.scheme) {
|
|
12166
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
12167
|
+
}
|
|
11823
12168
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
11824
12169
|
if (schemeHandler && schemeHandler.serialize)
|
|
11825
12170
|
schemeHandler.serialize(component, options);
|
|
12171
|
+
const hasAuthority = component.userinfo !== undefined || component.host !== undefined || component.port !== undefined;
|
|
12172
|
+
const pathNoScheme = !options.skipEscape && component.scheme === undefined && !hasAuthority;
|
|
11826
12173
|
if (component.path !== undefined) {
|
|
11827
12174
|
if (!options.skipEscape) {
|
|
11828
|
-
component.path =
|
|
11829
|
-
if (component.scheme !== undefined) {
|
|
11830
|
-
component.path = component.path.split("%3A").join(":");
|
|
11831
|
-
}
|
|
12175
|
+
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
11832
12176
|
} else {
|
|
11833
12177
|
component.path = normalizePercentEncoding(component.path);
|
|
11834
12178
|
}
|
|
11835
12179
|
}
|
|
11836
12180
|
if (options.reference !== "suffix" && component.scheme) {
|
|
12181
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
11837
12182
|
uriTokens.push(component.scheme, ":");
|
|
11838
12183
|
}
|
|
11839
12184
|
const authority = recomposeAuthority(component);
|
|
@@ -11851,16 +12196,19 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11851
12196
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
11852
12197
|
s = removeDotSegments(s);
|
|
11853
12198
|
}
|
|
12199
|
+
if (pathNoScheme) {
|
|
12200
|
+
s = serializePathEncoding(s, true);
|
|
12201
|
+
}
|
|
11854
12202
|
if (authority === undefined && s[0] === "/" && s[1] === "/") {
|
|
11855
12203
|
s = "/%2F" + s.slice(2);
|
|
11856
12204
|
}
|
|
11857
12205
|
uriTokens.push(s);
|
|
11858
12206
|
}
|
|
11859
12207
|
if (component.query !== undefined) {
|
|
11860
|
-
uriTokens.push("?", component.query);
|
|
12208
|
+
uriTokens.push("?", encodeQuery(component.query));
|
|
11861
12209
|
}
|
|
11862
12210
|
if (component.fragment !== undefined) {
|
|
11863
|
-
uriTokens.push("#", component.fragment);
|
|
12211
|
+
uriTokens.push("#", encodeFragment(component.fragment));
|
|
11864
12212
|
}
|
|
11865
12213
|
return uriTokens.join("");
|
|
11866
12214
|
}
|
|
@@ -11876,6 +12224,36 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11876
12224
|
}
|
|
11877
12225
|
return;
|
|
11878
12226
|
}
|
|
12227
|
+
function hasMalformedPercentEncoding(component) {
|
|
12228
|
+
if (component === undefined)
|
|
12229
|
+
return false;
|
|
12230
|
+
let percent = component.indexOf("%");
|
|
12231
|
+
while (percent !== -1) {
|
|
12232
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
|
|
12233
|
+
return true;
|
|
12234
|
+
}
|
|
12235
|
+
percent = component.indexOf("%", percent + 3);
|
|
12236
|
+
}
|
|
12237
|
+
return false;
|
|
12238
|
+
}
|
|
12239
|
+
function isIPLiteral(host) {
|
|
12240
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
12241
|
+
}
|
|
12242
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
12243
|
+
const host = matches[4];
|
|
12244
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== undefined && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
12245
|
+
}
|
|
12246
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
12247
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
12248
|
+
try {
|
|
12249
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
12250
|
+
} catch (e) {
|
|
12251
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
12252
|
+
return true;
|
|
12253
|
+
}
|
|
12254
|
+
}
|
|
12255
|
+
return false;
|
|
12256
|
+
}
|
|
11879
12257
|
function parseWithStatus(uri, opts) {
|
|
11880
12258
|
const options = Object.assign({}, opts);
|
|
11881
12259
|
const parsed = {
|
|
@@ -11888,6 +12266,11 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11888
12266
|
fragment: undefined
|
|
11889
12267
|
};
|
|
11890
12268
|
let malformedAuthorityOrPort = false;
|
|
12269
|
+
let malformedPercentEncoding = false;
|
|
12270
|
+
let malformedSchemeSpecific = false;
|
|
12271
|
+
let malformedHost = false;
|
|
12272
|
+
let malformedIPLiteral = false;
|
|
12273
|
+
let malformedScheme = false;
|
|
11891
12274
|
let isIP = false;
|
|
11892
12275
|
if (options.reference === "suffix") {
|
|
11893
12276
|
if (options.scheme) {
|
|
@@ -11924,6 +12307,19 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11924
12307
|
parsed.path = matches[6] || "";
|
|
11925
12308
|
parsed.query = matches[7];
|
|
11926
12309
|
parsed.fragment = matches[8];
|
|
12310
|
+
if (parsed.scheme !== undefined) {
|
|
12311
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
12312
|
+
if (VALID_SCHEME.test(decodedScheme)) {
|
|
12313
|
+
parsed.scheme = decodedScheme.toLowerCase();
|
|
12314
|
+
} else {
|
|
12315
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
12316
|
+
malformedScheme = true;
|
|
12317
|
+
}
|
|
12318
|
+
}
|
|
12319
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
12320
|
+
if (malformedPercentEncoding) {
|
|
12321
|
+
parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
12322
|
+
}
|
|
11927
12323
|
if (isNaN(parsed.port)) {
|
|
11928
12324
|
parsed.port = matches[5];
|
|
11929
12325
|
}
|
|
@@ -11935,9 +12331,16 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11935
12331
|
if (parsed.host) {
|
|
11936
12332
|
const ipv4result = isIPv4(parsed.host);
|
|
11937
12333
|
if (ipv4result === false) {
|
|
12334
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
12335
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
11938
12336
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
11939
|
-
|
|
11940
|
-
|
|
12337
|
+
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
12338
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
12339
|
+
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
12340
|
+
if (malformedIPLiteral) {
|
|
12341
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
12342
|
+
malformedAuthorityOrPort = true;
|
|
12343
|
+
}
|
|
11941
12344
|
} else {
|
|
11942
12345
|
isIP = true;
|
|
11943
12346
|
}
|
|
@@ -11955,42 +12358,36 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11955
12358
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
11956
12359
|
}
|
|
11957
12360
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
11958
|
-
if (!
|
|
11959
|
-
|
|
11960
|
-
try {
|
|
11961
|
-
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
11962
|
-
} catch (e) {
|
|
11963
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
11964
|
-
}
|
|
11965
|
-
}
|
|
12361
|
+
if (!malformedIPLiteral) {
|
|
12362
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
11966
12363
|
}
|
|
11967
12364
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
11968
12365
|
if (uri.indexOf("%") !== -1) {
|
|
11969
|
-
if (parsed.
|
|
11970
|
-
parsed.
|
|
11971
|
-
|
|
11972
|
-
if (parsed.host !== undefined) {
|
|
11973
|
-
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
12366
|
+
if (parsed.host !== undefined && !malformedIPLiteral) {
|
|
12367
|
+
const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
12368
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
11974
12369
|
}
|
|
11975
12370
|
}
|
|
11976
12371
|
if (parsed.path) {
|
|
11977
12372
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
11978
12373
|
}
|
|
12374
|
+
if (parsed.query) {
|
|
12375
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
12376
|
+
}
|
|
11979
12377
|
if (parsed.fragment) {
|
|
11980
|
-
|
|
11981
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
11982
|
-
} catch {
|
|
11983
|
-
parsed.error = parsed.error || "URI malformed";
|
|
11984
|
-
}
|
|
12378
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
11985
12379
|
}
|
|
11986
12380
|
}
|
|
11987
12381
|
if (schemeHandler && schemeHandler.parse) {
|
|
11988
12382
|
schemeHandler.parse(parsed, options);
|
|
12383
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === undefined) {
|
|
12384
|
+
malformedSchemeSpecific = true;
|
|
12385
|
+
}
|
|
11989
12386
|
}
|
|
11990
12387
|
} else {
|
|
11991
12388
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
11992
12389
|
}
|
|
11993
|
-
return { parsed, malformedAuthorityOrPort };
|
|
12390
|
+
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
11994
12391
|
}
|
|
11995
12392
|
function parse6(uri, opts) {
|
|
11996
12393
|
return parseWithStatus(uri, opts).parsed;
|
|
@@ -11999,25 +12396,33 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
11999
12396
|
return normalizeStringWithStatus(uri, opts).normalized;
|
|
12000
12397
|
}
|
|
12001
12398
|
function normalizeStringWithStatus(uri, opts) {
|
|
12002
|
-
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
12399
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
12003
12400
|
return {
|
|
12004
|
-
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
12005
|
-
malformedAuthorityOrPort
|
|
12401
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
|
|
12402
|
+
malformedAuthorityOrPort,
|
|
12403
|
+
malformedPercentEncoding,
|
|
12404
|
+
malformedSchemeSpecific,
|
|
12405
|
+
malformedHost,
|
|
12406
|
+
malformedScheme
|
|
12006
12407
|
};
|
|
12007
12408
|
}
|
|
12008
12409
|
function normalizeComparableURI(uri, opts) {
|
|
12009
|
-
if (typeof uri
|
|
12010
|
-
|
|
12011
|
-
return malformedAuthorityOrPort ? undefined : normalized;
|
|
12410
|
+
if (typeof uri !== "string" && typeof uri !== "object") {
|
|
12411
|
+
return;
|
|
12012
12412
|
}
|
|
12013
|
-
|
|
12014
|
-
|
|
12413
|
+
let value;
|
|
12414
|
+
try {
|
|
12415
|
+
value = typeof uri === "string" ? uri : serialize(uri, opts);
|
|
12416
|
+
} catch {
|
|
12417
|
+
return;
|
|
12015
12418
|
}
|
|
12419
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
12420
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? undefined : normalized;
|
|
12016
12421
|
}
|
|
12017
12422
|
var fastUri = {
|
|
12018
12423
|
SCHEMES,
|
|
12019
12424
|
normalize,
|
|
12020
|
-
resolve,
|
|
12425
|
+
resolve: resolve2,
|
|
12021
12426
|
resolveComponent,
|
|
12022
12427
|
equal,
|
|
12023
12428
|
serialize,
|
|
@@ -14829,14 +15234,14 @@ __export(exports_llm, {
|
|
|
14829
15234
|
PROVIDER_DEFAULTS: () => PROVIDER_DEFAULTS,
|
|
14830
15235
|
LLMClient: () => LLMClient
|
|
14831
15236
|
});
|
|
14832
|
-
import { existsSync as
|
|
14833
|
-
import { join as
|
|
15237
|
+
import { existsSync as existsSync10, readFileSync as readFileSync5, writeFileSync as writeFileSync4, mkdirSync as mkdirSync5 } from "fs";
|
|
15238
|
+
import { join as join10 } from "path";
|
|
14834
15239
|
function getLlmConfigPath() {
|
|
14835
|
-
return
|
|
15240
|
+
return join10(getConnectorsHome(), "llm.json");
|
|
14836
15241
|
}
|
|
14837
15242
|
function getLlmConfig() {
|
|
14838
15243
|
const path = getLlmConfigPath();
|
|
14839
|
-
if (!
|
|
15244
|
+
if (!existsSync10(path))
|
|
14840
15245
|
return null;
|
|
14841
15246
|
try {
|
|
14842
15247
|
return JSON.parse(readFileSync5(path, "utf-8"));
|
|
@@ -14966,30 +15371,30 @@ __export(exports_installer, {
|
|
|
14966
15371
|
getConnectorDocs: () => getConnectorDocs,
|
|
14967
15372
|
connectorExists: () => connectorExists
|
|
14968
15373
|
});
|
|
14969
|
-
import { existsSync as
|
|
14970
|
-
import { join as
|
|
15374
|
+
import { existsSync as existsSync11, mkdirSync as mkdirSync6, readFileSync as readFileSync6, writeFileSync as writeFileSync5, readdirSync as readdirSync6, statSync as statSync4, rmSync as rmSync2 } from "fs";
|
|
15375
|
+
import { join as join11, dirname as dirname5 } from "path";
|
|
14971
15376
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
14972
15377
|
function resolveConnectorsDir() {
|
|
14973
|
-
const fromBin =
|
|
14974
|
-
if (
|
|
15378
|
+
const fromBin = join11(__dirname4, "..", "connectors");
|
|
15379
|
+
if (existsSync11(fromBin))
|
|
14975
15380
|
return fromBin;
|
|
14976
|
-
const fromSrc =
|
|
14977
|
-
if (
|
|
15381
|
+
const fromSrc = join11(__dirname4, "..", "..", "connectors");
|
|
15382
|
+
if (existsSync11(fromSrc))
|
|
14978
15383
|
return fromSrc;
|
|
14979
15384
|
return fromBin;
|
|
14980
15385
|
}
|
|
14981
15386
|
function getProjectConnectorsDir(targetDir) {
|
|
14982
|
-
return
|
|
15387
|
+
return join11(targetDir, PROJECT_CONNECTORS_DIRNAME);
|
|
14983
15388
|
}
|
|
14984
15389
|
function getEnablementManifestPath(targetDir) {
|
|
14985
|
-
return
|
|
15390
|
+
return join11(getProjectConnectorsDir(targetDir), ENABLEMENT_MANIFEST_FILENAME);
|
|
14986
15391
|
}
|
|
14987
15392
|
function getLegacyInstallPath(targetDir, name) {
|
|
14988
|
-
return
|
|
15393
|
+
return join11(getProjectConnectorsDir(targetDir), legacyConnectorName(name));
|
|
14989
15394
|
}
|
|
14990
15395
|
function loadEnablementManifest(targetDir) {
|
|
14991
15396
|
const manifestPath = getEnablementManifestPath(targetDir);
|
|
14992
|
-
if (!
|
|
15397
|
+
if (!existsSync11(manifestPath)) {
|
|
14993
15398
|
return null;
|
|
14994
15399
|
}
|
|
14995
15400
|
try {
|
|
@@ -15009,11 +15414,11 @@ function loadEnablementManifest(targetDir) {
|
|
|
15009
15414
|
}
|
|
15010
15415
|
function getLegacyInstalledConnectors(targetDir) {
|
|
15011
15416
|
const connectorsDir = getProjectConnectorsDir(targetDir);
|
|
15012
|
-
if (!
|
|
15417
|
+
if (!existsSync11(connectorsDir)) {
|
|
15013
15418
|
return [];
|
|
15014
15419
|
}
|
|
15015
15420
|
return readdirSync6(connectorsDir).filter((entry) => {
|
|
15016
|
-
const fullPath =
|
|
15421
|
+
const fullPath = join11(connectorsDir, entry);
|
|
15017
15422
|
return entry.startsWith("connect-") && statSync4(fullPath).isDirectory();
|
|
15018
15423
|
}).map((entry) => entry.replace("connect-", "")).sort();
|
|
15019
15424
|
}
|
|
@@ -15022,7 +15427,7 @@ function getEnabledConnectors(targetDir) {
|
|
|
15022
15427
|
return [...new Set([...manifestConnectors, ...getLegacyInstalledConnectors(targetDir)])].sort();
|
|
15023
15428
|
}
|
|
15024
15429
|
function updateConnectorsIndex(connectorsDir, connectors18) {
|
|
15025
|
-
const indexPath =
|
|
15430
|
+
const indexPath = join11(connectorsDir, ENABLEMENT_INDEX_FILENAME);
|
|
15026
15431
|
const connectorList = connectors18.map((connector) => ` "${connector}",`).join(`
|
|
15027
15432
|
`);
|
|
15028
15433
|
const content = `/**
|
|
@@ -15058,7 +15463,7 @@ function getConnectorPath(name) {
|
|
|
15058
15463
|
}
|
|
15059
15464
|
function connectorExists(name) {
|
|
15060
15465
|
const normalizedName = normalizeConnectorName(name);
|
|
15061
|
-
return hasInternalConnectorDefinition(normalizedName) ||
|
|
15466
|
+
return hasInternalConnectorDefinition(normalizedName) || existsSync11(getConnectorPath(normalizedName));
|
|
15062
15467
|
}
|
|
15063
15468
|
function installConnector(name, options = {}) {
|
|
15064
15469
|
const { targetDir = process.cwd(), overwrite = false } = options;
|
|
@@ -15091,7 +15496,7 @@ function installConnector(name, options = {}) {
|
|
|
15091
15496
|
try {
|
|
15092
15497
|
const nextEnabled = [...new Set([...installed, normalizedName])].sort();
|
|
15093
15498
|
writeEnablementManifest(targetDir, nextEnabled);
|
|
15094
|
-
if (overwrite &&
|
|
15499
|
+
if (overwrite && existsSync11(legacyInstallPath)) {
|
|
15095
15500
|
rmSync2(legacyInstallPath, { recursive: true });
|
|
15096
15501
|
}
|
|
15097
15502
|
return {
|
|
@@ -15126,8 +15531,8 @@ function parseConnectorDocs(raw) {
|
|
|
15126
15531
|
function getConnectorDocs(name) {
|
|
15127
15532
|
const normalizedName = normalizeConnectorName(name);
|
|
15128
15533
|
const connectorPath = getConnectorPath(normalizedName);
|
|
15129
|
-
const claudeMdPath =
|
|
15130
|
-
if (
|
|
15534
|
+
const claudeMdPath = join11(connectorPath, "CLAUDE.md");
|
|
15535
|
+
if (existsSync11(claudeMdPath)) {
|
|
15131
15536
|
return parseConnectorDocs(readFileSync6(claudeMdPath, "utf-8"));
|
|
15132
15537
|
}
|
|
15133
15538
|
const internalDocs = getInternalConnectorDefinition(normalizedName)?.docsMarkdown;
|
|
@@ -15172,7 +15577,7 @@ function removeConnector(name, targetDir = process.cwd()) {
|
|
|
15172
15577
|
const nextEnabled = installed.filter((connector) => connector !== normalizedName);
|
|
15173
15578
|
writeEnablementManifest(targetDir, nextEnabled);
|
|
15174
15579
|
const legacyInstallPath = getLegacyInstallPath(targetDir, normalizedName);
|
|
15175
|
-
if (
|
|
15580
|
+
if (existsSync11(legacyInstallPath)) {
|
|
15176
15581
|
rmSync2(legacyInstallPath, { recursive: true });
|
|
15177
15582
|
}
|
|
15178
15583
|
return true;
|
|
@@ -15255,7 +15660,7 @@ var init_usage = __esm(() => {
|
|
|
15255
15660
|
});
|
|
15256
15661
|
|
|
15257
15662
|
// src/lib/lock.ts
|
|
15258
|
-
import { openSync, closeSync, unlinkSync, existsSync as
|
|
15663
|
+
import { openSync, closeSync, unlinkSync, existsSync as existsSync12, statSync as statSync5 } from "fs";
|
|
15259
15664
|
import { mkdirSync as mkdirSync7 } from "fs";
|
|
15260
15665
|
function lockPath(connector) {
|
|
15261
15666
|
const dir = getConnectorConfigDir(connector);
|
|
@@ -15271,7 +15676,7 @@ function isStale(path) {
|
|
|
15271
15676
|
}
|
|
15272
15677
|
}
|
|
15273
15678
|
function tryAcquire(path) {
|
|
15274
|
-
if (
|
|
15679
|
+
if (existsSync12(path) && isStale(path)) {
|
|
15275
15680
|
try {
|
|
15276
15681
|
unlinkSync(path);
|
|
15277
15682
|
} catch {}
|
|
@@ -15303,7 +15708,7 @@ async function withWriteLock(connector, fn) {
|
|
|
15303
15708
|
release(path);
|
|
15304
15709
|
}
|
|
15305
15710
|
}
|
|
15306
|
-
await new Promise((
|
|
15711
|
+
await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
|
|
15307
15712
|
}
|
|
15308
15713
|
throw new LockTimeoutError(connector);
|
|
15309
15714
|
}
|
|
@@ -15321,8 +15726,8 @@ var init_lock = __esm(() => {
|
|
|
15321
15726
|
});
|
|
15322
15727
|
|
|
15323
15728
|
// src/server/auth.ts
|
|
15324
|
-
import { chmodSync, existsSync as
|
|
15325
|
-
import { join as
|
|
15729
|
+
import { chmodSync, existsSync as existsSync13, readFileSync as readFileSync7, writeFileSync as writeFileSync6, mkdirSync as mkdirSync8, readdirSync as readdirSync7, rmSync as rmSync3, statSync as statSync6 } from "fs";
|
|
15730
|
+
import { join as join12 } from "path";
|
|
15326
15731
|
function getAuthType(name) {
|
|
15327
15732
|
name = normalizeConnectorName(name);
|
|
15328
15733
|
const docs = getConnectorDocs(name);
|
|
@@ -15359,8 +15764,8 @@ function writePrivateJson(path, data) {
|
|
|
15359
15764
|
function getCurrentProfile2(name) {
|
|
15360
15765
|
name = normalizeConnectorName(name);
|
|
15361
15766
|
for (const configDir of getConnectorConfigReadDirs2(name)) {
|
|
15362
|
-
const currentProfileFile =
|
|
15363
|
-
if (
|
|
15767
|
+
const currentProfileFile = join12(configDir, "current_profile");
|
|
15768
|
+
if (existsSync13(currentProfileFile)) {
|
|
15364
15769
|
try {
|
|
15365
15770
|
return readFileSync7(currentProfileFile, "utf-8").trim() || "default";
|
|
15366
15771
|
} catch {
|
|
@@ -15373,14 +15778,14 @@ function getCurrentProfile2(name) {
|
|
|
15373
15778
|
function loadProfileConfigFromDir(configDir, profile) {
|
|
15374
15779
|
let flatConfig = {};
|
|
15375
15780
|
let dirConfig = {};
|
|
15376
|
-
const profileFile =
|
|
15377
|
-
if (
|
|
15781
|
+
const profileFile = join12(configDir, "profiles", `${profile}.json`);
|
|
15782
|
+
if (existsSync13(profileFile)) {
|
|
15378
15783
|
try {
|
|
15379
15784
|
flatConfig = JSON.parse(readFileSync7(profileFile, "utf-8"));
|
|
15380
15785
|
} catch {}
|
|
15381
15786
|
}
|
|
15382
|
-
const profileDirConfig =
|
|
15383
|
-
if (
|
|
15787
|
+
const profileDirConfig = join12(configDir, "profiles", profile, "config.json");
|
|
15788
|
+
if (existsSync13(profileDirConfig)) {
|
|
15384
15789
|
try {
|
|
15385
15790
|
dirConfig = JSON.parse(readFileSync7(profileDirConfig, "utf-8"));
|
|
15386
15791
|
} catch {}
|
|
@@ -15400,8 +15805,8 @@ function loadTokens3(name) {
|
|
|
15400
15805
|
name = normalizeConnectorName(name);
|
|
15401
15806
|
const profile = getCurrentProfile2(name);
|
|
15402
15807
|
for (const configDir of getConnectorConfigReadDirs2(name)) {
|
|
15403
|
-
const tokensFile =
|
|
15404
|
-
if (
|
|
15808
|
+
const tokensFile = join12(configDir, "profiles", profile, "tokens.json");
|
|
15809
|
+
if (existsSync13(tokensFile)) {
|
|
15405
15810
|
try {
|
|
15406
15811
|
return JSON.parse(readFileSync7(tokensFile, "utf-8"));
|
|
15407
15812
|
} catch {
|
|
@@ -15534,10 +15939,10 @@ function _saveApiKey(name, key, field) {
|
|
|
15534
15939
|
const profile = getCurrentProfile2(name);
|
|
15535
15940
|
const keyField = field || guessKeyField(name);
|
|
15536
15941
|
if (keyField === "clientId" || keyField === "clientSecret") {
|
|
15537
|
-
const credentialsFile =
|
|
15942
|
+
const credentialsFile = join12(configDir, "credentials.json");
|
|
15538
15943
|
ensurePrivateDir(configDir);
|
|
15539
15944
|
let creds = {};
|
|
15540
|
-
if (
|
|
15945
|
+
if (existsSync13(credentialsFile)) {
|
|
15541
15946
|
try {
|
|
15542
15947
|
creds = JSON.parse(readFileSync7(credentialsFile, "utf-8"));
|
|
15543
15948
|
} catch {}
|
|
@@ -15546,10 +15951,10 @@ function _saveApiKey(name, key, field) {
|
|
|
15546
15951
|
writePrivateJson(credentialsFile, creds);
|
|
15547
15952
|
return;
|
|
15548
15953
|
}
|
|
15549
|
-
const profilesDir =
|
|
15550
|
-
const profileFile =
|
|
15551
|
-
const profileDir =
|
|
15552
|
-
if (
|
|
15954
|
+
const profilesDir = join12(configDir, "profiles");
|
|
15955
|
+
const profileFile = join12(profilesDir, `${profile}.json`);
|
|
15956
|
+
const profileDir = join12(profilesDir, profile);
|
|
15957
|
+
if (existsSync13(profileFile)) {
|
|
15553
15958
|
let config2 = {};
|
|
15554
15959
|
try {
|
|
15555
15960
|
config2 = JSON.parse(readFileSync7(profileFile, "utf-8"));
|
|
@@ -15560,10 +15965,10 @@ function _saveApiKey(name, key, field) {
|
|
|
15560
15965
|
writePrivateJson(profileFile, config2);
|
|
15561
15966
|
return;
|
|
15562
15967
|
}
|
|
15563
|
-
if (
|
|
15564
|
-
const configFile =
|
|
15968
|
+
if (existsSync13(profileDir)) {
|
|
15969
|
+
const configFile = join12(profileDir, "config.json");
|
|
15565
15970
|
let config2 = {};
|
|
15566
|
-
if (
|
|
15971
|
+
if (existsSync13(configFile)) {
|
|
15567
15972
|
try {
|
|
15568
15973
|
config2 = JSON.parse(readFileSync7(configFile, "utf-8"));
|
|
15569
15974
|
} catch {}
|
|
@@ -15578,7 +15983,7 @@ function _saveApiKey(name, key, field) {
|
|
|
15578
15983
|
ensurePrivateDir(configDir);
|
|
15579
15984
|
ensurePrivateDir(profilesDir);
|
|
15580
15985
|
ensurePrivateDir(profileDir);
|
|
15581
|
-
writePrivateJson(
|
|
15986
|
+
writePrivateJson(join12(profileDir, "config.json"), { [keyField]: key });
|
|
15582
15987
|
}
|
|
15583
15988
|
function guessKeyField(name) {
|
|
15584
15989
|
name = normalizeConnectorName(name);
|
|
@@ -15600,8 +16005,8 @@ function guessKeyField(name) {
|
|
|
15600
16005
|
function getOAuthConfig(name) {
|
|
15601
16006
|
name = normalizeConnectorName(name);
|
|
15602
16007
|
for (const configDir of getConnectorConfigReadDirs2(name)) {
|
|
15603
|
-
const credentialsFile =
|
|
15604
|
-
if (
|
|
16008
|
+
const credentialsFile = join12(configDir, "credentials.json");
|
|
16009
|
+
if (existsSync13(credentialsFile)) {
|
|
15605
16010
|
try {
|
|
15606
16011
|
const creds = JSON.parse(readFileSync7(credentialsFile, "utf-8"));
|
|
15607
16012
|
return { clientId: creds.clientId, clientSecret: creds.clientSecret };
|
|
@@ -15618,12 +16023,12 @@ function saveOAuthTokens(name, tokens) {
|
|
|
15618
16023
|
name = normalizeConnectorName(name);
|
|
15619
16024
|
const configDir = getConnectorConfigDir2(name);
|
|
15620
16025
|
const profile = getCurrentProfile2(name);
|
|
15621
|
-
const profilesDir =
|
|
15622
|
-
const profileDir =
|
|
16026
|
+
const profilesDir = join12(configDir, "profiles");
|
|
16027
|
+
const profileDir = join12(profilesDir, profile);
|
|
15623
16028
|
ensurePrivateDir(configDir);
|
|
15624
16029
|
ensurePrivateDir(profilesDir);
|
|
15625
16030
|
ensurePrivateDir(profileDir);
|
|
15626
|
-
const tokensFile =
|
|
16031
|
+
const tokensFile = join12(profileDir, "tokens.json");
|
|
15627
16032
|
writePrivateJson(tokensFile, tokens);
|
|
15628
16033
|
}
|
|
15629
16034
|
async function refreshOAuthToken(name) {
|
|
@@ -15731,16 +16136,16 @@ __export(exports_runner, {
|
|
|
15731
16136
|
buildEnvWithCredentials: () => buildEnvWithCredentials,
|
|
15732
16137
|
buildConnectorOperationArgs: () => buildConnectorOperationArgs
|
|
15733
16138
|
});
|
|
15734
|
-
import { existsSync as
|
|
15735
|
-
import { join as
|
|
16139
|
+
import { existsSync as existsSync15, readdirSync as readdirSync8 } from "fs";
|
|
16140
|
+
import { join as join14, dirname as dirname6 } from "path";
|
|
15736
16141
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
15737
16142
|
import { spawn as spawn2 } from "child_process";
|
|
15738
16143
|
function resolveConnectorsDir2() {
|
|
15739
|
-
const fromBin =
|
|
15740
|
-
if (
|
|
16144
|
+
const fromBin = join14(__dirname5, "..", "connectors");
|
|
16145
|
+
if (existsSync15(fromBin))
|
|
15741
16146
|
return fromBin;
|
|
15742
|
-
const fromSrc =
|
|
15743
|
-
if (
|
|
16147
|
+
const fromSrc = join14(__dirname5, "..", "..", "connectors");
|
|
16148
|
+
if (existsSync15(fromSrc))
|
|
15744
16149
|
return fromSrc;
|
|
15745
16150
|
return fromBin;
|
|
15746
16151
|
}
|
|
@@ -15808,8 +16213,8 @@ function buildEnvWithCredentials(connectorName, baseEnv) {
|
|
|
15808
16213
|
function getConnectorCliPath(name) {
|
|
15809
16214
|
const safeName = normalizeConnectorName(name).replace(/[^a-z0-9-]/g, "");
|
|
15810
16215
|
const connectorDir = getConnectorPackagePath(CONNECTORS_DIR2, safeName);
|
|
15811
|
-
const cliPath =
|
|
15812
|
-
if (
|
|
16216
|
+
const cliPath = join14(connectorDir, "src", "cli", "index.ts");
|
|
16217
|
+
if (existsSync15(cliPath))
|
|
15813
16218
|
return cliPath;
|
|
15814
16219
|
return null;
|
|
15815
16220
|
}
|
|
@@ -16003,7 +16408,7 @@ function runLegacyConnectorCommand(name, args, timeoutMs = 30000) {
|
|
|
16003
16408
|
success: false
|
|
16004
16409
|
});
|
|
16005
16410
|
}
|
|
16006
|
-
return new Promise((
|
|
16411
|
+
return new Promise((resolve2) => {
|
|
16007
16412
|
const proc = spawn2("bun", ["run", cliPath, ...args], {
|
|
16008
16413
|
timeout: timeoutMs,
|
|
16009
16414
|
env: buildEnvWithCredentials(connectorName, process.env),
|
|
@@ -16018,7 +16423,7 @@ function runLegacyConnectorCommand(name, args, timeoutMs = 30000) {
|
|
|
16018
16423
|
stderr += data.toString();
|
|
16019
16424
|
});
|
|
16020
16425
|
proc.on("close", (code) => {
|
|
16021
|
-
|
|
16426
|
+
resolve2({
|
|
16022
16427
|
stdout: stdout.trim(),
|
|
16023
16428
|
stderr: stderr.trim(),
|
|
16024
16429
|
exitCode: code ?? 1,
|
|
@@ -16026,7 +16431,7 @@ function runLegacyConnectorCommand(name, args, timeoutMs = 30000) {
|
|
|
16026
16431
|
});
|
|
16027
16432
|
});
|
|
16028
16433
|
proc.on("error", (err) => {
|
|
16029
|
-
|
|
16434
|
+
resolve2({
|
|
16030
16435
|
stdout: "",
|
|
16031
16436
|
stderr: err.message,
|
|
16032
16437
|
exitCode: 1,
|
|
@@ -16225,7 +16630,7 @@ var require_content_type = __commonJS((exports) => {
|
|
|
16225
16630
|
}
|
|
16226
16631
|
});
|
|
16227
16632
|
|
|
16228
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
16633
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
16229
16634
|
import process2 from "process";
|
|
16230
16635
|
|
|
16231
16636
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/core.js
|
|
@@ -20683,7 +21088,7 @@ function preprocess(fn, schema) {
|
|
|
20683
21088
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/external.js
|
|
20684
21089
|
config(en_default());
|
|
20685
21090
|
|
|
20686
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
21091
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
20687
21092
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
20688
21093
|
var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
|
|
20689
21094
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
@@ -21530,7 +21935,7 @@ class UrlElicitationRequiredError extends McpError {
|
|
|
21530
21935
|
}
|
|
21531
21936
|
}
|
|
21532
21937
|
|
|
21533
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
21938
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
21534
21939
|
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
21535
21940
|
|
|
21536
21941
|
class ReadBuffer {
|
|
@@ -21570,7 +21975,7 @@ function serializeMessage(message) {
|
|
|
21570
21975
|
`;
|
|
21571
21976
|
}
|
|
21572
21977
|
|
|
21573
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
21978
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
21574
21979
|
class StdioServerTransport {
|
|
21575
21980
|
constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
|
|
21576
21981
|
this._stdin = _stdin;
|
|
@@ -21635,8 +22040,8 @@ class StdioServerTransport {
|
|
|
21635
22040
|
|
|
21636
22041
|
// src/lib/registry.ts
|
|
21637
22042
|
init_builtins();
|
|
21638
|
-
import { existsSync as
|
|
21639
|
-
import { join as
|
|
22043
|
+
import { existsSync as existsSync9, readFileSync as readFileSync4 } from "fs";
|
|
22044
|
+
import { join as join9, dirname as dirname4 } from "path";
|
|
21640
22045
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
21641
22046
|
|
|
21642
22047
|
// src/lib/fuzzy.ts
|
|
@@ -30069,16 +30474,16 @@ function loadConnectorVersions() {
|
|
|
30069
30474
|
versionsLoaded = true;
|
|
30070
30475
|
const thisDir = dirname4(fileURLToPath3(import.meta.url));
|
|
30071
30476
|
const candidates = [
|
|
30072
|
-
|
|
30073
|
-
|
|
30477
|
+
join9(thisDir, "..", "connectors"),
|
|
30478
|
+
join9(thisDir, "..", "..", "connectors")
|
|
30074
30479
|
];
|
|
30075
|
-
const connectorsDir = candidates.find((d) =>
|
|
30480
|
+
const connectorsDir = candidates.find((d) => existsSync9(d));
|
|
30076
30481
|
if (!connectorsDir)
|
|
30077
30482
|
return;
|
|
30078
30483
|
for (const connector of CONNECTORS) {
|
|
30079
30484
|
try {
|
|
30080
|
-
const pkgPath =
|
|
30081
|
-
if (
|
|
30485
|
+
const pkgPath = join9(getConnectorPackagePath(connectorsDir, connector.name), "package.json");
|
|
30486
|
+
if (existsSync9(pkgPath)) {
|
|
30082
30487
|
const pkg = JSON.parse(readFileSync4(pkgPath, "utf-8"));
|
|
30083
30488
|
connector.version = pkg.version || "0.0.0";
|
|
30084
30489
|
continue;
|
|
@@ -30135,7 +30540,7 @@ function object2(shape, params) {
|
|
|
30135
30540
|
};
|
|
30136
30541
|
return new ZodMiniObject(def);
|
|
30137
30542
|
}
|
|
30138
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
30543
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
30139
30544
|
function isZ4Schema(s) {
|
|
30140
30545
|
const schema = s;
|
|
30141
30546
|
return !!schema._zod;
|
|
@@ -30296,7 +30701,7 @@ function getLiteralValue(schema) {
|
|
|
30296
30701
|
return;
|
|
30297
30702
|
}
|
|
30298
30703
|
|
|
30299
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
30704
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
30300
30705
|
function isTerminal(status) {
|
|
30301
30706
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
30302
30707
|
}
|
|
@@ -31537,7 +31942,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
31537
31942
|
}
|
|
31538
31943
|
return combined;
|
|
31539
31944
|
};
|
|
31540
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
31945
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
31541
31946
|
function mapMiniTarget(t) {
|
|
31542
31947
|
if (!t)
|
|
31543
31948
|
return "draft-7";
|
|
@@ -31579,7 +31984,7 @@ function parseWithCompat(schema, data) {
|
|
|
31579
31984
|
return result.data;
|
|
31580
31985
|
}
|
|
31581
31986
|
|
|
31582
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
31987
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
31583
31988
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
31584
31989
|
|
|
31585
31990
|
class Protocol {
|
|
@@ -32041,7 +32446,7 @@ class Protocol {
|
|
|
32041
32446
|
return;
|
|
32042
32447
|
}
|
|
32043
32448
|
const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1000;
|
|
32044
|
-
await new Promise((
|
|
32449
|
+
await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
|
|
32045
32450
|
options?.signal?.throwIfAborted();
|
|
32046
32451
|
}
|
|
32047
32452
|
} catch (error2) {
|
|
@@ -32053,7 +32458,7 @@ class Protocol {
|
|
|
32053
32458
|
}
|
|
32054
32459
|
request(request2, resultSchema, options) {
|
|
32055
32460
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
32056
|
-
return new Promise((
|
|
32461
|
+
return new Promise((resolve2, reject) => {
|
|
32057
32462
|
const earlyReject = (error2) => {
|
|
32058
32463
|
reject(error2);
|
|
32059
32464
|
};
|
|
@@ -32131,7 +32536,7 @@ class Protocol {
|
|
|
32131
32536
|
if (!parseResult.success) {
|
|
32132
32537
|
reject(parseResult.error);
|
|
32133
32538
|
} else {
|
|
32134
|
-
|
|
32539
|
+
resolve2(parseResult.data);
|
|
32135
32540
|
}
|
|
32136
32541
|
} catch (error2) {
|
|
32137
32542
|
reject(error2);
|
|
@@ -32322,12 +32727,12 @@ class Protocol {
|
|
|
32322
32727
|
interval = task.pollInterval;
|
|
32323
32728
|
}
|
|
32324
32729
|
} catch {}
|
|
32325
|
-
return new Promise((
|
|
32730
|
+
return new Promise((resolve2, reject) => {
|
|
32326
32731
|
if (signal.aborted) {
|
|
32327
32732
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
32328
32733
|
return;
|
|
32329
32734
|
}
|
|
32330
|
-
const timeoutId = setTimeout(
|
|
32735
|
+
const timeoutId = setTimeout(resolve2, interval);
|
|
32331
32736
|
signal.addEventListener("abort", () => {
|
|
32332
32737
|
clearTimeout(timeoutId);
|
|
32333
32738
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
@@ -32420,7 +32825,7 @@ function mergeCapabilities(base, additional) {
|
|
|
32420
32825
|
return result;
|
|
32421
32826
|
}
|
|
32422
32827
|
|
|
32423
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
32828
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
32424
32829
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
32425
32830
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
32426
32831
|
function createDefaultAjvInstance() {
|
|
@@ -32460,7 +32865,7 @@ class AjvJsonSchemaValidator {
|
|
|
32460
32865
|
}
|
|
32461
32866
|
}
|
|
32462
32867
|
|
|
32463
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
32868
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
32464
32869
|
class ExperimentalServerTasks {
|
|
32465
32870
|
constructor(_server) {
|
|
32466
32871
|
this._server = _server;
|
|
@@ -32538,7 +32943,7 @@ class ExperimentalServerTasks {
|
|
|
32538
32943
|
}
|
|
32539
32944
|
}
|
|
32540
32945
|
|
|
32541
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
32946
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
32542
32947
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
32543
32948
|
if (!requests) {
|
|
32544
32949
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -32573,7 +32978,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
32573
32978
|
}
|
|
32574
32979
|
}
|
|
32575
32980
|
|
|
32576
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
32981
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
32577
32982
|
class Server extends Protocol {
|
|
32578
32983
|
constructor(_serverInfo, options) {
|
|
32579
32984
|
super(options);
|
|
@@ -32897,7 +33302,7 @@ class Server extends Protocol {
|
|
|
32897
33302
|
}
|
|
32898
33303
|
}
|
|
32899
33304
|
|
|
32900
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
33305
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
32901
33306
|
var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
|
|
32902
33307
|
function isCompletable(schema) {
|
|
32903
33308
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
@@ -32911,7 +33316,7 @@ var McpZodTypeKind;
|
|
|
32911
33316
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
32912
33317
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
32913
33318
|
|
|
32914
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
33319
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
32915
33320
|
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
32916
33321
|
function validateToolName(name) {
|
|
32917
33322
|
const warnings = [];
|
|
@@ -32969,7 +33374,7 @@ function validateAndWarnToolName(name) {
|
|
|
32969
33374
|
return result.isValid;
|
|
32970
33375
|
}
|
|
32971
33376
|
|
|
32972
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
33377
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
32973
33378
|
class ExperimentalMcpServerTasks {
|
|
32974
33379
|
constructor(_mcpServer) {
|
|
32975
33380
|
this._mcpServer = _mcpServer;
|
|
@@ -32984,7 +33389,7 @@ class ExperimentalMcpServerTasks {
|
|
|
32984
33389
|
}
|
|
32985
33390
|
}
|
|
32986
33391
|
|
|
32987
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
33392
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
32988
33393
|
init_zod();
|
|
32989
33394
|
|
|
32990
33395
|
class McpServer {
|
|
@@ -33174,7 +33579,7 @@ class McpServer {
|
|
|
33174
33579
|
let task = createTaskResult.task;
|
|
33175
33580
|
const pollInterval = task.pollInterval ?? 5000;
|
|
33176
33581
|
while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
|
|
33177
|
-
await new Promise((
|
|
33582
|
+
await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
|
|
33178
33583
|
const updatedTask = await extra.taskStore.getTask(taskId);
|
|
33179
33584
|
if (!updatedTask) {
|
|
33180
33585
|
throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
|
|
@@ -33718,7 +34123,8 @@ var STRIP_PROMPT = `You are a data extraction assistant. Your job is to take raw
|
|
|
33718
34123
|
|
|
33719
34124
|
Rules:
|
|
33720
34125
|
- Return valid JSON only (no markdown, no explanation)
|
|
33721
|
-
-
|
|
34126
|
+
- Preserve pagination and continuation metadata exactly (count, total, limit, cursor, nextCursor, next_cursor, hasMore, has_more, complete)
|
|
34127
|
+
- Remove rate limit headers, empty fields, and null values that are not continuation markers
|
|
33722
34128
|
- Keep all meaningful data fields
|
|
33723
34129
|
- If the input is already minimal, return it unchanged
|
|
33724
34130
|
- If input is not JSON, extract key facts as a JSON object
|
|
@@ -33745,6 +34151,7 @@ init_package();
|
|
|
33745
34151
|
|
|
33746
34152
|
// src/mcp/tools/discovery.ts
|
|
33747
34153
|
init_zod();
|
|
34154
|
+
init_package();
|
|
33748
34155
|
|
|
33749
34156
|
// src/lib/compact-output.ts
|
|
33750
34157
|
var DEFAULT_MCP_LIMIT = 20;
|
|
@@ -33829,7 +34236,7 @@ function registerDiscoveryTools(server, stripped) {
|
|
|
33829
34236
|
description: "Search connectors by name or keyword.",
|
|
33830
34237
|
inputSchema: {
|
|
33831
34238
|
query: exports_external.string(),
|
|
33832
|
-
limit: exports_external.number().optional(),
|
|
34239
|
+
limit: exports_external.number().int().min(1).max(100).optional(),
|
|
33833
34240
|
verbose: exports_external.boolean().optional()
|
|
33834
34241
|
}
|
|
33835
34242
|
}, async ({ query, limit, verbose }) => {
|
|
@@ -33900,13 +34307,19 @@ function registerDiscoveryTools(server, stripped) {
|
|
|
33900
34307
|
description: c.description,
|
|
33901
34308
|
tags: c.tags
|
|
33902
34309
|
})) : page.items.map((c) => compactConnector(c, 120));
|
|
33903
|
-
|
|
34310
|
+
const compactMode = compact === true || !verbose && compact !== false;
|
|
34311
|
+
return { content: [{ type: "text", text: JSON.stringify({
|
|
33904
34312
|
connectors: data,
|
|
33905
34313
|
total: connectors18.length,
|
|
33906
34314
|
count: data.length,
|
|
34315
|
+
limit: page.limit,
|
|
34316
|
+
cursor: String(page.offset),
|
|
33907
34317
|
nextCursor: page.nextOffset === null ? null : String(page.nextOffset),
|
|
34318
|
+
hasMore: page.nextOffset !== null,
|
|
34319
|
+
compact: compactMode,
|
|
34320
|
+
catalogVersion: package_default.version,
|
|
33908
34321
|
hint: page.nextOffset === null ? "Use verbose=true or compact=false for full connector metadata." : `Call again with cursor="${page.nextOffset}", or use verbose=true / compact=false for full connector metadata.`
|
|
33909
|
-
}
|
|
34322
|
+
}) }] };
|
|
33910
34323
|
});
|
|
33911
34324
|
server.registerTool("connector_docs", {
|
|
33912
34325
|
title: "Connector Documentation",
|
|
@@ -34152,8 +34565,8 @@ init_zod();
|
|
|
34152
34565
|
init_auth();
|
|
34153
34566
|
init_database();
|
|
34154
34567
|
init_connector_resolver();
|
|
34155
|
-
import { existsSync as
|
|
34156
|
-
import { join as
|
|
34568
|
+
import { existsSync as existsSync14, readFileSync as readFileSync8 } from "fs";
|
|
34569
|
+
import { join as join13 } from "path";
|
|
34157
34570
|
import { spawn } from "child_process";
|
|
34158
34571
|
function registerAuthTools(server, stripped) {
|
|
34159
34572
|
server.registerTool("connector_auth_status", {
|
|
@@ -34288,11 +34701,11 @@ function registerAuthTools(server, stripped) {
|
|
|
34288
34701
|
const serverPort = port || 9876;
|
|
34289
34702
|
const oauthUrl = `http://localhost:${serverPort}/oauth/${name}/start`;
|
|
34290
34703
|
if (noBrowser) {
|
|
34291
|
-
const
|
|
34292
|
-
const tokenPaths = getConnectorConfigReadDirs(name,
|
|
34704
|
+
const connectorsHome2 = getConnectorsHome();
|
|
34705
|
+
const tokenPaths = getConnectorConfigReadDirs(name, connectorsHome2).map((dir) => join13(dir, "profiles", "default", "tokens.json"));
|
|
34293
34706
|
let serverRunning = false;
|
|
34294
34707
|
try {
|
|
34295
|
-
await fetch(`http://localhost:${serverPort}/
|
|
34708
|
+
await fetch(`http://localhost:${serverPort}/health`);
|
|
34296
34709
|
serverRunning = true;
|
|
34297
34710
|
} catch {}
|
|
34298
34711
|
if (!serverRunning) {
|
|
@@ -34302,13 +34715,13 @@ function registerAuthTools(server, stripped) {
|
|
|
34302
34715
|
stdio: "ignore"
|
|
34303
34716
|
});
|
|
34304
34717
|
serverProc.unref();
|
|
34305
|
-
await new Promise((
|
|
34718
|
+
await new Promise((resolve2) => setTimeout(resolve2, 2000));
|
|
34306
34719
|
}
|
|
34307
34720
|
let attempts = 0;
|
|
34308
34721
|
const maxAttempts = 120;
|
|
34309
34722
|
while (attempts < maxAttempts) {
|
|
34310
|
-
await new Promise((
|
|
34311
|
-
if (tokenPaths.some((tokensPath) =>
|
|
34723
|
+
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
34724
|
+
if (tokenPaths.some((tokensPath) => existsSync14(tokensPath))) {
|
|
34312
34725
|
break;
|
|
34313
34726
|
}
|
|
34314
34727
|
attempts++;
|
|
@@ -34327,7 +34740,7 @@ function registerAuthTools(server, stripped) {
|
|
|
34327
34740
|
};
|
|
34328
34741
|
}
|
|
34329
34742
|
try {
|
|
34330
|
-
const tokensPath = tokenPaths.find((path) =>
|
|
34743
|
+
const tokensPath = tokenPaths.find((path) => existsSync14(path)) ?? tokenPaths[0];
|
|
34331
34744
|
const tokenData = JSON.parse(readFileSync8(tokensPath, "utf-8"));
|
|
34332
34745
|
return {
|
|
34333
34746
|
content: [{
|
|
@@ -34731,7 +35144,7 @@ function listWorkflows(db) {
|
|
|
34731
35144
|
import { spawn as nodeSpawn } from "child_process";
|
|
34732
35145
|
var spawnImpl = nodeSpawn;
|
|
34733
35146
|
async function runStep(step, previousOutput) {
|
|
34734
|
-
return new Promise((
|
|
35147
|
+
return new Promise((resolve2) => {
|
|
34735
35148
|
const args = [...step.args ?? []];
|
|
34736
35149
|
if (previousOutput && previousOutput.trim()) {
|
|
34737
35150
|
args.push("--input", previousOutput.trim().slice(0, 4096));
|
|
@@ -34745,11 +35158,11 @@ async function runStep(step, previousOutput) {
|
|
|
34745
35158
|
proc.stderr.on("data", (d) => {
|
|
34746
35159
|
output += d.toString();
|
|
34747
35160
|
});
|
|
34748
|
-
proc.on("close", (code) =>
|
|
34749
|
-
proc.on("error", () =>
|
|
35161
|
+
proc.on("close", (code) => resolve2({ exitCode: code ?? 1, output }));
|
|
35162
|
+
proc.on("error", () => resolve2({ exitCode: 1, output: "Failed to spawn connectors" }));
|
|
34750
35163
|
setTimeout(() => {
|
|
34751
35164
|
proc.kill();
|
|
34752
|
-
|
|
35165
|
+
resolve2({ exitCode: 124, output: output + `
|
|
34753
35166
|
[timeout]` });
|
|
34754
35167
|
}, 60000);
|
|
34755
35168
|
});
|
|
@@ -34781,7 +35194,7 @@ async function runWorkflow(workflow) {
|
|
|
34781
35194
|
// src/lib/scheduler.ts
|
|
34782
35195
|
import { spawn as spawn3 } from "child_process";
|
|
34783
35196
|
async function runConnectorCommand2(connector, command, args) {
|
|
34784
|
-
return new Promise((
|
|
35197
|
+
return new Promise((resolve2) => {
|
|
34785
35198
|
const cmdArgs = [connector, command, ...args, "--format", "json"];
|
|
34786
35199
|
const proc = spawn3("connectors", ["run", ...cmdArgs], { shell: false });
|
|
34787
35200
|
let output = "";
|
|
@@ -34791,11 +35204,11 @@ async function runConnectorCommand2(connector, command, args) {
|
|
|
34791
35204
|
proc.stderr.on("data", (d) => {
|
|
34792
35205
|
output += d.toString();
|
|
34793
35206
|
});
|
|
34794
|
-
proc.on("close", (code) =>
|
|
34795
|
-
proc.on("error", () =>
|
|
35207
|
+
proc.on("close", (code) => resolve2({ exitCode: code ?? 1, output }));
|
|
35208
|
+
proc.on("error", () => resolve2({ exitCode: 1, output: `Failed to spawn connectors run` }));
|
|
34796
35209
|
setTimeout(() => {
|
|
34797
35210
|
proc.kill();
|
|
34798
|
-
|
|
35211
|
+
resolve2({ exitCode: 124, output: output + `
|
|
34799
35212
|
[timeout]` });
|
|
34800
35213
|
}, 60000);
|
|
34801
35214
|
});
|
|
@@ -35309,7 +35722,7 @@ function buildServer() {
|
|
|
35309
35722
|
return server;
|
|
35310
35723
|
}
|
|
35311
35724
|
|
|
35312
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
|
|
35725
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
|
|
35313
35726
|
var import_content_type = __toESM(require_content_type(), 1);
|
|
35314
35727
|
function mediaTypeEssence(header) {
|
|
35315
35728
|
if (!header) {
|
|
@@ -35332,7 +35745,7 @@ function isJsonContentType(header) {
|
|
|
35332
35745
|
return mediaTypeEssence(header) === "application/json";
|
|
35333
35746
|
}
|
|
35334
35747
|
|
|
35335
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
|
|
35748
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
|
|
35336
35749
|
var DEFAULT_SSE_KEEP_ALIVE_MS = 15000;
|
|
35337
35750
|
var MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
|
|
35338
35751
|
function armSseKeepAlive(intervalMs, onTick) {
|
|
@@ -35344,7 +35757,7 @@ function armSseKeepAlive(intervalMs, onTick) {
|
|
|
35344
35757
|
return timer;
|
|
35345
35758
|
}
|
|
35346
35759
|
|
|
35347
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
|
|
35760
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0+2b91fc17bf64bdfd/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
|
|
35348
35761
|
class WebStandardStreamableHTTPServerTransport {
|
|
35349
35762
|
constructor(options = {}) {
|
|
35350
35763
|
this._started = false;
|
|
@@ -35743,9 +36156,9 @@ data:
|
|
|
35743
36156
|
const initRequest = messages.find((m) => isInitializeRequest(m));
|
|
35744
36157
|
const clientProtocolVersion = initRequest ? initRequest.params.protocolVersion : req.headers.get("mcp-protocol-version") ?? DEFAULT_NEGOTIATED_PROTOCOL_VERSION;
|
|
35745
36158
|
if (this._enableJsonResponse) {
|
|
35746
|
-
return new Promise((
|
|
36159
|
+
return new Promise((resolve2) => {
|
|
35747
36160
|
this._streamMapping.set(streamId, {
|
|
35748
|
-
resolveJson:
|
|
36161
|
+
resolveJson: resolve2,
|
|
35749
36162
|
cleanup: () => {
|
|
35750
36163
|
this._streamMapping.delete(streamId);
|
|
35751
36164
|
}
|