@tangle-network/agent-integrations 0.20.0 → 0.21.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.
- package/README.md +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -1
- package/dist/specs.d.ts +33 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,6 +111,7 @@ pnpm add @tangle-network/agent-integrations
|
|
|
111
111
|
| `buildTangleIntegrationCatalogConnectors` | Broad normalized Tangle Integrations Catalog inventory for long-tail connection discovery. |
|
|
112
112
|
| `createTangleCatalogExecutorProvider` | Promotes catalog entries to gateway-executable only when a runtime executor is explicitly supplied. |
|
|
113
113
|
| `createTangleCatalogHttpExecutor` | Signed HTTP executor client for Tangle-hosted catalog runtimes. |
|
|
114
|
+
| `createTangleCatalogRuntimeHandler` | Server-side `/v1/integration-catalog/actions/invoke` handler with signature, connector, and action validation. |
|
|
114
115
|
| `auditTangleIntegrationCatalogFreshness` | Release gate for catalog breadth, executable promotion, registry conflicts, and stale external ingestion. |
|
|
115
116
|
| `createGatewayCatalogProvider` | Normalizes 500+ gateway-backed connectors into the same provider contract. |
|
|
116
117
|
| `buildIntegrationInvocationEnvelope` | Sandbox-safe action envelope. |
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ACTIVEPIECES_OVERRIDES, a as ACTIVEPIECES_PUBLIC_CATALOG_URL, b as ACTIVEPIECES_RUNTIME_SIGNATURE_HEADER, c as ActivepiecesCatalogEntry, d as ActivepiecesExecutorInvocation, e as ActivepiecesExecutorProviderOptions, f as ActivepiecesHttpExecutorOptions, g as ActivepiecesPieceOverride, h as ActivepiecesRuntimeRequest, ApiKeyAuthSpec, i as ApprovalBackedPolicyEngine, j as ApprovalBackedPolicyOptions, k as AuthSpec, C as CANONICAL_INTEGRATION_ACTIONS, l as CASStrategy, m as CanonicalIntegrationActionId, n as CanonicalLaunchConnectorOptions, o as Capability, p as CapabilityClass, q as CapabilityMutation, r as CapabilityMutationResult, s as CapabilityParameterSchema, t as CapabilityRead, u as CapabilityReadResult, v as CatalogExecutorInvocation, w as CatalogExecutorProviderOptions, x as CompleteAuthRequest, y as ComposeIntegrationRegistryOptions, z as ConnectionCredentialResolverOptions, B as ConnectorAdapter, D as ConnectorAdapterProviderOptions, E as ConnectorCredentials, F as ConnectorInvocation, G as ConnectorManifest, H as ConnectorManifestValidationIssue, I as ConnectorManifestValidationResult, J as ConsentSummary, K as ConsistencyModel, ConsoleStep, CredentialFieldSpec, CredentialValidationInput, CredentialValidationResult, L as CredentialsExpired, CustomAuthSpec, M as DEFAULT_INTEGRATION_BRIDGE_ENV, N as DEFAULT_SIGNATURE_TOLERANCE_SECONDS, O as DataSourceMetadata, P as DefaultIntegrationActionGuard, Q as EventHandlerResult, R as ExchangeCodeInput, S as GatewayCatalogAction, T as GatewayCatalogEntry, U as GatewayCatalogProviderOptions, V as GatewayCatalogTrigger, W as GenericHmacVerifyOptions, X as GoogleCalendarOptions, Y as GoogleSheetsOptions, Z as GraphqlOperationSpec, HealthcheckPlan, HealthcheckSpec, HmacAuthSpec, _ as HttpIntegrationProviderOptions, $ as HubSpotOptions, INTEGRATION_FAMILIES, a0 as ImportCatalogOptions, a1 as InMemoryConnectionStore, a2 as InMemoryIntegrationApprovalStore, a3 as InMemoryIntegrationAuditStore, a4 as InMemoryIntegrationEventStore, a5 as InMemoryIntegrationGrantStore, a6 as InMemoryIntegrationHealthcheckStore, a7 as InMemoryIntegrationIdempotencyStore, a8 as InMemoryIntegrationSecretStore, a9 as InMemoryIntegrationWorkflowStore, aa as InMemoryOAuthFlowStore, ab as InboundEvent, ac as InferIntegrationRequirementsOptions, ad as InstalledIntegrationWorkflow, ae as IntegrationActionGuard, af as IntegrationActionPack, ag as IntegrationActionRequest, ah as IntegrationActionResult, ai as IntegrationActionRisk, aj as IntegrationActor, ak as IntegrationApprovalFilter, al as IntegrationApprovalRecord, am as IntegrationApprovalRequest, an as IntegrationApprovalResolution, ao as IntegrationApprovalStatus, ap as IntegrationApprovalStore, aq as IntegrationAuditEvent, ar as IntegrationAuditEventType, as as IntegrationAuditFilter, at as IntegrationAuditSink, au as IntegrationAuditStore, IntegrationAuthMode, IntegrationAuthSpec, av as IntegrationBridgePayload, aw as IntegrationBridgeToolBinding, ax as IntegrationCapability, ay as IntegrationCapabilityBinding, az as IntegrationCatalogFreshnessOptions, aA as IntegrationCatalogFreshnessResult, aB as IntegrationCatalogSource, aC as IntegrationConnection, aD as IntegrationConnectionStore, aE as IntegrationConnector, aF as IntegrationConnectorAction, aG as IntegrationConnectorCategory, aH as IntegrationConnectorTrigger, aI as IntegrationCoveragePriority, aJ as IntegrationCoverageSpec, aK as IntegrationDataClass, aL as IntegrationError, aM as IntegrationErrorCode, aN as IntegrationEventStore, IntegrationFamilyId, IntegrationFamilySpec, aO as IntegrationGrant, aP as IntegrationGrantStore, aQ as IntegrationGuardContext, aR as IntegrationHealthcheckCheck, aS as IntegrationHealthcheckResult, aT as IntegrationHealthcheckStatus, aU as IntegrationHealthcheckStore, aV as IntegrationHub, aW as IntegrationHubOptions, aX as IntegrationIdempotencyRecord, aY as IntegrationIdempotencyStore, aZ as IntegrationInvocationEnvelope, a_ as IntegrationInvocationEnvelopeValidationOptions, IntegrationLifecycleSpec, a$ as IntegrationManifest, b0 as IntegrationManifestResolution, IntegrationPlannerHints, b1 as IntegrationPolicyDecision, b2 as IntegrationPolicyEffect, b3 as IntegrationPolicyEngine, b4 as IntegrationPolicyRule, b5 as IntegrationProvider, b6 as IntegrationProviderKind, b7 as IntegrationRateLimitDecision, b8 as IntegrationRateLimiter, b9 as IntegrationRegistry, ba as IntegrationRegistryConflict, bb as IntegrationRegistryEntry, bc as IntegrationRegistrySourceRef, bd as IntegrationRegistrySummary, be as IntegrationRequirement, bf as IntegrationRequirementMode, bg as IntegrationRequirementResolution, bh as IntegrationRequirementStatus, bi as IntegrationRuntime, bj as IntegrationRuntimeError, bk as IntegrationRuntimeHub, bl as IntegrationRuntimeOptions, bm as IntegrationSandboxBundle, bn as IntegrationSandboxHost, bo as IntegrationSandboxHostHub, bp as IntegrationSandboxHostOptions, bq as IntegrationSecretStore, IntegrationSetupSpec, IntegrationSpec, IntegrationSpecStatus, IntegrationSpecValidationIssue, IntegrationSpecValidationResult, br as IntegrationSupportTier, bs as IntegrationToolDefinition, bt as IntegrationToolSearchFilters, bu as IntegrationToolSearchResult, bv as IntegrationTriggerEvent, bw as IntegrationTriggerSubscription, bx as IntegrationUserAction, by as IntegrationWebhookReceiverResult, bz as IntegrationWorkflowDefinition, bA as IntegrationWorkflowRuntime, bB as IntegrationWorkflowRuntimeHub, bC as IntegrationWorkflowRuntimeOptions, bD as IntegrationWorkflowStore, bE as InvokeWithCapabilityRequest, bF as IssueCapabilityRequest, bG as IssuedIntegrationCapability, bH as ManifestValidationIssue, bI as ManifestValidationResult, bJ as McpCatalog, bK as McpCatalogTool, bL as McpToolDefinition, bM as MicrosoftCalendarOptions, bN as MissingRequirementExplanation, NoneAuthSpec, bO as NormalizedIntegrationError, bP as NormalizedIntegrationResult, NormalizedPermission, bQ as NotionDatabaseOptions, OAuth2AuthSpec, bR as OAuthFlowStore, bS as OAuthTokens, bT as OpenApiDocument, bU as OpenApiOperation, bV as PROVIDER_PASSTHROUGH_ACTION, bW as ParsedStripeSignatureHeader, bX as PendingOAuthFlow, PermissionDescriptor, bY as PlatformIntegrationPolicyPresetOptions, PostSetupCheck, bZ as ProviderHttpRequestInput, b_ as ProviderPassthroughPolicy, Quirk, b$ as RateLimitSpec, c0 as RefreshInput, c1 as RenderConsentOptions, RenderSpecOptions, RenderedConsoleStep, c2 as ResolvedDataSource, c3 as ResourceContention, c4 as RestConnectorSpec, c5 as RestCredentialPlacement, c6 as RestOperationSpec, c7 as RestRequestSpec, ScopeDescriptor, c8 as SecretRef, c9 as SlackOptions, ca as SlackVerifyOptions, cb as StartAuthRequest, cc as StartAuthResult, cd as StartOAuthInput, ce as StartOAuthOutput, cf as StaticIntegrationPolicyEngine, cg as StaticIntegrationPolicyOptions, ch as StoredIntegrationEvent, ci as StripeVerifyOptions, cj as TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER, ck as TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, cl as TANGLE_INTEGRATIONS_CATALOG_SOURCE, cm as TangleCatalogExecutorInvocation, cn as TangleCatalogExecutorProviderOptions, co as TangleCatalogHttpExecutorInvocation, cp as TangleCatalogHttpExecutorOptions, cq as TangleCatalogRuntimeRequest, cr as TangleIntegrationCatalogEntry, cs as TangleIntegrationCatalogFreshnessOptions, ct as TangleIntegrationCatalogFreshnessResult, cu as TangleIntegrationInvokeInput, cv as TangleIntegrationInvokeResult, cw as TangleIntegrationsClient, cx as TangleIntegrationsClientOptions, cy as TwilioVerifyOptions, cz as _resetPendingFlowsForTests, cA as adapterManifestsToConnectors, cB as airtableConnector, cC as asanaConnector, cD as assertValidConnectorManifest, cE as assertValidIntegrationManifest, assertValidIntegrationSpec, cF as auditIntegrationCatalogFreshness, cG as auditTangleIntegrationCatalogFreshness, cH as buildActivepiecesConnectors, cI as buildActivepiecesRuntimeRequest, cJ as buildApprovalRequest, cK as buildCanonicalLaunchConnectors, cL as buildDefaultIntegrationRegistry, buildHealthcheckPlan, cM as buildIntegrationBridgeEnvironment, cN as buildIntegrationBridgePayload, cO as buildIntegrationCoverageConnectors, cP as buildIntegrationInvocationEnvelope, cQ as buildIntegrationToolCatalog, cR as buildTangleCatalogRuntimeRequest, cS as buildTangleIntegrationCatalogConnectors, cT as calendarExercisePlannerManifest, cU as canonicalActionConnectorId, cV as canonicalConnectorId, cW as composeIntegrationRegistry, consoleStepsToText, cX as consumePendingFlow, cY as createActivepiecesExecutorProvider, cZ as createActivepiecesHttpExecutor, c_ as createApprovalBackedPolicyEngine, c$ as createAuditingActionGuard, d0 as createCatalogExecutorProvider, d1 as createConnectionCredentialResolver, d2 as createConnectorAdapterCatalogSource, d3 as createConnectorAdapterProvider, d4 as createCredentialBackedAdapterProvider, d5 as createDefaultIntegrationActionGuard, d6 as createDefaultIntegrationPolicyEngine, d7 as createGatewayCatalogProvider, d8 as createHttpIntegrationProvider, d9 as createIntegrationAuditEvent, da as createIntegrationRuntime, db as createIntegrationWorkflowRuntime, dc as createMockIntegrationProvider, dd as createPlatformIntegrationPolicyPreset, de as createTangleCatalogExecutorProvider, df as createTangleCatalogHttpExecutor, dg as createTangleIntegrationsClient, dh as declarativeRestConnector, di as decodeIntegrationBridgePayload, dj as dispatchIntegrationInvocation, dk as encodeIntegrationBridgePayload, dl as exchangeAuthorizationCode, dm as explainMissingRequirements, dn as extractActivepiecesPublicPieceCount, dp as extractExternalCatalogPublicCount, dq as firstHeader, dr as getActivepiecesOverride, getIntegrationFamily, getIntegrationSpec, ds as githubConnector, dt as gitlabConnector, du as googleCalendar, dv as googleSheets, dw as healthcheckRequest, dx as hubspot, dy as importGraphqlConnector, dz as importMcpConnector, dA as importOpenApiConnector, dB as inferIntegrationManifestFromTools, dC as inferIntegrationSupportTier, dD as integrationCoverageChecklistMarkdown, integrationSpecToConnector, dE as integrationToolName, dF as invocationRequestFromEnvelope, dG as listActivepiecesCatalogEntries, listExecutableIntegrationSpecs, dH as listIntegrationCoverageSpecs, listIntegrationSpecs, dI as listTangleIntegrationCatalogEntries, dJ as manifestToConnector, dK as microsoftCalendar, dL as normalizeGatewayCatalog, dM as normalizeIntegrationError, dN as normalizeIntegrationResult, dO as notionDatabase, dP as parseIntegrationBridgeEnvironment, dQ as parseIntegrationToolName, dR as parseStripeSignatureHeader, dS as receiveIntegrationWebhook, dT as redactApprovalRequest, dU as redactCapability, dV as redactIntegrationBridgePayload, dW as redactInvocationEnvelope, dX as refreshAccessToken, renderAgentToolDescription, dY as renderApprovalCopy, dZ as renderConsentSummary, renderConsoleSteps, renderRunbookMarkdown, d_ as resolveConnectionCredentials, d$ as resolveIntegrationApproval, e0 as revokeConnection, e1 as runIntegrationHealthcheck, e2 as runIntegrationHealthchecks, e3 as salesforceConnector, e4 as sanitizeAuditConnection, e5 as sanitizeConnection, e6 as searchIntegrationTools, e7 as signActivepiecesRuntimeRequest, e8 as signCapability, e9 as signTangleCatalogRuntimeRequest, ea as slack, eb as slackEventsConnector, specAuthToConnectorAuth, ec as startOAuthFlow, ed as statusForCode, ee as storedEventToTriggerEvent, ef as stripePackConnector, eg as stripeWebhookReceiverConnector, eh as summarizeIntegrationRegistry, ei as toMcpTools, ej as twilioSmsConnector, ek as validateConnectorManifest, validateCredentialFormat, validateCredentialSet, el as validateIntegrationInvocationEnvelope, em as validateIntegrationManifest, validateIntegrationSpec, en as validateProviderPassthroughRequest, eo as verifyActivepiecesRuntimeSignature, ep as verifyCapabilityToken, eq as verifyHmacSignature, er as verifySlackSignature, es as verifyStripeSignature, et as verifyTangleCatalogRuntimeSignature, eu as verifyTwilioSignature, ev as webhookConnector } from './specs.js';
|
|
1
|
+
export { A as ACTIVEPIECES_OVERRIDES, a as ACTIVEPIECES_PUBLIC_CATALOG_URL, b as ACTIVEPIECES_RUNTIME_SIGNATURE_HEADER, c as ActivepiecesCatalogEntry, d as ActivepiecesExecutorInvocation, e as ActivepiecesExecutorProviderOptions, f as ActivepiecesHttpExecutorOptions, g as ActivepiecesPieceOverride, h as ActivepiecesRuntimeRequest, ApiKeyAuthSpec, i as ApprovalBackedPolicyEngine, j as ApprovalBackedPolicyOptions, k as AuthSpec, C as CANONICAL_INTEGRATION_ACTIONS, l as CASStrategy, m as CanonicalIntegrationActionId, n as CanonicalLaunchConnectorOptions, o as Capability, p as CapabilityClass, q as CapabilityMutation, r as CapabilityMutationResult, s as CapabilityParameterSchema, t as CapabilityRead, u as CapabilityReadResult, v as CatalogExecutorInvocation, w as CatalogExecutorProviderOptions, x as CompleteAuthRequest, y as ComposeIntegrationRegistryOptions, z as ConnectionCredentialResolverOptions, B as ConnectorAdapter, D as ConnectorAdapterProviderOptions, E as ConnectorCredentials, F as ConnectorInvocation, G as ConnectorManifest, H as ConnectorManifestValidationIssue, I as ConnectorManifestValidationResult, J as ConsentSummary, K as ConsistencyModel, ConsoleStep, CredentialFieldSpec, CredentialValidationInput, CredentialValidationResult, L as CredentialsExpired, CustomAuthSpec, M as DEFAULT_INTEGRATION_BRIDGE_ENV, N as DEFAULT_SIGNATURE_TOLERANCE_SECONDS, O as DataSourceMetadata, P as DefaultIntegrationActionGuard, Q as EventHandlerResult, R as ExchangeCodeInput, S as GatewayCatalogAction, T as GatewayCatalogEntry, U as GatewayCatalogProviderOptions, V as GatewayCatalogTrigger, W as GenericHmacVerifyOptions, X as GoogleCalendarOptions, Y as GoogleSheetsOptions, Z as GraphqlOperationSpec, HealthcheckPlan, HealthcheckSpec, HmacAuthSpec, _ as HttpIntegrationProviderOptions, $ as HubSpotOptions, INTEGRATION_FAMILIES, a0 as ImportCatalogOptions, a1 as InMemoryConnectionStore, a2 as InMemoryIntegrationApprovalStore, a3 as InMemoryIntegrationAuditStore, a4 as InMemoryIntegrationEventStore, a5 as InMemoryIntegrationGrantStore, a6 as InMemoryIntegrationHealthcheckStore, a7 as InMemoryIntegrationIdempotencyStore, a8 as InMemoryIntegrationSecretStore, a9 as InMemoryIntegrationWorkflowStore, aa as InMemoryOAuthFlowStore, ab as InboundEvent, ac as InferIntegrationRequirementsOptions, ad as InstalledIntegrationWorkflow, ae as IntegrationActionGuard, af as IntegrationActionPack, ag as IntegrationActionRequest, ah as IntegrationActionResult, ai as IntegrationActionRisk, aj as IntegrationActor, ak as IntegrationApprovalFilter, al as IntegrationApprovalRecord, am as IntegrationApprovalRequest, an as IntegrationApprovalResolution, ao as IntegrationApprovalStatus, ap as IntegrationApprovalStore, aq as IntegrationAuditEvent, ar as IntegrationAuditEventType, as as IntegrationAuditFilter, at as IntegrationAuditSink, au as IntegrationAuditStore, IntegrationAuthMode, IntegrationAuthSpec, av as IntegrationBridgePayload, aw as IntegrationBridgeToolBinding, ax as IntegrationCapability, ay as IntegrationCapabilityBinding, az as IntegrationCatalogFreshnessOptions, aA as IntegrationCatalogFreshnessResult, aB as IntegrationCatalogSource, aC as IntegrationConnection, aD as IntegrationConnectionStore, aE as IntegrationConnector, aF as IntegrationConnectorAction, aG as IntegrationConnectorCategory, aH as IntegrationConnectorTrigger, aI as IntegrationCoveragePriority, aJ as IntegrationCoverageSpec, aK as IntegrationDataClass, aL as IntegrationError, aM as IntegrationErrorCode, aN as IntegrationEventStore, IntegrationFamilyId, IntegrationFamilySpec, aO as IntegrationGrant, aP as IntegrationGrantStore, aQ as IntegrationGuardContext, aR as IntegrationHealthcheckCheck, aS as IntegrationHealthcheckResult, aT as IntegrationHealthcheckStatus, aU as IntegrationHealthcheckStore, aV as IntegrationHub, aW as IntegrationHubOptions, aX as IntegrationIdempotencyRecord, aY as IntegrationIdempotencyStore, aZ as IntegrationInvocationEnvelope, a_ as IntegrationInvocationEnvelopeValidationOptions, IntegrationLifecycleSpec, a$ as IntegrationManifest, b0 as IntegrationManifestResolution, IntegrationPlannerHints, b1 as IntegrationPolicyDecision, b2 as IntegrationPolicyEffect, b3 as IntegrationPolicyEngine, b4 as IntegrationPolicyRule, b5 as IntegrationProvider, b6 as IntegrationProviderKind, b7 as IntegrationRateLimitDecision, b8 as IntegrationRateLimiter, b9 as IntegrationRegistry, ba as IntegrationRegistryConflict, bb as IntegrationRegistryEntry, bc as IntegrationRegistrySourceRef, bd as IntegrationRegistrySummary, be as IntegrationRequirement, bf as IntegrationRequirementMode, bg as IntegrationRequirementResolution, bh as IntegrationRequirementStatus, bi as IntegrationRuntime, bj as IntegrationRuntimeError, bk as IntegrationRuntimeHub, bl as IntegrationRuntimeOptions, bm as IntegrationSandboxBundle, bn as IntegrationSandboxHost, bo as IntegrationSandboxHostHub, bp as IntegrationSandboxHostOptions, bq as IntegrationSecretStore, IntegrationSetupSpec, IntegrationSpec, IntegrationSpecStatus, IntegrationSpecValidationIssue, IntegrationSpecValidationResult, br as IntegrationSupportTier, bs as IntegrationToolDefinition, bt as IntegrationToolSearchFilters, bu as IntegrationToolSearchResult, bv as IntegrationTriggerEvent, bw as IntegrationTriggerSubscription, bx as IntegrationUserAction, by as IntegrationWebhookReceiverResult, bz as IntegrationWorkflowDefinition, bA as IntegrationWorkflowRuntime, bB as IntegrationWorkflowRuntimeHub, bC as IntegrationWorkflowRuntimeOptions, bD as IntegrationWorkflowStore, bE as InvokeWithCapabilityRequest, bF as IssueCapabilityRequest, bG as IssuedIntegrationCapability, bH as ManifestValidationIssue, bI as ManifestValidationResult, bJ as McpCatalog, bK as McpCatalogTool, bL as McpToolDefinition, bM as MicrosoftCalendarOptions, bN as MissingRequirementExplanation, NoneAuthSpec, bO as NormalizedIntegrationError, bP as NormalizedIntegrationResult, NormalizedPermission, bQ as NotionDatabaseOptions, OAuth2AuthSpec, bR as OAuthFlowStore, bS as OAuthTokens, bT as OpenApiDocument, bU as OpenApiOperation, bV as PROVIDER_PASSTHROUGH_ACTION, bW as ParsedStripeSignatureHeader, bX as PendingOAuthFlow, PermissionDescriptor, bY as PlatformIntegrationPolicyPresetOptions, PostSetupCheck, bZ as ProviderHttpRequestInput, b_ as ProviderPassthroughPolicy, Quirk, b$ as RateLimitSpec, c0 as RefreshInput, c1 as RenderConsentOptions, RenderSpecOptions, RenderedConsoleStep, c2 as ResolvedDataSource, c3 as ResourceContention, c4 as RestConnectorSpec, c5 as RestCredentialPlacement, c6 as RestOperationSpec, c7 as RestRequestSpec, ScopeDescriptor, c8 as SecretRef, c9 as SlackOptions, ca as SlackVerifyOptions, cb as StartAuthRequest, cc as StartAuthResult, cd as StartOAuthInput, ce as StartOAuthOutput, cf as StaticIntegrationPolicyEngine, cg as StaticIntegrationPolicyOptions, ch as StoredIntegrationEvent, ci as StripeVerifyOptions, cj as TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER, ck as TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID, cl as TANGLE_INTEGRATIONS_CATALOG_SOURCE, cm as TangleCatalogExecutorInvocation, cn as TangleCatalogExecutorProviderOptions, co as TangleCatalogHttpExecutorInvocation, cp as TangleCatalogHttpExecutorOptions, cq as TangleCatalogRuntimeHandlerOptions, cr as TangleCatalogRuntimeHttpRequest, cs as TangleCatalogRuntimeHttpResponse, ct as TangleCatalogRuntimeInvocation, cu as TangleCatalogRuntimeRequest, cv as TangleIntegrationCatalogEntry, cw as TangleIntegrationCatalogFreshnessOptions, cx as TangleIntegrationCatalogFreshnessResult, cy as TangleIntegrationInvokeInput, cz as TangleIntegrationInvokeResult, cA as TangleIntegrationsClient, cB as TangleIntegrationsClientOptions, cC as TwilioVerifyOptions, cD as _resetPendingFlowsForTests, cE as adapterManifestsToConnectors, cF as airtableConnector, cG as asanaConnector, cH as assertValidConnectorManifest, cI as assertValidIntegrationManifest, assertValidIntegrationSpec, cJ as auditIntegrationCatalogFreshness, cK as auditTangleIntegrationCatalogFreshness, cL as buildActivepiecesConnectors, cM as buildActivepiecesRuntimeRequest, cN as buildApprovalRequest, cO as buildCanonicalLaunchConnectors, cP as buildDefaultIntegrationRegistry, buildHealthcheckPlan, cQ as buildIntegrationBridgeEnvironment, cR as buildIntegrationBridgePayload, cS as buildIntegrationCoverageConnectors, cT as buildIntegrationInvocationEnvelope, cU as buildIntegrationToolCatalog, cV as buildTangleCatalogRuntimeRequest, cW as buildTangleIntegrationCatalogConnectors, cX as calendarExercisePlannerManifest, cY as canonicalActionConnectorId, cZ as canonicalConnectorId, c_ as composeIntegrationRegistry, consoleStepsToText, c$ as consumePendingFlow, d0 as createActivepiecesExecutorProvider, d1 as createActivepiecesHttpExecutor, d2 as createApprovalBackedPolicyEngine, d3 as createAuditingActionGuard, d4 as createCatalogExecutorProvider, d5 as createConnectionCredentialResolver, d6 as createConnectorAdapterCatalogSource, d7 as createConnectorAdapterProvider, d8 as createCredentialBackedAdapterProvider, d9 as createDefaultIntegrationActionGuard, da as createDefaultIntegrationPolicyEngine, db as createGatewayCatalogProvider, dc as createHttpIntegrationProvider, dd as createIntegrationAuditEvent, de as createIntegrationRuntime, df as createIntegrationWorkflowRuntime, dg as createMockIntegrationProvider, dh as createPlatformIntegrationPolicyPreset, di as createTangleCatalogExecutorProvider, dj as createTangleCatalogHttpExecutor, dk as createTangleCatalogRuntimeHandler, dl as createTangleIntegrationsClient, dm as declarativeRestConnector, dn as decodeIntegrationBridgePayload, dp as dispatchIntegrationInvocation, dq as encodeIntegrationBridgePayload, dr as exchangeAuthorizationCode, ds as explainMissingRequirements, dt as extractActivepiecesPublicPieceCount, du as extractExternalCatalogPublicCount, dv as firstHeader, dw as getActivepiecesOverride, getIntegrationFamily, getIntegrationSpec, dx as githubConnector, dy as gitlabConnector, dz as googleCalendar, dA as googleSheets, dB as healthcheckRequest, dC as hubspot, dD as importGraphqlConnector, dE as importMcpConnector, dF as importOpenApiConnector, dG as inferIntegrationManifestFromTools, dH as inferIntegrationSupportTier, dI as integrationCoverageChecklistMarkdown, integrationSpecToConnector, dJ as integrationToolName, dK as invocationRequestFromEnvelope, dL as listActivepiecesCatalogEntries, listExecutableIntegrationSpecs, dM as listIntegrationCoverageSpecs, listIntegrationSpecs, dN as listTangleIntegrationCatalogEntries, dO as manifestToConnector, dP as microsoftCalendar, dQ as normalizeGatewayCatalog, dR as normalizeIntegrationError, dS as normalizeIntegrationResult, dT as notionDatabase, dU as parseIntegrationBridgeEnvironment, dV as parseIntegrationToolName, dW as parseStripeSignatureHeader, dX as receiveIntegrationWebhook, dY as redactApprovalRequest, dZ as redactCapability, d_ as redactIntegrationBridgePayload, d$ as redactInvocationEnvelope, e0 as refreshAccessToken, renderAgentToolDescription, e1 as renderApprovalCopy, e2 as renderConsentSummary, renderConsoleSteps, renderRunbookMarkdown, e3 as resolveConnectionCredentials, e4 as resolveIntegrationApproval, e5 as revokeConnection, e6 as runIntegrationHealthcheck, e7 as runIntegrationHealthchecks, e8 as salesforceConnector, e9 as sanitizeAuditConnection, ea as sanitizeConnection, eb as searchIntegrationTools, ec as signActivepiecesRuntimeRequest, ed as signCapability, ee as signTangleCatalogRuntimeRequest, ef as slack, eg as slackEventsConnector, specAuthToConnectorAuth, eh as startOAuthFlow, ei as statusForCode, ej as storedEventToTriggerEvent, ek as stripePackConnector, el as stripeWebhookReceiverConnector, em as summarizeIntegrationRegistry, en as toMcpTools, eo as twilioSmsConnector, ep as validateConnectorManifest, validateCredentialFormat, validateCredentialSet, eq as validateIntegrationInvocationEnvelope, er as validateIntegrationManifest, validateIntegrationSpec, es as validateProviderPassthroughRequest, et as verifyActivepiecesRuntimeSignature, eu as verifyCapabilityToken, ev as verifyHmacSignature, ew as verifySlackSignature, ex as verifyStripeSignature, ey as verifyTangleCatalogRuntimeSignature, ez as verifyTwilioSignature, eA as webhookConnector } from './specs.js';
|
package/dist/index.js
CHANGED
|
@@ -6218,6 +6218,102 @@ function sanitizeConnector(connector, providerId) {
|
|
|
6218
6218
|
};
|
|
6219
6219
|
}
|
|
6220
6220
|
|
|
6221
|
+
// src/tangle-catalog-runtime.ts
|
|
6222
|
+
function createTangleCatalogRuntimeHandler(options) {
|
|
6223
|
+
const connectors = options.connectors ?? buildTangleIntegrationCatalogConnectors({
|
|
6224
|
+
includeCatalogActions: true,
|
|
6225
|
+
executable: true
|
|
6226
|
+
});
|
|
6227
|
+
const byConnector = new Map(connectors.map((connector) => [connector.id, connector]));
|
|
6228
|
+
const requireSignature = options.requireSignature ?? Boolean(options.secret);
|
|
6229
|
+
const signatureHeader = options.signatureHeader ?? TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER;
|
|
6230
|
+
const maxBodyBytes = options.maxBodyBytes ?? 1e6;
|
|
6231
|
+
return async function handleTangleCatalogRuntimeRequest(input) {
|
|
6232
|
+
const serialized = serializeBody(input.body);
|
|
6233
|
+
if (Buffer.byteLength(serialized, "utf8") > maxBodyBytes) {
|
|
6234
|
+
return errorResponse(413, "unknown", "payload_too_large", "Tangle catalog runtime request is too large.");
|
|
6235
|
+
}
|
|
6236
|
+
if (requireSignature) {
|
|
6237
|
+
if (!options.secret) {
|
|
6238
|
+
return errorResponse(500, "unknown", "runtime_misconfigured", "Tangle catalog runtime secret is not configured.");
|
|
6239
|
+
}
|
|
6240
|
+
const signature = readHeader(input.headers, signatureHeader);
|
|
6241
|
+
if (!verifyTangleCatalogRuntimeSignature(serialized, signature, options.secret)) {
|
|
6242
|
+
return errorResponse(401, "unknown", "signature_invalid", "Tangle catalog runtime signature is invalid.");
|
|
6243
|
+
}
|
|
6244
|
+
}
|
|
6245
|
+
const parsed = parseRuntimeRequest(serialized);
|
|
6246
|
+
if (!parsed.ok) return parsed.response;
|
|
6247
|
+
const request = parsed.request;
|
|
6248
|
+
const connector = byConnector.get(request.connector.id);
|
|
6249
|
+
if (!connector) {
|
|
6250
|
+
return errorResponse(404, request.action.id, "connector_not_found", `Connector ${request.connector.id} is not in the Tangle catalog runtime.`);
|
|
6251
|
+
}
|
|
6252
|
+
if (request.connection.connectorId !== connector.id) {
|
|
6253
|
+
return errorResponse(400, request.action.id, "connector_mismatch", "Connection connectorId does not match runtime connector.");
|
|
6254
|
+
}
|
|
6255
|
+
if (request.connection.providerId !== connector.providerId) {
|
|
6256
|
+
return errorResponse(400, request.action.id, "provider_mismatch", "Connection providerId does not match runtime connector.");
|
|
6257
|
+
}
|
|
6258
|
+
const action = connector.actions.find((candidate) => candidate.id === request.action.id);
|
|
6259
|
+
if (!action) {
|
|
6260
|
+
return errorResponse(404, request.action.id, "action_not_found", `Action ${request.action.id} is not defined by connector ${connector.id}.`);
|
|
6261
|
+
}
|
|
6262
|
+
const result = await options.executeAction({
|
|
6263
|
+
request,
|
|
6264
|
+
connection: request.connection,
|
|
6265
|
+
connector,
|
|
6266
|
+
action
|
|
6267
|
+
});
|
|
6268
|
+
return {
|
|
6269
|
+
status: result.ok ? 200 : 502,
|
|
6270
|
+
headers: { "content-type": "application/json" },
|
|
6271
|
+
body: result
|
|
6272
|
+
};
|
|
6273
|
+
};
|
|
6274
|
+
}
|
|
6275
|
+
function serializeBody(body) {
|
|
6276
|
+
if (typeof body === "string") return body;
|
|
6277
|
+
if (body instanceof Uint8Array) return new TextDecoder().decode(body);
|
|
6278
|
+
return JSON.stringify(body);
|
|
6279
|
+
}
|
|
6280
|
+
function parseRuntimeRequest(serialized) {
|
|
6281
|
+
try {
|
|
6282
|
+
const request = JSON.parse(serialized);
|
|
6283
|
+
if (request.version !== 1) {
|
|
6284
|
+
return { ok: false, response: errorResponse(400, request.action?.id ?? "unknown", "version_invalid", "Unsupported Tangle catalog runtime request version.") };
|
|
6285
|
+
}
|
|
6286
|
+
if (!request.connection || !request.connector || !request.action?.id) {
|
|
6287
|
+
return { ok: false, response: errorResponse(400, request.action?.id ?? "unknown", "request_invalid", "Tangle catalog runtime request is missing required fields.") };
|
|
6288
|
+
}
|
|
6289
|
+
return { ok: true, request };
|
|
6290
|
+
} catch {
|
|
6291
|
+
return { ok: false, response: errorResponse(400, "unknown", "json_invalid", "Tangle catalog runtime request body is not valid JSON.") };
|
|
6292
|
+
}
|
|
6293
|
+
}
|
|
6294
|
+
function readHeader(headers, name) {
|
|
6295
|
+
if (!headers) return void 0;
|
|
6296
|
+
if (headers instanceof Headers) return headers.get(name) ?? void 0;
|
|
6297
|
+
const wanted = name.toLowerCase();
|
|
6298
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
6299
|
+
if (key.toLowerCase() !== wanted) continue;
|
|
6300
|
+
if (Array.isArray(value)) return value[0];
|
|
6301
|
+
return value;
|
|
6302
|
+
}
|
|
6303
|
+
return void 0;
|
|
6304
|
+
}
|
|
6305
|
+
function errorResponse(status, action, code, message) {
|
|
6306
|
+
return {
|
|
6307
|
+
status,
|
|
6308
|
+
headers: { "content-type": "application/json" },
|
|
6309
|
+
body: {
|
|
6310
|
+
ok: false,
|
|
6311
|
+
action,
|
|
6312
|
+
output: { code, message }
|
|
6313
|
+
}
|
|
6314
|
+
};
|
|
6315
|
+
}
|
|
6316
|
+
|
|
6221
6317
|
// src/runtime.ts
|
|
6222
6318
|
var InMemoryIntegrationGrantStore = class {
|
|
6223
6319
|
grants = /* @__PURE__ */ new Map();
|
|
@@ -6923,6 +7019,7 @@ export {
|
|
|
6923
7019
|
createPlatformIntegrationPolicyPreset,
|
|
6924
7020
|
createTangleCatalogExecutorProvider,
|
|
6925
7021
|
createTangleCatalogHttpExecutor,
|
|
7022
|
+
createTangleCatalogRuntimeHandler,
|
|
6926
7023
|
createTangleIntegrationsClient,
|
|
6927
7024
|
declarativeRestConnector,
|
|
6928
7025
|
decodeIntegrationBridgePayload,
|