@tangle-network/agent-integrations 0.31.0 → 0.33.0

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 (49) hide show
  1. package/dist/bin/tangle-catalog-runtime.js +7 -7
  2. package/dist/catalog.d.ts +74 -8
  3. package/dist/catalog.js +7 -7
  4. package/dist/{chunk-JCHD6L3B.js → chunk-43VQSANC.js} +2 -2
  5. package/dist/{chunk-F4YILONK.js → chunk-6N23S4JY.js} +21530 -257
  6. package/dist/chunk-6N23S4JY.js.map +1 -0
  7. package/dist/{chunk-VVC7U7W7.js → chunk-7T5YTVER.js} +51 -2
  8. package/dist/chunk-7T5YTVER.js.map +1 -0
  9. package/dist/{chunk-Q5X3QNHR.js → chunk-NQ7OPDUM.js} +261 -1
  10. package/dist/chunk-NQ7OPDUM.js.map +1 -0
  11. package/dist/{chunk-S2MVWQYL.js → chunk-RF3RH374.js} +2 -2
  12. package/dist/{chunk-M2RFFAMB.js → chunk-XO2RSS6Y.js} +300 -13
  13. package/dist/chunk-XO2RSS6Y.js.map +1 -0
  14. package/dist/{chunk-CDY2ETYT.js → chunk-YPZORI3G.js} +2 -2
  15. package/dist/connect/index.d.ts +2 -1
  16. package/dist/connect/index.js +2 -2
  17. package/dist/connectors/adapters/index.d.ts +113 -25
  18. package/dist/connectors/adapters/index.js +4 -2
  19. package/dist/connectors/index.d.ts +3 -2
  20. package/dist/connectors/index.js +4 -2
  21. package/dist/consumer-CzJgntej.d.ts +292 -0
  22. package/dist/consumer.d.ts +6 -8
  23. package/dist/consumer.js +2 -2
  24. package/dist/core-types-D5Dc65Ud.d.ts +355 -0
  25. package/dist/index.d.ts +1282 -4
  26. package/dist/index.js +13 -7
  27. package/dist/middleware/index.d.ts +2 -1
  28. package/dist/middleware/index.js +2 -2
  29. package/dist/registry.d.ts +3 -2407
  30. package/dist/registry.js +7 -7
  31. package/dist/runtime.d.ts +137 -8
  32. package/dist/runtime.js +7 -7
  33. package/dist/specs.d.ts +208 -8
  34. package/dist/specs.js +1 -1
  35. package/dist/tangle-catalog-runtime-2HddXxoM.d.ts +242 -0
  36. package/dist/tangle-catalog-runtime.d.ts +3 -8
  37. package/dist/tangle-catalog-runtime.js +7 -7
  38. package/dist/tangle-id-DA_qj-O_.d.ts +192 -0
  39. package/dist/{tangle-id-Dj0ipP4E.d.ts → types-XdpvaIzW.d.ts} +1 -167
  40. package/docs/integration-execution-audit.md +7 -5
  41. package/docs/integration-execution-matrix.json +32 -0
  42. package/package.json +12 -10
  43. package/dist/chunk-F4YILONK.js.map +0 -1
  44. package/dist/chunk-M2RFFAMB.js.map +0 -1
  45. package/dist/chunk-Q5X3QNHR.js.map +0 -1
  46. package/dist/chunk-VVC7U7W7.js.map +0 -1
  47. /package/dist/{chunk-JCHD6L3B.js.map → chunk-43VQSANC.js.map} +0 -0
  48. /package/dist/{chunk-S2MVWQYL.js.map → chunk-RF3RH374.js.map} +0 -0
  49. /package/dist/{chunk-CDY2ETYT.js.map → chunk-YPZORI3G.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,8 +1,1286 @@
1
- export { aR as ACTIVEPIECES_OVERRIDES, aS as ACTIVEPIECES_PUBLIC_CATALOG_URL, aT as ACTIVEPIECES_RUNTIME_SIGNATURE_HEADER, aU as ActivepiecesCatalogAuthField, aV as ActivepiecesCatalogEntry, aW as ActivepiecesExecutorInvocation, aX as ActivepiecesExecutorProviderOptions, aY as ActivepiecesHttpExecutorOptions, aZ as ActivepiecesPieceOverride, a_ as ActivepiecesRuntimeRequest, a6 as ApiKeyAuthSpec, a$ as ApprovalBackedPolicyEngine, b0 as ApprovalBackedPolicyOptions, b1 as CANONICAL_INTEGRATION_ACTIONS, b2 as CanonicalIntegrationActionId, b3 as CanonicalLaunchConnectorOptions, C as CapabilityBundleResult, b4 as CatalogExecutorInvocation, b5 as CatalogExecutorProviderOptions, A as CheckConnectorInput, B as CheckConnectorResult, b6 as CompleteAuthRequest, ComposeIntegrationRegistryOptions, b7 as ConnectionCredentialResolverOptions, b8 as ConnectorAdapterProviderOptions, a7 as ConnectorAuthSpec, b9 as ConsentSummary, a8 as ConsoleStep, D as CreateGrantsInput, ba as CredentialBackedAdapterProviderOptions, a9 as CredentialFieldSpec, aa as CredentialValidationInput, ab as CredentialValidationResult, ac as CustomAuthSpec, bb as DEFAULT_INTEGRATION_BRIDGE_ENV, bc as DefaultIntegrationActionGuard, bd as DiscoverWorkspaceCapabilitiesInput, be as GatewayCatalogAction, bf as GatewayCatalogEntry, bg as GatewayCatalogProviderOptions, bh as GatewayCatalogTrigger, bi as GraphqlOperationSpec, ad as HealthcheckPlan, ae as HealthcheckSpec, af as HmacAuthSpec, bj as HttpIntegrationProviderOptions, ag as INTEGRATION_FAMILIES, bk as ImportCatalogOptions, bl as InMemoryConnectionStore, bm as InMemoryIntegrationApprovalStore, bn as InMemoryIntegrationAuditStore, bo as InMemoryIntegrationEventStore, h as InMemoryIntegrationGrantStore, bp as InMemoryIntegrationHealthcheckStore, bq as InMemoryIntegrationIdempotencyStore, br as InMemoryIntegrationOAuthStateStore, bs as InMemoryIntegrationSecretStore, bt as InMemoryIntegrationWorkflowStore, bu as InferIntegrationRequirementsOptions, bv as InstalledIntegrationWorkflow, bw as IntegrationActionGuard, bx as IntegrationActionPack, by as IntegrationActionRequest, bz as IntegrationActionResult, bA as IntegrationActionRisk, bB as IntegrationActor, bC as IntegrationApprovalFilter, bD as IntegrationApprovalRecord, bE as IntegrationApprovalRequest, bF as IntegrationApprovalResolution, bG as IntegrationApprovalStatus, bH as IntegrationApprovalStore, bI as IntegrationAuditEvent, bJ as IntegrationAuditEventType, bK as IntegrationAuditFilter, bL as IntegrationAuditSink, bM as IntegrationAuditStore, ah as IntegrationAuthMode, ai as IntegrationAuthSpec, bN as IntegrationBridgePayload, bO as IntegrationBridgeToolBinding, bP as IntegrationCapability, j as IntegrationCapabilityBinding, IntegrationCatalogExecutability, bQ as IntegrationCatalogFreshnessOptions, bR as IntegrationCatalogFreshnessResult, IntegrationCatalogSource, I as IntegrationCatalogView, bS as IntegrationConnection, bT as IntegrationConnectionStore, bU as IntegrationConnector, bV as IntegrationConnectorAction, bW as IntegrationConnectorCategory, bX as IntegrationConnectorTrigger, bY as IntegrationCoveragePriority, bZ as IntegrationCoverageSpec, b_ as IntegrationCredentialsRotatedEvent, b$ as IntegrationDataClass, c0 as IntegrationError, c1 as IntegrationEventStore, aj as IntegrationFamilyId, ak as IntegrationFamilySpec, k as IntegrationGrant, l as IntegrationGrantStore, c2 as IntegrationGuardContext, c3 as IntegrationHealthcheckCheck, c4 as IntegrationHealthcheckResult, c5 as IntegrationHealthcheckStatus, c6 as IntegrationHealthcheckStore, c7 as IntegrationHub, E as IntegrationHubAuth, F as IntegrationHubClient, G as IntegrationHubClientOptions, c8 as IntegrationHubOptions, H as IntegrationHubRequestError, c9 as IntegrationIdempotencyRecord, ca as IntegrationIdempotencyStore, cb as IntegrationInvocationEnvelope, cc as IntegrationInvocationEnvelopeValidationOptions, al as IntegrationLifecycleSpec, m as IntegrationManifest, n as IntegrationManifestResolution, cd as IntegrationOAuthState, ce as IntegrationOAuthStateOutcome, cf as IntegrationOAuthStateStore, am as IntegrationPlannerHints, cg as IntegrationPolicyDecision, ch as IntegrationPolicyEffect, ci as IntegrationPolicyEngine, cj as IntegrationPolicyRule, ck as IntegrationProvider, cl as IntegrationProviderKind, cm as IntegrationRateLimitDecision, cn as IntegrationRateLimiter, IntegrationRegistry, IntegrationRegistryConflict, IntegrationRegistryEntry, IntegrationRegistrySourceRef, IntegrationRegistrySummary, o as IntegrationRequirement, q as IntegrationRequirementMode, r as IntegrationRequirementResolution, u as IntegrationRequirementStatus, v as IntegrationRuntime, w as IntegrationRuntimeHub, x as IntegrationRuntimeOptions, y as IntegrationSandboxBundle, co as IntegrationSandboxHost, cp as IntegrationSandboxHostHub, cq as IntegrationSandboxHostOptions, cr as IntegrationSecretStore, an as IntegrationSetupSpec, ao as IntegrationSpec, ap as IntegrationSpecStatus, aq as IntegrationSpecValidationIssue, ar as IntegrationSpecValidationResult, IntegrationSupportTier, a as IntegrationToolDefinition, b as IntegrationToolSearchFilters, c as IntegrationToolSearchResult, cs as IntegrationTriggerEvent, ct as IntegrationTriggerSubscription, cu as IntegrationWebhookReceiverResult, cv as IntegrationWorkflowDefinition, cw as IntegrationWorkflowRuntime, cx as IntegrationWorkflowRuntimeHub, cy as IntegrationWorkflowRuntimeOptions, cz as IntegrationWorkflowStore, cA as InvokeWithCapabilityRequest, cB as IssueCapabilityRequest, cC as IssuedIntegrationCapability, L as ListGrantsInput, cD as ManifestValidationIssue, cE as ManifestValidationResult, cF as McpCatalog, cG as McpCatalogTool, M as McpToolDefinition, J as MintCapabilityBundleInput, cH as MissingRequirementExplanation, as as NoneAuthSpec, cI as NormalizedIntegrationResult, at as NormalizedPermission, au as OAuth2AuthSpec, cJ as OpenApiDocument, cK as OpenApiOperation, cL as PROVIDER_PASSTHROUGH_ACTION, av as PermissionDescriptor, cM as PlatformIntegrationPolicyPresetOptions, aw as PostSetupCheck, cN as ProviderHttpRequestInput, cO as ProviderPassthroughPolicy, ax as Quirk, cP as RenderConsentOptions, ay as RenderSpecOptions, az as RenderedConsoleStep, R as ResolveManifestInput, aA as ScopeDescriptor, cQ as SecretRef, cR as StartAuthRequest, cS as StartAuthResult, cT as StartedTangleCatalogRuntimeNodeServer, cU as StaticIntegrationPolicyEngine, cV as StaticIntegrationPolicyOptions, cW as StoredIntegrationEvent, T as TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER, cX as TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, cY as TANGLE_INTEGRATIONS_CATALOG_SOURCE, N as TangleCatalogAuthResolverOptions, cZ as TangleCatalogExecutorInvocation, c_ as TangleCatalogExecutorProviderOptions, O as TangleCatalogHttpAuthResolverOptions, P as TangleCatalogHttpAuthResolverRequest, c$ as TangleCatalogHttpExecutorInvocation, d0 as TangleCatalogHttpExecutorOptions, Q as TangleCatalogInstalledPackageExecutorOptions, d1 as TangleCatalogRuntimeActionRequest, S as TangleCatalogRuntimeHandlerOptions, U as TangleCatalogRuntimeHttpRequest, V as TangleCatalogRuntimeHttpResponse, W as TangleCatalogRuntimeInvocation, X as TangleCatalogRuntimeModuleAction, d2 as TangleCatalogRuntimeNodeServerOptions, Y as TangleCatalogRuntimePackageCoverageOptions, Z as TangleCatalogRuntimePackageCoverageRow, d3 as TangleCatalogRuntimePackageManifest, d4 as TangleCatalogRuntimePackageManifestOptions, d5 as TangleCatalogRuntimePiece, d6 as TangleCatalogRuntimeRequest, d7 as TangleCatalogTriggerInvocation, d8 as TangleIntegrationCatalogEntry, d9 as TangleIntegrationCatalogFreshnessOptions, da as TangleIntegrationCatalogFreshnessResult, db as TangleIntegrationContract, dc as TangleIntegrationContractStatus, dd as TangleIntegrationImplementationKind, de as TangleIntegrationInvokeInput, df as TangleIntegrationInvokeResult, dg as TangleIntegrationsClient, dh as TangleIntegrationsClientOptions, di as WorkspaceCapability, dj as WorkspaceCapabilityDiscovery, dk as WorkspaceToolSchema, dl as WorkspaceTrigger, dm as adapterManifestsToConnectors, dn as assertValidIntegrationManifest, aB as assertValidIntegrationSpec, dp as auditIntegrationCatalogFreshness, _ as auditTangleCatalogRuntimePackages, dq as auditTangleIntegrationCatalogFreshness, dr as buildActivepiecesConnectors, ds as buildActivepiecesRuntimeRequest, dt as buildApprovalRequest, du as buildCanonicalLaunchConnectors, buildDefaultIntegrationRegistry, aC as buildHealthcheckPlan, dv as buildIntegrationBridgeEnvironment, dw as buildIntegrationBridgePayload, d as buildIntegrationCatalogView, dx as buildIntegrationCoverageConnectors, dy as buildIntegrationInvocationEnvelope, e as buildIntegrationToolCatalog, dz as buildTangleCatalogRuntimePackageManifest, dA as buildTangleCatalogRuntimeRequest, dB as buildTangleIntegrationCatalogConnectors, dC as calendarExercisePlannerManifest, dD as canonicalActionConnectorId, canonicalConnectorId, classifyIntegrationCatalogExecutability, composeIntegrationRegistry, aD as consoleStepsToText, dE as createActivepiecesExecutorProvider, dF as createActivepiecesHttpExecutor, dG as createApprovalBackedPolicyEngine, dH as createAuditingActionGuard, dI as createCatalogExecutorProvider, dJ as createConnectionCredentialResolver, dK as createConnectorAdapterCatalogSource, dL as createConnectorAdapterProvider, dM as createCredentialBackedAdapterProvider, dN as createDefaultIntegrationActionGuard, dO as createDefaultIntegrationPolicyEngine, dP as createGatewayCatalogProvider, dQ as createHttpIntegrationProvider, dR as createIntegrationAuditEvent, K as createIntegrationHubClient, z as createIntegrationRuntime, dS as createIntegrationWorkflowRuntime, dT as createMockIntegrationProvider, dU as createPlatformIntegrationPolicyPreset, $ as createTangleCatalogCredentialAuthResolver, dV as createTangleCatalogExecutorProvider, a0 as createTangleCatalogHttpAuthResolver, dW as createTangleCatalogHttpExecutor, a1 as createTangleCatalogInstalledPackageExecutor, a2 as createTangleCatalogRuntimeHandler, dX as createTangleCatalogRuntimeNodeRequestListener, dY as createTangleIntegrationsClient, dZ as decodeIntegrationBridgePayload, f as describeIntegrationTool, d_ as discoverWorkspaceCapabilities, d$ as dispatchIntegrationInvocation, e0 as encodeIntegrationBridgePayload, e1 as explainMissingRequirements, e2 as extractActivepiecesPublicPieceCount, e3 as extractExternalCatalogPublicCount, e4 as filterDiscoveryByWorkspaceScopes, g as flattenIntegrationToolDefinition, e5 as getActivepiecesOverride, aE as getIntegrationFamily, aF as getIntegrationSpec, e6 as healthcheckRequest, e7 as importGraphqlConnector, e8 as importMcpConnector, e9 as importOpenApiConnector, ea as inferIntegrationManifestFromTools, inferIntegrationSupportTier, eb as integrationCoverageChecklistMarkdown, aG as integrationSpecToConnector, i as integrationToolName, ec as invocationRequestFromEnvelope, ed as listActivepiecesCatalogEntries, aH as listExecutableIntegrationSpecs, ee as listIntegrationCoverageSpecs, aI as listIntegrationSpecs, ef as listTangleIntegrationCatalogEntries, eg as listTangleIntegrationCatalogRuntimePackages, eh as listTangleIntegrationContracts, ei as manifestToConnector, ej as normalizeGatewayCatalog, ek as normalizeIntegrationResult, el as parseIntegrationBridgeEnvironment, p as parseIntegrationToolName, em as receiveIntegrationWebhook, en as redactApprovalRequest, eo as redactCapability, ep as redactIntegrationBridgePayload, eq as redactInvocationEnvelope, aJ as renderAgentToolDescription, er as renderApprovalCopy, es as renderConsentSummary, aK as renderConsoleSteps, aL as renderRunbookMarkdown, et as renderTangleCatalogRuntimePnpmAddCommand, eu as resolveConnectionCredentials, aM as resolveConnectorAuthSpec, ev as resolveIntegrationApproval, ew as revokeConnection, ex as runIntegrationHealthcheck, ey as runIntegrationHealthchecks, ez as sanitizeAuditConnection, eA as sanitizeConnection, s as searchIntegrationTools, eB as signActivepiecesRuntimeRequest, eC as signCapability, a3 as signTangleCatalogRuntimeRequest, aN as specAuthToConnectorAuth, eD as startTangleCatalogRuntimeNodeServer, eE as storedEventToTriggerEvent, summarizeIntegrationRegistry, a4 as tangleCatalogAuthValue, t as toMcpTools, aO as validateCredentialFormat, aP as validateCredentialSet, eF as validateIntegrationInvocationEnvelope, eG as validateIntegrationManifest, aQ as validateIntegrationSpec, eH as validateProviderPassthroughRequest, eI as verifyActivepiecesRuntimeSignature, eJ as verifyCapabilityToken, a5 as verifyTangleCatalogRuntimeSignature } from './registry.js';
2
- export { A as AuthSpec, e as CASStrategy, f as Capability, g as CapabilityClass, h as CapabilityMutation, i as CapabilityMutationResult, j as CapabilityParameterSchema, k as CapabilityRead, l as CapabilityReadResult, C as ConnectorAdapter, d as ConnectorCredentials, m as ConnectorInvocation, n as ConnectorManifest, o as ConnectorManifestValidationIssue, p as ConnectorManifestValidationResult, q as ConsistencyModel, r as CredentialsExpired, D as DEFAULT_TANGLE_PLATFORM_URL, s as DataSourceMetadata, E as EventHandlerResult, I as InboundEvent, t as RateLimitSpec, R as ResolvedDataSource, u as ResourceContention, v as TANGLE_API_KEY_PREFIX, w as TANGLE_SERVICE_TOKEN_PREFIX, b as TangleIdentityClient, T as TangleIdentityOptions, x as TangleIdentityUnreachableError, c as TangleTokenVerifyFailure, y as TangleTokenVerifyResult, a as TangleUserSummary, z as TangleWorkspaceSummary, B as assertValidConnectorManifest, F as createTangleIdentityClient, G as tangleIdentity, H as validateConnectorManifest } from './tangle-id-Dj0ipP4E.js';
1
+ import { IntegrationRegistrySummary, IntegrationRegistryConflict, ComposeIntegrationRegistryOptions, IntegrationRegistry } from './registry.js';
2
+ export { IntegrationCatalogExecutability, IntegrationRegistryEntry, IntegrationRegistrySourceRef, IntegrationSupportTier, buildDefaultIntegrationRegistry, canonicalConnectorId, classifyIntegrationCatalogExecutability, composeIntegrationRegistry, inferIntegrationSupportTier, summarizeIntegrationRegistry } from './registry.js';
3
+ import { o as IntegrationPolicyEngine, p as IntegrationApprovalRequest, I as IntegrationActor, q as IntegrationGuardContext, r as IntegrationPolicyDecision, b as IntegrationConnector, e as IntegrationConnectorAction, s as IntegrationProviderKind, c as IntegrationConnection, h as IntegrationCatalogSource, m as IntegrationProvider, n as IntegrationSecretStore, t as IntegrationConnectionStore, u as IntegrationCredentialsRotatedEvent, v as IntegrationOAuthStateStore, w as IntegrationOAuthState, x as IntegrationOAuthStateOutcome, y as SecretRef, d as IntegrationConnectorCategory, f as IntegrationActionRisk, g as IntegrationDataClass, z as IntegrationTriggerSubscription, A as IntegrationTriggerEvent, i as IntegrationActionGuard, k as IntegrationActionResult, j as IntegrationActionRequest, S as StartAuthRequest, l as StartAuthResult, C as CompleteAuthRequest, B as InvokeWithCapabilityRequest, D as IntegrationCapability, E as IntegrationHubOptions, F as IssueCapabilityRequest, a as IssuedIntegrationCapability, H as HttpIntegrationProviderOptions } from './core-types-D5Dc65Ud.js';
4
+ export { G as IntegrationConnectorTrigger } from './core-types-D5Dc65Ud.js';
5
+ import { I as IntegrationAuditSink } from './consumer-CzJgntej.js';
6
+ export { C as CapabilityBundleResult, a as CheckConnectorInput, b as CheckConnectorResult, c as CreateGrantsInput, d as InMemoryIntegrationAuditStore, e as InMemoryIntegrationHealthcheckStore, f as IntegrationAuditEvent, g as IntegrationAuditEventType, h as IntegrationAuditFilter, i as IntegrationAuditStore, j as IntegrationHealthcheckCheck, k as IntegrationHealthcheckResult, l as IntegrationHealthcheckStatus, m as IntegrationHealthcheckStore, n as IntegrationHubAuth, o as IntegrationHubClient, p as IntegrationHubClientOptions, q as IntegrationHubRequestError, L as ListGrantsInput, M as MintCapabilityBundleInput, R as ResolveManifestInput, r as createAuditingActionGuard, s as createIntegrationAuditEvent, t as createIntegrationHubClient, u as healthcheckRequest, v as runIntegrationHealthcheck, w as runIntegrationHealthchecks, x as sanitizeAuditConnection } from './consumer-CzJgntej.js';
7
+ import { IntegrationSandboxBundle, IntegrationManifest, IntegrationManifestResolution, IntegrationRuntime, IntegrationGrantStore, IntegrationRequirementMode } from './runtime.js';
8
+ export { InMemoryIntegrationGrantStore, IntegrationCapabilityBinding, IntegrationGrant, IntegrationRequirement, IntegrationRequirementResolution, IntegrationRequirementStatus, IntegrationRuntimeHub, IntegrationRuntimeOptions, createIntegrationRuntime } from './runtime.js';
9
+ import { C as ConnectorAdapter, R as ResolvedDataSource, a as ConnectorCredentials } from './types-XdpvaIzW.js';
10
+ export { A as AuthSpec, b as CASStrategy, c as Capability, d as CapabilityClass, e as CapabilityMutation, f as CapabilityMutationResult, g as CapabilityParameterSchema, h as CapabilityRead, i as CapabilityReadResult, j as ConnectorInvocation, k as ConnectorManifest, l as ConnectorManifestValidationIssue, m as ConnectorManifestValidationResult, n as ConsistencyModel, o as CredentialsExpired, D as DataSourceMetadata, E as EventHandlerResult, I as InboundEvent, p as RateLimitSpec, q as ResourceContention, r as assertValidConnectorManifest, v as validateConnectorManifest } from './types-XdpvaIzW.js';
3
11
  export { b as IntegrationErrorCode, I as IntegrationRuntimeError, a as IntegrationUserAction, N as NormalizedIntegrationError, n as normalizeIntegrationError, s as statusForCode } from './errors-Bg3_rxnQ.js';
4
12
  export { ConnectFlowOptions, FinishConnectInput, FinishConnectOutput, InMemoryConnectStateStore, StartConnectInput, StartConnectOutput, finishConnectFlow, revokeConnectFlow, startConnectFlow } from './connect/index.js';
5
13
  export { ExpressLikeRequest, ExpressLikeResponse, HonoLikeContext, RequireTangleAuthOptions, TangleAuthContext, TangleAuthOutcome, TangleAuthReason, expressTangleAuthMiddleware, extractToken, honoTangleAuthMiddleware, requireTangleAuth } from './middleware/index.js';
6
14
  export { DEFAULT_SIGNATURE_TOLERANCE_SECONDS, ExchangeCodeInput, GenericHmacVerifyOptions, InMemoryOAuthFlowStore, OAuthFlowStore, OAuthTokens, ParsedStripeSignatureHeader, PendingOAuthFlow, RefreshInput, SlackVerifyOptions, StartOAuthInput, StartOAuthOutput, StripeVerifyOptions, TwilioVerifyOptions, _resetPendingFlowsForTests, consumePendingFlow, exchangeAuthorizationCode, firstHeader, parseStripeSignatureHeader, refreshAccessToken, startOAuthFlow, verifyHmacSignature, verifySlackSignature, verifyStripeSignature, verifyTwilioSignature } from './connectors/index.js';
7
- export { DocuSealOptions, EtsyOptions, GmailOptions, GoogleCalendarOptions, GoogleDocsOptions, GoogleDriveOptions, GoogleFormsOptions, GoogleSheetsOptions, HelloSignOptions, HubSpotOptions, MicrosoftCalendarOptions, MicrosoftGraphOptions, MicrosoftTeamsOptions, NotionDatabaseOptions, OneDriveOptions, OutlookMailOptions, PandaDocOptions, RestConnectorSpec, RestCredentialPlacement, RestOperationSpec, RestRequestSpec, SharePointOptions, SlackOptions, TELEGRAM_FILE_DOWNLOAD_ROOT, WhatsappBusinessOptions, activecampaignConnector, acumbamailConnector, adobeCreativeCloudConnector, afforaiConnector, agentxConnector, aidbaseConnector, aipriseConnector, airOpsConnector, aircallConnector, airtableConnector, airtopConnector, alaiConnector, altTextAiConnector, alttextifyConnector, amazonBedrockConnector, amazonSecretsManagerConnector, amazonSesConnector, amazonSnsConnector, amazonSqsConnector, amazonTextractConnector, aminosConnector, ampecoConnector, anthropicConnector, apitableConnector, apitemplateIoConnector, apolloConnector, appfollowConnector, asanaConnector, ashbyConnector, asknewsConnector, assemblyaiConnector, attioConnector, auth0Connector, autocallsConnector, avianConnector, avomaConnector, azureAdConnector, azureCommunicationServicesConnector, azureOpenaiConnector, backblazeConnector, bamboohrConnector, barcodeLookupConnector, baremetricsConnector, basecampConnector, beamerConnector, bettermodeConnector, bexioConnector, bigcommerceConnector, biginByZohoConnector, billplzConnector, bitlyConnector, blandAiConnector, blueskyConnector, bolnaConnector, bonjoroConnector, bookedinConnector, boxConnector, braveSearchConnector, brazeConnector, brilliantDirectoriesConnector, browseAiConnector, calComConnector, calendlyConnector, campaignMonitorConnector, cannyConnector, canvaConnector, capsuleCrmConnector, captainDataConnector, cashfreePaymentsConnector, certopusConnector, chainalysisApiConnector, chargebeeConnector, chargekeepConnector, chartlyConnector, chatDataConnector, chatbaseConnector, chatlingConnector, chatnodeConnector, chatwootConnector, checkoutConnector, circleConnector, clearoutConnector, clicdataConnector, clickupConnector, clioConnector, clockifyConnector, clockodoConnector, closeConnector, cloudconvertConnector, cloudinaryConnector, cloutlyConnector, codaConnector, cognitoFormsConnector, cohereConnector, cometapiConnector, comfyicuConnector, confluenceConnector, constantContactConnector, contentfulConnector, convertkitConnector, copperConnector, copyAiConnector, crispConnector, cryptolensConnector, customerIoConnector, customgptConnector, dashworksConnector, datadogConnector, datafuelConnector, datocmsConnector, declarativeRestConnector, deepseekConnector, denserAiConnector, descriptConnector, devinConnector, discordConnector, dittofeedConnector, doctlyConnector, documentproConnector, documergeConnector, docuseal, docusignConnector, dropboxConnector, dubConnector, dumplingAiConnector, dustConnector, easyPeasyAiConnector, ebayConnector, edenAiConnector, elasticEmailConnector, emailitConnector, emailoctopusConnector, enrichlayerConnector, esignaturesConnector, etsyConnector, exaConnector, facebookLeadsConnector, facebookPagesConnector, fathomAnalyticsConnector, fathomConnector, figjamConnector, figmaConnector, filloutFormsConnector, firebaseConnector, fireberryConnector, firecrawlConnector, firefliesAiConnector, flipandoConnector, flowiseConnector, flowluConnector, folkConnector, foreplayCoConnector, formbricksConnector, formstackConnector, fountainConnector, fragmentConnector, frameConnector, freeAgentConnector, freshsalesConnector, freshserviceConnector, frontConnector, gameballConnector, geminiConnector, ghostcmsConnector, gistlyConnector, giteaConnector, githubConnector, gitlabConnector, glideConnector, gmail, googleBigqueryConnector, googleCalendar, googleCloudStorageConnector, googleContactsConnector, googleDocs, googleDrive, googleForms, googleGeminiConnector, googleMyBusinessConnector, googleSearchConnector, googleSearchConsoleConnector, googleSheets, googleSlidesConnector, googleTasksConnector, googleVertexaiConnector, googlechatConnector, gorgiasConnector, gotifyConnector, gptzeroDetectAiConnector, granolaConnector, greenhouseConnector, greenptConnector, greipConnector, griptapeConnector, gristConnector, guideliteConnector, gustoConnector, harvestConnector, hashiCorpVaultConnector, hastewireConnector, heartbeatConnector, hedyConnector, hellosign, helpscoutConnector, heygenConnector, heymarketSmsConnector, housecallProConnector, hubspot, huggingFaceConnector, huggingfaceConnector, humeAiConnector, hunterConnector, hystructConnector, ibmCognoseConnector, imageRouterConnector, imapConnector, influencersClubConnector, insightlyConnector, insightoAiConnector, instaChartsConnector, instantlyAiConnector, instasentConnector, intercomConnector, invoiceninjaConnector, jinaAiConnector, jiraCloudConnector, jiraDataCenterConnector, joggAiConnector, jotformConnector, justInvoiceConnector, kallabotAiConnector, kapsoConnector, kimaiConnector, kissflowConnector, kizeoFormsConnector, klaviyoConnector, klentyConnector, knackConnector, knockConnector, koFiConnector, kommoConnector, kudosityConnector, kustomerConnector, leadConnectorConnector, leapAiConnector, leexiConnector, lemlistConnector, lemonSqueezyConnector, letsCalendarConnector, lettaConnector, leverConnector, lightfunnelsConnector, linearConnector, linkaConnector, linkupConnector, llmrailsConnector, lobstermailConnector, localaiConnector, loftyConnector, logrocketConnector, logsnagConnector, lokaliseConnector, loopsConnector, lucidyaConnector, lushaConnector, luxuryPresenceConnector, magicalApiConnector, mailchainConnector, mailchimpConnector, mailerLiteConnector, mailercheckConnector, mailerooConnector, mailgunConnector, makeConnector, manychatConnector, marketoConnector, mastodonConnector, matomoConnector, matrixConnector, mattermostConnector, mauticConnector, medullarConnector, meetgeekAiConnector, memConnector, messagebirdConnector, metabaseConnector, microsoft365PeopleConnector, microsoft365PlannerConnector, microsoftCalendar, microsoftDynamics365BusinessCentralConnector, microsoftDynamicsCrmConnector, microsoftExcel365Connector, microsoftGraph, microsoftOnedriveConnector, microsoftOnenoteConnector, microsoftOutlookCalendarConnector, microsoftOutlookConnector, microsoftPowerBiConnector, microsoftSharepointConnector, microsoftTeams, microsoftTodoConnector, millionverifierConnector, mindStudioConnector, mindeeConnector, miroConnector, missiveConnector, mixmaxConnector, mixpanelConnector, mollieConnector, mondayConnector, mongodbConnector, n8nConnector, netlifyConnector, niftyConnector, ninjapipeConnector, nocodbConnector, notionConnector, notionDatabase, ntfyConnector, odooConnector, omniCoConnector, omnihrConnector, oneDrive, openPhoneConnector, openRouterConnector, openaiConnector, openmicAiConnector, opnformConnector, opportifyConnector, opsgenieConnector, oracleDatabaseConnector, orimonConnector, outlookMail, paddleConnector, pagerdutyConnector, pandadoc, paperformConnector, parseurConnector, pastefyConnector, paywhirlConnector, pdfmonkeyConnector, peekshotConnector, perplexityAiConnector, personalAiConnector, pinchPaymentsConnector, pineconeConnector, pipedreamConnector, pipedriveConnector, placidConnector, plausibleConnector, pocketbaseConnector, pollybotAiConnector, postgresConnector, posthogConnector, postizConnector, postmarkConnector, predictLeadsConnector, productboardConnector, proxycurlConnector, pushbulletConnector, pushoverConnector, qawafelConnector, qdrantConnector, quadernoConnector, quickbooksConnector, quickzuConnector, raiaAiConnector, rapidtextAiConnector, reachinboxConnector, recallAiConnector, redditConnector, reoonVerifierConnector, replyIoConnector, retableConnector, retellAiConnector, ripplingConnector, robollyConnector, runwareConnector, saasticConnector, saleorConnector, salesforceConnector, sanityConnector, sardisConnector, savvycalConnector, scrapegraphaiConnector, scrapelessConnector, seekTableConnector, sendgridConnector, sendinblueConnector, sendpulseConnector, senjaConnector, sentryConnector, serpstatConnector, serviceNowConnector, sharepoint, shippoConnector, shopifyConnector, shortIoConnector, signNowConnector, signrequestConnector, simplirouteConnector, simplybookmeConnector, skyprepConnector, slack, slackEventsConnector, smartleadConnector, smartsheetConnector, smartsuiteConnector, smooveConnector, smsmodeConnector, snowflakeConnector, socialkitConnector, squareConnector, stripeConnector, stripePackConnector, stripeWebhookReceiverConnector, supabaseConnector, supadataConnector, swarmnodeConnector, systemeIoConnector, tableauConnector, talkableConnector, tallyConnector, teableConnector, telegramConnector, telnyxConnector, tenzoConnector, textcortexAiConnector, ticktickConnector, timeOpsConnector, timelinesAiConnector, tlDvConnector, todoistConnector, togglTrackConnector, totalcmsConnector, trelloConnector, twentyConnector, twilioConnector, twilioSmsConnector, twinLabsConnector, twitterConnector, typeformConnector, typefullyConnector, umamiConnector, upgradechatConnector, uscreenConnector, validatedmailsConnector, vapiConnector, vboutConnector, vercelConnector, videoaskConnector, vidlab7Connector, vlmRunConnector, voucheryIoConnector, vtexConnector, vtigerConnector, wafeqConnector, weaviateConnector, webflowConnector, webhookConnector, webscrapingAiConnector, whatConvertsConnector, whatsappBusiness, whatsappConnector, whatsscaleConnector, wonderchatConnector, woocommerceConnector, woodpeckerConnector, wootricConnector, wordpressConnector, workableConnector, workdayConnector, wrikeConnector, writesonicBulkConnector, wufooConnector, xeroConnector, youcanbookmeConnector, zagomailConnector, zapierConnector, zendeskConnector, zendeskSellConnector, zeplinConnector, zerobounceConnector, zohoBookingsConnector, zohoCrmConnector, zohoDeskConnector, zuoraConnector } from './connectors/adapters/index.js';
8
- import 'node:http';
15
+ export { DocuSealOptions, EtsyOptions, GmailOptions, GoogleCalendarOptions, GoogleDocsOptions, GoogleDriveOptions, GoogleFormsOptions, GoogleSheetsOptions, HelloSignOptions, HubSpotOptions, MicrosoftCalendarOptions, MicrosoftGraphOptions, MicrosoftTeamsOptions, NotionDatabaseOptions, OneDriveOptions, OutlookMailOptions, PandaDocOptions, RestConnectorSpec, RestCredentialPlacement, RestOperationSpec, RestRequestSpec, SharePointOptions, SlackOptions, TELEGRAM_FILE_DOWNLOAD_ROOT, WhatsappBusinessOptions, activecampaignConnector, acumbamailConnector, adobeCreativeCloudConnector, afforaiConnector, agentxConnector, aidbaseConnector, aipriseConnector, airOpsConnector, aircallConnector, airtableConnector, airtopConnector, alaiConnector, altTextAiConnector, alttextifyConnector, amazonBedrockConnector, amazonSecretsManagerConnector, amazonSesConnector, amazonSnsConnector, amazonSqsConnector, amazonTextractConnector, aminosConnector, ampecoConnector, anthropicConnector, apitableConnector, apitemplateIoConnector, apolloConnector, appfollowConnector, asanaConnector, ashbyConnector, asknewsConnector, assemblyaiConnector, attioConnector, auth0Connector, autocallsConnector, avianConnector, avomaConnector, azureAdConnector, azureCommunicationServicesConnector, azureOpenaiConnector, backblazeConnector, bamboohrConnector, barcodeLookupConnector, baremetricsConnector, basecampConnector, beamerConnector, bettermodeConnector, bexioConnector, bigcommerceConnector, biginByZohoConnector, billplzConnector, bitlyConnector, blandAiConnector, blueskyConnector, bolnaConnector, bonjoroConnector, bookedinConnector, boxConnector, braveSearchConnector, brazeConnector, brilliantDirectoriesConnector, browseAiConnector, calComConnector, calendlyConnector, campaignMonitorConnector, cannyConnector, canvaConnector, capsuleCrmConnector, captainDataConnector, cashfreePaymentsConnector, certopusConnector, chainalysisApiConnector, chargebeeConnector, chargekeepConnector, chartlyConnector, chatDataConnector, chatbaseConnector, chatlingConnector, chatnodeConnector, chatwootConnector, checkoutConnector, circleConnector, clearoutConnector, clicdataConnector, clickupConnector, clioConnector, clockifyConnector, clockodoConnector, closeConnector, cloudconvertConnector, cloudinaryConnector, cloutlyConnector, codaConnector, cognitoFormsConnector, cohereConnector, cometapiConnector, comfyicuConnector, confluenceConnector, constantContactConnector, contentfulConnector, convertkitConnector, copperConnector, copyAiConnector, crispConnector, cryptolensConnector, customerIoConnector, customgptConnector, dashworksConnector, datadogConnector, datafuelConnector, datocmsConnector, declarativeRestConnector, deepseekConnector, denserAiConnector, descriptConnector, devinConnector, discordConnector, dittofeedConnector, doctlyConnector, documentproConnector, documergeConnector, docuseal, docusignConnector, dropboxConnector, dubConnector, dumplingAiConnector, dustConnector, easyPeasyAiConnector, ebayConnector, edenAiConnector, elasticEmailConnector, emailitConnector, emailoctopusConnector, enrichlayerConnector, esignaturesConnector, etsyConnector, exaConnector, facebookLeadsConnector, facebookPagesConnector, fathomAnalyticsConnector, fathomConnector, figjamConnector, figmaConnector, filloutFormsConnector, firebaseConnector, fireberryConnector, firecrawlConnector, firefliesAiConnector, flipandoConnector, flowiseConnector, flowluConnector, folkConnector, foreplayCoConnector, formbricksConnector, formstackConnector, fountainConnector, fragmentConnector, frameConnector, freeAgentConnector, freshsalesConnector, freshserviceConnector, frontConnector, gameballConnector, geminiConnector, ghostcmsConnector, gistlyConnector, giteaConnector, githubConnector, gitlabConnector, glideConnector, gmail, googleBigqueryConnector, googleCalendar, googleCloudStorageConnector, googleContactsConnector, googleDocs, googleDrive, googleForms, googleGeminiConnector, googleMyBusinessConnector, googleSearchConnector, googleSearchConsoleConnector, googleSheets, googleSlidesConnector, googleTasksConnector, googleVertexaiConnector, googlechatConnector, gorgiasConnector, gotifyConnector, gptzeroDetectAiConnector, granolaConnector, greenhouseConnector, greenptConnector, greipConnector, griptapeConnector, gristConnector, guideliteConnector, gustoConnector, harvestConnector, hashiCorpVaultConnector, hastewireConnector, heartbeatConnector, hedyConnector, hellosign, helpscoutConnector, heygenConnector, heymarketSmsConnector, housecallProConnector, hubspot, huggingFaceConnector, huggingfaceConnector, humeAiConnector, hunterConnector, hystructConnector, ibmCognoseConnector, imageRouterConnector, imapConnector, influencersClubConnector, insightlyConnector, insightoAiConnector, instaChartsConnector, instantlyAiConnector, instasentConnector, intercomConnector, invoiceninjaConnector, jinaAiConnector, jiraCloudConnector, jiraDataCenterConnector, joggAiConnector, jotformConnector, justInvoiceConnector, kallabotAiConnector, kapsoConnector, kimaiConnector, kissflowConnector, kizeoFormsConnector, klaviyoConnector, klentyConnector, knackConnector, knockConnector, koFiConnector, kommoConnector, kudosityConnector, kustomerConnector, leadConnectorConnector, leapAiConnector, leexiConnector, lemlistConnector, lemonSqueezyConnector, letsCalendarConnector, lettaConnector, leverConnector, lightfunnelsConnector, linearConnector, linkaConnector, linkupConnector, llmrailsConnector, lobstermailConnector, localaiConnector, loftyConnector, logrocketConnector, logsnagConnector, lokaliseConnector, loopsConnector, lucidyaConnector, lushaConnector, luxuryPresenceConnector, magicalApiConnector, mailchainConnector, mailchimpConnector, mailerLiteConnector, mailercheckConnector, mailerooConnector, mailgunConnector, makeConnector, manychatConnector, marketoConnector, mastodonConnector, matomoConnector, matrixConnector, mattermostConnector, mauticConnector, medullarConnector, meetgeekAiConnector, memConnector, messagebirdConnector, metabaseConnector, microsoft365PeopleConnector, microsoft365PlannerConnector, microsoftCalendar, microsoftDynamics365BusinessCentralConnector, microsoftDynamicsCrmConnector, microsoftExcel365Connector, microsoftGraph, microsoftOnedriveConnector, microsoftOnenoteConnector, microsoftOutlookCalendarConnector, microsoftOutlookConnector, microsoftPowerBiConnector, microsoftSharepointConnector, microsoftTeams, microsoftTodoConnector, millionverifierConnector, mindStudioConnector, mindeeConnector, miroConnector, missiveConnector, mixmaxConnector, mixpanelConnector, mollieConnector, mondayConnector, mongodbConnector, n8nConnector, netlifyConnector, niftyConnector, ninjapipeConnector, nocodbConnector, notionConnector, notionDatabase, ntfyConnector, odooConnector, omniCoConnector, omnihrConnector, oneDrive, openPhoneConnector, openRouterConnector, openaiConnector, openmicAiConnector, opnformConnector, opportifyConnector, opsgenieConnector, oracleDatabaseConnector, orimonConnector, outlookMail, paddleConnector, pagerdutyConnector, pandadoc, paperformConnector, parseurConnector, pastefyConnector, paywhirlConnector, pdfmonkeyConnector, peekshotConnector, perplexityAiConnector, personalAiConnector, phonyConnector, pinchPaymentsConnector, pineconeConnector, pipedreamConnector, pipedriveConnector, placidConnector, plausibleConnector, pocketbaseConnector, pollybotAiConnector, postgresConnector, posthogConnector, postizConnector, postmarkConnector, predictLeadsConnector, productboardConnector, proxycurlConnector, pushbulletConnector, pushoverConnector, qawafelConnector, qdrantConnector, quadernoConnector, quickbooksConnector, quickzuConnector, raiaAiConnector, rapidtextAiConnector, reachinboxConnector, recallAiConnector, redditConnector, reoonVerifierConnector, replyIoConnector, retableConnector, retellAiConnector, ripplingConnector, robollyConnector, runwareConnector, saasticConnector, saleorConnector, salesforceConnector, sanityConnector, sardisConnector, savvycalConnector, scrapegraphaiConnector, scrapelessConnector, seekTableConnector, sendgridConnector, sendinblueConnector, sendpulseConnector, senjaConnector, sentryConnector, serpstatConnector, serviceNowConnector, sharepoint, shippoConnector, shopifyConnector, shortIoConnector, signNowConnector, signrequestConnector, simplirouteConnector, simplybookmeConnector, skyprepConnector, slack, slackEventsConnector, smartleadConnector, smartsheetConnector, smartsuiteConnector, smooveConnector, smsmodeConnector, snowflakeConnector, socialkitConnector, squareConnector, stripeConnector, stripePackConnector, stripeWebhookReceiverConnector, supabaseConnector, supadataConnector, swarmnodeConnector, systemeIoConnector, tableauConnector, talkableConnector, tallyConnector, teableConnector, telegramConnector, telnyxConnector, tenzoConnector, textcortexAiConnector, ticktickConnector, timeOpsConnector, timelinesAiConnector, tlDvConnector, todoistConnector, togglTrackConnector, totalcmsConnector, trelloConnector, twentyConnector, twilioConnector, twilioSmsConnector, twinLabsConnector, twitterConnector, typeformConnector, typefullyConnector, umamiConnector, upgradechatConnector, uscreenConnector, validatedmailsConnector, vapiConnector, vboutConnector, vercelConnector, videoaskConnector, vidlab7Connector, vlmRunConnector, voucheryIoConnector, vtexConnector, vtigerConnector, wafeqConnector, weaviateConnector, webflowConnector, webhookConnector, webscrapingAiConnector, whatConvertsConnector, whatsappBusiness, whatsappConnector, whatsscaleConnector, wonderchatConnector, woocommerceConnector, woodpeckerConnector, wootricConnector, wordpressConnector, workableConnector, workdayConnector, wrikeConnector, writesonicBulkConnector, wufooConnector, xeroConnector, youcanbookmeConnector, zagomailConnector, zapierConnector, zendeskConnector, zendeskSellConnector, zeplinConnector, zerobounceConnector, zohoBookingsConnector, zohoCrmConnector, zohoDeskConnector, zuoraConnector } from './connectors/adapters/index.js';
16
+ export { D as DEFAULT_TANGLE_PLATFORM_URL, d as TANGLE_API_KEY_PREFIX, e as TANGLE_SERVICE_TOKEN_PREFIX, b as TangleIdentityClient, T as TangleIdentityOptions, f as TangleIdentityUnreachableError, c as TangleTokenVerifyFailure, g as TangleTokenVerifyResult, a as TangleUserSummary, h as TangleWorkspaceSummary, i as createTangleIdentityClient, t as tangleIdentity } from './tangle-id-DA_qj-O_.js';
17
+ export { IntegrationCatalogView, IntegrationToolDefinition, IntegrationToolSearchFilters, IntegrationToolSearchResult, McpToolDefinition, buildIntegrationCatalogView, buildIntegrationToolCatalog, describeIntegrationTool, flattenIntegrationToolDefinition, integrationToolName, parseIntegrationToolName, searchIntegrationTools, toMcpTools } from './catalog.js';
18
+ import { A as ActivepiecesCatalogEntry, T as TangleCatalogHttpAuthResolverOptions, a as TangleCatalogInstalledPackageExecutorOptions } from './tangle-catalog-runtime-2HddXxoM.js';
19
+ export { b as ACTIVEPIECES_RUNTIME_SIGNATURE_HEADER, c as ActivepiecesCatalogAuthField, d as ActivepiecesExecutorInvocation, e as ActivepiecesExecutorProviderOptions, f as ActivepiecesHttpExecutorOptions, g as ActivepiecesRuntimeRequest, h as TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER, i as TangleCatalogAuthResolverOptions, j as TangleCatalogHttpAuthResolverRequest, k as TangleCatalogHttpExecutorInvocation, l as TangleCatalogHttpExecutorOptions, m as TangleCatalogRuntimeActionRequest, n as TangleCatalogRuntimeHandlerOptions, o as TangleCatalogRuntimeHttpRequest, p as TangleCatalogRuntimeHttpResponse, q as TangleCatalogRuntimeInvocation, r as TangleCatalogRuntimeModuleAction, s as TangleCatalogRuntimePackageCoverageOptions, t as TangleCatalogRuntimePackageCoverageRow, u as TangleCatalogRuntimePiece, v as TangleCatalogRuntimeRequest, w as auditTangleCatalogRuntimePackages, x as buildActivepiecesConnectors, y as buildActivepiecesRuntimeRequest, z as buildTangleCatalogRuntimeRequest, B as createActivepiecesExecutorProvider, C as createActivepiecesHttpExecutor, D as createTangleCatalogCredentialAuthResolver, E as createTangleCatalogHttpAuthResolver, F as createTangleCatalogHttpExecutor, G as createTangleCatalogInstalledPackageExecutor, H as createTangleCatalogRuntimeHandler, I as listActivepiecesCatalogEntries, J as signActivepiecesRuntimeRequest, K as signTangleCatalogRuntimeRequest, L as tangleCatalogAuthValue, M as verifyActivepiecesRuntimeSignature, N as verifyTangleCatalogRuntimeSignature } from './tangle-catalog-runtime-2HddXxoM.js';
20
+ import { Server, IncomingMessage, ServerResponse } from 'node:http';
21
+ export { ApiKeyAuthSpec, ConnectorAuthSpec, ConsoleStep, CredentialFieldSpec, CredentialValidationInput, CredentialValidationResult, CustomAuthSpec, HealthcheckPlan, HealthcheckSpec, HmacAuthSpec, INTEGRATION_FAMILIES, IntegrationAuthMode, IntegrationAuthSpec, IntegrationFamilyId, IntegrationFamilySpec, IntegrationLifecycleSpec, IntegrationPlannerHints, IntegrationSetupSpec, IntegrationSpec, IntegrationSpecStatus, IntegrationSpecValidationIssue, IntegrationSpecValidationResult, NoneAuthSpec, NormalizedPermission, OAuth2AuthSpec, PermissionDescriptor, PostSetupCheck, Quirk, RenderSpecOptions, RenderedConsoleStep, ScopeDescriptor, assertValidIntegrationSpec, buildHealthcheckPlan, consoleStepsToText, getIntegrationFamily, getIntegrationSpec, integrationSpecToConnector, listExecutableIntegrationSpecs, listIntegrationSpecs, renderAgentToolDescription, renderConsoleSteps, renderRunbookMarkdown, resolveConnectorAuthSpec, specAuthToConnectorAuth, validateCredentialFormat, validateCredentialSet, validateIntegrationSpec } from './specs.js';
22
+
23
+ /**
24
+ * IntegrationError — the runtime error class thrown by the hub, providers,
25
+ * adapters, and runtime helpers. Lives in its own module so any source
26
+ * file can import it without pulling the package barrel (`./index.ts`)
27
+ * and forming a cycle.
28
+ *
29
+ * The richer {@link IntegrationRuntimeError} (in `./errors.ts`) is a
30
+ * separate, structured error type used by consumers wiring custom
31
+ * error → HTTP-status mappings. `IntegrationError` is the legacy/canonical
32
+ * throw shape kept for back-compat with everything that already catches it.
33
+ */
34
+ type IntegrationErrorRuntimeCode = 'provider_not_found' | 'connector_not_found' | 'connection_not_found' | 'connection_not_active' | 'auth_not_supported' | 'capability_invalid' | 'capability_expired' | 'scope_denied' | 'action_denied' | 'action_not_found' | 'trigger_not_found' | 'approval_required' | 'policy_denied' | 'config_missing' | 'provider_failure';
35
+ declare class IntegrationError extends Error {
36
+ readonly code: IntegrationErrorRuntimeCode;
37
+ constructor(message: string, code: IntegrationErrorRuntimeCode);
38
+ }
39
+
40
+ type IntegrationApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired';
41
+ interface IntegrationApprovalRecord {
42
+ id: string;
43
+ request: IntegrationApprovalRequest;
44
+ status: IntegrationApprovalStatus;
45
+ requestedAt: string;
46
+ resolvedAt?: string;
47
+ resolvedBy?: IntegrationActor;
48
+ reason?: string;
49
+ expiresAt?: string;
50
+ metadata?: Record<string, unknown>;
51
+ }
52
+ interface IntegrationApprovalStore {
53
+ get(approvalId: string): Promise<IntegrationApprovalRecord | undefined> | IntegrationApprovalRecord | undefined;
54
+ put(record: IntegrationApprovalRecord): Promise<void> | void;
55
+ list(filter?: IntegrationApprovalFilter): Promise<IntegrationApprovalRecord[]> | IntegrationApprovalRecord[];
56
+ }
57
+ interface IntegrationApprovalFilter {
58
+ status?: IntegrationApprovalStatus;
59
+ connectionId?: string;
60
+ connectorId?: string;
61
+ action?: string;
62
+ actor?: IntegrationActor;
63
+ }
64
+ interface ApprovalBackedPolicyOptions {
65
+ base: IntegrationPolicyEngine;
66
+ store: IntegrationApprovalStore;
67
+ audit?: IntegrationAuditSink;
68
+ now?: () => Date;
69
+ approvalTtlMs?: number;
70
+ }
71
+ declare class InMemoryIntegrationApprovalStore implements IntegrationApprovalStore {
72
+ private readonly records;
73
+ get(approvalId: string): IntegrationApprovalRecord | undefined;
74
+ put(record: IntegrationApprovalRecord): void;
75
+ list(filter?: IntegrationApprovalFilter): IntegrationApprovalRecord[];
76
+ }
77
+ declare class ApprovalBackedPolicyEngine implements IntegrationPolicyEngine {
78
+ private readonly base;
79
+ private readonly store;
80
+ private readonly audit;
81
+ private readonly now;
82
+ private readonly approvalTtlMs;
83
+ constructor(options: ApprovalBackedPolicyOptions);
84
+ decide(ctx: IntegrationGuardContext & {
85
+ subject: IntegrationActor;
86
+ }): Promise<IntegrationPolicyDecision>;
87
+ private findApprovedRecord;
88
+ }
89
+ declare function createApprovalBackedPolicyEngine(options: ApprovalBackedPolicyOptions): ApprovalBackedPolicyEngine;
90
+ declare function resolveIntegrationApproval(input: {
91
+ store: IntegrationApprovalStore;
92
+ approvalId: string;
93
+ approved: boolean;
94
+ resolvedBy: IntegrationActor;
95
+ reason?: string;
96
+ metadata?: Record<string, unknown>;
97
+ audit?: IntegrationAuditSink;
98
+ now?: () => Date;
99
+ }): Promise<IntegrationApprovalRecord>;
100
+
101
+ declare const CANONICAL_INTEGRATION_ACTIONS: {
102
+ readonly googleCalendarEventsList: "google-calendar.events.list";
103
+ readonly googleCalendarEventsCreate: "google-calendar.events.create";
104
+ readonly gmailMessagesSearch: "gmail.messages.search";
105
+ readonly gmailMessagesSend: "gmail.messages.send";
106
+ readonly googleDriveFilesSearch: "google-drive.files.search";
107
+ readonly googleDriveFilesRead: "google-drive.files.read";
108
+ readonly githubRepositoriesGet: "github.repositories.get";
109
+ readonly githubIssuesSearch: "github.issues.search";
110
+ readonly githubIssuesCreate: "github.issues.create";
111
+ readonly githubPullRequestsComment: "github.pull-requests.comment";
112
+ readonly slackChannelsList: "slack.channels.list";
113
+ readonly slackMessagesSearch: "slack.messages.search";
114
+ readonly slackMessagesPost: "slack.messages.post";
115
+ readonly providerHttpRequest: "provider.http.request";
116
+ };
117
+ type CanonicalIntegrationActionId = typeof CANONICAL_INTEGRATION_ACTIONS[keyof typeof CANONICAL_INTEGRATION_ACTIONS];
118
+ interface CanonicalLaunchConnectorOptions {
119
+ providerId?: string;
120
+ includeProviderPassthrough?: boolean;
121
+ }
122
+ declare function buildCanonicalLaunchConnectors(options?: CanonicalLaunchConnectorOptions): IntegrationConnector[];
123
+ declare function canonicalActionConnectorId(actionId: string): string | undefined;
124
+
125
+ declare const DEFAULT_INTEGRATION_BRIDGE_ENV = "TANGLE_INTEGRATION_BUNDLE";
126
+ interface IntegrationBridgePayload {
127
+ version: 1;
128
+ manifestId: string;
129
+ subject: IntegrationSandboxBundle['subject'];
130
+ expiresAt: string;
131
+ tools: IntegrationBridgeToolBinding[];
132
+ }
133
+ interface IntegrationBridgeToolBinding {
134
+ name: string;
135
+ title: string;
136
+ connectorId: string;
137
+ connectionId: string;
138
+ action: string;
139
+ risk: string;
140
+ dataClass: string;
141
+ requiredScopes: string[];
142
+ capabilityToken: string;
143
+ }
144
+ declare function buildIntegrationBridgePayload(bundle: IntegrationSandboxBundle): IntegrationBridgePayload;
145
+ declare function encodeIntegrationBridgePayload(payload: IntegrationBridgePayload): string;
146
+ declare function decodeIntegrationBridgePayload(encoded: string): IntegrationBridgePayload;
147
+ declare function buildIntegrationBridgeEnvironment(bundle: IntegrationSandboxBundle, options?: {
148
+ envVar?: string;
149
+ }): Record<string, string>;
150
+ declare function parseIntegrationBridgeEnvironment(env: Record<string, string | undefined>, options?: {
151
+ envVar?: string;
152
+ }): IntegrationBridgePayload;
153
+ declare function redactIntegrationBridgePayload(payload: IntegrationBridgePayload): IntegrationBridgePayload;
154
+
155
+ /**
156
+ * Self-service external-apps client — the brokered hub-exec path.
157
+ *
158
+ * The operator-allowlist-free way to integrate the Tangle hub (no `TRUSTED_APPS`
159
+ * entry): a product registers itself ONCE (`registerApp` → client_id/secret),
160
+ * the end user consents ONCE per connection from their Tangle session (a browser
161
+ * step — not done here), and the product then mints short-lived
162
+ * `sk-tan-broker-…` tokens unattended (`mintBrokerToken`) for each
163
+ * `/v1/hub/exec` call. The durable grant means only the first consent needs a
164
+ * user; everything after is app-credential-only.
165
+ *
166
+ * Sits alongside {@link TangleIntegrationsClient} in the integrations/hub SDK —
167
+ * same `endpoint` + `fetchImpl` shape and the same `IntegrationRuntimeError`
168
+ * surface. Endpoints (platform API, e.g. https://id.tangle.tools):
169
+ * POST /v1/apps register (owner bearer)
170
+ * GET /v1/apps list (owner bearer)
171
+ * POST /v1/apps/:appId/revoke revoke (owner bearer)
172
+ * POST /v1/apps/grants/:grantId/mint-broker-token durable re-mint (app creds)
173
+ * POST /v1/apps/oauth/token authorization_code → token
174
+ */
175
+ interface TangleAppsClientOptions {
176
+ /** Platform base URL (e.g. https://id.tangle.tools). */
177
+ endpoint: string;
178
+ /** Test seam. Defaults to global `fetch`. */
179
+ fetchImpl?: typeof fetch;
180
+ }
181
+ interface RegisterAppInput {
182
+ name: string;
183
+ redirectUris: string[];
184
+ allowedScopes: string[];
185
+ homepageUrl?: string;
186
+ }
187
+ interface AppSummary {
188
+ id: string;
189
+ clientId: string;
190
+ name: string;
191
+ redirectUris: string[];
192
+ allowedScopes: string[];
193
+ homepageUrl?: string;
194
+ createdAt?: string;
195
+ }
196
+ interface RegisteredApp extends AppSummary {
197
+ /** Shown ONCE at registration — persist it as a secret immediately. */
198
+ clientSecret: string;
199
+ }
200
+ interface BrokerToken {
201
+ /** The `sk-tan-broker-…` bearer for a single `/v1/hub/exec` call. */
202
+ accessToken: string;
203
+ expiresIn: number;
204
+ scope: string;
205
+ connectionId?: string;
206
+ }
207
+ declare class TangleAppsClient {
208
+ private readonly endpoint;
209
+ private readonly fetchImpl;
210
+ constructor(options: TangleAppsClientOptions);
211
+ /**
212
+ * Register a product as an app (ONE-TIME, with the owner's bearer — a Tangle
213
+ * session or `sk-tan-*` key). Returns the client_id + the once-shown
214
+ * client_secret; persist the secret immediately (never retrievable again).
215
+ */
216
+ registerApp(input: RegisterAppInput, ownerBearer: string): Promise<RegisteredApp>;
217
+ /** List the caller's registered apps (no secrets). */
218
+ listApps(ownerBearer: string): Promise<AppSummary[]>;
219
+ /** Revoke an app and cascade-kill its grants + tokens. */
220
+ revokeApp(appId: string, ownerBearer: string): Promise<{
221
+ revoked: boolean;
222
+ }>;
223
+ /**
224
+ * Durable re-mint: mint a fresh single-use `sk-tan-broker-` token against an
225
+ * existing consented grant using ONLY the app credentials — no user session,
226
+ * no `agc_` code. The runtime path: one call per `/v1/hub/exec`.
227
+ */
228
+ mintBrokerToken(input: {
229
+ clientId: string;
230
+ clientSecret: string;
231
+ grantId: string;
232
+ ttlSeconds?: number;
233
+ }): Promise<BrokerToken>;
234
+ /**
235
+ * Exchange an `agc_` authorization code (from the user's one-time consent)
236
+ * for the first broker token + the durable grant. Use on the consent
237
+ * callback; afterward `mintBrokerToken` is enough.
238
+ */
239
+ exchangeAuthCode(input: {
240
+ clientId: string;
241
+ clientSecret: string;
242
+ code: string;
243
+ redirectUri: string;
244
+ connectionId?: string;
245
+ }): Promise<BrokerToken>;
246
+ private request;
247
+ }
248
+ declare function createTangleAppsClient(options: TangleAppsClientOptions): TangleAppsClient;
249
+
250
+ interface TangleIntegrationsClientOptions {
251
+ endpoint: string;
252
+ bridge?: IntegrationBridgePayload;
253
+ env?: Record<string, string | undefined>;
254
+ envVar?: string;
255
+ fetchImpl?: typeof fetch;
256
+ getCapabilityToken?: (tool: IntegrationBridgeToolBinding) => string | Promise<string>;
257
+ }
258
+ interface TangleIntegrationInvokeInput<TInput = unknown> {
259
+ tool: string;
260
+ input?: TInput;
261
+ idempotencyKey?: string;
262
+ dryRun?: boolean;
263
+ metadata?: Record<string, unknown>;
264
+ }
265
+ interface TangleIntegrationInvokeResult<TOutput = unknown> {
266
+ status: 'ok' | 'approval_required' | 'failed';
267
+ action: string;
268
+ output?: TOutput;
269
+ approval?: unknown;
270
+ error?: string;
271
+ metadata?: Record<string, unknown>;
272
+ }
273
+ declare class TangleIntegrationsClient {
274
+ private readonly endpoint;
275
+ private readonly bridge;
276
+ private readonly fetchImpl;
277
+ private readonly getCapabilityToken;
278
+ constructor(options: TangleIntegrationsClientOptions);
279
+ tools(): IntegrationBridgeToolBinding[];
280
+ findTool(toolOrAction: string): IntegrationBridgeToolBinding;
281
+ invoke<TOutput = unknown, TInput = unknown>(input: TangleIntegrationInvokeInput<TInput>): Promise<TangleIntegrationInvokeResult<TOutput>>;
282
+ }
283
+ declare function createTangleIntegrationsClient(options: TangleIntegrationsClientOptions): TangleIntegrationsClient;
284
+
285
+ interface ConsentSummary {
286
+ title: string;
287
+ body: string;
288
+ bullets: string[];
289
+ primaryAction: string;
290
+ risk: 'read' | 'write' | 'destructive';
291
+ connectorIds: string[];
292
+ }
293
+ interface RenderConsentOptions {
294
+ appName?: string;
295
+ connectors?: IntegrationConnector[];
296
+ }
297
+ declare function renderConsentSummary(manifestOrResolution: IntegrationManifest | IntegrationManifestResolution, options?: RenderConsentOptions): ConsentSummary;
298
+ declare function renderApprovalCopy(input: {
299
+ appName: string;
300
+ connectorTitle: string;
301
+ action: IntegrationConnectorAction;
302
+ approvalId?: string;
303
+ }): ConsentSummary;
304
+
305
+ /** OAuth client credentials the host resolves at start/exchange time.
306
+ * The lib never reads env or any vault — kept edge-runtime-safe. */
307
+ interface OAuthClientCredentials {
308
+ clientId: string;
309
+ clientSecret: string;
310
+ }
311
+ interface ConnectorAdapterProviderOptions {
312
+ id?: string;
313
+ kind?: IntegrationProviderKind;
314
+ adapters: ConnectorAdapter[];
315
+ resolveDataSource: (connection: IntegrationConnection) => Promise<ResolvedDataSource> | ResolvedDataSource;
316
+ /** Invoked when an adapter rotates credentials during executeRead /
317
+ * executeMutation (e.g. an OAuth access token refreshed on expiry). The
318
+ * host re-encrypts + persists the rotated envelope so the next expiry
319
+ * does not force a reconnect. Carries the connection so the host can
320
+ * resolve the secretRef. */
321
+ onCredentialsRotated?: (event: {
322
+ connection: IntegrationConnection;
323
+ credentials: ConnectorCredentials;
324
+ }) => Promise<void> | void;
325
+ /** Resolve OAuth client_id / client_secret for an oauth2 adapter at
326
+ * start- and exchange-time. Host owns env, vault, and per-tenant
327
+ * overrides. Return null to refuse the flow (lib will throw
328
+ * `config_missing`). The lib never logs the secret nor includes it
329
+ * in thrown error messages. */
330
+ resolveOAuthClient?: (input: {
331
+ connectorId: string;
332
+ }) => Promise<OAuthClientCredentials | null> | OAuthClientCredentials | null;
333
+ /** Fetch implementation forwarded to the OAuth token exchange. Default
334
+ * is `globalThis.fetch`. Tests inject a mock. */
335
+ fetchImpl?: typeof fetch;
336
+ now?: () => Date;
337
+ }
338
+ declare function createConnectorAdapterProvider(options: ConnectorAdapterProviderOptions): IntegrationProvider;
339
+ declare function adapterManifestsToConnectors(adapters: ConnectorAdapter[], providerId?: string): IntegrationConnector[];
340
+ declare function createConnectorAdapterCatalogSource(options: {
341
+ id?: string;
342
+ providerId?: string;
343
+ adapters: ConnectorAdapter[];
344
+ precedence?: number;
345
+ }): IntegrationCatalogSource;
346
+ declare function manifestToConnector(providerId: string, adapter: ConnectorAdapter): IntegrationConnector;
347
+
348
+ interface ConnectionCredentialResolverOptions {
349
+ secrets: IntegrationSecretStore;
350
+ connections?: IntegrationConnectionStore;
351
+ adapters?: ConnectorAdapter[];
352
+ now?: () => Date;
353
+ markConnectionError?: (connection: IntegrationConnection, error: Error) => Promise<void> | void;
354
+ }
355
+ declare class InMemoryIntegrationSecretStore implements IntegrationSecretStore {
356
+ private readonly secrets;
357
+ get(ref: SecretRef): ConnectorCredentials | undefined;
358
+ put(ref: SecretRef, credentials: ConnectorCredentials): void;
359
+ delete(ref: SecretRef): void;
360
+ }
361
+ /** Test/dev double for {@link IntegrationOAuthStateStore}. Production hubs
362
+ * inject a durable implementation; this one keeps records in a Map and
363
+ * enforces the single-use + expiry contract. */
364
+ declare class InMemoryIntegrationOAuthStateStore implements IntegrationOAuthStateStore {
365
+ private readonly states;
366
+ put(state: IntegrationOAuthState): void;
367
+ consume(state: string): IntegrationOAuthStateOutcome;
368
+ sweep(now: number): void;
369
+ }
370
+ declare function createConnectionCredentialResolver(options: ConnectionCredentialResolverOptions): (connection: IntegrationConnection) => Promise<ResolvedDataSource>;
371
+ declare function resolveConnectionCredentials(input: IntegrationConnection, options: ConnectionCredentialResolverOptions): Promise<ConnectorCredentials>;
372
+ type CredentialBackedAdapterProviderOptions = Omit<ConnectorAdapterProviderOptions, 'resolveDataSource' | 'onCredentialsRotated'> & ConnectionCredentialResolverOptions & {
373
+ /** Fired after the provider re-persists rotated credentials to the
374
+ * secret + connection stores. Receives the hub-shaped event including
375
+ * the resolved secretRef so the host can drive external re-encryption
376
+ * or telemetry. */
377
+ onCredentialsRotated?: (event: IntegrationCredentialsRotatedEvent) => Promise<void> | void;
378
+ };
379
+ declare function createCredentialBackedAdapterProvider(options: CredentialBackedAdapterProviderOptions): IntegrationProvider;
380
+ declare function revokeConnection(input: {
381
+ connection: IntegrationConnection;
382
+ connections?: IntegrationConnectionStore;
383
+ secrets?: IntegrationSecretStore;
384
+ now?: () => Date;
385
+ }): Promise<IntegrationConnection>;
386
+
387
+ /**
388
+ * Workspace capability discovery — answers "what can this workspace do?"
389
+ * with a typed list of MCP-shape tool descriptors that the agent runtime
390
+ * can flatten into a planner's tool registry.
391
+ *
392
+ * The agent runtime's gating question is one level above the existing
393
+ * connector catalog ("which integrations exist?") and one level below
394
+ * the issued capability-token surface ("temporarily delegate scope X
395
+ * via this signed token"). This module bridges the two:
396
+ *
397
+ * discoverWorkspaceCapabilities({ owner, connectors, connections, scopes })
398
+ * → WorkspaceCapability[]
399
+ *
400
+ * A `WorkspaceCapability` is hand-shaped to be cheap to emit alongside a
401
+ * connector manifest and trivial to render into:
402
+ * - an LLM tool-choice JSON array
403
+ * - an MCP `tools/list` response
404
+ * - a UI surface ("Connect Gmail to enable: send_reply, list_messages…")
405
+ *
406
+ * What this is NOT:
407
+ * - A capability-token issuer. That stays in IntegrationHub.issueCapability.
408
+ * - A connector registry. That stays in IntegrationRegistry / catalog.
409
+ *
410
+ * Scopes are the load-bearing input: a connector advertises N actions,
411
+ * but only the subset whose `requiredScopes` are a subset of the
412
+ * connection's `grantedScopes` is reachable. The discovery function
413
+ * filters on that automatically.
414
+ *
415
+ * Stability: `@stable` — additions to WorkspaceCapability must be
416
+ * additive and non-breaking.
417
+ */
418
+
419
+ /** MCP-shape tool descriptor. Mirrors the
420
+ * [Model Context Protocol tool schema](https://modelcontextprotocol.io/specification)
421
+ * closely enough that consumers can pipe a WorkspaceCapability straight
422
+ * into a `tools/list` response. */
423
+ interface WorkspaceToolSchema {
424
+ name: string;
425
+ description?: string;
426
+ /** JSON-schema describing the action's input. */
427
+ inputSchema?: unknown;
428
+ /** Optional JSON-schema describing the action's output. */
429
+ outputSchema?: unknown;
430
+ }
431
+ /** One discoverable capability — an action a connector exposes that the
432
+ * workspace has the connection + scopes to invoke. */
433
+ interface WorkspaceCapability {
434
+ /** Stable, fully-qualified id. Format `<connector-id>.<action-id>`. */
435
+ id: string;
436
+ /** Human label safe for UI. */
437
+ title: string;
438
+ /** Optional one-line description. */
439
+ description?: string;
440
+ /** Connector category for grouping. */
441
+ category: IntegrationConnectorCategory;
442
+ /** Connector that hosts this capability. */
443
+ connectorId: string;
444
+ /** Provider that hosts this connector (first-party, gateway, …). */
445
+ providerId: string;
446
+ /** Underlying action id on the connector. */
447
+ actionId: string;
448
+ /** Scopes required to invoke. The discovery function only returns
449
+ * capabilities whose required scopes are a subset of the connection's
450
+ * grantedScopes. */
451
+ scopes: string[];
452
+ /** Risk class — useful for UI ("write" / "destructive" lights). */
453
+ risk: IntegrationActionRisk;
454
+ /** Data class of the action's output, when known. */
455
+ dataClass: IntegrationDataClass;
456
+ /** MCP-shape tool schema the agent runtime can register directly. */
457
+ toolSchema: WorkspaceToolSchema;
458
+ /** True iff the workspace has an active connection backing this
459
+ * capability. False capabilities (advertised by the connector but
460
+ * not yet connected) are included when `includeUnconnected: true`
461
+ * is passed — useful for "connect to unlock" UI affordances. */
462
+ connected: boolean;
463
+ /** Connection id backing this capability. Undefined when
464
+ * `connected: false`. */
465
+ connectionId?: string;
466
+ /** Whether the action requires explicit approval before invocation. */
467
+ approvalRequired?: boolean;
468
+ }
469
+ /** Optional inbound trigger surface. Same shape as a capability so the
470
+ * consumer can render both with one component. */
471
+ interface WorkspaceTrigger {
472
+ id: string;
473
+ title: string;
474
+ description?: string;
475
+ category: IntegrationConnectorCategory;
476
+ connectorId: string;
477
+ providerId: string;
478
+ triggerId: string;
479
+ scopes: string[];
480
+ dataClass: IntegrationDataClass;
481
+ connected: boolean;
482
+ connectionId?: string;
483
+ }
484
+ interface DiscoverWorkspaceCapabilitiesInput {
485
+ /** Workspace owner. Used to scope the connection lookup when `store`
486
+ * is supplied (the canonical production path). */
487
+ owner: IntegrationActor;
488
+ /** Either an explicit connection list (test/fixture path) or a store
489
+ * the function should query for connections by owner. Exactly one
490
+ * of `connections` / `store` MUST be provided. */
491
+ connections?: IntegrationConnection[];
492
+ store?: IntegrationConnectionStore;
493
+ /** Either an explicit connector list (test/fixture path) or a set of
494
+ * providers the function should query via `listConnectors()`. */
495
+ connectors?: IntegrationConnector[];
496
+ providers?: IntegrationProvider[];
497
+ /** Include capabilities whose connector is in the catalog but the
498
+ * workspace has no active connection for. Useful to render
499
+ * "connect to unlock" affordances. Default: false. */
500
+ includeUnconnected?: boolean;
501
+ /** When true, include capabilities even if some required scopes are
502
+ * missing from the connection grant. The default `false` hides such
503
+ * capabilities — the agent runtime never sees them. */
504
+ includeMissingScopes?: boolean;
505
+ }
506
+ interface WorkspaceCapabilityDiscovery {
507
+ capabilities: WorkspaceCapability[];
508
+ triggers: WorkspaceTrigger[];
509
+ /** Counts grouped by connector for telemetry / UI badges. */
510
+ countsByConnector: Record<string, number>;
511
+ /** Connectors the workspace is connected to but the planner cannot
512
+ * reach any actions on (e.g., zero scopes granted, or all actions
513
+ * require an additional scope). */
514
+ unreachableConnectors: Array<{
515
+ connectorId: string;
516
+ reason: string;
517
+ }>;
518
+ }
519
+ /** Resolve workspace-visible capabilities + triggers. Pure with respect
520
+ * to the inputs — caller decides whether to back `connections` and
521
+ * `connectors` with persistent state or static fixtures. */
522
+ declare function discoverWorkspaceCapabilities(input: DiscoverWorkspaceCapabilitiesInput): Promise<WorkspaceCapabilityDiscovery>;
523
+ /**
524
+ * Filter a {@link WorkspaceCapabilityDiscovery} result by the calling
525
+ * user's effective id.tangle.tools workspace scopes. Pair with the
526
+ * `tangleIdentity()` adapter's `list_workspaces` / `switch_workspace`
527
+ * output to keep what the agent runtime sees aligned with what the
528
+ * workspace's plan actually permits.
529
+ *
530
+ * Semantics:
531
+ * - Every workspace scope is matched against every capability's
532
+ * `scopes` list. Wildcard scopes (`tangle:*`, `<connectorId>:*`) are
533
+ * respected — a workspace with `tangle:*` sees everything; a
534
+ * workspace with `gmail:*` sees every gmail capability regardless of
535
+ * the upstream OAuth scope.
536
+ * - When `workspaceScopes` is empty, returns the discovery as-is (no
537
+ * workspace gate). Pass an explicit `denyByDefault: true` to flip
538
+ * that to "empty workspace sees nothing" — matches the platform's
539
+ * fail-closed posture for production tenants.
540
+ *
541
+ * Pure with respect to the inputs — no side effects.
542
+ */
543
+ declare function filterDiscoveryByWorkspaceScopes(discovery: WorkspaceCapabilityDiscovery, workspaceScopes: string[], opts?: {
544
+ denyByDefault?: boolean;
545
+ }): WorkspaceCapabilityDiscovery;
546
+
547
+ interface IntegrationWorkflowDefinition {
548
+ id: string;
549
+ title?: string;
550
+ manifest: IntegrationManifest;
551
+ trigger: {
552
+ requirementId: string;
553
+ triggerId: string;
554
+ targetUrl?: string;
555
+ };
556
+ metadata?: Record<string, unknown>;
557
+ }
558
+ interface InstalledIntegrationWorkflow {
559
+ id: string;
560
+ workflowId: string;
561
+ manifestId: string;
562
+ owner: IntegrationActor;
563
+ grantee: IntegrationActor;
564
+ triggerGrantId: string;
565
+ subscription: IntegrationTriggerSubscription;
566
+ status: 'active' | 'paused' | 'error';
567
+ createdAt: string;
568
+ metadata?: Record<string, unknown>;
569
+ }
570
+ interface IntegrationWorkflowStore {
571
+ put(workflow: InstalledIntegrationWorkflow): Promise<void> | void;
572
+ get(id: string): Promise<InstalledIntegrationWorkflow | undefined> | InstalledIntegrationWorkflow | undefined;
573
+ list(): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
574
+ listByWorkflow(workflowId: string): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
575
+ listByOwner(owner: IntegrationActor): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
576
+ }
577
+ interface IntegrationWorkflowRuntimeHub {
578
+ subscribeTrigger(connectionId: string, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription;
579
+ }
580
+ interface IntegrationWorkflowRuntimeOptions {
581
+ runtime: IntegrationRuntime;
582
+ hub: IntegrationWorkflowRuntimeHub;
583
+ grants: IntegrationGrantStore;
584
+ store?: IntegrationWorkflowStore;
585
+ now?: () => Date;
586
+ }
587
+ declare class InMemoryIntegrationWorkflowStore implements IntegrationWorkflowStore {
588
+ private readonly workflows;
589
+ put(workflow: InstalledIntegrationWorkflow): void;
590
+ get(id: string): InstalledIntegrationWorkflow | undefined;
591
+ list(): InstalledIntegrationWorkflow[];
592
+ listByWorkflow(workflowId: string): InstalledIntegrationWorkflow[];
593
+ listByOwner(owner: IntegrationActor): InstalledIntegrationWorkflow[];
594
+ }
595
+ declare class IntegrationWorkflowRuntime {
596
+ private readonly runtime;
597
+ private readonly hub;
598
+ private readonly grants;
599
+ private readonly store;
600
+ private readonly now;
601
+ constructor(options: IntegrationWorkflowRuntimeOptions);
602
+ install(input: {
603
+ workflow: IntegrationWorkflowDefinition;
604
+ owner: IntegrationActor;
605
+ grantee: IntegrationActor;
606
+ }): Promise<InstalledIntegrationWorkflow>;
607
+ dispatchEvent<T = unknown>(event: IntegrationTriggerEvent<T>, handler: (input: {
608
+ event: IntegrationTriggerEvent<T>;
609
+ workflows: InstalledIntegrationWorkflow[];
610
+ }) => Promise<void> | void): Promise<{
611
+ matched: InstalledIntegrationWorkflow[];
612
+ }>;
613
+ }
614
+ declare function createIntegrationWorkflowRuntime(options: IntegrationWorkflowRuntimeOptions): IntegrationWorkflowRuntime;
615
+
616
+ interface StoredIntegrationEvent {
617
+ id: string;
618
+ sourceId: string;
619
+ connectorId: string;
620
+ eventType: string;
621
+ providerEventId?: string;
622
+ receivedAt: string;
623
+ payload: Record<string, unknown>;
624
+ dispatchedAt?: string;
625
+ metadata?: Record<string, unknown>;
626
+ }
627
+ interface IntegrationEventStore {
628
+ put(event: StoredIntegrationEvent): Promise<void> | void;
629
+ hasProviderEvent(sourceId: string, providerEventId: string): Promise<boolean> | boolean;
630
+ list(): Promise<StoredIntegrationEvent[]> | StoredIntegrationEvent[];
631
+ }
632
+ interface IntegrationWebhookReceiverResult {
633
+ status: number;
634
+ body: unknown;
635
+ headers?: Record<string, string>;
636
+ received: StoredIntegrationEvent[];
637
+ duplicates: StoredIntegrationEvent[];
638
+ }
639
+ declare class InMemoryIntegrationEventStore implements IntegrationEventStore {
640
+ private readonly events;
641
+ private readonly providerIds;
642
+ put(event: StoredIntegrationEvent): void;
643
+ hasProviderEvent(sourceId: string, providerEventId: string): boolean;
644
+ list(): StoredIntegrationEvent[];
645
+ }
646
+ declare function receiveIntegrationWebhook(input: {
647
+ adapter: ConnectorAdapter;
648
+ source: ResolvedDataSource;
649
+ rawBody: string;
650
+ headers: Record<string, string | string[] | undefined>;
651
+ store: IntegrationEventStore;
652
+ workflowRuntime?: IntegrationWorkflowRuntime;
653
+ allowUnsignedWebhook?: boolean;
654
+ now?: () => Date;
655
+ }): Promise<IntegrationWebhookReceiverResult>;
656
+ declare function storedEventToTriggerEvent(event: StoredIntegrationEvent, source: ResolvedDataSource): IntegrationTriggerEvent;
657
+
658
+ interface IntegrationIdempotencyRecord {
659
+ key: string;
660
+ requestHash: string;
661
+ result: IntegrationActionResult;
662
+ createdAt: string;
663
+ }
664
+ interface IntegrationIdempotencyStore {
665
+ get(key: string): Promise<IntegrationIdempotencyRecord | undefined> | IntegrationIdempotencyRecord | undefined;
666
+ put(record: IntegrationIdempotencyRecord): Promise<void> | void;
667
+ }
668
+ interface IntegrationRateLimitDecision {
669
+ allowed: boolean;
670
+ retryAfterMs?: number;
671
+ reason?: string;
672
+ }
673
+ interface IntegrationRateLimiter {
674
+ check(ctx: IntegrationGuardContext): Promise<IntegrationRateLimitDecision> | IntegrationRateLimitDecision;
675
+ }
676
+ declare class InMemoryIntegrationIdempotencyStore implements IntegrationIdempotencyStore {
677
+ private readonly records;
678
+ get(key: string): IntegrationIdempotencyRecord | undefined;
679
+ put(record: IntegrationIdempotencyRecord): void;
680
+ }
681
+ declare class DefaultIntegrationActionGuard implements IntegrationActionGuard {
682
+ private readonly idempotency;
683
+ private readonly audit;
684
+ private readonly rateLimiter;
685
+ private readonly requireIdempotencyForMutations;
686
+ private readonly now;
687
+ constructor(options?: {
688
+ idempotency?: IntegrationIdempotencyStore;
689
+ audit?: IntegrationAuditSink;
690
+ rateLimiter?: IntegrationRateLimiter;
691
+ requireIdempotencyForMutations?: boolean;
692
+ now?: () => Date;
693
+ });
694
+ invokeAction(ctx: IntegrationGuardContext, proceed: () => Promise<IntegrationActionResult>): Promise<IntegrationActionResult>;
695
+ private writeIdempotency;
696
+ }
697
+ declare function createDefaultIntegrationActionGuard(options?: ConstructorParameters<typeof DefaultIntegrationActionGuard>[0]): DefaultIntegrationActionGuard;
698
+
699
+ interface ManifestValidationIssue {
700
+ path: string;
701
+ message: string;
702
+ }
703
+ interface ManifestValidationResult {
704
+ ok: boolean;
705
+ issues: ManifestValidationIssue[];
706
+ }
707
+ interface InferIntegrationRequirementsOptions {
708
+ manifestId: string;
709
+ title?: string;
710
+ tools: Array<string | {
711
+ action: string;
712
+ reason?: string;
713
+ mode?: IntegrationRequirementMode;
714
+ connectorId?: string;
715
+ scopes?: string[];
716
+ }>;
717
+ metadata?: Record<string, unknown>;
718
+ }
719
+ interface MissingRequirementExplanation {
720
+ requirementId: string;
721
+ connectorId: string;
722
+ status: string;
723
+ message: string;
724
+ userAction: 'connect' | 'enable' | 'ignore_optional';
725
+ }
726
+ declare function validateIntegrationManifest(manifest: IntegrationManifest): ManifestValidationResult;
727
+ declare function assertValidIntegrationManifest(manifest: IntegrationManifest): void;
728
+ declare function inferIntegrationManifestFromTools(options: InferIntegrationRequirementsOptions): IntegrationManifest;
729
+ declare function explainMissingRequirements(resolution: IntegrationManifestResolution): MissingRequirementExplanation[];
730
+ declare function calendarExercisePlannerManifest(id?: string): IntegrationManifest;
731
+
732
+ interface ProviderHttpRequestInput {
733
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
734
+ path: string;
735
+ query?: Record<string, string | number | boolean | undefined>;
736
+ headers?: Record<string, string>;
737
+ body?: unknown;
738
+ }
739
+ interface ProviderPassthroughPolicy {
740
+ enabled: boolean;
741
+ allowedMethods?: ProviderHttpRequestInput['method'][];
742
+ allowedPathPrefixes?: string[];
743
+ maxBodyBytes?: number;
744
+ }
745
+ declare const PROVIDER_PASSTHROUGH_ACTION: "provider.http.request";
746
+ declare function validateProviderPassthroughRequest(input: ProviderHttpRequestInput, policy: ProviderPassthroughPolicy): void;
747
+
748
+ type IntegrationPolicyEffect = 'allow' | 'require_approval' | 'deny';
749
+ interface IntegrationPolicyRule {
750
+ id: string;
751
+ effect: IntegrationPolicyEffect;
752
+ reason: string;
753
+ providerId?: string;
754
+ connectorId?: string;
755
+ action?: string;
756
+ maxRisk?: IntegrationActionRisk;
757
+ risk?: IntegrationActionRisk;
758
+ dataClass?: IntegrationDataClass;
759
+ }
760
+ interface StaticIntegrationPolicyOptions {
761
+ rules?: IntegrationPolicyRule[];
762
+ defaultReadEffect?: IntegrationPolicyEffect;
763
+ defaultWriteEffect?: IntegrationPolicyEffect;
764
+ defaultDestructiveEffect?: IntegrationPolicyEffect;
765
+ now?: () => Date;
766
+ }
767
+ interface IntegrationApprovalResolution {
768
+ approvalId: string;
769
+ approved: boolean;
770
+ resolvedBy: string;
771
+ resolvedAt: string;
772
+ reason?: string;
773
+ metadata?: Record<string, unknown>;
774
+ }
775
+ declare class StaticIntegrationPolicyEngine implements IntegrationPolicyEngine {
776
+ private readonly rules;
777
+ private readonly defaultReadEffect;
778
+ private readonly defaultWriteEffect;
779
+ private readonly defaultDestructiveEffect;
780
+ private readonly now;
781
+ constructor(options?: StaticIntegrationPolicyOptions);
782
+ decide(ctx: IntegrationGuardContext & {
783
+ subject: {
784
+ type: string;
785
+ id: string;
786
+ };
787
+ }): IntegrationPolicyDecision;
788
+ private defaultEffect;
789
+ }
790
+ declare function createDefaultIntegrationPolicyEngine(options?: Omit<StaticIntegrationPolicyOptions, 'rules'>): StaticIntegrationPolicyEngine;
791
+ declare function buildApprovalRequest(ctx: IntegrationGuardContext & {
792
+ subject: {
793
+ type: string;
794
+ id: string;
795
+ };
796
+ }, reason: string, requestedAt: Date): IntegrationApprovalRequest;
797
+ declare function redactApprovalRequest(request: IntegrationApprovalRequest): IntegrationApprovalRequest;
798
+
799
+ interface PlatformIntegrationPolicyPresetOptions extends Omit<StaticIntegrationPolicyOptions, 'defaultReadEffect' | 'defaultWriteEffect' | 'defaultDestructiveEffect'> {
800
+ allowWritesWithoutApproval?: boolean;
801
+ allowDestructiveActions?: boolean;
802
+ allowProviderPassthrough?: boolean;
803
+ }
804
+ declare function createPlatformIntegrationPolicyPreset(options?: PlatformIntegrationPolicyPresetOptions): StaticIntegrationPolicyEngine;
805
+
806
+ interface CatalogExecutorInvocation {
807
+ connection: IntegrationConnection;
808
+ request: IntegrationActionRequest;
809
+ connector: IntegrationConnector;
810
+ action: IntegrationConnector['actions'][number];
811
+ }
812
+ interface CatalogExecutorProviderOptions {
813
+ id: string;
814
+ kind: IntegrationProviderKind;
815
+ connectors: IntegrationConnector[];
816
+ startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult;
817
+ completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection;
818
+ executeAction: (invocation: CatalogExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult;
819
+ subscribeTrigger?: (connection: IntegrationConnection, trigger: NonNullable<IntegrationConnector['triggers']>[number], targetUrl?: string) => Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription;
820
+ unsubscribeTrigger?: (subscriptionId: string) => Promise<void> | void;
821
+ normalizeTriggerEvent?: (raw: unknown) => Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent;
822
+ }
823
+ declare function createCatalogExecutorProvider(options: CatalogExecutorProviderOptions): IntegrationProvider;
824
+
825
+ interface IntegrationInvocationEnvelope {
826
+ kind: 'integration.invocation';
827
+ capabilityToken: string;
828
+ toolName: string;
829
+ action: string;
830
+ input?: unknown;
831
+ idempotencyKey: string;
832
+ dryRun?: boolean;
833
+ metadata?: Record<string, unknown>;
834
+ }
835
+ interface IntegrationInvocationEnvelopeValidationOptions {
836
+ connectors?: IntegrationConnector[];
837
+ maxInputBytes?: number;
838
+ requireKnownTool?: boolean;
839
+ }
840
+ type NormalizedIntegrationResult = {
841
+ status: 'ok';
842
+ action: string;
843
+ output?: unknown;
844
+ metadata?: Record<string, unknown>;
845
+ } | {
846
+ status: 'approval_required';
847
+ action: string;
848
+ approval: IntegrationApprovalRequest;
849
+ metadata?: Record<string, unknown>;
850
+ } | {
851
+ status: 'failed';
852
+ action: string;
853
+ error: string;
854
+ metadata?: Record<string, unknown>;
855
+ };
856
+ interface IntegrationSandboxHostHub {
857
+ invokeWithCapability(token: string, request: InvokeWithCapabilityRequest): Promise<IntegrationActionResult> | IntegrationActionResult;
858
+ }
859
+ interface IntegrationSandboxHostOptions extends IntegrationInvocationEnvelopeValidationOptions {
860
+ hub: IntegrationSandboxHostHub;
861
+ }
862
+ declare function buildIntegrationInvocationEnvelope(input: {
863
+ capabilityToken: string;
864
+ toolName: string;
865
+ args?: unknown;
866
+ idempotencyKey: string;
867
+ dryRun?: boolean;
868
+ metadata?: Record<string, unknown>;
869
+ }): IntegrationInvocationEnvelope;
870
+ declare function invocationRequestFromEnvelope(envelope: IntegrationInvocationEnvelope): InvokeWithCapabilityRequest;
871
+ declare function validateIntegrationInvocationEnvelope(envelope: IntegrationInvocationEnvelope, options?: IntegrationInvocationEnvelopeValidationOptions): void;
872
+ declare function redactInvocationEnvelope(envelope: IntegrationInvocationEnvelope): Omit<IntegrationInvocationEnvelope, 'capabilityToken'> & {
873
+ capabilityToken: '[REDACTED]';
874
+ };
875
+ declare function redactCapability(capability: IntegrationCapability): IntegrationCapability;
876
+ declare function normalizeIntegrationResult(result: IntegrationActionResult): NormalizedIntegrationResult;
877
+ declare function dispatchIntegrationInvocation(envelope: IntegrationInvocationEnvelope, options: IntegrationSandboxHostOptions): Promise<NormalizedIntegrationResult>;
878
+ declare class IntegrationSandboxHost {
879
+ private readonly options;
880
+ constructor(options: IntegrationSandboxHostOptions);
881
+ dispatch(envelope: IntegrationInvocationEnvelope): Promise<NormalizedIntegrationResult>;
882
+ }
883
+
884
+ interface ImportCatalogOptions {
885
+ providerId: string;
886
+ connectorId: string;
887
+ connectorTitle: string;
888
+ category?: IntegrationConnectorCategory;
889
+ auth?: IntegrationConnector['auth'];
890
+ scopes?: string[];
891
+ dataClass?: IntegrationDataClass;
892
+ defaultRisk?: IntegrationActionRisk;
893
+ }
894
+ interface OpenApiDocument {
895
+ openapi?: string;
896
+ swagger?: string;
897
+ info?: {
898
+ title?: string;
899
+ };
900
+ paths?: Record<string, Record<string, OpenApiOperation | unknown>>;
901
+ }
902
+ interface OpenApiOperation {
903
+ operationId?: string;
904
+ summary?: string;
905
+ description?: string;
906
+ parameters?: unknown[];
907
+ requestBody?: unknown;
908
+ responses?: unknown;
909
+ security?: Array<Record<string, string[]>>;
910
+ tags?: string[];
911
+ }
912
+ interface GraphqlOperationSpec {
913
+ name: string;
914
+ kind: 'query' | 'mutation';
915
+ description?: string;
916
+ inputSchema?: unknown;
917
+ outputSchema?: unknown;
918
+ requiredScopes?: string[];
919
+ }
920
+ interface McpCatalogTool {
921
+ name: string;
922
+ description?: string;
923
+ inputSchema?: unknown;
924
+ annotations?: {
925
+ readOnlyHint?: boolean;
926
+ destructiveHint?: boolean;
927
+ openWorldHint?: boolean;
928
+ title?: string;
929
+ };
930
+ }
931
+ interface McpCatalog {
932
+ tools: McpCatalogTool[];
933
+ }
934
+ declare function importOpenApiConnector(document: OpenApiDocument, options: ImportCatalogOptions): IntegrationConnector;
935
+ declare function importGraphqlConnector(operations: GraphqlOperationSpec[], options: ImportCatalogOptions): IntegrationConnector;
936
+ declare function importMcpConnector(catalog: McpCatalog, options: ImportCatalogOptions): IntegrationConnector;
937
+
938
+ interface GatewayCatalogProviderOptions {
939
+ id: string;
940
+ kind: Extract<IntegrationProviderKind, 'nango' | 'pipedream' | 'activepieces' | 'tangle_catalog' | 'zapier' | 'executor' | 'custom'>;
941
+ fetchCatalog: () => Promise<GatewayCatalogEntry[]> | GatewayCatalogEntry[];
942
+ startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult;
943
+ completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection;
944
+ invokeAction?: (connection: IntegrationConnection, request: IntegrationActionRequest) => Promise<IntegrationActionResult> | IntegrationActionResult;
945
+ cacheTtlMs?: number;
946
+ now?: () => Date;
947
+ }
948
+ interface GatewayCatalogEntry {
949
+ id?: string;
950
+ key?: string;
951
+ name?: string;
952
+ title?: string;
953
+ category?: string;
954
+ auth?: 'oauth2' | 'api_key' | 'none' | 'custom' | string;
955
+ scopes?: string[];
956
+ actions?: GatewayCatalogAction[];
957
+ triggers?: GatewayCatalogTrigger[];
958
+ metadata?: Record<string, unknown>;
959
+ }
960
+ interface GatewayCatalogAction {
961
+ id?: string;
962
+ key?: string;
963
+ name?: string;
964
+ title?: string;
965
+ description?: string;
966
+ risk?: 'read' | 'write' | 'destructive' | string;
967
+ scopes?: string[];
968
+ requiredScopes?: string[];
969
+ dataClass?: IntegrationDataClass | string;
970
+ approvalRequired?: boolean;
971
+ inputSchema?: unknown;
972
+ outputSchema?: unknown;
973
+ }
974
+ interface GatewayCatalogTrigger {
975
+ id?: string;
976
+ key?: string;
977
+ name?: string;
978
+ title?: string;
979
+ description?: string;
980
+ scopes?: string[];
981
+ requiredScopes?: string[];
982
+ dataClass?: IntegrationDataClass | string;
983
+ payloadSchema?: unknown;
984
+ }
985
+ declare function createGatewayCatalogProvider(options: GatewayCatalogProviderOptions): IntegrationProvider;
986
+ declare function normalizeGatewayCatalog(entries: GatewayCatalogEntry[], options: {
987
+ providerId: string;
988
+ providerKind: IntegrationProviderKind;
989
+ }): IntegrationConnector[];
990
+
991
+ interface ActivepiecesPieceOverride {
992
+ category?: IntegrationConnectorCategory;
993
+ actionRisks?: Record<string, IntegrationActionRisk>;
994
+ approvalRequired?: Record<string, boolean>;
995
+ }
996
+ declare const ACTIVEPIECES_OVERRIDES: Record<string, ActivepiecesPieceOverride>;
997
+ declare function getActivepiecesOverride(id: string): ActivepiecesPieceOverride | undefined;
998
+
999
+ interface IntegrationCatalogFreshnessOptions {
1000
+ liveActivepieces?: boolean;
1001
+ minActivepiecesConnectors?: number;
1002
+ staleConnectorDelta?: number;
1003
+ fetchImpl?: typeof fetch;
1004
+ }
1005
+ interface IntegrationCatalogFreshnessResult {
1006
+ ok: boolean;
1007
+ generatedAt: string;
1008
+ local: {
1009
+ activepiecesEntries: number;
1010
+ activepiecesConnectors: number;
1011
+ activepiecesActions: number;
1012
+ activepiecesTriggers: number;
1013
+ executableActivepiecesConnectors: number;
1014
+ executableActivepiecesActions: number;
1015
+ executableActivepiecesTriggers: number;
1016
+ executableToolDefinitions: number;
1017
+ unsupportedExecutableConnectorIds: string[];
1018
+ registryEntries: number;
1019
+ registrySummary: IntegrationRegistrySummary;
1020
+ conflictSamples: IntegrationRegistryConflict[];
1021
+ };
1022
+ upstream?: {
1023
+ activepiecesPieces?: number;
1024
+ activepiecesDelta?: number;
1025
+ checkedUrl: string;
1026
+ warning?: string;
1027
+ };
1028
+ warnings: string[];
1029
+ }
1030
+ declare const ACTIVEPIECES_PUBLIC_CATALOG_URL = "https://www.activepieces.com/pieces";
1031
+ declare function extractActivepiecesPublicPieceCount(html: string): number | undefined;
1032
+ declare function auditIntegrationCatalogFreshness(options?: IntegrationCatalogFreshnessOptions): Promise<IntegrationCatalogFreshnessResult>;
1033
+
1034
+ declare const TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID = "tangle-catalog";
1035
+ declare const TANGLE_INTEGRATIONS_CATALOG_SOURCE = "tangle-integrations-catalog";
1036
+ type TangleIntegrationImplementationKind = 'native_adapter' | 'package_runtime';
1037
+ type TangleIntegrationContractStatus = 'contract_ready' | 'runtime_backed' | 'native_backed';
1038
+ interface TangleIntegrationCatalogEntry {
1039
+ id: string;
1040
+ title: string;
1041
+ description: string;
1042
+ category: IntegrationConnector['category'];
1043
+ auth: IntegrationConnector['auth'];
1044
+ authFields?: ActivepiecesCatalogEntry['authFields'];
1045
+ domains: string[];
1046
+ actions: Array<{
1047
+ id: string;
1048
+ title: string;
1049
+ risk: IntegrationConnector['actions'][number]['risk'];
1050
+ upstreamName?: string;
1051
+ }>;
1052
+ triggers: Array<{
1053
+ id: string;
1054
+ title: string;
1055
+ upstreamName?: string;
1056
+ }>;
1057
+ }
1058
+ interface TangleIntegrationContract {
1059
+ id: string;
1060
+ title: string;
1061
+ description: string;
1062
+ category: IntegrationConnector['category'];
1063
+ auth: IntegrationConnector['auth'];
1064
+ authFields: NonNullable<ActivepiecesCatalogEntry['authFields']>;
1065
+ actions: Array<{
1066
+ id: string;
1067
+ title: string;
1068
+ risk: IntegrationConnector['actions'][number]['risk'];
1069
+ upstreamName: string;
1070
+ }>;
1071
+ triggers: Array<{
1072
+ id: string;
1073
+ title: string;
1074
+ upstreamName: string;
1075
+ }>;
1076
+ implementation: {
1077
+ kind: TangleIntegrationImplementationKind;
1078
+ runtimePackage?: string;
1079
+ version?: string;
1080
+ };
1081
+ status: TangleIntegrationContractStatus;
1082
+ quality: {
1083
+ tangleContract: true;
1084
+ authFieldsMapped: boolean;
1085
+ actionNamesMapped: boolean;
1086
+ triggerNamesMapped: boolean;
1087
+ runtimePackageMapped: boolean;
1088
+ nativeAdapter: boolean;
1089
+ };
1090
+ }
1091
+ interface TangleCatalogRuntimePackageManifestOptions {
1092
+ name?: string;
1093
+ includeAgentIntegrationsPackage?: boolean;
1094
+ agentIntegrationsVersion?: string;
1095
+ additionalDependencies?: Record<string, string>;
1096
+ }
1097
+ interface TangleCatalogRuntimePackageManifest {
1098
+ name: string;
1099
+ private: true;
1100
+ type: 'module';
1101
+ dependencies: Record<string, string>;
1102
+ tangle: {
1103
+ integrationContracts: number;
1104
+ packageRuntimeBackends: number;
1105
+ generatedFrom: typeof TANGLE_INTEGRATIONS_CATALOG_SOURCE;
1106
+ };
1107
+ }
1108
+ interface TangleCatalogExecutorInvocation {
1109
+ connection: IntegrationConnection;
1110
+ request: IntegrationActionRequest;
1111
+ connector: IntegrationConnector;
1112
+ catalogEntry: TangleIntegrationCatalogEntry;
1113
+ piece: {
1114
+ id: string;
1115
+ packageName?: string;
1116
+ version?: string;
1117
+ actionId: string;
1118
+ upstreamActionName?: string;
1119
+ };
1120
+ }
1121
+ interface TangleCatalogTriggerInvocation {
1122
+ connection: IntegrationConnection;
1123
+ connector: IntegrationConnector;
1124
+ catalogEntry: TangleIntegrationCatalogEntry;
1125
+ trigger: NonNullable<IntegrationConnector['triggers']>[number];
1126
+ targetUrl?: string;
1127
+ piece: {
1128
+ id: string;
1129
+ packageName?: string;
1130
+ version?: string;
1131
+ triggerId: string;
1132
+ upstreamTriggerName?: string;
1133
+ };
1134
+ }
1135
+ interface TangleCatalogExecutorProviderOptions {
1136
+ id?: string;
1137
+ connectors?: IntegrationConnector[];
1138
+ startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult;
1139
+ completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection;
1140
+ executeAction: (invocation: TangleCatalogExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult;
1141
+ subscribeTrigger?: (invocation: TangleCatalogTriggerInvocation) => Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription;
1142
+ unsubscribeTrigger?: (subscriptionId: string) => Promise<void> | void;
1143
+ normalizeTriggerEvent?: (raw: unknown) => Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent;
1144
+ }
1145
+ type TangleIntegrationCatalogFreshnessOptions = IntegrationCatalogFreshnessOptions;
1146
+ interface TangleIntegrationCatalogFreshnessResult {
1147
+ ok: boolean;
1148
+ generatedAt: string;
1149
+ local: {
1150
+ catalogEntries: number;
1151
+ catalogConnectors: number;
1152
+ catalogActions: number;
1153
+ catalogTriggers: number;
1154
+ executableCatalogConnectors: number;
1155
+ executableCatalogActions: number;
1156
+ executableCatalogTriggers: number;
1157
+ executableToolDefinitions: number;
1158
+ unsupportedExecutableConnectorIds: string[];
1159
+ registryEntries: number;
1160
+ registrySummary: Awaited<ReturnType<typeof auditIntegrationCatalogFreshness>>['local']['registrySummary'];
1161
+ conflictSamples: Awaited<ReturnType<typeof auditIntegrationCatalogFreshness>>['local']['conflictSamples'];
1162
+ };
1163
+ upstream?: {
1164
+ externalEntries?: number;
1165
+ externalDelta?: number;
1166
+ checkedUrl: string;
1167
+ warning?: string;
1168
+ };
1169
+ warnings: string[];
1170
+ }
1171
+ declare function listTangleIntegrationCatalogEntries(): TangleIntegrationCatalogEntry[];
1172
+ declare function listTangleIntegrationContracts(): TangleIntegrationContract[];
1173
+ declare function listTangleIntegrationCatalogRuntimePackages(): Array<{
1174
+ connectorId: string;
1175
+ packageName: string;
1176
+ version?: string;
1177
+ }>;
1178
+ declare function buildTangleCatalogRuntimePackageManifest(options?: TangleCatalogRuntimePackageManifestOptions): TangleCatalogRuntimePackageManifest;
1179
+ declare function renderTangleCatalogRuntimePnpmAddCommand(options?: {
1180
+ includeAgentIntegrationsPackage?: boolean;
1181
+ agentIntegrationsVersion?: string;
1182
+ }): string;
1183
+ declare function buildTangleIntegrationCatalogConnectors(options?: {
1184
+ providerId?: string;
1185
+ includeCatalogActions?: boolean;
1186
+ executable?: boolean;
1187
+ }): IntegrationConnector[];
1188
+ declare function createTangleCatalogExecutorProvider(options: TangleCatalogExecutorProviderOptions): IntegrationProvider;
1189
+ declare const extractExternalCatalogPublicCount: typeof extractActivepiecesPublicPieceCount;
1190
+ declare function auditTangleIntegrationCatalogFreshness(options?: TangleIntegrationCatalogFreshnessOptions): Promise<TangleIntegrationCatalogFreshnessResult>;
1191
+
1192
+ interface TangleCatalogRuntimeNodeServerOptions {
1193
+ secret: string;
1194
+ host?: string;
1195
+ port?: number;
1196
+ path?: string;
1197
+ maxBodyBytes?: number;
1198
+ requireSignature?: boolean;
1199
+ authResolver?: false | TangleCatalogHttpAuthResolverOptions;
1200
+ executor?: Omit<TangleCatalogInstalledPackageExecutorOptions, 'resolveAuth'> & {
1201
+ resolveAuth?: TangleCatalogInstalledPackageExecutorOptions['resolveAuth'];
1202
+ };
1203
+ onLog?: (event: {
1204
+ level: 'info' | 'warn' | 'error';
1205
+ message: string;
1206
+ metadata?: Record<string, unknown>;
1207
+ }) => void;
1208
+ }
1209
+ interface StartedTangleCatalogRuntimeNodeServer {
1210
+ server: Server;
1211
+ url: string;
1212
+ close: () => Promise<void>;
1213
+ }
1214
+ declare function createTangleCatalogRuntimeNodeRequestListener(options: TangleCatalogRuntimeNodeServerOptions): (request: IncomingMessage, response: ServerResponse) => Promise<void>;
1215
+ declare function startTangleCatalogRuntimeNodeServer(options: TangleCatalogRuntimeNodeServerOptions): Promise<StartedTangleCatalogRuntimeNodeServer>;
1216
+
1217
+ type IntegrationCoveragePriority = 'tier_0' | 'tier_1' | 'tier_2' | 'long_tail';
1218
+ interface IntegrationCoverageSpec {
1219
+ id: string;
1220
+ title: string;
1221
+ category: IntegrationConnectorCategory;
1222
+ auth: IntegrationConnector['auth'];
1223
+ priority: IntegrationCoveragePriority;
1224
+ providerKinds: IntegrationProviderKind[];
1225
+ domains: string[];
1226
+ actionPack: IntegrationActionPack;
1227
+ scopes?: string[];
1228
+ }
1229
+ type IntegrationActionPack = 'email' | 'calendar' | 'chat' | 'crm' | 'storage' | 'docs' | 'database' | 'project' | 'support' | 'marketing' | 'sales' | 'commerce' | 'finance' | 'hr' | 'dev' | 'ai' | 'analytics' | 'workflow' | 'webhook';
1230
+ declare function listIntegrationCoverageSpecs(): IntegrationCoverageSpec[];
1231
+ declare function buildIntegrationCoverageConnectors(options?: {
1232
+ providerId?: string;
1233
+ priorities?: IntegrationCoveragePriority[];
1234
+ categories?: IntegrationConnectorCategory[];
1235
+ actionPacks?: IntegrationActionPack[];
1236
+ }): IntegrationConnector[];
1237
+ declare function integrationCoverageChecklistMarkdown(): string;
1238
+
1239
+ declare class InMemoryConnectionStore implements IntegrationConnectionStore {
1240
+ private readonly connections;
1241
+ get(connectionId: string): IntegrationConnection | undefined;
1242
+ put(connection: IntegrationConnection): void;
1243
+ listByOwner(owner: IntegrationActor): IntegrationConnection[];
1244
+ delete(connectionId: string): void;
1245
+ }
1246
+ declare class IntegrationHub {
1247
+ private readonly providers;
1248
+ private readonly store;
1249
+ private readonly capabilitySecret;
1250
+ private readonly guard;
1251
+ private readonly policy;
1252
+ /** Host-injected (or in-memory default) secret store. The hub re-persists
1253
+ * rotated credentials here when a connection carries a secretRef. */
1254
+ readonly secretStore: IntegrationHubOptions['secretStore'];
1255
+ private readonly oauthStateStore;
1256
+ private readonly oauthStateTtlMs;
1257
+ private readonly credentialsRotated;
1258
+ private readonly now;
1259
+ constructor(options: IntegrationHubOptions);
1260
+ listConnectors(): Promise<IntegrationConnector[]>;
1261
+ listRegistry(options?: ComposeIntegrationRegistryOptions): Promise<IntegrationRegistry>;
1262
+ startAuth(providerId: string, request: StartAuthRequest): Promise<StartAuthResult>;
1263
+ completeAuth(providerId: string, request: CompleteAuthRequest): Promise<IntegrationConnection>;
1264
+ upsertConnection(connection: IntegrationConnection): Promise<IntegrationConnection>;
1265
+ listConnections(owner: IntegrationActor): Promise<IntegrationConnection[]>;
1266
+ getConnection(connectionId: string): Promise<IntegrationConnection | undefined>;
1267
+ issueCapability(request: IssueCapabilityRequest): Promise<IssuedIntegrationCapability>;
1268
+ verifyCapability(token: string): IntegrationCapability;
1269
+ invokeWithCapability(token: string, request: InvokeWithCapabilityRequest): Promise<IntegrationActionResult>;
1270
+ subscribeTrigger(connectionId: string, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription>;
1271
+ private requireProvider;
1272
+ private requireConnector;
1273
+ private requireConnection;
1274
+ private assertConnectionActive;
1275
+ }
1276
+ declare function sanitizeConnection(connection: IntegrationConnection): Record<string, unknown>;
1277
+ declare function createMockIntegrationProvider(options?: {
1278
+ id?: string;
1279
+ connectors?: IntegrationConnector[];
1280
+ onInvoke?: (connection: IntegrationConnection, request: IntegrationActionRequest) => IntegrationActionResult | Promise<IntegrationActionResult>;
1281
+ }): IntegrationProvider;
1282
+ declare function createHttpIntegrationProvider(options: HttpIntegrationProviderOptions): IntegrationProvider;
1283
+ declare function signCapability(capability: IntegrationCapability, secret: string): string;
1284
+ declare function verifyCapabilityToken(token: string, secret: string): IntegrationCapability;
1285
+
1286
+ export { ACTIVEPIECES_OVERRIDES, ACTIVEPIECES_PUBLIC_CATALOG_URL, ActivepiecesCatalogEntry, type ActivepiecesPieceOverride, type AppSummary, ApprovalBackedPolicyEngine, type ApprovalBackedPolicyOptions, type BrokerToken, CANONICAL_INTEGRATION_ACTIONS, type CanonicalIntegrationActionId, type CanonicalLaunchConnectorOptions, type CatalogExecutorInvocation, type CatalogExecutorProviderOptions, CompleteAuthRequest, ComposeIntegrationRegistryOptions, type ConnectionCredentialResolverOptions, ConnectorAdapter, type ConnectorAdapterProviderOptions, ConnectorCredentials, type ConsentSummary, type CredentialBackedAdapterProviderOptions, DEFAULT_INTEGRATION_BRIDGE_ENV, DefaultIntegrationActionGuard, type DiscoverWorkspaceCapabilitiesInput, type GatewayCatalogAction, type GatewayCatalogEntry, type GatewayCatalogProviderOptions, type GatewayCatalogTrigger, type GraphqlOperationSpec, HttpIntegrationProviderOptions, type ImportCatalogOptions, InMemoryConnectionStore, InMemoryIntegrationApprovalStore, InMemoryIntegrationEventStore, InMemoryIntegrationIdempotencyStore, InMemoryIntegrationOAuthStateStore, InMemoryIntegrationSecretStore, InMemoryIntegrationWorkflowStore, type InferIntegrationRequirementsOptions, type InstalledIntegrationWorkflow, IntegrationActionGuard, type IntegrationActionPack, IntegrationActionRequest, IntegrationActionResult, IntegrationActionRisk, IntegrationActor, type IntegrationApprovalFilter, type IntegrationApprovalRecord, IntegrationApprovalRequest, type IntegrationApprovalResolution, type IntegrationApprovalStatus, type IntegrationApprovalStore, IntegrationAuditSink, type IntegrationBridgePayload, type IntegrationBridgeToolBinding, IntegrationCapability, type IntegrationCatalogFreshnessOptions, type IntegrationCatalogFreshnessResult, IntegrationCatalogSource, IntegrationConnection, IntegrationConnectionStore, IntegrationConnector, IntegrationConnectorAction, IntegrationConnectorCategory, type IntegrationCoveragePriority, type IntegrationCoverageSpec, IntegrationCredentialsRotatedEvent, IntegrationDataClass, IntegrationError, type IntegrationErrorRuntimeCode, type IntegrationEventStore, IntegrationGrantStore, IntegrationGuardContext, IntegrationHub, IntegrationHubOptions, type IntegrationIdempotencyRecord, type IntegrationIdempotencyStore, type IntegrationInvocationEnvelope, type IntegrationInvocationEnvelopeValidationOptions, IntegrationManifest, IntegrationManifestResolution, IntegrationOAuthState, IntegrationOAuthStateOutcome, IntegrationOAuthStateStore, IntegrationPolicyDecision, type IntegrationPolicyEffect, IntegrationPolicyEngine, type IntegrationPolicyRule, IntegrationProvider, IntegrationProviderKind, type IntegrationRateLimitDecision, type IntegrationRateLimiter, IntegrationRegistry, IntegrationRegistryConflict, IntegrationRegistrySummary, IntegrationRequirementMode, IntegrationRuntime, IntegrationSandboxBundle, IntegrationSandboxHost, type IntegrationSandboxHostHub, type IntegrationSandboxHostOptions, IntegrationSecretStore, IntegrationTriggerEvent, IntegrationTriggerSubscription, type IntegrationWebhookReceiverResult, type IntegrationWorkflowDefinition, IntegrationWorkflowRuntime, type IntegrationWorkflowRuntimeHub, type IntegrationWorkflowRuntimeOptions, type IntegrationWorkflowStore, InvokeWithCapabilityRequest, IssueCapabilityRequest, IssuedIntegrationCapability, type ManifestValidationIssue, type ManifestValidationResult, type McpCatalog, type McpCatalogTool, type MissingRequirementExplanation, type NormalizedIntegrationResult, type OAuthClientCredentials, type OpenApiDocument, type OpenApiOperation, PROVIDER_PASSTHROUGH_ACTION, type PlatformIntegrationPolicyPresetOptions, type ProviderHttpRequestInput, type ProviderPassthroughPolicy, type RegisterAppInput, type RegisteredApp, type RenderConsentOptions, ResolvedDataSource, SecretRef, StartAuthRequest, StartAuthResult, type StartedTangleCatalogRuntimeNodeServer, StaticIntegrationPolicyEngine, type StaticIntegrationPolicyOptions, type StoredIntegrationEvent, TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, TANGLE_INTEGRATIONS_CATALOG_SOURCE, TangleAppsClient, type TangleAppsClientOptions, type TangleCatalogExecutorInvocation, type TangleCatalogExecutorProviderOptions, TangleCatalogHttpAuthResolverOptions, TangleCatalogInstalledPackageExecutorOptions, type TangleCatalogRuntimeNodeServerOptions, type TangleCatalogRuntimePackageManifest, type TangleCatalogRuntimePackageManifestOptions, type TangleCatalogTriggerInvocation, type TangleIntegrationCatalogEntry, type TangleIntegrationCatalogFreshnessOptions, type TangleIntegrationCatalogFreshnessResult, type TangleIntegrationContract, type TangleIntegrationContractStatus, type TangleIntegrationImplementationKind, type TangleIntegrationInvokeInput, type TangleIntegrationInvokeResult, TangleIntegrationsClient, type TangleIntegrationsClientOptions, type WorkspaceCapability, type WorkspaceCapabilityDiscovery, type WorkspaceToolSchema, type WorkspaceTrigger, adapterManifestsToConnectors, assertValidIntegrationManifest, auditIntegrationCatalogFreshness, auditTangleIntegrationCatalogFreshness, buildApprovalRequest, buildCanonicalLaunchConnectors, buildIntegrationBridgeEnvironment, buildIntegrationBridgePayload, buildIntegrationCoverageConnectors, buildIntegrationInvocationEnvelope, buildTangleCatalogRuntimePackageManifest, buildTangleIntegrationCatalogConnectors, calendarExercisePlannerManifest, canonicalActionConnectorId, createApprovalBackedPolicyEngine, createCatalogExecutorProvider, createConnectionCredentialResolver, createConnectorAdapterCatalogSource, createConnectorAdapterProvider, createCredentialBackedAdapterProvider, createDefaultIntegrationActionGuard, createDefaultIntegrationPolicyEngine, createGatewayCatalogProvider, createHttpIntegrationProvider, createIntegrationWorkflowRuntime, createMockIntegrationProvider, createPlatformIntegrationPolicyPreset, createTangleAppsClient, createTangleCatalogExecutorProvider, createTangleCatalogRuntimeNodeRequestListener, createTangleIntegrationsClient, decodeIntegrationBridgePayload, discoverWorkspaceCapabilities, dispatchIntegrationInvocation, encodeIntegrationBridgePayload, explainMissingRequirements, extractActivepiecesPublicPieceCount, extractExternalCatalogPublicCount, filterDiscoveryByWorkspaceScopes, getActivepiecesOverride, importGraphqlConnector, importMcpConnector, importOpenApiConnector, inferIntegrationManifestFromTools, integrationCoverageChecklistMarkdown, invocationRequestFromEnvelope, listIntegrationCoverageSpecs, listTangleIntegrationCatalogEntries, listTangleIntegrationCatalogRuntimePackages, listTangleIntegrationContracts, manifestToConnector, normalizeGatewayCatalog, normalizeIntegrationResult, parseIntegrationBridgeEnvironment, receiveIntegrationWebhook, redactApprovalRequest, redactCapability, redactIntegrationBridgePayload, redactInvocationEnvelope, renderApprovalCopy, renderConsentSummary, renderTangleCatalogRuntimePnpmAddCommand, resolveConnectionCredentials, resolveIntegrationApproval, revokeConnection, sanitizeConnection, signCapability, startTangleCatalogRuntimeNodeServer, storedEventToTriggerEvent, validateIntegrationInvocationEnvelope, validateIntegrationManifest, validateProviderPassthroughRequest, verifyCapabilityToken };