@tangle-network/agent-integrations 0.59.0 → 0.59.2

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.
Files changed (58) hide show
  1. package/README.md +31 -0
  2. package/data/bundled-adapter-manifests.json +1 -1
  3. package/dist/{adapters-ediOgE75.js → adapters-4-7nkFS3.js} +137 -383
  4. package/dist/{adapters-ediOgE75.js.map → adapters-4-7nkFS3.js.map} +1 -1
  5. package/dist/{bundled-manifest-data-DQXscV3-.js → bundled-manifest-data-ka9qth1e.js} +72 -51
  6. package/dist/{bundled-manifest-data-DQXscV3-.js.map → bundled-manifest-data-ka9qth1e.js.map} +1 -1
  7. package/dist/catalog-CFvKzwVj.js +201 -0
  8. package/dist/catalog-CFvKzwVj.js.map +1 -0
  9. package/dist/catalog.js +1 -1
  10. package/dist/connect/index.js +1 -1
  11. package/dist/connectors/adapters/index.js +1 -1
  12. package/dist/connectors/index.d.ts +2 -1
  13. package/dist/connectors/index.js +3 -2
  14. package/dist/connectors/oauth.d.ts +2 -0
  15. package/dist/connectors/oauth.js +282 -0
  16. package/dist/connectors/oauth.js.map +1 -0
  17. package/dist/{consumer-BC6pCUzI.d.ts → consumer-zHtoJixe.d.ts} +5 -37
  18. package/dist/{consumer-BC6pCUzI.d.ts.map → consumer-zHtoJixe.d.ts.map} +1 -1
  19. package/dist/consumer.d.ts +1 -1
  20. package/dist/hub-0Od2lgun.d.ts +38 -0
  21. package/dist/hub-0Od2lgun.d.ts.map +1 -0
  22. package/dist/hub-D13zPQGr.js +1004 -0
  23. package/dist/hub-D13zPQGr.js.map +1 -0
  24. package/dist/hub.d.ts +2 -0
  25. package/dist/hub.js +2 -0
  26. package/dist/index-BQXENE9p.d.ts +130 -0
  27. package/dist/index-BQXENE9p.d.ts.map +1 -0
  28. package/dist/index-CDVPZuIY.d.ts.map +1 -1
  29. package/dist/index.d.ts +5 -3
  30. package/dist/index.js +16 -12
  31. package/dist/internal/bundled-manifest-runtime.js +1 -1
  32. package/dist/mcp.d.ts +1 -1
  33. package/dist/mcp.js +2 -1
  34. package/dist/mcp.js.map +1 -1
  35. package/dist/middleware/index.js +1 -1
  36. package/dist/oauth-C5pa5j3O.d.ts +136 -0
  37. package/dist/oauth-C5pa5j3O.d.ts.map +1 -0
  38. package/dist/registry-core-BZo69C37.js +186 -0
  39. package/dist/registry-core-BZo69C37.js.map +1 -0
  40. package/dist/registry.js +2 -2
  41. package/dist/runtime.d.ts +1 -1
  42. package/dist/runtime.js +1 -1
  43. package/dist/sandbox.d.ts +2 -0
  44. package/dist/sandbox.js +114 -0
  45. package/dist/sandbox.js.map +1 -0
  46. package/dist/{specs-BkhKJNjX.js → specs-C2qsaxDe.js} +2 -2
  47. package/dist/{specs-BkhKJNjX.js.map → specs-C2qsaxDe.js.map} +1 -1
  48. package/dist/specs.js +1 -1
  49. package/dist/{src-Bd4KMI-J.js → src-mzICXbwx.js} +84922 -86026
  50. package/dist/src-mzICXbwx.js.map +1 -0
  51. package/dist/stripe/index.js +1 -1
  52. package/dist/webhooks/index.js +1 -1
  53. package/package.json +17 -2
  54. package/dist/catalog-CBd0zbdD.js +0 -383
  55. package/dist/catalog-CBd0zbdD.js.map +0 -1
  56. package/dist/index-j2QziJA5.d.ts +0 -263
  57. package/dist/index-j2QziJA5.d.ts.map +0 -1
  58. package/dist/src-Bd4KMI-J.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,19 +1,23 @@
1
- import { $ as uscreenConnector, $a as openaiConnector, $c as hellosign, $d as beehiivConnector, $i as campaignMonitorConnector, $l as cloudflareConnector, $n as mailerooConnector, $o as zohoCrmConnector, $r as mailercheckConnector, $s as pipedriveConnector, $t as postizConnector, $u as netlifyConnector, A as bettercontactConnector, Aa as altTextAiConnector, Ac as microsoft365PlannerConnector, Ad as dripConnector, Ai as copyAiConnector, Al as figmaConnector, An as instasentConnector, Ao as discourseConnector, Ar as joggAiConnector, As as slack, At as sendinblueConnector, Au as amplitudeConnector, B as woocommerceConnector, Ba as airOpsConnector, Bc as publicKafkaSocketFactory, Bd as codyConnector, Bi as clockifyConnector, Bl as docuseal, Bn as gptzeroDetectAiConnector, Bo as salesloftConnector, Br as hashiCorpVaultConnector, Bs as ringcentralConnector, Bt as retableConnector, Bu as tenzoConnector, C as serperConnector, Ca as apitableConnector, Cc as microsoftOnenoteConnector, Cd as flowParserConnector, Cf as oauthClientCredentialRedactionValues, Ci as descriptConnector, Cl as googleTestFailureReason, Cn as nocodbConnector, Co as mysqlConnector, Cr as koFiConnector, Cs as tlDvConnector, Ct as simplybookmeConnector, Cu as asanaConnector, D as snovIoConnector, Da as amazonTextractConnector, Dc as microsoftDynamicsCrmConnector, Dd as excelFilesConnector, Di as customgptConnector, Dl as folkConnector, Dn as loopsConnector, Do as firebaseConnector, Dr as kimaiConnector, Ds as squareConnector, Dt as serviceNowConnector, Du as amazonLambdaConnector, E as wizaConnector, Ea as apitemplateIoConnector, Ec as microsoftExcel365Connector, Ed as everhourConnector, Ef as startOAuthFlow, Ei as deepseekConnector, El as freshdeskConnector, En as mailchainConnector, Eo as googleBigqueryConnector, Er as kissflowConnector, Es as stripePackConnector, Et as signrequestConnector, Eu as amazonS3Connector, F as zeplinConnector, Fa as aipriseConnector, Fc as linearConnector, Fd as deepgramConnector, Fi as cometapiConnector, Fl as etsyConnector, Fn as humeAiConnector, Fo as telegramConnector, Fr as instantlyAiConnector, Fs as saleorConnector, Ft as sardisConnector, Fu as zoominfoConnector, G as webscrapingAiConnector, Ga as bamboohrConnector, Gc as invoiceninjaConnector, Gd as chatAidConnector, Gi as chatbaseConnector, Gl as taxjarConnector, Gn as missiveConnector, Go as klaviyoConnector, Gr as greenptConnector, Gs as createRedshiftConnector, Gt as raiaAiConnector, Gu as ripplingConnector, H as wonderchatConnector, Ha as activecampaignConnector, Hc as jotformConnector, Hd as clearoutphoneConnector, Hi as chatnodeConnector, Hl as checkoutConnector, Hn as glideConnector, Ho as marketoConnector, Hr as hastewireConnector, Hs as recallAiConnector, Ht as reoonVerifierConnector, Hu as snowflakeConnector, I as youcanbookmeConnector, Ia as acumbamailConnector, Ic as lemonSqueezyConnector, Id as dappierConnector, Ii as cohereConnector, Il as ebayConnector, In as hedyConnector, Io as mattermostConnector, Ir as huggingFaceConnector, Is as createSftpConnector, It as saasticConnector, Iu as workdayConnector, J as vtigerConnector, Ja as weaviateConnector, Jc as intercomConnector, Jd as csvFilesConnector, Ji as cannyConnector, Jl as copperConnector, Jn as mindeeConnector, Jo as apolloConnector, Jr as ghostcmsConnector, Js as redisConnector, Jt as pushoverConnector, Ju as pushbulletConnector, K as whatConvertsConnector, Ka as qdrantConnector, Kc as insightlyConnector, Kd as chaindeskConnector, Ki as chatlingConnector, Kl as recurlyConnector, Kn as mixpanelConnector, Ko as customerIoConnector, Kr as googleSearchConnector, Ks as redshiftConnector, Kt as quadernoConnector, Ku as reddit, L as wufooConnector, La as aidbaseConnector, Lc as leadConnectorConnector, Ld as couchbaseConnector, Li as cognitoFormsConnector, Ll as dropboxConnector, Ln as heartbeatConnector, Lo as matrixConnector, Lr as influencersClubConnector, Ls as sftpConnector, Lt as runwareConnector, Lu as wootricConnector, M as lagrowthmachineConnector, Ma as airtopConnector, Mc as makeConnector, Md as duckdbConnector, Mi as convertkitConnector, Ml as firefliesAiConnector, Mn as imapConnector, Mo as baserowConnector, Mr as jiraDataCenterConnector, Ms as shippoConnector, Mt as seekTableConnector, Mu as aircallConnector, N as heyreachConnector, Na as amazonSecretsManagerConnector, Nc as createLinkedinConnector, Nd as digitalPilotConnector, Ni as crispConnector, Nl as fireberryConnector, Nn as ibmCognoseConnector, No as airtableConnector, Nr as jinaAiConnector, Ns as sharepoint, Nt as scrapelessConnector, Nu as adobeSignConnector, O as findymailConnector, Oa as amazonSesConnector, Oc as microsoftDynamics365BusinessCentralConnector, Od as elevenlabsConnector, Oi as cryptolensConnector, Ol as flowluConnector, On as knockConnector, Oo as clicksendConnector, Or as kapsoConnector, Os as shopifyConnector, Ot as serpstatConnector, Ou as amazonCloudWatchConnector, P as amplemarketConnector, Pa as amazonBedrockConnector, Pc as linkedinConnector, Pd as detectingAiConnector, Pi as comfyicuConnector, Pl as fathomConnector, Pn as hystructConnector, Po as TELEGRAM_FILE_DOWNLOAD_ROOT, Pr as imageRouterConnector, Ps as savvycalConnector, Pt as scrapegraphaiConnector, Pu as zuoraConnector, Q as vboutConnector, Qa as anthropicConnector, Qc as harvestConnector, Qd as bikaConnector, Qi as braveSearchConnector, Ql as cloudinaryConnector, Qn as messagebirdConnector, Qo as zohoBooksConnector, Qr as frameConnector, Qs as parquetFilesConnector, Qt as posthogConnector, Qu as niftyConnector, R as writesonicBulkConnector, Ra as afforaiConnector, Rc as createKafkaConnector, Rd as contiguityConnector, Ri as clearoutConnector, Rl as dialpadConnector, Rn as griptapeConnector, Ro as chatwootConnector, Rr as housecallProConnector, Rs as salesforceConnector, Rt as robollyConnector, Ru as videoaskConnector, S as warmlyConnector, Sa as aminosConnector, Sc as microsoftPowerBiConnector, Sd as gammaConnector, Sf as formEncodeOAuthClientCredential, Si as datocmsConnector, Sl as googleErrorReason, Sn as ntfyConnector, So as createMySqlConnector, Sr as kudosityConnector, Ss as todoistConnector, St as smartsheetConnector, Su as attioConnector, T as commonRoomConnector, Ta as ampecoConnector, Tc as microsoftGraph, Td as featheryConnector, Tf as refreshAccessToken, Ti as denserAiConnector, Tl as freshsalesConnector, Tn as medullarConnector, To as hightouchConnector, Tr as klentyConnector, Ts as tallyConnector, Tt as shortIoConnector, Tu as amazonSnsConnector, U as whatsscaleConnector, Ua as smooveConnector, Uc as jiraCloudConnector, Ud as claudeConnector, Ui as chatDataConnector, Ul as circleConnector, Un as googleVertexaiConnector, Uo as mailchimpConnector, Ur as guideliteConnector, Us as createPostgresConnector, Ut as reachinboxConnector, Uu as sendpulseConnector, V as woodpeckerConnector, Va as kustomerConnector, Vc as justcallConnector, Vd as clickfunnelsConnector, Vi as clockodoConnector, Vl as chessComConnector, Vn as gotifyConnector, Vo as outreachConnector, Vr as heygenConnector, Vs as rampConnector, Vt as replyIoConnector, Vu as teableConnector, W as whatsappConnector, Wa as greenhouseConnector, Wc as ironcladConnector, Wd as chatsistantConnector, Wi as chartlyConnector, Wl as cashfreePaymentsConnector, Wn as exaConnector, Wo as lemlistConnector, Wr as greipConnector, Ws as postgresConnector, Wt as rapidtextAiConnector, Wu as sanityConnector, X as vlmRunConnector, Xa as geminiConnector, Xc as hubspot, Xd as cambAiConnector, Xi as certopusConnector, Xl as confluenceConnector, Xn as memConnector, Xo as zohoInvoiceConnector, Xr as gameballConnector, Xs as rabbitMqConnector, Xt as productboardConnector, Xu as pagerdutyConnector, Y as vtexConnector, Ya as huggingfaceConnector, Yc as httpConnector, Yd as cartloomConnector, Yi as chainalysisApiConnector, Yl as contentfulConnector, Yn as millionverifierConnector, Yo as zohoMailConnector, Yr as freshserviceConnector, Ys as createRabbitMqConnector, Yt as proxycurlConnector, Yu as paychexConnector, Z as vidlab7Connector, Za as googleGeminiConnector, Zc as helpscoutConnector, Zd as buttondownConnector, Zi as captainDataConnector, Zl as codaConnector, Zn as mauticConnector, Zo as zohoCampaignsConnector, Zr as fragmentConnector, Zs as quickbooksConnector, Zt as predictLeadsConnector, Zu as opsgenieConnector, _ as phantombusterConnector, _a as ashbyConnector, _c as miroConnector, _d as adobeCreativeCloudConnector, _f as _resetPendingFlowsForTests, _i as dubConnector, _l as gongConnector, _n as opportifyConnector, _o as hunterConnector, _r as linkupConnector, _s as twitter, _t as swarmnodeConnector, _u as azureAdConnector, a as linqConnector, aa as bonjoroConnector, ac as oneSpanSignConnector, ad as freeAgentConnector, af as airparserConnector, ai as facebookLeadsConnector, al as googleSearchConsoleConnector, an as perplexityAiConnector, ao as quickzuConnector, ar as mailerLiteConnector, as as zendeskConnector, at as twinLabsConnector, au as calComConnector, b as crustdataConnector, ba as semrushConnector, bc as mastodonConnector, bd as generatebannersConnector, bf as createOAuthTokenRequestHeaders, bi as documergeConnector, bl as classifyGoogleReason, bn as omniCoConnector, bo as supabaseConnector, br as kommoConnector, bs as twentyConnector, bt as smsmodeConnector, bu as acuitySchedulingConnector, c as factorsAiConnector, ca as bettermodeConnector, cc as ninjapipeConnector, cd as demandbaseConnector, cf as scimConnector, ci as firecrawlConnector, cl as googleForms, cn as parseurConnector, co as githubConnector, cr as logsnagConnector, cs as wrikeConnector, ct as togglTrackConnector, cu as brexConnector, d as signwellConnector, da as barcodeLookupConnector, dc as notion, dd as clioConnector, df as clientCredentialsRestConnector, di as emailoctopusConnector, dl as googleContactsConnector, dn as pastefyConnector, do as webhookConnector, dr as magicalApiConnector, ds as xeroConnector, dt as textcortexAiConnector, du as biginByZohoConnector, ea as brilliantDirectoriesConnector, ec as pipedreamConnector, ed as lightfunnelsConnector, ef as base44Connector, ei as fountainConnector, el as granolaConnector, en as pollybotAiConnector, eo as sentryConnector, er as mailgunConnector, es as zohoDeskConnector, et as umamiConnector, eu as clickupConnector, f as polytomicConnector, fa as autocallsConnector, fc as notionConnector, fd as clicdataConnector, ff as oktaConnector, fi as dustConnector, fl as googlePubSubConnector, fn as paperformConnector, fo as CONNECTOR_ADAPTER_FACTORIES, fr as llmrailsConnector, fs as whatsappBusiness, ft as telnyxConnector, fu as backblazeConnector, g as zenrowsConnector, ga as assemblyaiConnector, gc as mondayConnector, gd as adpConnector, gf as InMemoryOAuthFlowStore, gi as documentproConnector, gl as gorgiasConnector, gn as openmicAiConnector, go as neverbounceConnector, gr as letsCalendarConnector, gs as tiktokConnector, gt as stripeConnector, gu as azureBlobStorageConnector, h as oceanIoConnector, ha as avianConnector, hc as mongodbConnector, hd as bexioConnector, hf as phonyConnector, hi as elasticEmailConnector, hl as googleCalendar, hn as opnformConnector, ho as theirstackConnector, hr as linkaConnector, hs as tiktok, ht as systemeIoConnector, hu as azureEventGridConnector, i as linqWhatsappConnector, ia as blueskyConnector, ic as outlookMail, id as giteaConnector, if as anyhookWebsocketConnector, ii as flowiseConnector, il as googleSheets, in as personalAiConnector, io as zagomailConnector, ir as luxuryPresenceConnector, is as zoomConnector, it as twilioConnector, iu as calCom, j as saleshandyConnector, ja as alaiConnector, jc as microsoft365PeopleConnector, jd as docsbotConnector, ji as dashworksConnector, jl as figjamConnector, jn as insightoAiConnector, jo as datadogConnector, jr as justInvoiceConnector, js as signNowConnector, jt as skyprepConnector, ju as affinityConnector, k as contactoutConnector, ka as alttextifyConnector, kc as microsoftCalendar, kd as echowinConnector, ki as datafuelConnector, kl as filloutFormsConnector, kn as kallabotAiConnector, ko as digitalOceanConnector, kr as kizeoFormsConnector, ks as sageIntacctConnector, kt as senjaConnector, ku as amazonEventBridgeConnector, l as modjoConnector, la as beamerConnector, lc as netsuiteConnector, ld as constantContactConnector, lf as pingIdentityConnector, li as esignaturesConnector, ll as googleDrive, ln as paywhirlConnector, lo as slackEventsConnector, lr as logrocketConnector, ls as wordpressConnector, lt as timelinesAiConnector, lu as baremetricsConnector, m as seamlessAiConnector, ma as asknewsConnector, mc as createMongoDbConnector, md as bigcommerceConnector, mf as createPhonyConnector, mi as edenAiConnector, ml as googleAnalyticsConnector, mn as orimonConnector, mo as zerobounceConnector, mr as localaiConnector, ms as twilioSmsConnector, mt as tableauConnector, mu as azureServiceBusConnector, n as sendblueConnector, na as bookedinConnector, nc as paddleConnector, nd as instaChartsConnector, nf as askHandleConnector, ni as formbricksConnector, nl as googleTasksConnector, nn as plausibleConnector, no as sendgridConnector, nr as matomoConnector, ns as cloudbedsConnector, nt as vapiConnector, nu as capsuleCrmConnector, o as inkboxConnector, oa as bitlyConnector, oc as oneDrive, od as formstackConnector, of as aianswerConnector, oi as enrichlayerConnector, ol as googleMyBusinessConnector, on as peekshotConnector, oo as facebookPagesConnector, or as lushaConnector, os as zapierConnector, ot as typefullyConnector, ou as billplzConnector, p as usergemsConnector, pa as azureCommunicationServicesConnector, pc as mycaseConnector, pd as canvaConnector, pf as declarativeRestConnector, pi as easyPeasyAiConnector, pl as googleCloudStorageConnector, pn as oracleDatabaseConnector, po as resolveConnectorAdapterFactoryOptions, pr as lobstermailConnector, ps as voucheryIoConnector, pt as talkableConnector, pu as basecampConnector, q as wafeqConnector, qa as pineconeConnector, qc as instagramBusinessConnector, qd as chainAwareConnector, qi as chargekeepConnector, ql as chargebeeConnector, qn as mixmaxConnector, qo as brazeConnector, qr as gistlyConnector, qs as createRedisConnector, qt as qawafelConnector, qu as redditConnector, r as resendConnector, ra as bolnaConnector, rc as pandadoc, rd as gustoConnector, rf as apifyConnector, ri as flipandoConnector, rl as googleSlidesConnector, rn as placidConnector, ro as zendeskSellConnector, rr as lucidyaConnector, rs as zohoBookingsConnector, rt as upgradechatConnector, ru as calendlyConnector, s as getresponseConnector, sa as blandAiConnector, sc as openPhoneConnector, sd as discordConnector, sf as actualbudgetConnector, si as fathomAnalyticsConnector, sl as googleMeetConnector, sn as pdfmonkeyConnector, so as gitlabConnector, sr as loftyConnector, ss as youtubeDataConnector, st as totalcmsConnector, su as billComConnector, ta as browseAiConnector, tc as plaidConnector, td as leverConnector, tf as bannerbearConnector, ti as foreplayCoConnector, tl as googlechatConnector, tn as pocketbaseConnector, to as postmarkConnector, tr as manychatConnector, ts as pricelabsConnector, tt as validatedmailsConnector, tu as closeConnector, u as nooksConnector, ua as azureOpenaiConnector, uc as n8nConnector, ud as cloudconvertConnector, uf as oneloginConnector, ui as emailitConnector, ul as googleDocs, un as pinchPaymentsConnector, uo as stripeWebhookReceiverConnector, ur as lokaliseConnector, us as webflowConnector, ut as timeOpsConnector, uu as boxConnector, v as brightdataConnector, va as clayConnector, vc as mollieConnector, vd as modelslabConnector, vf as consumePendingFlow, vi as dumplingAiConnector, vl as gmail, vn as openRouterConnector, vo as fullenrichConnector, vr as lettaConnector, vs as twitterConnector, vt as supadataConnector, vu as avalaraConnector, w as leadfeederConnector, wa as appfollowConnector, wc as microsoftTeams, wd as fellowConnector, wf as redactOAuthSensitiveText, wi as devinConnector, wl as frontConnector, wn as mindStudioConnector, wo as metabaseConnector, wr as knackConnector, ws as ticktickConnector, wt as simplirouteConnector, wu as amazonSqsConnector, x as autoboundConnector, xa as similarwebConnector, xc as microsoftTodoConnector, xd as genderApiConnector, xf as exchangeAuthorizationCode, xi as dittofeedConnector, xl as googleApiError, xn as odooConnector, xo as segmentConnector, xr as leapAiConnector, xs as trelloConnector, xt as smartsuiteConnector, xu as auth0Connector, y as leadmagicConnector, ya as cognismConnector, yc as meetgeekAiConnector, yd as giftbitConnector, yf as createOAuthBasicAuthorizationHeader, yi as doctlyConnector, yl as classifyGoogleError, yn as omnihrConnector, yo as builtwithConnector, yr as leexiConnector, ys as typeformConnector, yt as socialkitConnector, yu as avomaConnector, z as workableConnector, za as agentxConnector, zc as kafkaConnector, zd as contextualAiConnector, zi as cloutlyConnector, zl as docusignConnector, zn as gristConnector, zo as smartleadConnector, zr as heymarketSmsConnector, zs as rssConnector, zt as retellAiConnector, zu as vercelConnector } from "./adapters-ediOgE75.js";
2
- import { $ as parseIntegrationBridgeEnvironment, A as inferIntegrationManifestFromTools, At as listTangleIntegrationContracts, B as filterDiscoveryByWorkspaceScopes, Bt as ACTIVEPIECES_OVERRIDES, C as validateIntegrationInvocationEnvelope, Ct as auditTangleIntegrationCatalogFreshness, D as assertValidIntegrationManifest, Dt as extractExternalCatalogPublicCount, E as validateProviderPassthroughRequest, Et as createTangleCatalogExecutorProvider, F as runIntegrationHealthchecks, Ft as extractActivepiecesPublicPieceCount, G as TangleAppsClient, H as renderConsentSummary, I as InMemoryIntegrationEventStore, It as createActivepiecesExecutorProvider, J as DEFAULT_INTEGRATION_BRIDGE_ENV, K as createTangleAppsClient, L as receiveIntegrationWebhook, Lt as createCatalogExecutorProvider, M as InMemoryIntegrationHealthcheckStore, Mt as renderTangleCatalogRuntimePnpmAddCommand, N as healthcheckRequest, Nt as ACTIVEPIECES_PUBLIC_CATALOG_URL, O as calendarExercisePlannerManifest, Ot as listTangleIntegrationCatalogEntries, P as runIntegrationHealthcheck, Pt as auditIntegrationCatalogFreshness, Q as encodeIntegrationBridgePayload, R as storedEventToTriggerEvent, Rt as buildActivepiecesConnectors, S as redactInvocationEnvelope, St as TANGLE_INTEGRATIONS_CATALOG_SOURCE, T as PROVIDER_PASSTHROUGH_ACTION, Tt as buildTangleIntegrationCatalogConnectors, U as TangleIntegrationsClient, V as renderApprovalCopy, Vt as getActivepiecesOverride, W as createTangleIntegrationsClient, X as buildIntegrationBridgePayload, Y as buildIntegrationBridgeEnvironment, Z as decodeIntegrationBridgePayload, _ as buildIntegrationInvocationEnvelope, _t as manifestToConnector, a as sanitizeConnection, at as InMemoryIntegrationApprovalStore, b as normalizeIntegrationResult, bt as classifyIntegrationCatalogExecutability, c as InMemoryIntegrationWorkflowStore, ct as InMemoryIntegrationOAuthStateStore, d as createGatewayCatalogProvider, dt as createCredentialBackedAdapterProvider, et as redactIntegrationBridgePayload, f as normalizeGatewayCatalog, ft as resolveConnectionCredentials, g as IntegrationSandboxHost, gt as createConnectorAdapterProvider, h as importOpenApiConnector, ht as createConnectorAdapterCatalogSource, i as createMockIntegrationProvider, it as ApprovalBackedPolicyEngine, j as validateIntegrationManifest, jt as listTangleNativeAdapterIds, k as explainMissingRequirements, kt as listTangleIntegrationCatalogRuntimePackages, l as IntegrationWorkflowRuntime, lt as InMemoryIntegrationSecretStore, m as importMcpConnector, mt as adapterManifestsToConnectors, n as IntegrationHub, nt as buildCanonicalLaunchConnectors, o as signCapability, ot as createApprovalBackedPolicyEngine, p as importGraphqlConnector, pt as revokeConnection, q as requireBrokerGrantReceipt, r as createHttpIntegrationProvider, rt as canonicalActionConnectorId, s as verifyCapabilityToken, st as resolveIntegrationApproval, t as InMemoryConnectionStore, tt as CANONICAL_INTEGRATION_ACTIONS, u as createIntegrationWorkflowRuntime, ut as createConnectionCredentialResolver, v as dispatchIntegrationInvocation, vt as IntegrationError, w as createPlatformIntegrationPolicyPreset, wt as buildTangleCatalogRuntimePackageManifest, x as redactCapability, xt as TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, y as invocationRequestFromEnvelope, yt as buildDefaultIntegrationRegistry, z as discoverWorkspaceCapabilities, zt as listActivepiecesCatalogEntries } from "./src-Bd4KMI-J.js";
3
- import { n as canonicalIntegrationKind, t as INTEGRATION_KIND_ALIASES } from "./integration-kind-aliases-DeUJgBWP.js";
4
- import { a as integrationToolName, c as toMcpTools, d as inferIntegrationSupportTier, f as summarizeIntegrationRegistry, i as flattenIntegrationToolDefinition, l as canonicalConnectorId, n as buildIntegrationToolCatalog, o as parseIntegrationToolName, r as describeIntegrationTool, s as searchIntegrationTools, t as buildIntegrationCatalogView, u as composeIntegrationRegistry } from "./catalog-CBd0zbdD.js";
5
- import { a as TangleIdentityUnreachableError, c as CredentialsExpired, d as ResourceContention, f as assertValidConnectorManifest, i as TANGLE_SERVICE_TOKEN_PREFIX, l as ProviderConfigError, n as TANGLE_API_KEY_PREFIX, o as createTangleIdentityClient, p as validateConnectorManifest, s as tangleIdentity, t as DEFAULT_TANGLE_PLATFORM_URL, u as ProviderRateLimited } from "./tangle-id-S6oooMWh.js";
6
- import { a as verifyHmacSignature, c as verifyTwilioSignature, i as verifyEmailSignature, n as firstHeader, o as verifySlackSignature, r as parseStripeSignatureHeader, s as verifyStripeSignature, t as DEFAULT_SIGNATURE_TOLERANCE_SECONDS } from "./webhooks-FsjqRN_0.js";
7
- import { n as normalizeIntegrationError, r as statusForCode, t as IntegrationRuntimeError } from "./errors-CvO_y8JO.js";
1
+ import { $ as uscreenConnector, $a as openaiConnector, $c as hellosign, $d as beehiivConnector, $i as campaignMonitorConnector, $l as cloudflareConnector, $n as mailerooConnector, $o as zohoCrmConnector, $r as mailercheckConnector, $s as pipedriveConnector, $t as postizConnector, $u as netlifyConnector, A as bettercontactConnector, Aa as altTextAiConnector, Ac as microsoft365PlannerConnector, Ad as dripConnector, Ai as copyAiConnector, Al as figmaConnector, An as instasentConnector, Ao as discourseConnector, Ar as joggAiConnector, As as slack, At as sendinblueConnector, Au as amplitudeConnector, B as woocommerceConnector, Ba as airOpsConnector, Bc as publicKafkaSocketFactory, Bd as codyConnector, Bi as clockifyConnector, Bl as docuseal, Bn as gptzeroDetectAiConnector, Bo as salesloftConnector, Br as hashiCorpVaultConnector, Bs as ringcentralConnector, Bt as retableConnector, Bu as tenzoConnector, C as serperConnector, Ca as apitableConnector, Cc as microsoftOnenoteConnector, Cd as flowParserConnector, Ci as descriptConnector, Cl as googleTestFailureReason, Cn as nocodbConnector, Co as mysqlConnector, Cr as koFiConnector, Cs as tlDvConnector, Ct as simplybookmeConnector, Cu as asanaConnector, D as snovIoConnector, Da as amazonTextractConnector, Dc as microsoftDynamicsCrmConnector, Dd as excelFilesConnector, Di as customgptConnector, Dl as folkConnector, Dn as loopsConnector, Do as firebaseConnector, Dr as kimaiConnector, Ds as squareConnector, Dt as serviceNowConnector, Du as amazonLambdaConnector, E as wizaConnector, Ea as apitemplateIoConnector, Ec as microsoftExcel365Connector, Ed as everhourConnector, Ei as deepseekConnector, El as freshdeskConnector, En as mailchainConnector, Eo as googleBigqueryConnector, Er as kissflowConnector, Es as stripePackConnector, Et as signrequestConnector, Eu as amazonS3Connector, F as zeplinConnector, Fa as aipriseConnector, Fc as linearConnector, Fd as deepgramConnector, Fi as cometapiConnector, Fl as etsyConnector, Fn as humeAiConnector, Fo as telegramConnector, Fr as instantlyAiConnector, Fs as saleorConnector, Ft as sardisConnector, Fu as zoominfoConnector, G as webscrapingAiConnector, Ga as bamboohrConnector, Gc as invoiceninjaConnector, Gd as chatAidConnector, Gi as chatbaseConnector, Gl as taxjarConnector, Gn as missiveConnector, Go as klaviyoConnector, Gr as greenptConnector, Gs as createRedshiftConnector, Gt as raiaAiConnector, Gu as ripplingConnector, H as wonderchatConnector, Ha as activecampaignConnector, Hc as jotformConnector, Hd as clearoutphoneConnector, Hi as chatnodeConnector, Hl as checkoutConnector, Hn as glideConnector, Ho as marketoConnector, Hr as hastewireConnector, Hs as recallAiConnector, Ht as reoonVerifierConnector, Hu as snowflakeConnector, I as youcanbookmeConnector, Ia as acumbamailConnector, Ic as lemonSqueezyConnector, Id as dappierConnector, Ii as cohereConnector, Il as ebayConnector, In as hedyConnector, Io as mattermostConnector, Ir as huggingFaceConnector, Is as createSftpConnector, It as saasticConnector, Iu as workdayConnector, J as vtigerConnector, Ja as weaviateConnector, Jc as intercomConnector, Jd as csvFilesConnector, Ji as cannyConnector, Jl as copperConnector, Jn as mindeeConnector, Jo as apolloConnector, Jr as ghostcmsConnector, Js as redisConnector, Jt as pushoverConnector, Ju as pushbulletConnector, K as whatConvertsConnector, Ka as qdrantConnector, Kc as insightlyConnector, Kd as chaindeskConnector, Ki as chatlingConnector, Kl as recurlyConnector, Kn as mixpanelConnector, Ko as customerIoConnector, Kr as googleSearchConnector, Ks as redshiftConnector, Kt as quadernoConnector, Ku as reddit, L as wufooConnector, La as aidbaseConnector, Lc as leadConnectorConnector, Ld as couchbaseConnector, Li as cognitoFormsConnector, Ll as dropboxConnector, Ln as heartbeatConnector, Lo as matrixConnector, Lr as influencersClubConnector, Ls as sftpConnector, Lt as runwareConnector, Lu as wootricConnector, M as lagrowthmachineConnector, Ma as airtopConnector, Mc as makeConnector, Md as duckdbConnector, Mi as convertkitConnector, Ml as firefliesAiConnector, Mn as imapConnector, Mo as baserowConnector, Mr as jiraDataCenterConnector, Ms as shippoConnector, Mt as seekTableConnector, Mu as aircallConnector, N as heyreachConnector, Na as amazonSecretsManagerConnector, Nc as createLinkedinConnector, Nd as digitalPilotConnector, Ni as crispConnector, Nl as fireberryConnector, Nn as ibmCognoseConnector, No as airtableConnector, Nr as jinaAiConnector, Ns as sharepoint, Nt as scrapelessConnector, Nu as adobeSignConnector, O as findymailConnector, Oa as amazonSesConnector, Oc as microsoftDynamics365BusinessCentralConnector, Od as elevenlabsConnector, Oi as cryptolensConnector, Ol as flowluConnector, On as knockConnector, Oo as clicksendConnector, Or as kapsoConnector, Os as shopifyConnector, Ot as serpstatConnector, Ou as amazonCloudWatchConnector, P as amplemarketConnector, Pa as amazonBedrockConnector, Pc as linkedinConnector, Pd as detectingAiConnector, Pi as comfyicuConnector, Pl as fathomConnector, Pn as hystructConnector, Po as TELEGRAM_FILE_DOWNLOAD_ROOT, Pr as imageRouterConnector, Ps as savvycalConnector, Pt as scrapegraphaiConnector, Pu as zuoraConnector, Q as vboutConnector, Qa as anthropicConnector, Qc as harvestConnector, Qd as bikaConnector, Qi as braveSearchConnector, Ql as cloudinaryConnector, Qn as messagebirdConnector, Qo as zohoBooksConnector, Qr as frameConnector, Qs as parquetFilesConnector, Qt as posthogConnector, Qu as niftyConnector, R as writesonicBulkConnector, Ra as afforaiConnector, Rc as createKafkaConnector, Rd as contiguityConnector, Ri as clearoutConnector, Rl as dialpadConnector, Rn as griptapeConnector, Ro as chatwootConnector, Rr as housecallProConnector, Rs as salesforceConnector, Rt as robollyConnector, Ru as videoaskConnector, S as warmlyConnector, Sa as aminosConnector, Sc as microsoftPowerBiConnector, Sd as gammaConnector, Si as datocmsConnector, Sl as googleErrorReason, Sn as ntfyConnector, So as createMySqlConnector, Sr as kudosityConnector, Ss as todoistConnector, St as smartsheetConnector, Su as attioConnector, T as commonRoomConnector, Ta as ampecoConnector, Tc as microsoftGraph, Td as featheryConnector, Ti as denserAiConnector, Tl as freshsalesConnector, Tn as medullarConnector, To as hightouchConnector, Tr as klentyConnector, Ts as tallyConnector, Tt as shortIoConnector, Tu as amazonSnsConnector, U as whatsscaleConnector, Ua as smooveConnector, Uc as jiraCloudConnector, Ud as claudeConnector, Ui as chatDataConnector, Ul as circleConnector, Un as googleVertexaiConnector, Uo as mailchimpConnector, Ur as guideliteConnector, Us as createPostgresConnector, Ut as reachinboxConnector, Uu as sendpulseConnector, V as woodpeckerConnector, Va as kustomerConnector, Vc as justcallConnector, Vd as clickfunnelsConnector, Vi as clockodoConnector, Vl as chessComConnector, Vn as gotifyConnector, Vo as outreachConnector, Vr as heygenConnector, Vs as rampConnector, Vt as replyIoConnector, Vu as teableConnector, W as whatsappConnector, Wa as greenhouseConnector, Wc as ironcladConnector, Wd as chatsistantConnector, Wi as chartlyConnector, Wl as cashfreePaymentsConnector, Wn as exaConnector, Wo as lemlistConnector, Wr as greipConnector, Ws as postgresConnector, Wt as rapidtextAiConnector, Wu as sanityConnector, X as vlmRunConnector, Xa as geminiConnector, Xc as hubspot, Xd as cambAiConnector, Xi as certopusConnector, Xl as confluenceConnector, Xn as memConnector, Xo as zohoInvoiceConnector, Xr as gameballConnector, Xs as rabbitMqConnector, Xt as productboardConnector, Xu as pagerdutyConnector, Y as vtexConnector, Ya as huggingfaceConnector, Yc as httpConnector, Yd as cartloomConnector, Yi as chainalysisApiConnector, Yl as contentfulConnector, Yn as millionverifierConnector, Yo as zohoMailConnector, Yr as freshserviceConnector, Ys as createRabbitMqConnector, Yt as proxycurlConnector, Yu as paychexConnector, Z as vidlab7Connector, Za as googleGeminiConnector, Zc as helpscoutConnector, Zd as buttondownConnector, Zi as captainDataConnector, Zl as codaConnector, Zn as mauticConnector, Zo as zohoCampaignsConnector, Zr as fragmentConnector, Zs as quickbooksConnector, Zt as predictLeadsConnector, Zu as opsgenieConnector, _ as phantombusterConnector, _a as ashbyConnector, _c as miroConnector, _d as adobeCreativeCloudConnector, _i as dubConnector, _l as gongConnector, _n as opportifyConnector, _o as hunterConnector, _r as linkupConnector, _s as twitter, _t as swarmnodeConnector, _u as azureAdConnector, a as linqConnector, aa as bonjoroConnector, ac as oneSpanSignConnector, ad as freeAgentConnector, af as airparserConnector, ai as facebookLeadsConnector, al as googleSearchConsoleConnector, an as perplexityAiConnector, ao as quickzuConnector, ar as mailerLiteConnector, as as zendeskConnector, at as twinLabsConnector, au as calComConnector, b as crustdataConnector, ba as semrushConnector, bc as mastodonConnector, bd as generatebannersConnector, bi as documergeConnector, bl as classifyGoogleReason, bn as omniCoConnector, bo as supabaseConnector, br as kommoConnector, bs as twentyConnector, bt as smsmodeConnector, bu as acuitySchedulingConnector, c as factorsAiConnector, ca as bettermodeConnector, cc as ninjapipeConnector, cd as demandbaseConnector, cf as scimConnector, ci as firecrawlConnector, cl as googleForms, cn as parseurConnector, co as githubConnector, cr as logsnagConnector, cs as wrikeConnector, ct as togglTrackConnector, cu as brexConnector, d as signwellConnector, da as barcodeLookupConnector, dc as notion, dd as clioConnector, df as clientCredentialsRestConnector, di as emailoctopusConnector, dl as googleContactsConnector, dn as pastefyConnector, do as webhookConnector, dr as magicalApiConnector, ds as xeroConnector, dt as textcortexAiConnector, du as biginByZohoConnector, ea as brilliantDirectoriesConnector, ec as pipedreamConnector, ed as lightfunnelsConnector, ef as base44Connector, ei as fountainConnector, el as granolaConnector, en as pollybotAiConnector, eo as sentryConnector, er as mailgunConnector, es as zohoDeskConnector, et as umamiConnector, eu as clickupConnector, f as polytomicConnector, fa as autocallsConnector, fc as notionConnector, fd as clicdataConnector, ff as oktaConnector, fi as dustConnector, fl as googlePubSubConnector, fn as paperformConnector, fo as CONNECTOR_ADAPTER_FACTORIES, fr as llmrailsConnector, fs as whatsappBusiness, ft as telnyxConnector, fu as backblazeConnector, g as zenrowsConnector, ga as assemblyaiConnector, gc as mondayConnector, gd as adpConnector, gi as documentproConnector, gl as gorgiasConnector, gn as openmicAiConnector, go as neverbounceConnector, gr as letsCalendarConnector, gs as tiktokConnector, gt as stripeConnector, gu as azureBlobStorageConnector, h as oceanIoConnector, ha as avianConnector, hc as mongodbConnector, hd as bexioConnector, hf as phonyConnector, hi as elasticEmailConnector, hl as googleCalendar, hn as opnformConnector, ho as theirstackConnector, hr as linkaConnector, hs as tiktok, ht as systemeIoConnector, hu as azureEventGridConnector, i as linqWhatsappConnector, ia as blueskyConnector, ic as outlookMail, id as giteaConnector, if as anyhookWebsocketConnector, ii as flowiseConnector, il as googleSheets, in as personalAiConnector, io as zagomailConnector, ir as luxuryPresenceConnector, is as zoomConnector, it as twilioConnector, iu as calCom, j as saleshandyConnector, ja as alaiConnector, jc as microsoft365PeopleConnector, jd as docsbotConnector, ji as dashworksConnector, jl as figjamConnector, jn as insightoAiConnector, jo as datadogConnector, jr as justInvoiceConnector, js as signNowConnector, jt as skyprepConnector, ju as affinityConnector, k as contactoutConnector, ka as alttextifyConnector, kc as microsoftCalendar, kd as echowinConnector, ki as datafuelConnector, kl as filloutFormsConnector, kn as kallabotAiConnector, ko as digitalOceanConnector, kr as kizeoFormsConnector, ks as sageIntacctConnector, kt as senjaConnector, ku as amazonEventBridgeConnector, l as modjoConnector, la as beamerConnector, lc as netsuiteConnector, ld as constantContactConnector, lf as pingIdentityConnector, li as esignaturesConnector, ll as googleDrive, ln as paywhirlConnector, lo as slackEventsConnector, lr as logrocketConnector, ls as wordpressConnector, lt as timelinesAiConnector, lu as baremetricsConnector, m as seamlessAiConnector, ma as asknewsConnector, mc as createMongoDbConnector, md as bigcommerceConnector, mf as createPhonyConnector, mi as edenAiConnector, ml as googleAnalyticsConnector, mn as orimonConnector, mo as zerobounceConnector, mr as localaiConnector, ms as twilioSmsConnector, mt as tableauConnector, mu as azureServiceBusConnector, n as sendblueConnector, na as bookedinConnector, nc as paddleConnector, nd as instaChartsConnector, nf as askHandleConnector, ni as formbricksConnector, nl as googleTasksConnector, nn as plausibleConnector, no as sendgridConnector, nr as matomoConnector, ns as cloudbedsConnector, nt as vapiConnector, nu as capsuleCrmConnector, o as inkboxConnector, oa as bitlyConnector, oc as oneDrive, od as formstackConnector, of as aianswerConnector, oi as enrichlayerConnector, ol as googleMyBusinessConnector, on as peekshotConnector, oo as facebookPagesConnector, or as lushaConnector, os as zapierConnector, ot as typefullyConnector, ou as billplzConnector, p as usergemsConnector, pa as azureCommunicationServicesConnector, pc as mycaseConnector, pd as canvaConnector, pf as declarativeRestConnector, pi as easyPeasyAiConnector, pl as googleCloudStorageConnector, pn as oracleDatabaseConnector, po as resolveConnectorAdapterFactoryOptions, pr as lobstermailConnector, ps as voucheryIoConnector, pt as talkableConnector, pu as basecampConnector, q as wafeqConnector, qa as pineconeConnector, qc as instagramBusinessConnector, qd as chainAwareConnector, qi as chargekeepConnector, ql as chargebeeConnector, qn as mixmaxConnector, qo as brazeConnector, qr as gistlyConnector, qs as createRedisConnector, qt as qawafelConnector, qu as redditConnector, r as resendConnector, ra as bolnaConnector, rc as pandadoc, rd as gustoConnector, rf as apifyConnector, ri as flipandoConnector, rl as googleSlidesConnector, rn as placidConnector, ro as zendeskSellConnector, rr as lucidyaConnector, rs as zohoBookingsConnector, rt as upgradechatConnector, ru as calendlyConnector, s as getresponseConnector, sa as blandAiConnector, sc as openPhoneConnector, sd as discordConnector, sf as actualbudgetConnector, si as fathomAnalyticsConnector, sl as googleMeetConnector, sn as pdfmonkeyConnector, so as gitlabConnector, sr as loftyConnector, ss as youtubeDataConnector, st as totalcmsConnector, su as billComConnector, ta as browseAiConnector, tc as plaidConnector, td as leverConnector, tf as bannerbearConnector, ti as foreplayCoConnector, tl as googlechatConnector, tn as pocketbaseConnector, to as postmarkConnector, tr as manychatConnector, ts as pricelabsConnector, tt as validatedmailsConnector, tu as closeConnector, u as nooksConnector, ua as azureOpenaiConnector, uc as n8nConnector, ud as cloudconvertConnector, uf as oneloginConnector, ui as emailitConnector, ul as googleDocs, un as pinchPaymentsConnector, uo as stripeWebhookReceiverConnector, ur as lokaliseConnector, us as webflowConnector, ut as timeOpsConnector, uu as boxConnector, v as brightdataConnector, va as clayConnector, vc as mollieConnector, vd as modelslabConnector, vi as dumplingAiConnector, vl as gmail, vn as openRouterConnector, vo as fullenrichConnector, vr as lettaConnector, vs as twitterConnector, vt as supadataConnector, vu as avalaraConnector, w as leadfeederConnector, wa as appfollowConnector, wc as microsoftTeams, wd as fellowConnector, wi as devinConnector, wl as frontConnector, wn as mindStudioConnector, wo as metabaseConnector, wr as knackConnector, ws as ticktickConnector, wt as simplirouteConnector, wu as amazonSqsConnector, x as autoboundConnector, xa as similarwebConnector, xc as microsoftTodoConnector, xd as genderApiConnector, xi as dittofeedConnector, xl as googleApiError, xn as odooConnector, xo as segmentConnector, xr as leapAiConnector, xs as trelloConnector, xt as smartsuiteConnector, xu as auth0Connector, y as leadmagicConnector, ya as cognismConnector, yc as meetgeekAiConnector, yd as giftbitConnector, yi as doctlyConnector, yl as classifyGoogleError, yn as omnihrConnector, yo as builtwithConnector, yr as leexiConnector, ys as typeformConnector, yt as socialkitConnector, yu as avomaConnector, z as workableConnector, za as agentxConnector, zc as kafkaConnector, zd as contextualAiConnector, zi as cloutlyConnector, zl as docusignConnector, zn as gristConnector, zo as smartleadConnector, zr as heymarketSmsConnector, zs as rssConnector, zt as retellAiConnector, zu as vercelConnector } from "./adapters-4-7nkFS3.js";
2
+ import { a as InMemoryIntegrationSecretStore, c as resolveConnectionCredentials, d as createConnectorAdapterCatalogSource, f as createConnectorAdapterProvider, i as InMemoryIntegrationOAuthStateStore, l as revokeConnection, m as IntegrationError, n as signCapability, o as createConnectionCredentialResolver, p as manifestToConnector, r as verifyCapabilityToken, s as createCredentialBackedAdapterProvider, t as IntegrationHub, u as adapterManifestsToConnectors } from "./hub-D13zPQGr.js";
3
+ import { a as DefaultIntegrationActionGuard, c as InMemoryIntegrationAuditStore, d as sanitizeAuditConnection, i as redactApprovalRequest, l as createAuditingActionGuard, n as buildApprovalRequest, o as InMemoryIntegrationIdempotencyStore, r as createDefaultIntegrationPolicyEngine, s as createDefaultIntegrationActionGuard, t as StaticIntegrationPolicyEngine, u as createIntegrationAuditEvent } from "./policy-UOPcZqdE.js";
4
+ import { $ as renderApprovalCopy, A as createGatewayCatalogProvider, B as calendarExercisePlannerManifest, C as buildDefaultIntegrationRegistry, D as listActivepiecesCatalogEntries, E as buildActivepiecesConnectors, F as createCatalogExecutorProvider, G as healthcheckRequest, H as inferIntegrationManifestFromTools, I as createPlatformIntegrationPolicyPreset, J as InMemoryIntegrationEventStore, K as runIntegrationHealthcheck, L as PROVIDER_PASSTHROUGH_ACTION, M as importGraphqlConnector, N as importMcpConnector, O as ACTIVEPIECES_OVERRIDES, P as importOpenApiConnector, Q as filterDiscoveryByWorkspaceScopes, R as validateProviderPassthroughRequest, S as extractActivepiecesPublicPieceCount, T as createActivepiecesExecutorProvider, U as validateIntegrationManifest, V as explainMissingRequirements, W as InMemoryIntegrationHealthcheckStore, X as storedEventToTriggerEvent, Y as receiveIntegrationWebhook, Z as discoverWorkspaceCapabilities, _ as listTangleIntegrationContracts, _t as InMemoryIntegrationApprovalStore, a as InMemoryIntegrationWorkflowStore, at as requireBrokerGrantReceipt, b as ACTIVEPIECES_PUBLIC_CATALOG_URL, c as TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, ct as buildIntegrationBridgePayload, d as buildTangleCatalogRuntimePackageManifest, dt as parseIntegrationBridgeEnvironment, et as renderConsentSummary, f as buildTangleIntegrationCatalogConnectors, ft as redactIntegrationBridgePayload, g as listTangleIntegrationCatalogRuntimePackages, gt as ApprovalBackedPolicyEngine, h as listTangleIntegrationCatalogEntries, ht as canonicalActionConnectorId, i as sanitizeConnection, it as createTangleAppsClient, j as normalizeGatewayCatalog, k as getActivepiecesOverride, l as TANGLE_INTEGRATIONS_CATALOG_SOURCE, lt as decodeIntegrationBridgePayload, m as extractExternalCatalogPublicCount, mt as buildCanonicalLaunchConnectors, n as createHttpIntegrationProvider, nt as createTangleIntegrationsClient, o as IntegrationWorkflowRuntime, ot as DEFAULT_INTEGRATION_BRIDGE_ENV, p as createTangleCatalogExecutorProvider, pt as CANONICAL_INTEGRATION_ACTIONS, q as runIntegrationHealthchecks, r as createMockIntegrationProvider, rt as TangleAppsClient, s as createIntegrationWorkflowRuntime, st as buildIntegrationBridgeEnvironment, t as InMemoryConnectionStore, tt as TangleIntegrationsClient, u as auditTangleIntegrationCatalogFreshness, ut as encodeIntegrationBridgePayload, v as listTangleNativeAdapterIds, vt as createApprovalBackedPolicyEngine, w as classifyIntegrationCatalogExecutability, x as auditIntegrationCatalogFreshness, y as renderTangleCatalogRuntimePnpmAddCommand, yt as resolveIntegrationApproval, z as assertValidIntegrationManifest } from "./src-mzICXbwx.js";
8
5
  import { FileSystemAtomicIdempotencyStore, InMemoryAtomicIdempotencyStore, resolveAtomicIdempotencyStore } from "./idempotency.js";
9
6
  import { a as PRODUCT_FREE_CREDIT_SOURCES, c as isRealNonPlaceholderEmail, i as PLATFORM_FUNDING_REPLAY_RETENTION_MS, l as isTrustedPlatformEvidence, n as PLATFORM_ACCESS_ISSUER, o as assertNoProductFreeTrial, r as PLATFORM_ACCESS_POLICY_VERSION, s as decideBillingAccess, t as NO_PRODUCT_FREE_CREDITS_POLICY, u as verifyTrustedPlatformEvidence } from "./billing-access-policy-DJ63AxZ5.js";
10
- import { a as getBundledAdapterManifest, c as listBundledAdapterManifests, i as bundledOAuth2AuthContract, n as bundledAuthMode, o as hasBundledAdapter, r as bundledOAuth2Auth, s as listBundledAdapterKinds, t as bundledApiKeyHint } from "./bundled-manifest-data-DQXscV3-.js";
11
- import { listBundledConnectorAdapters } from "./internal/bundled-manifest-runtime.js";
12
- import { buildIntegrationCoverageConnectors, integrationCoverageChecklistMarkdown, listIntegrationCoverageSpecs } from "./coverage-catalog.js";
13
- import { _ as getIntegrationFamily, a as buildHealthcheckPlan, c as renderConsoleSteps, d as getIntegrationSpec, f as integrationSpecToConnector, g as INTEGRATION_FAMILIES, h as resolveConnectorAuthSpec, i as validateIntegrationSpec, l as renderRunbookMarkdown, m as listIntegrationSpecs, n as validateCredentialFormat, o as consoleStepsToText, p as listExecutableIntegrationSpecs, r as validateCredentialSet, s as renderAgentToolDescription, t as assertValidIntegrationSpec, u as specAuthToConnectorAuth } from "./specs-BkhKJNjX.js";
14
- import { a as DefaultIntegrationActionGuard, c as InMemoryIntegrationAuditStore, d as sanitizeAuditConnection, i as redactApprovalRequest, l as createAuditingActionGuard, n as buildApprovalRequest, o as InMemoryIntegrationIdempotencyStore, r as createDefaultIntegrationPolicyEngine, s as createDefaultIntegrationActionGuard, t as StaticIntegrationPolicyEngine, u as createIntegrationAuditEvent } from "./policy-UOPcZqdE.js";
7
+ import { n as normalizeIntegrationError, r as statusForCode, t as IntegrationRuntimeError } from "./errors-CvO_y8JO.js";
8
+ import { a as TangleIdentityUnreachableError, c as CredentialsExpired, d as ResourceContention, f as assertValidConnectorManifest, i as TANGLE_SERVICE_TOKEN_PREFIX, l as ProviderConfigError, n as TANGLE_API_KEY_PREFIX, o as createTangleIdentityClient, p as validateConnectorManifest, s as tangleIdentity, t as DEFAULT_TANGLE_PLATFORM_URL, u as ProviderRateLimited } from "./tangle-id-S6oooMWh.js";
15
9
  import { IntegrationHubClient, IntegrationHubRequestError, createIntegrationHubClient } from "./consumer.js";
10
+ import { InMemoryOAuthFlowStore, _resetPendingFlowsForTests, consumePendingFlow, createOAuthBasicAuthorizationHeader, createOAuthTokenRequestHeaders, exchangeAuthorizationCode, formEncodeOAuthClientCredential, oauthClientCredentialRedactionValues, redactOAuthSensitiveText, refreshAccessToken, startOAuthFlow } from "./connectors/oauth.js";
16
11
  import { InMemoryConnectStateStore, finishConnectFlow, revokeConnectFlow, startConnectFlow } from "./connect/index.js";
17
12
  import { expressTangleAuthMiddleware, extractToken, honoTangleAuthMiddleware, requireTangleAuth } from "./middleware/index.js";
13
+ import { n as canonicalIntegrationKind, t as INTEGRATION_KIND_ALIASES } from "./integration-kind-aliases-DeUJgBWP.js";
14
+ import { i as summarizeIntegrationRegistry, n as composeIntegrationRegistry, r as inferIntegrationSupportTier, t as canonicalConnectorId } from "./registry-core-BZo69C37.js";
15
+ import { a as verifyHmacSignature, c as verifyTwilioSignature, i as verifyEmailSignature, n as firstHeader, o as verifySlackSignature, r as parseStripeSignatureHeader, s as verifyStripeSignature, t as DEFAULT_SIGNATURE_TOLERANCE_SECONDS } from "./webhooks-FsjqRN_0.js";
16
+ import { a as getBundledAdapterManifest, c as listBundledAdapterManifests, i as bundledOAuth2AuthContract, n as bundledAuthMode, o as hasBundledAdapter, r as bundledOAuth2Auth, s as listBundledAdapterKinds, t as bundledApiKeyHint } from "./bundled-manifest-data-ka9qth1e.js";
17
+ import { listBundledConnectorAdapters } from "./internal/bundled-manifest-runtime.js";
18
+ import { a as integrationToolName, c as toMcpTools, i as flattenIntegrationToolDefinition, n as buildIntegrationToolCatalog, o as parseIntegrationToolName, r as describeIntegrationTool, s as searchIntegrationTools, t as buildIntegrationCatalogView } from "./catalog-CFvKzwVj.js";
19
+ import { IntegrationSandboxHost, buildIntegrationInvocationEnvelope, dispatchIntegrationInvocation, invocationRequestFromEnvelope, normalizeIntegrationResult, redactCapability, redactInvocationEnvelope, validateIntegrationInvocationEnvelope } from "./sandbox.js";
20
+ import { buildIntegrationCoverageConnectors, integrationCoverageChecklistMarkdown, listIntegrationCoverageSpecs } from "./coverage-catalog.js";
21
+ import { _ as getIntegrationFamily, a as buildHealthcheckPlan, c as renderConsoleSteps, d as getIntegrationSpec, f as integrationSpecToConnector, g as INTEGRATION_FAMILIES, h as resolveConnectorAuthSpec, i as validateIntegrationSpec, l as renderRunbookMarkdown, m as listIntegrationSpecs, n as validateCredentialFormat, o as consoleStepsToText, p as listExecutableIntegrationSpecs, r as validateCredentialSet, s as renderAgentToolDescription, t as assertValidIntegrationSpec, u as specAuthToConnectorAuth } from "./specs-C2qsaxDe.js";
18
22
  import { InMemoryIntegrationGrantStore, IntegrationRuntime, createIntegrationRuntime } from "./runtime.js";
19
23
  export { ACTIVEPIECES_OVERRIDES, ACTIVEPIECES_PUBLIC_CATALOG_URL, ApprovalBackedPolicyEngine, CANONICAL_INTEGRATION_ACTIONS, CONNECTOR_ADAPTER_FACTORIES, CredentialsExpired, DEFAULT_INTEGRATION_BRIDGE_ENV, DEFAULT_SIGNATURE_TOLERANCE_SECONDS, DEFAULT_TANGLE_PLATFORM_URL, DefaultIntegrationActionGuard, FileSystemAtomicIdempotencyStore, INTEGRATION_FAMILIES, INTEGRATION_KIND_ALIASES, InMemoryAtomicIdempotencyStore, InMemoryConnectStateStore, InMemoryConnectionStore, InMemoryIntegrationApprovalStore, InMemoryIntegrationAuditStore, InMemoryIntegrationEventStore, InMemoryIntegrationGrantStore, InMemoryIntegrationHealthcheckStore, InMemoryIntegrationIdempotencyStore, InMemoryIntegrationOAuthStateStore, InMemoryIntegrationSecretStore, InMemoryIntegrationWorkflowStore, InMemoryOAuthFlowStore, IntegrationError, IntegrationHub, IntegrationHubClient, IntegrationHubRequestError, IntegrationRuntime, IntegrationRuntimeError, IntegrationSandboxHost, IntegrationWorkflowRuntime, NO_PRODUCT_FREE_CREDITS_POLICY, PLATFORM_ACCESS_ISSUER, PLATFORM_ACCESS_POLICY_VERSION, PLATFORM_FUNDING_REPLAY_RETENTION_MS, PRODUCT_FREE_CREDIT_SOURCES, PROVIDER_PASSTHROUGH_ACTION, ProviderConfigError, ProviderRateLimited, ResourceContention, StaticIntegrationPolicyEngine, TANGLE_API_KEY_PREFIX, TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, TANGLE_INTEGRATIONS_CATALOG_SOURCE, TANGLE_SERVICE_TOKEN_PREFIX, TELEGRAM_FILE_DOWNLOAD_ROOT, TangleAppsClient, TangleIdentityUnreachableError, TangleIntegrationsClient, _resetPendingFlowsForTests, activecampaignConnector, actualbudgetConnector, acuitySchedulingConnector, acumbamailConnector, adapterManifestsToConnectors, adobeCreativeCloudConnector, adobeSignConnector, adpConnector, affinityConnector, afforaiConnector, agentxConnector, aianswerConnector, aidbaseConnector, aipriseConnector, airOpsConnector, aircallConnector, airparserConnector, airtableConnector, airtopConnector, alaiConnector, altTextAiConnector, alttextifyConnector, amazonBedrockConnector, amazonCloudWatchConnector, amazonEventBridgeConnector, amazonLambdaConnector, amazonS3Connector, amazonSecretsManagerConnector, amazonSesConnector, amazonSnsConnector, amazonSqsConnector, amazonTextractConnector, aminosConnector, ampecoConnector, amplemarketConnector, amplitudeConnector, anthropicConnector, anyhookWebsocketConnector, apifyConnector, apitableConnector, apitemplateIoConnector, apolloConnector, appfollowConnector, asanaConnector, ashbyConnector, askHandleConnector, asknewsConnector, assemblyaiConnector, assertNoProductFreeTrial, assertValidConnectorManifest, assertValidIntegrationManifest, assertValidIntegrationSpec, attioConnector, auditIntegrationCatalogFreshness, auditTangleIntegrationCatalogFreshness, auth0Connector, autoboundConnector, autocallsConnector, avalaraConnector, avianConnector, avomaConnector, azureAdConnector, azureBlobStorageConnector, azureCommunicationServicesConnector, azureEventGridConnector, azureOpenaiConnector, azureServiceBusConnector, backblazeConnector, bamboohrConnector, bannerbearConnector, barcodeLookupConnector, baremetricsConnector, base44Connector, basecampConnector, baserowConnector, beamerConnector, beehiivConnector, bettercontactConnector, bettermodeConnector, bexioConnector, bigcommerceConnector, biginByZohoConnector, bikaConnector, billComConnector, billplzConnector, bitlyConnector, blandAiConnector, blueskyConnector, bolnaConnector, bonjoroConnector, bookedinConnector, boxConnector, braveSearchConnector, brazeConnector, brexConnector, brightdataConnector, brilliantDirectoriesConnector, browseAiConnector, buildActivepiecesConnectors, buildApprovalRequest, buildCanonicalLaunchConnectors, buildDefaultIntegrationRegistry, buildHealthcheckPlan, buildIntegrationBridgeEnvironment, buildIntegrationBridgePayload, buildIntegrationCatalogView, buildIntegrationCoverageConnectors, buildIntegrationInvocationEnvelope, buildIntegrationToolCatalog, buildTangleCatalogRuntimePackageManifest, buildTangleIntegrationCatalogConnectors, builtwithConnector, bundledApiKeyHint, bundledAuthMode, bundledOAuth2Auth, bundledOAuth2AuthContract, buttondownConnector, calCom, calComConnector, calendarExercisePlannerManifest, calendlyConnector, cambAiConnector, campaignMonitorConnector, cannyConnector, canonicalActionConnectorId, canonicalConnectorId, canonicalIntegrationKind, canvaConnector, capsuleCrmConnector, captainDataConnector, cartloomConnector, cashfreePaymentsConnector, certopusConnector, chainAwareConnector, chainalysisApiConnector, chaindeskConnector, chargebeeConnector, chargekeepConnector, chartlyConnector, chatAidConnector, chatDataConnector, chatbaseConnector, chatlingConnector, chatnodeConnector, chatsistantConnector, chatwootConnector, checkoutConnector, chessComConnector, circleConnector, classifyGoogleError, classifyGoogleReason, classifyIntegrationCatalogExecutability, claudeConnector, clayConnector, clearoutConnector, clearoutphoneConnector, clicdataConnector, clickfunnelsConnector, clicksendConnector, clickupConnector, clientCredentialsRestConnector, clioConnector, clockifyConnector, clockodoConnector, closeConnector, cloudbedsConnector, cloudconvertConnector, cloudflareConnector, cloudinaryConnector, cloutlyConnector, codaConnector, codyConnector, cognismConnector, cognitoFormsConnector, cohereConnector, cometapiConnector, comfyicuConnector, commonRoomConnector, composeIntegrationRegistry, confluenceConnector, consoleStepsToText, constantContactConnector, consumePendingFlow, contactoutConnector, contentfulConnector, contextualAiConnector, contiguityConnector, convertkitConnector, copperConnector, copyAiConnector, couchbaseConnector, createActivepiecesExecutorProvider, createApprovalBackedPolicyEngine, createAuditingActionGuard, createCatalogExecutorProvider, createConnectionCredentialResolver, createConnectorAdapterCatalogSource, createConnectorAdapterProvider, createCredentialBackedAdapterProvider, createDefaultIntegrationActionGuard, createDefaultIntegrationPolicyEngine, createGatewayCatalogProvider, createHttpIntegrationProvider, createIntegrationAuditEvent, createIntegrationHubClient, createIntegrationRuntime, createIntegrationWorkflowRuntime, createKafkaConnector, createLinkedinConnector, createMockIntegrationProvider, createMongoDbConnector, createMySqlConnector, createOAuthBasicAuthorizationHeader, createOAuthTokenRequestHeaders, createPhonyConnector, createPlatformIntegrationPolicyPreset, createPostgresConnector, createRabbitMqConnector, createRedisConnector, createRedshiftConnector, createSftpConnector, createTangleAppsClient, createTangleCatalogExecutorProvider, createTangleIdentityClient, createTangleIntegrationsClient, crispConnector, crustdataConnector, cryptolensConnector, csvFilesConnector, customerIoConnector, customgptConnector, dappierConnector, dashworksConnector, datadogConnector, datafuelConnector, datocmsConnector, decideBillingAccess, declarativeRestConnector, decodeIntegrationBridgePayload, deepgramConnector, deepseekConnector, demandbaseConnector, denserAiConnector, describeIntegrationTool, descriptConnector, detectingAiConnector, devinConnector, dialpadConnector, digitalOceanConnector, digitalPilotConnector, discordConnector, discourseConnector, discoverWorkspaceCapabilities, dispatchIntegrationInvocation, dittofeedConnector, docsbotConnector, doctlyConnector, documentproConnector, documergeConnector, docuseal, docusignConnector, dripConnector, dropboxConnector, dubConnector, duckdbConnector, dumplingAiConnector, dustConnector, easyPeasyAiConnector, ebayConnector, echowinConnector, edenAiConnector, elasticEmailConnector, elevenlabsConnector, emailitConnector, emailoctopusConnector, encodeIntegrationBridgePayload, enrichlayerConnector, esignaturesConnector, etsyConnector, everhourConnector, exaConnector, excelFilesConnector, exchangeAuthorizationCode, explainMissingRequirements, expressTangleAuthMiddleware, extractActivepiecesPublicPieceCount, extractExternalCatalogPublicCount, extractToken, facebookLeadsConnector, facebookPagesConnector, factorsAiConnector, fathomAnalyticsConnector, fathomConnector, featheryConnector, fellowConnector, figjamConnector, figmaConnector, filloutFormsConnector, filterDiscoveryByWorkspaceScopes, findymailConnector, finishConnectFlow, firebaseConnector, fireberryConnector, firecrawlConnector, firefliesAiConnector, firstHeader, flattenIntegrationToolDefinition, flipandoConnector, flowParserConnector, flowiseConnector, flowluConnector, folkConnector, foreplayCoConnector, formEncodeOAuthClientCredential, formbricksConnector, formstackConnector, fountainConnector, fragmentConnector, frameConnector, freeAgentConnector, freshdeskConnector, freshsalesConnector, freshserviceConnector, frontConnector, fullenrichConnector, gameballConnector, gammaConnector, geminiConnector, genderApiConnector, generatebannersConnector, getActivepiecesOverride, getBundledAdapterManifest, getIntegrationFamily, getIntegrationSpec, getresponseConnector, ghostcmsConnector, giftbitConnector, gistlyConnector, giteaConnector, githubConnector, gitlabConnector, glideConnector, gmail, gongConnector, googleAnalyticsConnector, googleApiError, googleBigqueryConnector, googleCalendar, googleCloudStorageConnector, googleContactsConnector, googleDocs, googleDrive, googleErrorReason, googleForms, googleGeminiConnector, googleMeetConnector, googleMyBusinessConnector, googlePubSubConnector, googleSearchConnector, googleSearchConsoleConnector, googleSheets, googleSlidesConnector, googleTasksConnector, googleTestFailureReason, googleVertexaiConnector, googlechatConnector, gorgiasConnector, gotifyConnector, gptzeroDetectAiConnector, granolaConnector, greenhouseConnector, greenptConnector, greipConnector, griptapeConnector, gristConnector, guideliteConnector, gustoConnector, harvestConnector, hasBundledAdapter, hashiCorpVaultConnector, hastewireConnector, healthcheckRequest, heartbeatConnector, hedyConnector, hellosign, helpscoutConnector, heygenConnector, heymarketSmsConnector, heyreachConnector, hightouchConnector, honoTangleAuthMiddleware, housecallProConnector, httpConnector, hubspot, huggingFaceConnector, huggingfaceConnector, humeAiConnector, hunterConnector, hystructConnector, ibmCognoseConnector, imageRouterConnector, imapConnector, importGraphqlConnector, importMcpConnector, importOpenApiConnector, inferIntegrationManifestFromTools, inferIntegrationSupportTier, influencersClubConnector, inkboxConnector, insightlyConnector, insightoAiConnector, instaChartsConnector, instagramBusinessConnector, instantlyAiConnector, instasentConnector, integrationCoverageChecklistMarkdown, integrationSpecToConnector, integrationToolName, intercomConnector, invocationRequestFromEnvelope, invoiceninjaConnector, ironcladConnector, isRealNonPlaceholderEmail, isTrustedPlatformEvidence, jinaAiConnector, jiraCloudConnector, jiraDataCenterConnector, joggAiConnector, jotformConnector, justInvoiceConnector, justcallConnector, kafkaConnector, kallabotAiConnector, kapsoConnector, kimaiConnector, kissflowConnector, kizeoFormsConnector, klaviyoConnector, klentyConnector, knackConnector, knockConnector, koFiConnector, kommoConnector, kudosityConnector, kustomerConnector, lagrowthmachineConnector, leadConnectorConnector, leadfeederConnector, leadmagicConnector, leapAiConnector, leexiConnector, lemlistConnector, lemonSqueezyConnector, letsCalendarConnector, lettaConnector, leverConnector, lightfunnelsConnector, linearConnector, linkaConnector, linkedinConnector, linkupConnector, linqConnector, linqWhatsappConnector, listActivepiecesCatalogEntries, listBundledAdapterKinds, listBundledAdapterManifests, listBundledConnectorAdapters, listExecutableIntegrationSpecs, listIntegrationCoverageSpecs, listIntegrationSpecs, listTangleIntegrationCatalogEntries, listTangleIntegrationCatalogRuntimePackages, listTangleIntegrationContracts, listTangleNativeAdapterIds, llmrailsConnector, lobstermailConnector, localaiConnector, loftyConnector, logrocketConnector, logsnagConnector, lokaliseConnector, loopsConnector, lucidyaConnector, lushaConnector, luxuryPresenceConnector, magicalApiConnector, mailchainConnector, mailchimpConnector, mailerLiteConnector, mailercheckConnector, mailerooConnector, mailgunConnector, makeConnector, manifestToConnector, manychatConnector, marketoConnector, mastodonConnector, matomoConnector, matrixConnector, mattermostConnector, mauticConnector, medullarConnector, meetgeekAiConnector, memConnector, messagebirdConnector, metabaseConnector, microsoft365PeopleConnector, microsoft365PlannerConnector, microsoftCalendar, microsoftDynamics365BusinessCentralConnector, microsoftDynamicsCrmConnector, microsoftExcel365Connector, microsoftGraph, microsoftOnenoteConnector, microsoftPowerBiConnector, microsoftTeams, microsoftTodoConnector, millionverifierConnector, mindStudioConnector, mindeeConnector, miroConnector, missiveConnector, mixmaxConnector, mixpanelConnector, modelslabConnector, modjoConnector, mollieConnector, mondayConnector, mongodbConnector, mycaseConnector, mysqlConnector, n8nConnector, netlifyConnector, netsuiteConnector, neverbounceConnector, niftyConnector, ninjapipeConnector, nocodbConnector, nooksConnector, normalizeGatewayCatalog, normalizeIntegrationError, normalizeIntegrationResult, notion, notionConnector, ntfyConnector, oauthClientCredentialRedactionValues, oceanIoConnector, odooConnector, oktaConnector, omniCoConnector, omnihrConnector, oneDrive, oneSpanSignConnector, oneloginConnector, openPhoneConnector, openRouterConnector, openaiConnector, openmicAiConnector, opnformConnector, opportifyConnector, opsgenieConnector, oracleDatabaseConnector, orimonConnector, outlookMail, outreachConnector, paddleConnector, pagerdutyConnector, pandadoc, paperformConnector, parquetFilesConnector, parseIntegrationBridgeEnvironment, parseIntegrationToolName, parseStripeSignatureHeader, parseurConnector, pastefyConnector, paychexConnector, paywhirlConnector, pdfmonkeyConnector, peekshotConnector, perplexityAiConnector, personalAiConnector, phantombusterConnector, phonyConnector, pinchPaymentsConnector, pineconeConnector, pingIdentityConnector, pipedreamConnector, pipedriveConnector, placidConnector, plaidConnector, plausibleConnector, pocketbaseConnector, pollybotAiConnector, polytomicConnector, postgresConnector, posthogConnector, postizConnector, postmarkConnector, predictLeadsConnector, pricelabsConnector, productboardConnector, proxycurlConnector, publicKafkaSocketFactory, pushbulletConnector, pushoverConnector, qawafelConnector, qdrantConnector, quadernoConnector, quickbooksConnector, quickzuConnector, rabbitMqConnector, raiaAiConnector, rampConnector, rapidtextAiConnector, reachinboxConnector, recallAiConnector, receiveIntegrationWebhook, recurlyConnector, redactApprovalRequest, redactCapability, redactIntegrationBridgePayload, redactInvocationEnvelope, redactOAuthSensitiveText, reddit, redditConnector, redisConnector, redshiftConnector, refreshAccessToken, renderAgentToolDescription, renderApprovalCopy, renderConsentSummary, renderConsoleSteps, renderRunbookMarkdown, renderTangleCatalogRuntimePnpmAddCommand, reoonVerifierConnector, replyIoConnector, requireBrokerGrantReceipt, requireTangleAuth, resendConnector, resolveAtomicIdempotencyStore, resolveConnectionCredentials, resolveConnectorAdapterFactoryOptions, resolveConnectorAuthSpec, resolveIntegrationApproval, retableConnector, retellAiConnector, revokeConnectFlow, revokeConnection, ringcentralConnector, ripplingConnector, robollyConnector, rssConnector, runIntegrationHealthcheck, runIntegrationHealthchecks, runwareConnector, saasticConnector, sageIntacctConnector, saleorConnector, salesforceConnector, saleshandyConnector, salesloftConnector, sanitizeAuditConnection, sanitizeConnection, sanityConnector, sardisConnector, savvycalConnector, scimConnector, scrapegraphaiConnector, scrapelessConnector, seamlessAiConnector, searchIntegrationTools, seekTableConnector, segmentConnector, semrushConnector, sendblueConnector, sendgridConnector, sendinblueConnector, sendpulseConnector, senjaConnector, sentryConnector, serperConnector, serpstatConnector, serviceNowConnector, sftpConnector, sharepoint, shippoConnector, shopifyConnector, shortIoConnector, signCapability, signNowConnector, signrequestConnector, signwellConnector, similarwebConnector, simplirouteConnector, simplybookmeConnector, skyprepConnector, slack, slackEventsConnector, smartleadConnector, smartsheetConnector, smartsuiteConnector, smooveConnector, smsmodeConnector, snovIoConnector, snowflakeConnector, socialkitConnector, specAuthToConnectorAuth, squareConnector, startConnectFlow, startOAuthFlow, statusForCode, storedEventToTriggerEvent, stripeConnector, stripePackConnector, stripeWebhookReceiverConnector, summarizeIntegrationRegistry, supabaseConnector, supadataConnector, swarmnodeConnector, systemeIoConnector, tableauConnector, talkableConnector, tallyConnector, tangleIdentity, taxjarConnector, teableConnector, telegramConnector, telnyxConnector, tenzoConnector, textcortexAiConnector, theirstackConnector, ticktickConnector, tiktok, tiktokConnector, timeOpsConnector, timelinesAiConnector, tlDvConnector, toMcpTools, todoistConnector, togglTrackConnector, totalcmsConnector, trelloConnector, twentyConnector, twilioConnector, twilioSmsConnector, twinLabsConnector, twitter, twitterConnector, typeformConnector, typefullyConnector, umamiConnector, upgradechatConnector, uscreenConnector, usergemsConnector, validateConnectorManifest, validateCredentialFormat, validateCredentialSet, validateIntegrationInvocationEnvelope, validateIntegrationManifest, validateIntegrationSpec, validateProviderPassthroughRequest, validatedmailsConnector, vapiConnector, vboutConnector, vercelConnector, verifyCapabilityToken, verifyEmailSignature, verifyHmacSignature, verifySlackSignature, verifyStripeSignature, verifyTrustedPlatformEvidence, verifyTwilioSignature, videoaskConnector, vidlab7Connector, vlmRunConnector, voucheryIoConnector, vtexConnector, vtigerConnector, wafeqConnector, warmlyConnector, weaviateConnector, webflowConnector, webhookConnector, webscrapingAiConnector, whatConvertsConnector, whatsappBusiness, whatsappConnector, whatsscaleConnector, wizaConnector, wonderchatConnector, woocommerceConnector, woodpeckerConnector, wootricConnector, wordpressConnector, workableConnector, workdayConnector, wrikeConnector, writesonicBulkConnector, wufooConnector, xeroConnector, youcanbookmeConnector, youtubeDataConnector, zagomailConnector, zapierConnector, zendeskConnector, zendeskSellConnector, zenrowsConnector, zeplinConnector, zerobounceConnector, zohoBookingsConnector, zohoBooksConnector, zohoCampaignsConnector, zohoCrmConnector, zohoDeskConnector, zohoInvoiceConnector, zohoMailConnector, zoomConnector, zoominfoConnector, zuoraConnector };
@@ -1,4 +1,4 @@
1
- import { fo as CONNECTOR_ADAPTER_FACTORIES, t as adapters_exports } from "../adapters-ediOgE75.js";
1
+ import { fo as CONNECTOR_ADAPTER_FACTORIES, t as adapters_exports } from "../adapters-4-7nkFS3.js";
2
2
  //#region src/connectors/bundled-manifest-runtime.ts
3
3
  const MANIFEST_PROBE_PREFIX = "tangle-adapter-metadata-";
4
4
  function isConnectorAdapter(value) {
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { E as IntegrationProvider, h as IntegrationConnectorCategory, o as IntegrationActionRisk, p as IntegrationConnector, v as IntegrationDataClass } from "./core-types-LLZ7aRGv.js";
2
- import { gt as McpCatalogTool } from "./consumer-BC6pCUzI.js";
2
+ import { pt as McpCatalogTool } from "./consumer-zHtoJixe.js";
3
3
  //#region src/mcp.d.ts
4
4
  /** Protocol revision sent on `initialize` and the `MCP-Protocol-Version`
5
5
  * header. Servers negotiate down from this. */
package/dist/mcp.js CHANGED
@@ -1,4 +1,5 @@
1
- import { Lt as createCatalogExecutorProvider, m as importMcpConnector, vt as IntegrationError } from "./src-Bd4KMI-J.js";
1
+ import { m as IntegrationError } from "./hub-D13zPQGr.js";
2
+ import { F as createCatalogExecutorProvider, N as importMcpConnector } from "./src-mzICXbwx.js";
2
3
  //#region src/mcp.ts
3
4
  /**
4
5
  * Live MCP connector — attach a remote MCP (Model Context Protocol) server
package/dist/mcp.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.js","names":[],"sources":["../src/mcp.ts"],"sourcesContent":["/**\n * Live MCP connector — attach a remote MCP (Model Context Protocol) server\n * as an {@link IntegrationProvider}, so its tools flow through the same\n * catalog / grants / approvals machinery as every other connector instead of\n * forming a parallel, ungoverned tool path.\n *\n * Transport is Streamable HTTP only (single POST endpoint, JSON or SSE\n * response framing) — this package runs in edge workers, so stdio servers are\n * out of scope; front them with any HTTP-bridging MCP host.\n *\n * Discovery reuses {@link importMcpConnector}: `tools/list` output becomes an\n * `IntegrationConnector` whose per-action risk comes from MCP tool\n * annotations (readOnlyHint / destructiveHint) with a text-heuristic\n * fallback, so non-read MCP tools default to `approvalRequired` — fail-closed\n * against servers that don't annotate.\n *\n * Credentials: the server's auth header is supplied at construction by the\n * product (which owns secret storage) and held in memory only. Connection\n * rows carry no MCP secrets.\n */\n\nimport { IntegrationError } from './core-error.js'\nimport type {\n IntegrationActionResult,\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorCategory,\n IntegrationDataClass,\n IntegrationProvider,\n} from './core-types.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport { importMcpConnector, type McpCatalogTool } from './importers.js'\n\n/** Protocol revision sent on `initialize` and the `MCP-Protocol-Version`\n * header. Servers negotiate down from this. */\nexport const MCP_PROTOCOL_VERSION = '2025-06-18'\n\nexport interface McpServerConfig {\n /** The server's single Streamable-HTTP endpoint. */\n url: string\n /** Static request headers — typically `{ Authorization: 'Bearer …' }`.\n * Held in memory only; never persisted by this module. */\n headers?: Record<string, string>\n protocolVersion?: string\n clientInfo?: { name: string; version: string }\n /** Injectable for tests / custom egress policies (SSRF pinning). */\n fetchImpl?: typeof fetch\n}\n\nexport interface McpToolCallResult {\n /** MCP content blocks (text, image, resource, …) verbatim. */\n content: unknown[]\n isError: boolean\n /** `structuredContent` from servers that return it. */\n structured?: unknown\n}\n\ninterface JsonRpcResponse {\n jsonrpc: '2.0'\n id?: number | string | null\n result?: unknown\n error?: { code: number; message: string; data?: unknown }\n}\n\n/**\n * Minimal Streamable-HTTP MCP client: `initialize` handshake (capturing the\n * server's `Mcp-Session-Id`), paginated `tools/list`, and `tools/call`.\n * Lazily initializes on first use; safe to share across calls within an\n * isolate.\n */\nexport class McpHttpClient {\n private nextId = 1\n private sessionId: string | undefined\n private negotiatedVersion: string | undefined\n private initializing: Promise<void> | undefined\n\n constructor(private readonly config: McpServerConfig) {}\n\n private get fetchImpl(): typeof fetch {\n return this.config.fetchImpl ?? fetch\n }\n\n private async post(body: Record<string, unknown>): Promise<JsonRpcResponse | undefined> {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n Accept: 'application/json, text/event-stream',\n ...(this.config.headers ?? {}),\n }\n const version = this.negotiatedVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION\n headers['MCP-Protocol-Version'] = version\n if (this.sessionId) headers['Mcp-Session-Id'] = this.sessionId\n\n let response: Response\n try {\n response = await this.fetchImpl(this.config.url, {\n method: 'POST',\n headers,\n body: JSON.stringify(body),\n })\n } catch (error) {\n throw new IntegrationError(\n `MCP server unreachable: ${error instanceof Error ? error.message : String(error)}`,\n 'provider_failure',\n )\n }\n const session = response.headers.get('mcp-session-id')\n if (session) this.sessionId = session\n\n if (!response.ok) {\n throw new IntegrationError(`MCP server returned HTTP ${response.status}`, 'provider_failure')\n }\n // Notifications get 202/204 with no body.\n if (body.id === undefined) return undefined\n const contentType = response.headers.get('content-type') ?? ''\n const text = await response.text()\n const message = contentType.includes('text/event-stream')\n ? findSseResponse(text, body.id as number)\n : (JSON.parse(text) as JsonRpcResponse)\n if (!message) {\n throw new IntegrationError('MCP server response missing a result for the request', 'provider_failure')\n }\n if (message.error) {\n throw new IntegrationError(`MCP error ${message.error.code}: ${message.error.message}`, 'provider_failure')\n }\n return message\n }\n\n private async request(method: string, params?: Record<string, unknown>): Promise<unknown> {\n const response = await this.post({ jsonrpc: '2.0', id: this.nextId++, method, ...(params ? { params } : {}) })\n return response?.result\n }\n\n /** Idempotent handshake; concurrent callers share one in-flight init. */\n async initialize(): Promise<void> {\n if (this.negotiatedVersion) return\n this.initializing ??= (async () => {\n const result = (await this.request('initialize', {\n protocolVersion: this.config.protocolVersion ?? MCP_PROTOCOL_VERSION,\n capabilities: {},\n clientInfo: this.config.clientInfo ?? { name: 'tangle-agent-integrations', version: '1' },\n })) as { protocolVersion?: string } | undefined\n this.negotiatedVersion = result?.protocolVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION\n await this.post({ jsonrpc: '2.0', method: 'notifications/initialized' })\n })().catch((error) => {\n this.initializing = undefined\n throw error\n })\n await this.initializing\n }\n\n /** Full tool catalog, following `nextCursor` pagination. */\n async listTools(): Promise<McpCatalogTool[]> {\n await this.initialize()\n const tools: McpCatalogTool[] = []\n let cursor: string | undefined\n do {\n const result = (await this.request('tools/list', cursor ? { cursor } : {})) as\n | { tools?: McpCatalogTool[]; nextCursor?: string }\n | undefined\n tools.push(...(result?.tools ?? []))\n cursor = result?.nextCursor\n } while (cursor)\n return tools\n }\n\n async callTool(name: string, args: unknown): Promise<McpToolCallResult> {\n await this.initialize()\n const result = (await this.request('tools/call', { name, arguments: args ?? {} })) as\n | { content?: unknown[]; isError?: boolean; structuredContent?: unknown }\n | undefined\n return {\n content: result?.content ?? [],\n isError: result?.isError === true,\n structured: result?.structuredContent,\n }\n }\n}\n\nexport interface CreateMcpProviderOptions {\n /** Provider id, unique within the hub (e.g. `mcp:linear`). */\n id: string\n server: McpServerConfig\n connectorId: string\n connectorTitle: string\n category?: IntegrationConnectorCategory\n scopes?: string[]\n dataClass?: IntegrationDataClass\n /** Risk for tools whose annotations/name don't classify them. Defaults to\n * 'write' (⇒ approvalRequired) — fail-closed. */\n defaultRisk?: IntegrationActionRisk\n}\n\n/** Discover a live MCP server's tools as an {@link IntegrationConnector}. */\nexport async function discoverMcpConnector(\n client: McpHttpClient,\n options: CreateMcpProviderOptions,\n): Promise<IntegrationConnector> {\n const tools = await client.listTools()\n return importMcpConnector(\n { tools },\n {\n providerId: options.id,\n connectorId: options.connectorId,\n connectorTitle: options.connectorTitle,\n category: options.category,\n auth: 'custom',\n scopes: options.scopes,\n dataClass: options.dataClass,\n defaultRisk: options.defaultRisk ?? 'write',\n },\n )\n}\n\n/**\n * Build an {@link IntegrationProvider} over one remote MCP server: live\n * `tools/list` discovery at construction, `tools/call` on invoke. A tool\n * result with `isError` maps to `{ ok: false }` (the model sees the failure\n * content); transport and JSON-RPC failures throw {@link IntegrationError}.\n */\nexport async function createMcpProvider(options: CreateMcpProviderOptions): Promise<IntegrationProvider> {\n const client = new McpHttpClient(options.server)\n const connector = await discoverMcpConnector(client, options)\n return createCatalogExecutorProvider({\n id: options.id,\n kind: 'mcp',\n connectors: [connector],\n async executeAction({ request, action }): Promise<IntegrationActionResult> {\n const result = await client.callTool(action.id, request.input)\n return {\n ok: !result.isError,\n action: action.id,\n output: result.structured ?? result.content,\n metadata: { mcp: true, ...(result.isError ? { isError: true } : {}) },\n }\n },\n })\n}\n\nfunction findSseResponse(body: string, id: number): JsonRpcResponse | undefined {\n for (const event of body.split(/\\n\\n/)) {\n const data = event\n .split('\\n')\n .filter((line) => line.startsWith('data:'))\n .map((line) => line.slice(5).trim())\n .join('')\n if (!data) continue\n try {\n const parsed = JSON.parse(data) as JsonRpcResponse\n if (parsed.id === id) return parsed\n } catch {\n // non-JSON SSE frame (keepalive/comment) — skip\n }\n }\n return undefined\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"mcp.js","names":[],"sources":["../src/mcp.ts"],"sourcesContent":["/**\n * Live MCP connector — attach a remote MCP (Model Context Protocol) server\n * as an {@link IntegrationProvider}, so its tools flow through the same\n * catalog / grants / approvals machinery as every other connector instead of\n * forming a parallel, ungoverned tool path.\n *\n * Transport is Streamable HTTP only (single POST endpoint, JSON or SSE\n * response framing) — this package runs in edge workers, so stdio servers are\n * out of scope; front them with any HTTP-bridging MCP host.\n *\n * Discovery reuses {@link importMcpConnector}: `tools/list` output becomes an\n * `IntegrationConnector` whose per-action risk comes from MCP tool\n * annotations (readOnlyHint / destructiveHint) with a text-heuristic\n * fallback, so non-read MCP tools default to `approvalRequired` — fail-closed\n * against servers that don't annotate.\n *\n * Credentials: the server's auth header is supplied at construction by the\n * product (which owns secret storage) and held in memory only. Connection\n * rows carry no MCP secrets.\n */\n\nimport { IntegrationError } from './core-error.js'\nimport type {\n IntegrationActionResult,\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorCategory,\n IntegrationDataClass,\n IntegrationProvider,\n} from './core-types.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport { importMcpConnector, type McpCatalogTool } from './importers.js'\n\n/** Protocol revision sent on `initialize` and the `MCP-Protocol-Version`\n * header. Servers negotiate down from this. */\nexport const MCP_PROTOCOL_VERSION = '2025-06-18'\n\nexport interface McpServerConfig {\n /** The server's single Streamable-HTTP endpoint. */\n url: string\n /** Static request headers — typically `{ Authorization: 'Bearer …' }`.\n * Held in memory only; never persisted by this module. */\n headers?: Record<string, string>\n protocolVersion?: string\n clientInfo?: { name: string; version: string }\n /** Injectable for tests / custom egress policies (SSRF pinning). */\n fetchImpl?: typeof fetch\n}\n\nexport interface McpToolCallResult {\n /** MCP content blocks (text, image, resource, …) verbatim. */\n content: unknown[]\n isError: boolean\n /** `structuredContent` from servers that return it. */\n structured?: unknown\n}\n\ninterface JsonRpcResponse {\n jsonrpc: '2.0'\n id?: number | string | null\n result?: unknown\n error?: { code: number; message: string; data?: unknown }\n}\n\n/**\n * Minimal Streamable-HTTP MCP client: `initialize` handshake (capturing the\n * server's `Mcp-Session-Id`), paginated `tools/list`, and `tools/call`.\n * Lazily initializes on first use; safe to share across calls within an\n * isolate.\n */\nexport class McpHttpClient {\n private nextId = 1\n private sessionId: string | undefined\n private negotiatedVersion: string | undefined\n private initializing: Promise<void> | undefined\n\n constructor(private readonly config: McpServerConfig) {}\n\n private get fetchImpl(): typeof fetch {\n return this.config.fetchImpl ?? fetch\n }\n\n private async post(body: Record<string, unknown>): Promise<JsonRpcResponse | undefined> {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n Accept: 'application/json, text/event-stream',\n ...(this.config.headers ?? {}),\n }\n const version = this.negotiatedVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION\n headers['MCP-Protocol-Version'] = version\n if (this.sessionId) headers['Mcp-Session-Id'] = this.sessionId\n\n let response: Response\n try {\n response = await this.fetchImpl(this.config.url, {\n method: 'POST',\n headers,\n body: JSON.stringify(body),\n })\n } catch (error) {\n throw new IntegrationError(\n `MCP server unreachable: ${error instanceof Error ? error.message : String(error)}`,\n 'provider_failure',\n )\n }\n const session = response.headers.get('mcp-session-id')\n if (session) this.sessionId = session\n\n if (!response.ok) {\n throw new IntegrationError(`MCP server returned HTTP ${response.status}`, 'provider_failure')\n }\n // Notifications get 202/204 with no body.\n if (body.id === undefined) return undefined\n const contentType = response.headers.get('content-type') ?? ''\n const text = await response.text()\n const message = contentType.includes('text/event-stream')\n ? findSseResponse(text, body.id as number)\n : (JSON.parse(text) as JsonRpcResponse)\n if (!message) {\n throw new IntegrationError('MCP server response missing a result for the request', 'provider_failure')\n }\n if (message.error) {\n throw new IntegrationError(`MCP error ${message.error.code}: ${message.error.message}`, 'provider_failure')\n }\n return message\n }\n\n private async request(method: string, params?: Record<string, unknown>): Promise<unknown> {\n const response = await this.post({ jsonrpc: '2.0', id: this.nextId++, method, ...(params ? { params } : {}) })\n return response?.result\n }\n\n /** Idempotent handshake; concurrent callers share one in-flight init. */\n async initialize(): Promise<void> {\n if (this.negotiatedVersion) return\n this.initializing ??= (async () => {\n const result = (await this.request('initialize', {\n protocolVersion: this.config.protocolVersion ?? MCP_PROTOCOL_VERSION,\n capabilities: {},\n clientInfo: this.config.clientInfo ?? { name: 'tangle-agent-integrations', version: '1' },\n })) as { protocolVersion?: string } | undefined\n this.negotiatedVersion = result?.protocolVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION\n await this.post({ jsonrpc: '2.0', method: 'notifications/initialized' })\n })().catch((error) => {\n this.initializing = undefined\n throw error\n })\n await this.initializing\n }\n\n /** Full tool catalog, following `nextCursor` pagination. */\n async listTools(): Promise<McpCatalogTool[]> {\n await this.initialize()\n const tools: McpCatalogTool[] = []\n let cursor: string | undefined\n do {\n const result = (await this.request('tools/list', cursor ? { cursor } : {})) as\n | { tools?: McpCatalogTool[]; nextCursor?: string }\n | undefined\n tools.push(...(result?.tools ?? []))\n cursor = result?.nextCursor\n } while (cursor)\n return tools\n }\n\n async callTool(name: string, args: unknown): Promise<McpToolCallResult> {\n await this.initialize()\n const result = (await this.request('tools/call', { name, arguments: args ?? {} })) as\n | { content?: unknown[]; isError?: boolean; structuredContent?: unknown }\n | undefined\n return {\n content: result?.content ?? [],\n isError: result?.isError === true,\n structured: result?.structuredContent,\n }\n }\n}\n\nexport interface CreateMcpProviderOptions {\n /** Provider id, unique within the hub (e.g. `mcp:linear`). */\n id: string\n server: McpServerConfig\n connectorId: string\n connectorTitle: string\n category?: IntegrationConnectorCategory\n scopes?: string[]\n dataClass?: IntegrationDataClass\n /** Risk for tools whose annotations/name don't classify them. Defaults to\n * 'write' (⇒ approvalRequired) — fail-closed. */\n defaultRisk?: IntegrationActionRisk\n}\n\n/** Discover a live MCP server's tools as an {@link IntegrationConnector}. */\nexport async function discoverMcpConnector(\n client: McpHttpClient,\n options: CreateMcpProviderOptions,\n): Promise<IntegrationConnector> {\n const tools = await client.listTools()\n return importMcpConnector(\n { tools },\n {\n providerId: options.id,\n connectorId: options.connectorId,\n connectorTitle: options.connectorTitle,\n category: options.category,\n auth: 'custom',\n scopes: options.scopes,\n dataClass: options.dataClass,\n defaultRisk: options.defaultRisk ?? 'write',\n },\n )\n}\n\n/**\n * Build an {@link IntegrationProvider} over one remote MCP server: live\n * `tools/list` discovery at construction, `tools/call` on invoke. A tool\n * result with `isError` maps to `{ ok: false }` (the model sees the failure\n * content); transport and JSON-RPC failures throw {@link IntegrationError}.\n */\nexport async function createMcpProvider(options: CreateMcpProviderOptions): Promise<IntegrationProvider> {\n const client = new McpHttpClient(options.server)\n const connector = await discoverMcpConnector(client, options)\n return createCatalogExecutorProvider({\n id: options.id,\n kind: 'mcp',\n connectors: [connector],\n async executeAction({ request, action }): Promise<IntegrationActionResult> {\n const result = await client.callTool(action.id, request.input)\n return {\n ok: !result.isError,\n action: action.id,\n output: result.structured ?? result.content,\n metadata: { mcp: true, ...(result.isError ? { isError: true } : {}) },\n }\n },\n })\n}\n\nfunction findSseResponse(body: string, id: number): JsonRpcResponse | undefined {\n for (const event of body.split(/\\n\\n/)) {\n const data = event\n .split('\\n')\n .filter((line) => line.startsWith('data:'))\n .map((line) => line.slice(5).trim())\n .join('')\n if (!data) continue\n try {\n const parsed = JSON.parse(data) as JsonRpcResponse\n if (parsed.id === id) return parsed\n } catch {\n // non-JSON SSE frame (keepalive/comment) — skip\n }\n }\n return undefined\n}\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
- import { a as TangleIdentityUnreachableError, o as createTangleIdentityClient } from "../tangle-id-S6oooMWh.js";
2
1
  import { c as isRealNonPlaceholderEmail } from "../billing-access-policy-DJ63AxZ5.js";
2
+ import { a as TangleIdentityUnreachableError, o as createTangleIdentityClient } from "../tangle-id-S6oooMWh.js";
3
3
  //#region src/middleware/index.ts
4
4
  /**
5
5
  * @stable Drop-in request middleware that verifies id.tangle.tools
@@ -0,0 +1,136 @@
1
+ import { x as OAuth2TokenClientAuthMethod } from "./types-CauVC-Gr.js";
2
+ //#region src/connectors/oauth.d.ts
3
+ type OAuthPkceMode = 'required' | 'supported' | 'unsupported';
4
+ interface PendingOAuthFlow {
5
+ /** code_verifier for PKCE. Absent when the provider rejects PKCE. */
6
+ codeVerifier?: string;
7
+ /** Opaque-state value also returned in the OAuth redirect. */
8
+ state: string;
9
+ /** Project the user is connecting under. */
10
+ projectId: string;
11
+ /** Connector kind (e.g. 'google-calendar'). */
12
+ kind: string;
13
+ /** Operator-supplied label that becomes DataSource.label. */
14
+ label: string;
15
+ /** When we drop the entry. */
16
+ expiresAt: number;
17
+ /** The redirectUri we used in the start step — must match exactly on
18
+ * the callback exchange. */
19
+ redirectUri: string;
20
+ }
21
+ interface OAuthFlowStore {
22
+ put(state: string, flow: PendingOAuthFlow): Promise<void> | void;
23
+ consume(state: string): Promise<PendingOAuthFlow | undefined> | PendingOAuthFlow | undefined;
24
+ sweep?(now: number): Promise<void> | void;
25
+ clear?(): Promise<void> | void;
26
+ }
27
+ declare class InMemoryOAuthFlowStore implements OAuthFlowStore {
28
+ private readonly pendingFlows;
29
+ put(state: string, flow: PendingOAuthFlow): void;
30
+ consume(state: string): PendingOAuthFlow | undefined;
31
+ sweep(now: number): void;
32
+ clear(): void;
33
+ }
34
+ interface StartOAuthInput {
35
+ projectId: string;
36
+ kind: string;
37
+ label: string;
38
+ authorizationUrl: string;
39
+ scopes: string[];
40
+ /** OAuth defaults to spaces; set `,` for providers such as Zoho. */
41
+ scopeSeparator?: ' ' | ',';
42
+ clientId: string;
43
+ /** Authorization query parameter for the client id. Defaults to
44
+ * `client_id`; TikTok uses `client_key`. */
45
+ authorizationClientIdParam?: string;
46
+ /** PKCE posture. Defaults to required to preserve the existing safe flow. */
47
+ pkce?: OAuthPkceMode;
48
+ redirectUri: string;
49
+ /** Optional extra query params; Google needs `access_type=offline` and
50
+ * `prompt=consent` to issue refresh tokens reliably. */
51
+ extraAuthParams?: Record<string, string>;
52
+ /** Optional flow store. Use a durable store in distributed production
53
+ * runtimes; omitted means local in-memory storage. */
54
+ store?: OAuthFlowStore;
55
+ /** Override clock for tests. */
56
+ now?: number;
57
+ }
58
+ interface StartOAuthOutput {
59
+ /** URL the SPA should redirect the user to. */
60
+ authorizationUrl: string;
61
+ /** State token — caller stashes this in localStorage to verify on
62
+ * callback. */
63
+ state: string;
64
+ }
65
+ /** Build the authorization URL + state. SPA navigates the user there;
66
+ * user consents; provider redirects back to redirectUri with `code` +
67
+ * `state`. The caller's callback then invokes `consumePendingFlow`. */
68
+ declare function startOAuthFlow(input: StartOAuthInput): StartOAuthOutput;
69
+ /** Look up + remove the pending flow record. Throws if state is unknown
70
+ * or expired (CSRF guard / replay protection). */
71
+ declare function consumePendingFlow(state: string, store?: OAuthFlowStore): Promise<PendingOAuthFlow>;
72
+ interface ExchangeCodeInput {
73
+ tokenUrl: string;
74
+ clientId: string;
75
+ /** Required unless tokenClientAuthMethod is `none`. */
76
+ clientSecret?: string;
77
+ /** Defaults to client_secret_post for backward compatibility. */
78
+ tokenClientAuthMethod?: OAuth2TokenClientAuthMethod;
79
+ tokenClientIdParam?: string;
80
+ tokenClientSecretParam?: string;
81
+ code: string;
82
+ /** Required unless pkce is explicitly unsupported. */
83
+ codeVerifier?: string;
84
+ /** PKCE posture. Defaults to required. */
85
+ pkce?: OAuthPkceMode;
86
+ redirectUri: string;
87
+ /** Non-secret provider identification headers for the token request. */
88
+ tokenRequestHeaders?: Readonly<Record<string, string>>;
89
+ fetchImpl?: typeof fetch;
90
+ signal?: AbortSignal;
91
+ }
92
+ interface OAuthTokens {
93
+ accessToken: string;
94
+ refreshToken?: string;
95
+ expiresIn?: number;
96
+ scope?: string;
97
+ tokenType?: string;
98
+ /** OpenID Connect identity token returned when the connector requests
99
+ * `openid`. Kept separate from the access credential so adapters can
100
+ * capture stable account metadata without persisting the ID token. */
101
+ idToken?: string;
102
+ }
103
+ /** POST authorization code → token endpoint. Provider-agnostic; if a
104
+ * provider returns a non-standard JSON shape, the adapter wraps this
105
+ * call rather than reaching into the helper. */
106
+ declare function exchangeAuthorizationCode(input: ExchangeCodeInput): Promise<OAuthTokens>;
107
+ interface RefreshInput {
108
+ tokenUrl: string;
109
+ clientId: string;
110
+ /** Required unless tokenClientAuthMethod is `none`. */
111
+ clientSecret?: string;
112
+ /** Defaults to client_secret_post for backward compatibility. */
113
+ tokenClientAuthMethod?: OAuth2TokenClientAuthMethod;
114
+ tokenClientIdParam?: string;
115
+ tokenClientSecretParam?: string;
116
+ refreshToken: string;
117
+ /** Non-secret provider identification headers for the token request. */
118
+ tokenRequestHeaders?: Readonly<Record<string, string>>;
119
+ fetchImpl?: typeof fetch;
120
+ signal?: AbortSignal;
121
+ }
122
+ /** Refresh an access token. Returns the new tokens — the connector layer
123
+ * is responsible for re-encrypting + persisting the envelope. */
124
+ declare function refreshAccessToken(input: RefreshInput): Promise<OAuthTokens>;
125
+ /** Build token-endpoint headers without permitting an adapter-supplied value
126
+ * to replace the authentication or form-media-type headers owned here. */
127
+ declare function createOAuthTokenRequestHeaders(additional?: Readonly<Record<string, string>>): Record<string, string>;
128
+ declare function formEncodeOAuthClientCredential(value: string): string;
129
+ declare function createOAuthBasicAuthorizationHeader(clientId: string, clientSecret: string, encodeBase64?: (value: string) => string): string;
130
+ declare function oauthClientCredentialRedactionValues(clientId: string, clientSecret?: string, authorization?: string): string[];
131
+ declare function redactOAuthSensitiveText(text: string, secrets: readonly string[]): string;
132
+ /** Test-only — drop pending flows between unit-test runs. */
133
+ declare function _resetPendingFlowsForTests(): void;
134
+ //#endregion
135
+ export { redactOAuthSensitiveText as _, OAuthTokens as a, StartOAuthInput as c, consumePendingFlow as d, createOAuthBasicAuthorizationHeader as f, oauthClientCredentialRedactionValues as g, formEncodeOAuthClientCredential as h, OAuthPkceMode as i, StartOAuthOutput as l, exchangeAuthorizationCode as m, InMemoryOAuthFlowStore as n, PendingOAuthFlow as o, createOAuthTokenRequestHeaders as p, OAuthFlowStore as r, RefreshInput as s, ExchangeCodeInput as t, _resetPendingFlowsForTests as u, refreshAccessToken as v, startOAuthFlow as y };
136
+ //# sourceMappingURL=oauth-C5pa5j3O.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-C5pa5j3O.d.ts","names":[],"sources":["../src/connectors/oauth.ts"],"mappings":";;KAkBY;UAEK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;UAKe;EACf,IAAI,eAAe,MAAM,mBAAmB;EAC5C,QAAQ,gBAAgB,QAAQ,gCAAgC;EAChE,OAAO,cAAc;EACrB,UAAU;;cAGC,kCAAkC;mBAC5B;EAEjB,IAAI,eAAe,MAAM;EAIzB,QAAQ,gBAAgB;EAOxB,MAAM;EAMN;;UAOe;EACf;EACA;EACA;EACA;EACA;;EAEA;EACA;;;EAGA;;EAEA,OAAO;EACP;;;EAGA,kBAAkB;;;EAGlB,QAAQ;;EAER;;UAGe;;EAEf;;;EAGA;;;;;iBAMc,eAAe,OAAO,kBAAkB;;;iBA+ClC,mBAAmB,eAAe,QAAO,iBAAoC,QAAQ;UAS1F;EACf;EACA;;EAEA;;EAEA,wBAAwB;EACxB;EACA;EACA;;EAEA;;EAEA,OAAO;EACP;;EAEA,sBAAsB,SAAS;EAC/B,mBAAmB;EACnB,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;;;;EAIA;;;;;iBAMoB,0BAA0B,OAAO,oBAAoB,QAAQ;UAoElE;EACf;EACA;;EAEA;;EAEA,wBAAwB;EACxB;EACA;EACA;;EAEA,sBAAsB,SAAS;EAC/B,mBAAmB;EACnB,SAAS;;;;iBAKW,mBAAmB,OAAO,eAAe,QAAQ;;;iBA+DvD,+BACd,aAAa,SAAS,0BACrB;iBAQa,gCAAgC;iBAIhC,oCACd,kBACA,sBACA,gBAAe;iBAiBD,qCACd,kBACA,uBACA;iBAgBc,yBACd,cACA;;iBA8Hc"}
@@ -0,0 +1,186 @@
1
+ import { t as INTEGRATION_KIND_ALIASES } from "./integration-kind-aliases-DeUJgBWP.js";
2
+ //#region src/registry-core.ts
3
+ const DEFAULT_ALIASES = INTEGRATION_KIND_ALIASES;
4
+ const DEFAULT_SOURCE_PRECEDENCE = {
5
+ "first-party": 500,
6
+ spec: 400,
7
+ gateway: 300,
8
+ "tangle-catalog": 100,
9
+ activepieces: 100,
10
+ coverage: 50
11
+ };
12
+ const SUPPORT_RANK = {
13
+ catalogOnly: 0,
14
+ setupReady: 1,
15
+ gatewayExecutable: 2,
16
+ firstPartyExecutable: 3,
17
+ sandboxExecutable: 4
18
+ };
19
+ function composeIntegrationRegistry(sources, options = {}) {
20
+ const aliases = {
21
+ ...DEFAULT_ALIASES,
22
+ ...options.aliases ?? {}
23
+ };
24
+ const precedence = {
25
+ ...DEFAULT_SOURCE_PRECEDENCE,
26
+ ...options.sourcePrecedence ?? {}
27
+ };
28
+ const grouped = /* @__PURE__ */ new Map();
29
+ for (const source of sources) for (const connector of source.connectors) {
30
+ const canonicalId = canonicalConnectorId(connector.id, aliases);
31
+ const candidates = grouped.get(canonicalId) ?? [];
32
+ candidates.push({
33
+ source,
34
+ connector,
35
+ supportTier: inferIntegrationSupportTier(connector)
36
+ });
37
+ grouped.set(canonicalId, candidates);
38
+ }
39
+ const entries = [...grouped.entries()].map(([canonicalId, candidates]) => registryEntry(canonicalId, candidates, precedence, aliases)).sort((a, b) => a.canonicalId.localeCompare(b.canonicalId));
40
+ const byId = /* @__PURE__ */ new Map();
41
+ for (const entry of entries) {
42
+ byId.set(entry.canonicalId, entry);
43
+ for (const alias of entry.aliases) byId.set(alias, entry);
44
+ }
45
+ return {
46
+ entries,
47
+ connectors: entries.map((entry) => entry.connector),
48
+ byId
49
+ };
50
+ }
51
+ function summarizeIntegrationRegistry(registry) {
52
+ const bySupportTier = {
53
+ catalogOnly: 0,
54
+ setupReady: 0,
55
+ gatewayExecutable: 0,
56
+ firstPartyExecutable: 0,
57
+ sandboxExecutable: 0
58
+ };
59
+ for (const entry of registry.entries) bySupportTier[entry.supportTier] += 1;
60
+ return {
61
+ totalEntries: registry.entries.length,
62
+ totalSources: registry.entries.reduce((sum, entry) => sum + entry.sources.length, 0),
63
+ toolBindableEntries: registry.entries.filter((entry) => entry.connector.actions.length > 0).length,
64
+ conflictEntries: registry.entries.filter((entry) => entry.conflicts.length > 0).length,
65
+ bySupportTier
66
+ };
67
+ }
68
+ function canonicalConnectorId(id, aliases = DEFAULT_ALIASES) {
69
+ let current = slug(id);
70
+ const seen = /* @__PURE__ */ new Set();
71
+ while (aliases[current] && !seen.has(current)) {
72
+ seen.add(current);
73
+ current = aliases[current];
74
+ }
75
+ return current;
76
+ }
77
+ function inferIntegrationSupportTier(connector) {
78
+ const metadata = connector.metadata ?? {};
79
+ const explicit = metadata.supportTier;
80
+ if (isSupportTier(explicit)) return explicit;
81
+ if (metadata.sandboxExecutable === true) return "sandboxExecutable";
82
+ if (metadata.source === "first-party-adapter" || connector.providerId === "first-party") return "firstPartyExecutable";
83
+ if (metadata.source === "gateway-catalog" && metadata.executable === true) return "gatewayExecutable";
84
+ if (metadata.source === "integration-spec") return "setupReady";
85
+ if (metadata.source === "coverage-catalog" || metadata.source === "activepieces-community" || metadata.source === "tangle-integrations-catalog" || metadata.catalogOnly === true) return "catalogOnly";
86
+ if (connector.actions.length > 0) return "gatewayExecutable";
87
+ return "catalogOnly";
88
+ }
89
+ function registryEntry(canonicalId, candidates, precedence, aliases) {
90
+ const ordered = [...candidates].sort((a, b) => compareCandidates(a, b, precedence));
91
+ const primary = ordered[0];
92
+ const actions = mergeActions(ordered);
93
+ const triggers = mergeTriggers(ordered);
94
+ const scopes = unique(toolBindableCandidates(ordered).flatMap((candidate) => candidate.connector.scopes ?? []));
95
+ const supportTier = ordered.reduce((best, candidate) => SUPPORT_RANK[candidate.supportTier] > SUPPORT_RANK[best] ? candidate.supportTier : best, primary.supportTier);
96
+ const aliasesForEntry = unique([...ordered.map((candidate) => candidate.connector.id), ...Object.entries(aliases).filter(([, target]) => canonicalConnectorId(target, aliases) === canonicalId).map(([alias]) => alias)].map(slug).filter((id) => id && id !== canonicalId)).sort();
97
+ const sources = ordered.map((candidate) => ({
98
+ sourceId: candidate.source.id,
99
+ providerId: candidate.connector.providerId,
100
+ connectorId: candidate.connector.id,
101
+ supportTier: candidate.supportTier,
102
+ actionCount: candidate.connector.actions.length,
103
+ triggerCount: candidate.connector.triggers?.length ?? 0
104
+ }));
105
+ const conflicts = conflictDiagnostics(ordered);
106
+ return {
107
+ canonicalId,
108
+ aliases: aliasesForEntry,
109
+ supportTier,
110
+ sources,
111
+ conflicts,
112
+ connector: {
113
+ ...primary.connector,
114
+ id: canonicalId,
115
+ scopes,
116
+ actions,
117
+ triggers,
118
+ metadata: {
119
+ ...primary.connector.metadata ?? {},
120
+ registry: {
121
+ canonicalId,
122
+ aliases: aliasesForEntry,
123
+ supportTier,
124
+ sources,
125
+ conflicts,
126
+ toolBindable: actions.length > 0,
127
+ catalogOnlyActionCount: ordered.filter((candidate) => candidate.supportTier === "catalogOnly").reduce((sum, candidate) => sum + catalogActionCount(candidate.connector), 0)
128
+ }
129
+ }
130
+ }
131
+ };
132
+ }
133
+ function compareCandidates(a, b, precedence) {
134
+ return SUPPORT_RANK[b.supportTier] - SUPPORT_RANK[a.supportTier] || (b.source.precedence ?? precedence[b.source.id] ?? 0) - (a.source.precedence ?? precedence[a.source.id] ?? 0) || b.connector.actions.length - a.connector.actions.length || a.connector.id.localeCompare(b.connector.id);
135
+ }
136
+ function mergeActions(candidates) {
137
+ const out = /* @__PURE__ */ new Map();
138
+ for (const candidate of toolBindableCandidates(candidates)) for (const action of candidate.connector.actions) if (!out.has(action.id)) out.set(action.id, action);
139
+ return [...out.values()];
140
+ }
141
+ function mergeTriggers(candidates) {
142
+ const out = /* @__PURE__ */ new Map();
143
+ for (const candidate of toolBindableCandidates(candidates)) for (const trigger of candidate.connector.triggers ?? []) if (!out.has(trigger.id)) out.set(trigger.id, trigger);
144
+ return out.size > 0 ? [...out.values()] : void 0;
145
+ }
146
+ function toolBindableCandidates(candidates) {
147
+ const bindable = candidates.filter((candidate) => candidate.supportTier !== "catalogOnly");
148
+ if (bindable.length === 0) return [];
149
+ const maxRank = Math.max(...bindable.map((candidate) => SUPPORT_RANK[candidate.supportTier]));
150
+ return bindable.filter((candidate) => SUPPORT_RANK[candidate.supportTier] === maxRank);
151
+ }
152
+ function catalogActionCount(connector) {
153
+ const value = connector.metadata?.catalogActionCount;
154
+ return typeof value === "number" ? value : connector.actions.length;
155
+ }
156
+ function conflictDiagnostics(candidates) {
157
+ return [conflictFor("auth", candidates.map((candidate) => ({
158
+ value: candidate.connector.auth,
159
+ sourceId: candidate.source.id,
160
+ connectorId: candidate.connector.id
161
+ }))), conflictFor("category", candidates.map((candidate) => ({
162
+ value: candidate.connector.category,
163
+ sourceId: candidate.source.id,
164
+ connectorId: candidate.connector.id
165
+ })))].filter((conflict) => Boolean(conflict));
166
+ }
167
+ function conflictFor(field, values) {
168
+ if (new Set(values.map((entry) => entry.value)).size <= 1) return void 0;
169
+ return {
170
+ field,
171
+ values
172
+ };
173
+ }
174
+ function isSupportTier(value) {
175
+ return value === "catalogOnly" || value === "setupReady" || value === "gatewayExecutable" || value === "firstPartyExecutable" || value === "sandboxExecutable";
176
+ }
177
+ function slug(value) {
178
+ return value.trim().toLowerCase().replace(/&/g, "and").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
179
+ }
180
+ function unique(values) {
181
+ return [...new Set(values)];
182
+ }
183
+ //#endregion
184
+ export { summarizeIntegrationRegistry as i, composeIntegrationRegistry as n, inferIntegrationSupportTier as r, canonicalConnectorId as t };
185
+
186
+ //# sourceMappingURL=registry-core-BZo69C37.js.map