@tangle-network/agent-integrations 0.67.0 → 0.67.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/data/bundled-adapter-manifests.json +1 -1
  2. package/dist/{adapters-CHzc3qI0.js → adapters-C4M7uzRR.js} +89 -61
  3. package/dist/{adapters-CHzc3qI0.js.map → adapters-C4M7uzRR.js.map} +1 -1
  4. package/dist/{bundled-manifest-data-wo3D0Q4P.js → bundled-manifest-data-KD2SsNNX.js} +26 -16
  5. package/dist/{bundled-manifest-data-wo3D0Q4P.js.map → bundled-manifest-data-KD2SsNNX.js.map} +1 -1
  6. package/dist/connectors/adapters/index.d.ts +1 -1
  7. package/dist/connectors/adapters/index.js +1 -1
  8. package/dist/connectors/index.d.ts +2 -2
  9. package/dist/connectors/index.js +2 -2
  10. package/dist/{consumer-DYpMLeNG.d.ts → consumer-DBiE_-E7.d.ts} +2 -2
  11. package/dist/{consumer-DYpMLeNG.d.ts.map → consumer-DBiE_-E7.d.ts.map} +1 -1
  12. package/dist/consumer.d.ts +1 -1
  13. package/dist/conversation-events/index.js +1 -3
  14. package/dist/conversation-events/index.js.map +1 -1
  15. package/dist/{index-Bb---RDI.d.ts → index-DAQVjkde.d.ts} +2 -2
  16. package/dist/{index-Bb---RDI.d.ts.map → index-DAQVjkde.d.ts.map} +1 -1
  17. package/dist/{index-BXhHnxfA.d.ts → index-DT-raio8.d.ts} +11 -10
  18. package/dist/index-DT-raio8.d.ts.map +1 -0
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.js +4 -4
  21. package/dist/internal/bundled-manifest-runtime.js +1 -1
  22. package/dist/mcp.d.ts +1 -1
  23. package/dist/mcp.js +1 -1
  24. package/dist/registry.js +1 -1
  25. package/dist/runtime.d.ts +1 -1
  26. package/dist/sandbox.d.ts +1 -1
  27. package/dist/{specs-DyeHZSyC.js → specs-CUUU8WIk.js} +2 -2
  28. package/dist/{specs-DyeHZSyC.js.map → specs-CUUU8WIk.js.map} +1 -1
  29. package/dist/specs.js +1 -1
  30. package/dist/{src-CvnOy-XH.js → src-CQjtO44Z.js} +3 -3
  31. package/dist/{src-CvnOy-XH.js.map → src-CQjtO44Z.js.map} +1 -1
  32. package/docs/whatsapp-cloud-routing.md +19 -0
  33. package/package.json +1 -1
  34. package/dist/index-BXhHnxfA.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"src-CvnOy-XH.js","names":["unique","toTrigger","unique","titleFromId","unique","catalogData"],"sources":["../src/approval.ts","../src/actions.ts","../src/bridge.ts","../src/apps.ts","../src/client.ts","../src/consent.ts","../src/discovery.ts","../src/events.ts","../src/healthcheck.ts","../src/manifest.ts","../src/passthrough.ts","../src/presets.ts","../src/catalog-executor.ts","../src/importers.ts","../src/gateway-catalog.ts","../src/activepieces-overrides.ts","../data/activepieces-catalog.json","../src/activepieces-catalog.ts","../src/activepieces-provider.ts","../src/registry.ts","../src/catalog-freshness.ts","../src/tangle-catalog.ts","../src/workflow.ts","../src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport type {\n IntegrationActor,\n IntegrationApprovalRequest,\n IntegrationGuardContext,\n IntegrationPolicyDecision,\n IntegrationPolicyEngine,\n} from './index.js'\nimport type { IntegrationAuditSink } from './audit.js'\nimport { createIntegrationAuditEvent } from './audit.js'\n\nexport type IntegrationApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired'\n\nexport interface IntegrationApprovalRecord {\n id: string\n request: IntegrationApprovalRequest\n status: IntegrationApprovalStatus\n requestedAt: string\n resolvedAt?: string\n resolvedBy?: IntegrationActor\n reason?: string\n expiresAt?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationApprovalStore {\n get(approvalId: string): Promise<IntegrationApprovalRecord | undefined> | IntegrationApprovalRecord | undefined\n put(record: IntegrationApprovalRecord): Promise<void> | void\n list(filter?: IntegrationApprovalFilter): Promise<IntegrationApprovalRecord[]> | IntegrationApprovalRecord[]\n}\n\nexport interface IntegrationApprovalFilter {\n status?: IntegrationApprovalStatus\n connectionId?: string\n connectorId?: string\n action?: string\n actor?: IntegrationActor\n}\n\nexport interface ApprovalBackedPolicyOptions {\n base: IntegrationPolicyEngine\n store: IntegrationApprovalStore\n audit?: IntegrationAuditSink\n now?: () => Date\n approvalTtlMs?: number\n}\n\nexport class InMemoryIntegrationApprovalStore implements IntegrationApprovalStore {\n private readonly records = new Map<string, IntegrationApprovalRecord>()\n\n get(approvalId: string): IntegrationApprovalRecord | undefined {\n return this.records.get(approvalId)\n }\n\n put(record: IntegrationApprovalRecord): void {\n this.records.set(record.id, record)\n }\n\n list(filter: IntegrationApprovalFilter = {}): IntegrationApprovalRecord[] {\n return [...this.records.values()].filter((record) => matchesFilter(record, filter))\n }\n}\n\nexport class ApprovalBackedPolicyEngine implements IntegrationPolicyEngine {\n private readonly base: IntegrationPolicyEngine\n private readonly store: IntegrationApprovalStore\n private readonly audit: IntegrationAuditSink | undefined\n private readonly now: () => Date\n private readonly approvalTtlMs: number | undefined\n\n constructor(options: ApprovalBackedPolicyOptions) {\n this.base = options.base\n this.store = options.store\n this.audit = options.audit\n this.now = options.now ?? (() => new Date())\n this.approvalTtlMs = options.approvalTtlMs\n }\n\n async decide(ctx: IntegrationGuardContext & { subject: IntegrationActor }): Promise<IntegrationPolicyDecision> {\n const approved = await this.findApprovedRecord(ctx)\n if (approved) return { decision: 'allow', reason: `Approved by ${approved.resolvedBy?.type ?? 'actor'} ${approved.resolvedBy?.id ?? 'unknown'}.`, metadata: { approvalId: approved.id } }\n\n const decision = await this.base.decide(ctx)\n if (decision.decision !== 'require_approval') return decision\n\n const requestedAt = decision.approval.requestedAt\n const expiresAt = this.approvalTtlMs ? new Date(Date.parse(requestedAt) + this.approvalTtlMs).toISOString() : undefined\n const record: IntegrationApprovalRecord = {\n id: decision.approval.id,\n request: decision.approval,\n status: 'pending',\n requestedAt,\n expiresAt,\n metadata: { ...(decision.metadata ?? {}), inputHash: approvalInputHash(ctx.request.input) },\n }\n await this.store.put(record)\n await this.audit?.record(createIntegrationAuditEvent({\n type: 'approval.requested',\n actor: ctx.subject,\n connectionId: ctx.connection.id,\n providerId: ctx.connection.providerId,\n connectorId: ctx.connection.connectorId,\n action: ctx.request.action,\n risk: ctx.action?.risk,\n dataClass: ctx.action?.dataClass,\n message: decision.reason,\n metadata: { approvalId: record.id },\n now: this.now,\n }))\n return decision\n }\n\n private async findApprovedRecord(ctx: IntegrationGuardContext & { subject: IntegrationActor }): Promise<IntegrationApprovalRecord | undefined> {\n const approvalId = typeof ctx.request.metadata?.approvalId === 'string' ? ctx.request.metadata.approvalId : undefined\n if (!approvalId) return undefined\n const record = await this.store.get(approvalId)\n if (!record || record.status !== 'approved') return undefined\n if (record.expiresAt && Date.parse(record.expiresAt) <= this.now().getTime()) {\n await this.store.put({ ...record, status: 'expired' })\n return undefined\n }\n if (!approvalMatches(record, ctx)) return undefined\n return record\n }\n}\n\nexport function createApprovalBackedPolicyEngine(options: ApprovalBackedPolicyOptions): ApprovalBackedPolicyEngine {\n return new ApprovalBackedPolicyEngine(options)\n}\n\nexport async function resolveIntegrationApproval(input: {\n store: IntegrationApprovalStore\n approvalId: string\n approved: boolean\n resolvedBy: IntegrationActor\n reason?: string\n metadata?: Record<string, unknown>\n audit?: IntegrationAuditSink\n now?: () => Date\n}): Promise<IntegrationApprovalRecord> {\n const record = await input.store.get(input.approvalId)\n if (!record) throw new Error(`Approval ${input.approvalId} not found.`)\n const now = input.now ?? (() => new Date())\n const next: IntegrationApprovalRecord = {\n ...record,\n status: input.approved ? 'approved' : 'denied',\n resolvedAt: now().toISOString(),\n resolvedBy: input.resolvedBy,\n reason: input.reason,\n metadata: { ...(record.metadata ?? {}), ...(input.metadata ?? {}) },\n }\n await input.store.put(next)\n await input.audit?.record(createIntegrationAuditEvent({\n type: 'approval.resolved',\n actor: input.resolvedBy,\n connectionId: record.request.connectionId,\n providerId: record.request.providerId,\n connectorId: record.request.connectorId,\n action: record.request.action,\n risk: record.request.risk,\n dataClass: record.request.dataClass,\n ok: input.approved,\n message: input.reason,\n metadata: { approvalId: record.id, status: next.status },\n now,\n }))\n return next\n}\n\nfunction approvalMatches(record: IntegrationApprovalRecord, ctx: IntegrationGuardContext & { subject: IntegrationActor }): boolean {\n return record.request.connectionId === ctx.connection.id\n && record.request.providerId === ctx.connection.providerId\n && record.request.connectorId === ctx.connection.connectorId\n && record.request.action === ctx.request.action\n && record.request.actor.type === ctx.subject.type\n && record.request.actor.id === ctx.subject.id\n && record.metadata?.inputHash === approvalInputHash(ctx.request.input)\n}\n\nfunction matchesFilter(record: IntegrationApprovalRecord, filter: IntegrationApprovalFilter): boolean {\n if (filter.status && record.status !== filter.status) return false\n if (filter.connectionId && record.request.connectionId !== filter.connectionId) return false\n if (filter.connectorId && record.request.connectorId !== filter.connectorId) return false\n if (filter.action && record.request.action !== filter.action) return false\n if (filter.actor && (record.request.actor.type !== filter.actor.type || record.request.actor.id !== filter.actor.id)) return false\n return true\n}\n\nfunction approvalInputHash(input: unknown): string {\n return createHash('sha256').update(JSON.stringify(input ?? null)).digest('base64url')\n}\n","import type {\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorTrigger,\n} from './index.js'\n\nexport const CANONICAL_INTEGRATION_ACTIONS = {\n googleCalendarEventsList: 'google-calendar.events.list',\n googleCalendarEventsCreate: 'google-calendar.events.create',\n gmailMessagesSearch: 'gmail.messages.search',\n gmailMessagesSend: 'gmail.messages.send',\n googleDriveFilesSearch: 'google-drive.files.search',\n googleDriveFilesRead: 'google-drive.files.read',\n githubRepositoriesGet: 'github.repositories.get',\n githubIssuesSearch: 'github.issues.search',\n githubIssuesCreate: 'github.issues.create',\n githubPullRequestsComment: 'github.pull-requests.comment',\n slackChannelsList: 'slack.channels.list',\n slackMessagesSearch: 'slack.messages.search',\n slackMessagesPost: 'slack.messages.post',\n providerHttpRequest: 'provider.http.request',\n} as const\n\nexport type CanonicalIntegrationActionId =\n typeof CANONICAL_INTEGRATION_ACTIONS[keyof typeof CANONICAL_INTEGRATION_ACTIONS]\n\nexport interface CanonicalLaunchConnectorOptions {\n providerId?: string\n includeProviderPassthrough?: boolean\n}\n\nexport function buildCanonicalLaunchConnectors(options: CanonicalLaunchConnectorOptions = {}): IntegrationConnector[] {\n const providerId = options.providerId ?? 'tangle-platform'\n const connectors = [\n googleCalendarConnector(providerId),\n gmailConnector(providerId),\n googleDriveConnector(providerId),\n githubConnector(providerId),\n slackConnector(providerId),\n ]\n if (!options.includeProviderPassthrough) return connectors\n return connectors.map((connector) => ({\n ...connector,\n actions: [...connector.actions, providerPassthroughAction(connector.id)],\n }))\n}\n\nexport function canonicalActionConnectorId(actionId: string): string | undefined {\n if (actionId.startsWith('google-calendar.')) return 'google-calendar'\n if (actionId.startsWith('gmail.')) return 'gmail'\n if (actionId.startsWith('google-drive.')) return 'google-drive'\n if (actionId.startsWith('github.')) return 'github'\n if (actionId.startsWith('slack.')) return 'slack'\n if (actionId === CANONICAL_INTEGRATION_ACTIONS.providerHttpRequest) return undefined\n return actionId.split('.')[0]\n}\n\nfunction googleCalendarConnector(providerId: string): IntegrationConnector {\n return {\n id: 'google-calendar',\n providerId,\n title: 'Google Calendar',\n category: 'calendar',\n auth: 'oauth2',\n scopes: ['https://www.googleapis.com/auth/calendar.readonly', 'https://www.googleapis.com/auth/calendar.events'],\n actions: [\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleCalendarEventsList,\n title: 'List calendar events',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/calendar.readonly'],\n dataClass: 'private',\n description: 'Read events from a Google Calendar over a bounded time range.',\n inputSchema: objectSchema({\n calendarId: { type: 'string', default: 'primary' },\n timeMin: { type: 'string', description: 'RFC3339 lower bound.' },\n timeMax: { type: 'string', description: 'RFC3339 upper bound.' },\n }, ['timeMin', 'timeMax']),\n },\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleCalendarEventsCreate,\n title: 'Create calendar event',\n risk: 'write',\n requiredScopes: ['https://www.googleapis.com/auth/calendar.events'],\n dataClass: 'private',\n approvalRequired: true,\n description: 'Create an event on a Google Calendar after user approval.',\n inputSchema: objectSchema({\n calendarId: { type: 'string', default: 'primary' },\n start: { type: 'string', description: 'RFC3339 start time.' },\n end: { type: 'string', description: 'RFC3339 end time.' },\n summary: { type: 'string' },\n description: { type: 'string' },\n attendees: { type: 'array', items: { type: 'string' } },\n }, ['start', 'end', 'summary']),\n },\n ],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction gmailConnector(providerId: string): IntegrationConnector {\n return {\n id: 'gmail',\n providerId,\n title: 'Gmail',\n category: 'email',\n auth: 'oauth2',\n scopes: ['https://www.googleapis.com/auth/gmail.readonly', 'https://www.googleapis.com/auth/gmail.send'],\n actions: [\n {\n id: CANONICAL_INTEGRATION_ACTIONS.gmailMessagesSearch,\n title: 'Search Gmail messages',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/gmail.readonly'],\n dataClass: 'private',\n description: 'Search user Gmail messages and return bounded message metadata/snippets.',\n inputSchema: objectSchema({ query: { type: 'string' }, maxResults: { type: 'integer', minimum: 1, maximum: 50 } }, ['query']),\n },\n {\n id: CANONICAL_INTEGRATION_ACTIONS.gmailMessagesSend,\n title: 'Send Gmail message',\n risk: 'write',\n requiredScopes: ['https://www.googleapis.com/auth/gmail.send'],\n dataClass: 'private',\n approvalRequired: true,\n description: 'Send an email from the user account after approval.',\n inputSchema: objectSchema({\n to: { type: 'array', items: { type: 'string' } },\n subject: { type: 'string' },\n body: { type: 'string' },\n }, ['to', 'subject', 'body']),\n },\n ],\n triggers: [{\n id: 'gmail.messages.received',\n title: 'Gmail message received',\n requiredScopes: ['https://www.googleapis.com/auth/gmail.readonly'],\n dataClass: 'private',\n description: 'Triggered when a new matching Gmail message is received.',\n }],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction googleDriveConnector(providerId: string): IntegrationConnector {\n return {\n id: 'google-drive',\n providerId,\n title: 'Google Drive',\n category: 'storage',\n auth: 'oauth2',\n scopes: ['https://www.googleapis.com/auth/drive.readonly', 'https://www.googleapis.com/auth/drive.file'],\n actions: [\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleDriveFilesSearch,\n title: 'Search Drive files',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/drive.readonly'],\n dataClass: 'private',\n description: 'Search user-visible Google Drive files.',\n inputSchema: objectSchema({ query: { type: 'string' }, maxResults: { type: 'integer', minimum: 1, maximum: 50 } }, ['query']),\n },\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleDriveFilesRead,\n title: 'Read Drive file',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/drive.readonly'],\n dataClass: 'private',\n description: 'Read metadata and content for an authorized Drive file.',\n inputSchema: objectSchema({ fileId: { type: 'string' } }, ['fileId']),\n },\n ],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction githubConnector(providerId: string): IntegrationConnector {\n return {\n id: 'github',\n providerId,\n title: 'GitHub',\n category: 'workflow',\n auth: 'oauth2',\n scopes: ['repo', 'read:user'],\n actions: [\n readAction(CANONICAL_INTEGRATION_ACTIONS.githubRepositoriesGet, 'Read repository metadata', ['repo'], objectSchema({ owner: { type: 'string' }, repo: { type: 'string' } }, ['owner', 'repo'])),\n readAction(CANONICAL_INTEGRATION_ACTIONS.githubIssuesSearch, 'Search issues and pull requests', ['repo'], objectSchema({ query: { type: 'string' }, limit: { type: 'integer', minimum: 1, maximum: 50 } }, ['query'])),\n writeAction(CANONICAL_INTEGRATION_ACTIONS.githubIssuesCreate, 'Create issue', ['repo'], objectSchema({ owner: { type: 'string' }, repo: { type: 'string' }, title: { type: 'string' }, body: { type: 'string' } }, ['owner', 'repo', 'title'])),\n writeAction(CANONICAL_INTEGRATION_ACTIONS.githubPullRequestsComment, 'Comment on pull request', ['repo'], objectSchema({ owner: { type: 'string' }, repo: { type: 'string' }, pullNumber: { type: 'integer' }, body: { type: 'string' } }, ['owner', 'repo', 'pullNumber', 'body'])),\n ],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction slackConnector(providerId: string): IntegrationConnector {\n return {\n id: 'slack',\n providerId,\n title: 'Slack',\n category: 'chat',\n auth: 'oauth2',\n scopes: ['channels:read', 'search:read', 'chat:write'],\n actions: [\n readAction(CANONICAL_INTEGRATION_ACTIONS.slackChannelsList, 'List Slack channels', ['channels:read'], objectSchema({ limit: { type: 'integer', minimum: 1, maximum: 200 } })),\n readAction(CANONICAL_INTEGRATION_ACTIONS.slackMessagesSearch, 'Search Slack messages', ['search:read'], objectSchema({ query: { type: 'string' }, count: { type: 'integer', minimum: 1, maximum: 50 } }, ['query'])),\n writeAction(CANONICAL_INTEGRATION_ACTIONS.slackMessagesPost, 'Post Slack message', ['chat:write'], objectSchema({ channel: { type: 'string' }, text: { type: 'string' }, blocks: { type: 'array' } }, ['channel', 'text'])),\n ],\n triggers: [trigger('slack.message.posted', 'Slack message posted', ['channels:read'])],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction readAction(id: string, title: string, scopes: string[], inputSchema: unknown): IntegrationConnectorAction {\n return { id, title, risk: 'read', requiredScopes: scopes, dataClass: 'private', inputSchema }\n}\n\nfunction writeAction(id: string, title: string, scopes: string[], inputSchema: unknown): IntegrationConnectorAction {\n return { id, title, risk: 'write', requiredScopes: scopes, dataClass: 'private', approvalRequired: true, inputSchema }\n}\n\nfunction trigger(id: string, title: string, scopes: string[]): IntegrationConnectorTrigger {\n return { id, title, requiredScopes: scopes, dataClass: 'private' }\n}\n\nfunction providerPassthroughAction(connectorId: string): IntegrationConnectorAction {\n return {\n id: CANONICAL_INTEGRATION_ACTIONS.providerHttpRequest,\n title: 'Provider HTTP request',\n risk: 'write',\n requiredScopes: [],\n dataClass: 'sensitive',\n approvalRequired: true,\n description: `Controlled provider-native passthrough for ${connectorId}. Disabled by default by platform policy.`,\n inputSchema: objectSchema({\n method: { type: 'string', enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] },\n path: { type: 'string' },\n query: { type: 'object' },\n body: { type: 'object' },\n }, ['method', 'path']),\n }\n}\n\nfunction objectSchema(properties: Record<string, unknown>, required: string[] = []): Record<string, unknown> {\n return { type: 'object', additionalProperties: false, properties, required }\n}\n","import type { IntegrationSandboxBundle } from './runtime.js'\n\nexport const DEFAULT_INTEGRATION_BRIDGE_ENV = 'TANGLE_INTEGRATION_BUNDLE'\n\nexport interface IntegrationBridgePayload {\n version: 1\n manifestId: string\n subject: IntegrationSandboxBundle['subject']\n expiresAt: string\n tools: IntegrationBridgeToolBinding[]\n}\n\nexport interface IntegrationBridgeToolBinding {\n name: string\n title: string\n connectorId: string\n connectionId: string\n action: string\n risk: string\n dataClass: string\n requiredScopes: string[]\n capabilityToken: string\n}\n\nexport function buildIntegrationBridgePayload(bundle: IntegrationSandboxBundle): IntegrationBridgePayload {\n return {\n version: 1,\n manifestId: bundle.manifestId,\n subject: bundle.subject,\n expiresAt: bundle.expiresAt,\n tools: bundle.tools.flatMap((tool) => {\n const binding = bundle.capabilities.find((candidate) =>\n candidate.connectorId === tool.connectorId\n && candidate.connectionId\n && candidate.allowedActions.includes(tool.action.id)\n )\n if (!binding) return []\n return [{\n name: tool.name,\n title: tool.title,\n connectorId: tool.connectorId,\n connectionId: binding.connectionId,\n action: tool.action.id,\n risk: tool.risk,\n dataClass: tool.dataClass,\n requiredScopes: tool.requiredScopes,\n capabilityToken: binding.capability.token,\n }]\n }),\n }\n}\n\nexport function encodeIntegrationBridgePayload(payload: IntegrationBridgePayload): string {\n return Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url')\n}\n\nexport function decodeIntegrationBridgePayload(encoded: string): IntegrationBridgePayload {\n const parsed = JSON.parse(Buffer.from(encoded, 'base64url').toString('utf8')) as unknown\n assertBridgePayload(parsed)\n return parsed\n}\n\nexport function buildIntegrationBridgeEnvironment(\n bundle: IntegrationSandboxBundle,\n options: { envVar?: string } = {},\n): Record<string, string> {\n const envVar = options.envVar ?? DEFAULT_INTEGRATION_BRIDGE_ENV\n return {\n [envVar]: encodeIntegrationBridgePayload(buildIntegrationBridgePayload(bundle)),\n }\n}\n\nexport function parseIntegrationBridgeEnvironment(\n env: Record<string, string | undefined>,\n options: { envVar?: string } = {},\n): IntegrationBridgePayload {\n const envVar = options.envVar ?? DEFAULT_INTEGRATION_BRIDGE_ENV\n const encoded = env[envVar]\n if (!encoded) throw new Error(`Missing ${envVar}.`)\n return decodeIntegrationBridgePayload(encoded)\n}\n\nexport function redactIntegrationBridgePayload(payload: IntegrationBridgePayload): IntegrationBridgePayload {\n return {\n ...payload,\n tools: payload.tools.map((tool) => ({\n ...tool,\n capabilityToken: '[REDACTED]',\n })),\n }\n}\n\nfunction assertBridgePayload(value: unknown): asserts value is IntegrationBridgePayload {\n if (!value || typeof value !== 'object') throw new Error('Invalid integration bridge payload.')\n const payload = value as Partial<IntegrationBridgePayload>\n if (payload.version !== 1) throw new Error('Unsupported integration bridge payload version.')\n if (typeof payload.manifestId !== 'string') throw new Error('Invalid integration bridge manifestId.')\n if (typeof payload.expiresAt !== 'string') throw new Error('Invalid integration bridge expiresAt.')\n if (!Array.isArray(payload.tools)) throw new Error('Invalid integration bridge tools.')\n}\n","import { IntegrationRuntimeError, normalizeIntegrationError } from './errors.js'\nimport { TANGLE_API_KEY_PREFIX, TANGLE_BROKER_TOKEN_PREFIX } from './connectors/adapters/tangle-id.js'\n\n/**\n * Self-service external-apps client — the brokered hub-exec path.\n *\n * The operator-allowlist-free way to integrate the Tangle hub (no `TRUSTED_APPS`\n * entry): a product registers itself ONCE (`registerApp` → client_id/secret),\n * the end user consents ONCE per connection from their Tangle session (a browser\n * step — not done here), and the product then mints short-lived\n * `sk-tan-broker-…` tokens unattended (`mintBrokerToken`) for each\n * `/v1/hub/exec` call. The durable grant means only the first consent needs a\n * user; everything after is app-credential-only.\n *\n * Sits alongside {@link TangleIntegrationsClient} in the integrations/hub SDK —\n * same `endpoint` + `fetchImpl` shape and the same `IntegrationRuntimeError`\n * surface. Endpoints (platform API, e.g. https://id.tangle.tools):\n * POST /v1/apps register (owner bearer)\n * GET /v1/apps list (owner bearer)\n * POST /v1/apps/:appId/revoke revoke (owner bearer)\n * POST /v1/apps/grants/:grantId/mint-broker-token durable re-mint (app creds)\n * POST /v1/apps/oauth/token authorization_code → token\n */\n\nexport interface TangleAppsClientOptions {\n /** Platform base URL (e.g. https://id.tangle.tools). */\n endpoint: string\n /** Test seam. Defaults to global `fetch`. */\n fetchImpl?: typeof fetch\n /** Platform-backed owner check for optional user claims on app operations. */\n ownerPolicy?: AppsOwnerPolicy\n}\n\nexport interface AppsOwnerPolicy {\n authorize(input: {\n operation: 'mint_broker_token' | 'exchange_auth_code'\n ownerUserId: string\n grantId?: string\n clientId?: string\n }): Promise<boolean> | boolean\n}\n\nexport interface RegisterAppInput {\n name: string\n redirectUris: string[]\n allowedScopes: string[]\n homepageUrl?: string\n}\n\nexport interface AppSummary {\n id: string\n clientId: string\n name: string\n redirectUris: string[]\n allowedScopes: string[]\n homepageUrl?: string\n createdAt?: string\n}\n\nexport interface RegisteredApp extends AppSummary {\n /** Shown ONCE at registration — persist it as a secret immediately. */\n clientSecret: string\n}\n\nexport interface BrokerToken {\n /** The `sk-tan-broker-…` bearer for a single `/v1/hub/exec` call. */\n accessToken: string\n expiresIn: number\n scope: string\n connectionId?: string\n /** Durable, consented grant identity. Older hosts omit these receipt fields. */\n grantId?: string\n ownerUserId?: string\n clientId?: string\n /** Absolute expiry derived from the broker response. */\n expiresAt: number\n}\n\ninterface PlatformEnvelope<T> {\n success?: boolean\n data?: T\n error?: { code?: string; message?: string } | string\n}\n\ninterface TokenResponse {\n access_token?: unknown\n expires_in?: unknown\n scope?: unknown\n connection_id?: string\n grant_id?: unknown\n user_id?: unknown\n client_id?: unknown\n}\n\nconst MAX_BROKER_TOKEN_TTL_SECONDS = 3_600\n\nexport class TangleAppsClient {\n private readonly endpoint: string\n private readonly fetchImpl: typeof fetch\n private readonly ownerPolicy?: AppsOwnerPolicy\n\n constructor(options: TangleAppsClientOptions) {\n this.endpoint = options.endpoint.replace(/\\/$/, '')\n // Call fetch as a plain function: Workers throw \"Illegal invocation\" when\n // fetch runs with the client as its receiver (this.fetchImpl(...)).\n const fetchImpl = options.fetchImpl ?? fetch\n this.fetchImpl = (input, init) => fetchImpl(input, init)\n this.ownerPolicy = options.ownerPolicy\n }\n\n /**\n * Register a product as an app (ONE-TIME, with the owner's bearer — a Tangle\n * session or `sk-tan-*` key). Returns the client_id + the once-shown\n * client_secret; persist the secret immediately (never retrievable again).\n */\n async registerApp(input: RegisterAppInput, ownerBearer: string): Promise<RegisteredApp> {\n assertOwnerBearer(ownerBearer)\n const data = await this.request<{ app: AppSummary; clientSecret: string }>(\n 'POST',\n '/v1/apps',\n input,\n ownerBearer,\n )\n return { ...data.app, clientSecret: data.clientSecret }\n }\n\n /** List the caller's registered apps (no secrets). */\n async listApps(ownerBearer: string): Promise<AppSummary[]> {\n assertOwnerBearer(ownerBearer)\n const data = await this.request<{ apps: AppSummary[] }>('GET', '/v1/apps', undefined, ownerBearer)\n return data.apps ?? []\n }\n\n /** Revoke an app and cascade-kill its grants + tokens. */\n revokeApp(appId: string, ownerBearer: string): Promise<{ revoked: boolean }> {\n assertNonEmpty(appId, 'appId')\n assertOwnerBearer(ownerBearer)\n return this.request('POST', `/v1/apps/${encodeURIComponent(appId)}/revoke`, {}, ownerBearer)\n }\n\n /**\n * Durable re-mint: mint a fresh single-use `sk-tan-broker-` token against an\n * existing consented grant using ONLY the app credentials — no user session,\n * no `agc_` code. The runtime path: one call per `/v1/hub/exec`.\n */\n async mintBrokerToken(input: {\n clientId: string\n clientSecret: string\n grantId: string\n ttlSeconds?: number\n ownerUserId?: string\n }): Promise<BrokerToken> {\n assertNonEmpty(input.clientId, 'clientId')\n assertNonEmpty(input.clientSecret, 'clientSecret')\n assertNonEmpty(input.grantId, 'grantId')\n await this.authorizeOwner({\n operation: 'mint_broker_token',\n ownerUserId: input.ownerUserId,\n grantId: input.grantId,\n clientId: input.clientId,\n })\n const data = await this.request<TokenResponse>(\n 'POST',\n `/v1/apps/grants/${encodeURIComponent(input.grantId)}/mint-broker-token`,\n {\n client_id: input.clientId,\n client_secret: input.clientSecret,\n grant_id: input.grantId,\n ...(input.ttlSeconds !== undefined ? { ttl_seconds: input.ttlSeconds } : {}),\n },\n )\n return toBrokerToken(data)\n }\n\n /**\n * Exchange an `agc_` authorization code (from the user's one-time consent)\n * for the first broker token + the durable grant. Use on the consent\n * callback; afterward `mintBrokerToken` is enough.\n */\n async exchangeAuthCode(input: {\n clientId: string\n clientSecret: string\n code: string\n redirectUri: string\n connectionId?: string\n ownerUserId?: string\n }): Promise<BrokerToken> {\n assertNonEmpty(input.clientId, 'clientId')\n assertNonEmpty(input.clientSecret, 'clientSecret')\n assertNonEmpty(input.code, 'code')\n assertNonEmpty(input.redirectUri, 'redirectUri')\n await this.authorizeOwner({\n operation: 'exchange_auth_code',\n ownerUserId: input.ownerUserId,\n clientId: input.clientId,\n })\n const data = await this.request<TokenResponse>('POST', '/v1/apps/oauth/token', {\n grant_type: 'authorization_code',\n client_id: input.clientId,\n client_secret: input.clientSecret,\n code: input.code,\n redirect_uri: input.redirectUri,\n ...(input.connectionId ? { connection_id: input.connectionId } : {}),\n })\n return toBrokerToken(data)\n }\n\n private async authorizeOwner(input: {\n operation: 'mint_broker_token' | 'exchange_auth_code'\n ownerUserId?: string\n grantId?: string\n clientId?: string\n }): Promise<void> {\n if (input.ownerUserId === undefined) return\n assertNonEmpty(input.ownerUserId, 'ownerUserId')\n if (!this.ownerPolicy) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 403,\n message: 'Tangle apps ownerUserId requires a Platform-backed ownerPolicy',\n })\n }\n const allowed = await this.ownerPolicy.authorize({\n operation: input.operation,\n ownerUserId: input.ownerUserId.trim(),\n ...(input.grantId ? { grantId: input.grantId } : {}),\n ...(input.clientId ? { clientId: input.clientId } : {}),\n })\n if (!allowed) {\n throw new IntegrationRuntimeError({\n code: 'provider_auth_failed',\n status: 403,\n message: 'Tangle apps owner policy rejected the requested owner',\n })\n }\n }\n\n private async request<T>(\n method: 'GET' | 'POST' | 'DELETE',\n path: string,\n body?: unknown,\n bearer?: string,\n ): Promise<T> {\n try {\n const headers: Record<string, string> = { accept: 'application/json' }\n if (bearer) headers.authorization = `Bearer ${bearer}`\n if (body !== undefined) headers['content-type'] = 'application/json'\n\n const response = await this.fetchImpl(`${this.endpoint}${path}`, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n })\n const json = (await response.json().catch(() => undefined)) as PlatformEnvelope<T> | undefined\n\n if (!response.ok || (json && json.success === false)) {\n const platformCode = json?.error && typeof json.error === 'object' ? json.error.code : undefined\n const message =\n (json?.error && typeof json.error === 'object' && json.error.message) ||\n (typeof json?.error === 'string' ? json.error : `Tangle apps request failed (HTTP ${response.status})`)\n throw new IntegrationRuntimeError({\n code: platformCode === 'BROKER_DISABLED' ? 'passthrough_disabled' : 'unknown',\n message,\n status: response.status,\n metadata: { platformCode, path },\n })\n }\n // The /v1/apps surface wraps in { success, data }; /v1/apps/oauth/token is flat.\n return ((json && 'data' in json ? json.data : json) ?? ({} as T)) as T\n } catch (error) {\n if (error instanceof IntegrationRuntimeError) throw error\n const normalized = normalizeIntegrationError(error)\n throw new IntegrationRuntimeError({\n code: normalized.code,\n message: normalized.message,\n metadata: { path, userAction: normalized.userAction },\n })\n }\n }\n}\n\nexport function createTangleAppsClient(options: TangleAppsClientOptions): TangleAppsClient {\n return new TangleAppsClient(options)\n}\n\nfunction toBrokerToken(data: TokenResponse): BrokerToken {\n if (\n typeof data.access_token !== 'string' ||\n !/^sk-tan-broker-[A-Za-z0-9][A-Za-z0-9._-]*$/.test(data.access_token) ||\n typeof data.expires_in !== 'number' ||\n !Number.isSafeInteger(data.expires_in) ||\n data.expires_in <= 0 ||\n data.expires_in > MAX_BROKER_TOKEN_TTL_SECONDS ||\n typeof data.scope !== 'string' ||\n data.scope.trim().length === 0 ||\n (data.connection_id !== undefined && (typeof data.connection_id !== 'string' || data.connection_id.trim().length === 0)) ||\n [data.grant_id, data.user_id, data.client_id].some(value => value !== undefined && (typeof value !== 'string' || !value.trim() || value.length > 256))\n ) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 502,\n message: 'Tangle broker returned an invalid token, expiry, or scope',\n })\n }\n const accessToken = data.access_token\n const expiresIn = data.expires_in\n const scope = data.scope.trim().split(/\\s+/).join(' ')\n const expiresAt = Date.now() + expiresIn * 1000\n if (!Number.isFinite(expiresAt)) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 502,\n message: 'Tangle broker returned an invalid expiry',\n })\n }\n return {\n accessToken,\n expiresIn,\n scope,\n expiresAt,\n connectionId: data.connection_id,\n ...(typeof data.grant_id === 'string' ? { grantId: data.grant_id } : {}),\n ...(typeof data.user_id === 'string' ? { ownerUserId: data.user_id } : {}),\n ...(typeof data.client_id === 'string' ? { clientId: data.client_id } : {}),\n }\n}\n\nfunction assertNonEmpty(value: unknown, name: string): asserts value is string {\n if (typeof value !== 'string' || !value.trim()) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 400,\n message: `Tangle apps ${name} is required`,\n })\n }\n}\n\nfunction assertOwnerBearer(value: unknown): asserts value is string {\n assertNonEmpty(value, 'owner bearer')\n if (\n value.startsWith('sk-') &&\n (!value.startsWith(TANGLE_API_KEY_PREFIX) ||\n value.startsWith(TANGLE_BROKER_TOKEN_PREFIX) ||\n value.length <= TANGLE_API_KEY_PREFIX.length)\n ) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 400,\n message: 'Tangle apps owner bearer must be a Platform key or session bearer',\n })\n }\n}\n\n/** Require the authenticated host receipt before retaining a grant for unattended\n * use. The browser's state and connection id are expectations, not evidence. */\nexport function requireBrokerGrantReceipt(token: BrokerToken, expected: {\n ownerUserId: string; clientId: string; connectionId: string; scopes: readonly string[]; grantId?: string\n}): { grantId: string; connectionId: string; ownerUserId: string; clientId: string; scopes: string[] } {\n const scopes = [...new Set(token.scope.split(/\\s+/).filter(Boolean))].sort()\n const expectedScopes = [...new Set(expected.scopes)].sort()\n if (!token.grantId || token.ownerUserId !== expected.ownerUserId || token.clientId !== expected.clientId ||\n token.connectionId !== expected.connectionId || (expected.grantId && token.grantId !== expected.grantId) ||\n JSON.stringify(scopes) !== JSON.stringify(expectedScopes)) {\n throw new IntegrationRuntimeError({ code: 'provider_auth_failed', status: 403,\n message: 'The broker grant receipt does not match the authenticated owner, app, connection and requested scopes' })\n }\n return { grantId: token.grantId, connectionId: expected.connectionId, ownerUserId: expected.ownerUserId, clientId: expected.clientId, scopes }\n}\n","import {\n DEFAULT_INTEGRATION_BRIDGE_ENV,\n parseIntegrationBridgeEnvironment,\n type IntegrationBridgePayload,\n type IntegrationBridgeToolBinding,\n} from './bridge.js'\nimport { IntegrationRuntimeError, normalizeIntegrationError } from './errors.js'\n\nexport interface TangleIntegrationsClientOptions {\n endpoint: string\n bridge?: IntegrationBridgePayload\n env?: Record<string, string | undefined>\n envVar?: string\n fetchImpl?: typeof fetch\n getCapabilityToken?: (tool: IntegrationBridgeToolBinding) => string | Promise<string>\n}\n\nexport interface TangleIntegrationInvokeInput<TInput = unknown> {\n tool: string\n input?: TInput\n idempotencyKey?: string\n dryRun?: boolean\n metadata?: Record<string, unknown>\n}\n\nexport interface TangleIntegrationInvokeResult<TOutput = unknown> {\n status: 'ok' | 'approval_required' | 'failed'\n action: string\n output?: TOutput\n approval?: unknown\n error?: string\n metadata?: Record<string, unknown>\n}\n\nexport class TangleIntegrationsClient {\n private readonly endpoint: string\n private readonly bridge: IntegrationBridgePayload\n private readonly fetchImpl: typeof fetch\n private readonly getCapabilityToken: (tool: IntegrationBridgeToolBinding) => string | Promise<string>\n\n constructor(options: TangleIntegrationsClientOptions) {\n this.endpoint = options.endpoint.replace(/\\/$/, '')\n this.bridge = options.bridge ?? parseIntegrationBridgeEnvironment(\n options.env ?? readProcessEnv(),\n { envVar: options.envVar ?? DEFAULT_INTEGRATION_BRIDGE_ENV },\n )\n // Call fetch as a plain function: Workers throw \"Illegal invocation\" when\n // fetch runs with the client as its receiver (this.fetchImpl(...)).\n const fetchImpl = options.fetchImpl ?? fetch\n this.fetchImpl = (input, init) => fetchImpl(input, init)\n this.getCapabilityToken = options.getCapabilityToken ?? ((tool) => tool.capabilityToken)\n }\n\n tools(): IntegrationBridgeToolBinding[] {\n return [...this.bridge.tools]\n }\n\n findTool(toolOrAction: string): IntegrationBridgeToolBinding {\n const found = this.bridge.tools.find((tool) =>\n tool.name === toolOrAction ||\n tool.action === toolOrAction ||\n `${tool.connectorId}.${tool.action}` === toolOrAction\n )\n if (!found) {\n throw new IntegrationRuntimeError({\n code: 'action_not_found',\n message: `Integration tool ${toolOrAction} is not available in this runtime.`,\n metadata: { available: this.bridge.tools.map((tool) => ({ name: tool.name, action: tool.action, connectorId: tool.connectorId })) },\n })\n }\n return found\n }\n\n async invoke<TOutput = unknown, TInput = unknown>(input: TangleIntegrationInvokeInput<TInput>): Promise<TangleIntegrationInvokeResult<TOutput>> {\n try {\n const tool = this.findTool(input.tool)\n const token = await this.getCapabilityToken(tool)\n const response = await this.fetchImpl(`${this.endpoint}/v1/integrations/invoke`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n authorization: `Bearer ${token}`,\n },\n body: JSON.stringify({\n action: tool.action,\n input: input.input,\n idempotencyKey: input.idempotencyKey ?? defaultIdempotencyKey(tool.action),\n dryRun: input.dryRun,\n metadata: input.metadata,\n }),\n })\n const json = await response.json().catch(() => undefined) as TangleIntegrationInvokeResult<TOutput> | undefined\n if (!response.ok && !json) {\n return { status: 'failed', action: tool.action, error: `Integration invoke failed with HTTP ${response.status}` }\n }\n return json ?? { status: 'failed', action: tool.action, error: 'Integration invoke returned an empty response.' }\n } catch (error) {\n const normalized = normalizeIntegrationError(error)\n return { status: 'failed', action: input.tool, error: normalized.message, metadata: { code: normalized.code, userAction: normalized.userAction } }\n }\n }\n}\n\nexport function createTangleIntegrationsClient(options: TangleIntegrationsClientOptions): TangleIntegrationsClient {\n return new TangleIntegrationsClient(options)\n}\n\nfunction defaultIdempotencyKey(action: string): string {\n return `${action}:${Date.now()}:${Math.random().toString(36).slice(2)}`\n}\n\nfunction readProcessEnv(): Record<string, string | undefined> {\n if (typeof process !== 'undefined' && process.env) return process.env\n return {}\n}\n","import type {\n IntegrationConnector,\n IntegrationConnectorAction,\n} from './index.js'\nimport type {\n IntegrationManifest,\n IntegrationManifestResolution,\n IntegrationRequirement,\n} from './runtime.js'\n\nexport interface ConsentSummary {\n title: string\n body: string\n bullets: string[]\n primaryAction: string\n risk: 'read' | 'write' | 'destructive'\n connectorIds: string[]\n}\n\nexport interface RenderConsentOptions {\n appName?: string\n connectors?: IntegrationConnector[]\n}\n\nexport function renderConsentSummary(\n manifestOrResolution: IntegrationManifest | IntegrationManifestResolution,\n options: RenderConsentOptions = {},\n): ConsentSummary {\n const manifest = 'manifest' in manifestOrResolution ? manifestOrResolution.manifest : manifestOrResolution\n const appName = options.appName ?? manifest.title ?? manifest.id\n const requirements = manifest.requirements\n const risk = aggregateRisk(requirements, options.connectors)\n const connectorIds = unique(requirements.map((requirement) => requirement.connectorId))\n const first = requirements[0]\n const body = first ? sentenceForRequirement(appName, first) : `${appName} does not request integrations.`\n return {\n title: `${appName} wants to use ${humanList(connectorIds.map(titleize))}`,\n body,\n bullets: requirements.map((requirement) => bulletForRequirement(requirement, options.connectors)),\n primaryAction: risk === 'read' ? 'Allow access' : risk === 'write' ? 'Review and allow' : 'Review destructive access',\n risk,\n connectorIds,\n }\n}\n\nexport function renderApprovalCopy(input: {\n appName: string\n connectorTitle: string\n action: IntegrationConnectorAction\n approvalId?: string\n}): ConsentSummary {\n return {\n title: `${input.appName} wants to ${input.action.title.toLowerCase()}`,\n body: `${input.appName} is requesting permission to run \"${input.action.title}\" on ${input.connectorTitle}.`,\n bullets: [\n `Risk: ${input.action.risk}`,\n `Data: ${input.action.dataClass}`,\n ...(input.approvalId ? [`Approval id: ${input.approvalId}`] : []),\n ],\n primaryAction: input.action.risk === 'read' ? 'Allow' : 'Approve action',\n risk: input.action.risk,\n connectorIds: [],\n }\n}\n\nfunction sentenceForRequirement(appName: string, requirement: IntegrationRequirement): string {\n if (requirement.connectorId === 'google-calendar' && requirement.mode === 'read') {\n return `${appName} wants to read your Google Calendar to find schedule-aware recommendations.`\n }\n if (requirement.connectorId === 'google-calendar' && requirement.mode === 'write') {\n return `${appName} wants to create or update Google Calendar events after your approval.`\n }\n if (requirement.mode === 'read') return `${appName} wants to read ${titleize(requirement.connectorId)} data.`\n if (requirement.mode === 'write') return `${appName} wants to write ${titleize(requirement.connectorId)} data after approval.`\n return `${appName} wants to subscribe to ${titleize(requirement.connectorId)} events.`\n}\n\nfunction bulletForRequirement(requirement: IntegrationRequirement, connectors: IntegrationConnector[] = []): string {\n const connector = connectors.find((candidate) => candidate.id === requirement.connectorId)\n const actions = requirement.requiredActions?.length\n ? requirement.requiredActions.map((id) => connector?.actions.find((action) => action.id === id)?.title ?? id)\n : requirement.requiredTriggers ?? []\n return `${titleize(requirement.connectorId)}: ${requirement.reason}${actions.length ? ` (${actions.join(', ')})` : ''}`\n}\n\nfunction aggregateRisk(requirements: IntegrationRequirement[], connectors: IntegrationConnector[] = []): 'read' | 'write' | 'destructive' {\n let rank = 0\n for (const requirement of requirements) {\n if (requirement.mode === 'write') rank = Math.max(rank, 1)\n const connector = connectors.find((candidate) => candidate.id === requirement.connectorId)\n for (const actionId of requirement.requiredActions ?? []) {\n const risk = connector?.actions.find((action) => action.id === actionId)?.risk\n if (risk === 'write') rank = Math.max(rank, 1)\n if (risk === 'destructive') rank = Math.max(rank, 2)\n }\n }\n return rank === 2 ? 'destructive' : rank === 1 ? 'write' : 'read'\n}\n\nfunction humanList(values: string[]): string {\n if (values.length <= 1) return values[0] ?? 'integrations'\n if (values.length === 2) return `${values[0]} and ${values[1]}`\n return `${values.slice(0, -1).join(', ')}, and ${values.at(-1)}`\n}\n\nfunction titleize(value: string): string {\n return value.split(/[-_.]/g).filter(Boolean).map((part) => part[0]!.toUpperCase() + part.slice(1)).join(' ')\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","/**\n * Workspace capability discovery — answers \"what can this workspace do?\"\n * with a typed list of MCP-shape tool descriptors that the agent runtime\n * can flatten into a planner's tool registry.\n *\n * The agent runtime's gating question is one level above the existing\n * connector catalog (\"which integrations exist?\") and one level below\n * the issued capability-token surface (\"temporarily delegate scope X\n * via this signed token\"). This module bridges the two:\n *\n * discoverWorkspaceCapabilities({ owner, connectors, connections, scopes })\n * → WorkspaceCapability[]\n *\n * A `WorkspaceCapability` is hand-shaped to be cheap to emit alongside a\n * connector manifest and trivial to render into:\n * - an LLM tool-choice JSON array\n * - an MCP `tools/list` response\n * - a UI surface (\"Connect Gmail to enable: send_reply, list_messages…\")\n *\n * What this is NOT:\n * - A capability-token issuer. That stays in IntegrationHub.issueCapability.\n * - A connector registry. That stays in IntegrationRegistry / catalog.\n *\n * Scopes are the load-bearing input: a connector advertises N actions,\n * but only the subset whose `requiredScopes` are a subset of the\n * connection's `grantedScopes` is reachable. The discovery function\n * filters on that automatically.\n *\n * Stability: `@stable` — additions to WorkspaceCapability must be\n * additive and non-breaking.\n */\n\nimport type {\n IntegrationActor,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationConnectorTrigger,\n IntegrationDataClass,\n IntegrationActionRisk,\n IntegrationConnectionStore,\n IntegrationProvider,\n} from './index.js'\n\n/** MCP-shape tool descriptor. Mirrors the\n * [Model Context Protocol tool schema](https://modelcontextprotocol.io/specification)\n * closely enough that consumers can pipe a WorkspaceCapability straight\n * into a `tools/list` response. */\nexport interface WorkspaceToolSchema {\n name: string\n description?: string\n /** JSON-schema describing the action's input. */\n inputSchema?: unknown\n /** Optional JSON-schema describing the action's output. */\n outputSchema?: unknown\n}\n\n/** One discoverable capability — an action a connector exposes that the\n * workspace has the connection + scopes to invoke. */\nexport interface WorkspaceCapability {\n /** Stable, fully-qualified id. Format `<connector-id>.<action-id>`. */\n id: string\n /** Human label safe for UI. */\n title: string\n /** Optional one-line description. */\n description?: string\n /** Connector category for grouping. */\n category: IntegrationConnectorCategory\n /** Connector that hosts this capability. */\n connectorId: string\n /** Provider that hosts this connector (first-party, gateway, …). */\n providerId: string\n /** Underlying action id on the connector. */\n actionId: string\n /** Scopes required to invoke. The discovery function only returns\n * capabilities whose required scopes are a subset of the connection's\n * grantedScopes. */\n scopes: string[]\n /** Risk class — useful for UI (\"write\" / \"destructive\" lights). */\n risk: IntegrationActionRisk\n /** Data class of the action's output, when known. */\n dataClass: IntegrationDataClass\n /** MCP-shape tool schema the agent runtime can register directly. */\n toolSchema: WorkspaceToolSchema\n /** True iff the workspace has an active connection backing this\n * capability. False capabilities (advertised by the connector but\n * not yet connected) are included when `includeUnconnected: true`\n * is passed — useful for \"connect to unlock\" UI affordances. */\n connected: boolean\n /** Connection id backing this capability. Undefined when\n * `connected: false`. */\n connectionId?: string\n /** Whether the action requires explicit approval before invocation. */\n approvalRequired?: boolean\n}\n\n/** Optional inbound trigger surface. Same shape as a capability so the\n * consumer can render both with one component. */\nexport interface WorkspaceTrigger {\n id: string\n title: string\n description?: string\n category: IntegrationConnectorCategory\n connectorId: string\n providerId: string\n triggerId: string\n scopes: string[]\n dataClass: IntegrationDataClass\n connected: boolean\n connectionId?: string\n}\n\nexport interface DiscoverWorkspaceCapabilitiesInput {\n /** Workspace owner. Used to scope the connection lookup when `store`\n * is supplied (the canonical production path). */\n owner: IntegrationActor\n /** Either an explicit connection list (test/fixture path) or a store\n * the function should query for connections by owner. Exactly one\n * of `connections` / `store` MUST be provided. */\n connections?: IntegrationConnection[]\n store?: IntegrationConnectionStore\n /** Either an explicit connector list (test/fixture path) or a set of\n * providers the function should query via `listConnectors()`. */\n connectors?: IntegrationConnector[]\n providers?: IntegrationProvider[]\n /** Include capabilities whose connector is in the catalog but the\n * workspace has no active connection for. Useful to render\n * \"connect to unlock\" affordances. Default: false. */\n includeUnconnected?: boolean\n /** When true, include capabilities even if some required scopes are\n * missing from the connection grant. The default `false` hides such\n * capabilities — the agent runtime never sees them. */\n includeMissingScopes?: boolean\n}\n\nexport interface WorkspaceCapabilityDiscovery {\n capabilities: WorkspaceCapability[]\n triggers: WorkspaceTrigger[]\n /** Counts grouped by connector for telemetry / UI badges. */\n countsByConnector: Record<string, number>\n /** Connectors the workspace is connected to but the planner cannot\n * reach any actions on (e.g., zero scopes granted, or all actions\n * require an additional scope). */\n unreachableConnectors: Array<{ connectorId: string; reason: string }>\n}\n\n/** Resolve workspace-visible capabilities + triggers. Pure with respect\n * to the inputs — caller decides whether to back `connections` and\n * `connectors` with persistent state or static fixtures. */\nexport async function discoverWorkspaceCapabilities(\n input: DiscoverWorkspaceCapabilitiesInput,\n): Promise<WorkspaceCapabilityDiscovery> {\n const connections = await resolveConnections(input)\n const connectors = await resolveConnectors(input)\n const activeConnectionsByConnector = new Map<string, IntegrationConnection>()\n for (const conn of connections) {\n if (conn.status !== 'active') continue\n if (!activeConnectionsByConnector.has(conn.connectorId)) {\n activeConnectionsByConnector.set(conn.connectorId, conn)\n }\n }\n\n const capabilities: WorkspaceCapability[] = []\n const triggers: WorkspaceTrigger[] = []\n const countsByConnector: Record<string, number> = {}\n const unreachableConnectors: Array<{ connectorId: string; reason: string }> = []\n\n for (const connector of connectors) {\n const connection = activeConnectionsByConnector.get(connector.id)\n const connected = Boolean(connection)\n if (!connected && !input.includeUnconnected) continue\n\n const grantedScopes = new Set(connection?.grantedScopes ?? [])\n let actionsAdded = 0\n\n for (const action of connector.actions) {\n const missing = action.requiredScopes.filter((scope) => !grantedScopes.has(scope))\n if (connected && missing.length > 0 && !input.includeMissingScopes) continue\n capabilities.push(toCapability(connector, action, connection))\n actionsAdded += 1\n }\n for (const trigger of connector.triggers ?? []) {\n const missing = trigger.requiredScopes.filter((scope) => !grantedScopes.has(scope))\n if (connected && missing.length > 0 && !input.includeMissingScopes) continue\n triggers.push(toTrigger(connector, trigger, connection))\n }\n\n countsByConnector[connector.id] = actionsAdded\n if (connected && actionsAdded === 0 && connector.actions.length > 0) {\n unreachableConnectors.push({\n connectorId: connector.id,\n reason: 'all_actions_missing_scope',\n })\n }\n }\n\n return { capabilities, triggers, countsByConnector, unreachableConnectors }\n}\n\nasync function resolveConnections(input: DiscoverWorkspaceCapabilitiesInput): Promise<IntegrationConnection[]> {\n if (input.connections) return input.connections\n if (input.store) return await input.store.listByOwner(input.owner)\n throw new Error('discoverWorkspaceCapabilities: provide either connections or store')\n}\n\nasync function resolveConnectors(input: DiscoverWorkspaceCapabilitiesInput): Promise<IntegrationConnector[]> {\n if (input.connectors) return input.connectors\n if (input.providers) {\n const lists = await Promise.all(input.providers.map((p) => Promise.resolve(p.listConnectors())))\n return lists.flat()\n }\n throw new Error('discoverWorkspaceCapabilities: provide either connectors or providers')\n}\n\nfunction toCapability(\n connector: IntegrationConnector,\n action: IntegrationConnectorAction,\n connection: IntegrationConnection | undefined,\n): WorkspaceCapability {\n return {\n id: `${connector.id}.${action.id}`,\n title: action.title,\n description: action.description,\n category: connector.category,\n connectorId: connector.id,\n providerId: connector.providerId,\n actionId: action.id,\n scopes: action.requiredScopes,\n risk: action.risk,\n dataClass: action.dataClass,\n toolSchema: {\n name: `${connector.id}.${action.id}`,\n description: action.description,\n inputSchema: action.inputSchema,\n outputSchema: action.outputSchema,\n },\n connected: Boolean(connection),\n connectionId: connection?.id,\n approvalRequired: action.approvalRequired,\n }\n}\n\nfunction toTrigger(\n connector: IntegrationConnector,\n trigger: IntegrationConnectorTrigger,\n connection: IntegrationConnection | undefined,\n): WorkspaceTrigger {\n return {\n id: `${connector.id}.${trigger.id}`,\n title: trigger.title,\n description: trigger.description,\n category: connector.category,\n connectorId: connector.id,\n providerId: connector.providerId,\n triggerId: trigger.id,\n scopes: trigger.requiredScopes,\n dataClass: trigger.dataClass,\n connected: Boolean(connection),\n connectionId: connection?.id,\n }\n}\n\n/**\n * Filter a {@link WorkspaceCapabilityDiscovery} result by the calling\n * user's effective id.tangle.tools workspace scopes. Pair with the\n * `tangleIdentity()` adapter's `list_workspaces` / `switch_workspace`\n * output to keep what the agent runtime sees aligned with what the\n * workspace's plan actually permits.\n *\n * Semantics:\n * - Every workspace scope is matched against every capability's\n * `scopes` list. Wildcard scopes (`tangle:*`, `<connectorId>:*`) are\n * respected — a workspace with `tangle:*` sees everything; a\n * workspace with `gmail:*` sees every gmail capability regardless of\n * the upstream OAuth scope.\n * - When `workspaceScopes` is empty, returns the discovery as-is (no\n * workspace gate). Pass an explicit `denyByDefault: true` to flip\n * that to \"empty workspace sees nothing\" — matches the platform's\n * fail-closed posture for production tenants.\n *\n * Pure with respect to the inputs — no side effects.\n */\nexport function filterDiscoveryByWorkspaceScopes(\n discovery: WorkspaceCapabilityDiscovery,\n workspaceScopes: string[],\n opts: { denyByDefault?: boolean } = {},\n): WorkspaceCapabilityDiscovery {\n if (workspaceScopes.length === 0 && !opts.denyByDefault) return discovery\n const granted = new Set(workspaceScopes)\n const hasWildcard = granted.has('tangle:*')\n\n function allowed(connectorId: string, scopes: string[]): boolean {\n if (hasWildcard) return true\n if (granted.has(`${connectorId}:*`)) return true\n // A workspace scope satisfies the capability iff every required\n // upstream scope is also present, OR the workspace explicitly\n // grants the connector. We deliberately do NOT loosen this to\n // \"any granted scope intersects\" — that would let a tenant with\n // a read-only Gmail grant invoke send_reply by accident.\n for (const scope of scopes) {\n if (!granted.has(scope)) return false\n }\n return true\n }\n\n const capabilities = discovery.capabilities.filter((cap) => allowed(cap.connectorId, cap.scopes))\n const triggers = discovery.triggers.filter((t) => allowed(t.connectorId, t.scopes))\n const countsByConnector: Record<string, number> = {}\n for (const cap of capabilities) {\n countsByConnector[cap.connectorId] = (countsByConnector[cap.connectorId] ?? 0) + 1\n }\n return {\n capabilities,\n triggers,\n countsByConnector,\n unreachableConnectors: discovery.unreachableConnectors,\n }\n}\n","import type {\n ConnectorAdapter,\n InboundEvent,\n ResolvedDataSource,\n} from './connectors/types.js'\nimport type {\n IntegrationTriggerEvent,\n} from './index.js'\nimport type { IntegrationWorkflowRuntime } from './workflow.js'\n\nexport interface StoredIntegrationEvent {\n id: string\n sourceId: string\n connectorId: string\n eventType: string\n providerEventId?: string\n receivedAt: string\n payload: Record<string, unknown>\n dispatchedAt?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationEventStore {\n put(event: StoredIntegrationEvent): Promise<void> | void\n hasProviderEvent(sourceId: string, providerEventId: string): Promise<boolean> | boolean\n list(): Promise<StoredIntegrationEvent[]> | StoredIntegrationEvent[]\n}\n\nexport interface IntegrationWebhookReceiverResult {\n status: number\n body: unknown\n headers?: Record<string, string>\n received: StoredIntegrationEvent[]\n duplicates: StoredIntegrationEvent[]\n}\n\nexport class InMemoryIntegrationEventStore implements IntegrationEventStore {\n private readonly events = new Map<string, StoredIntegrationEvent>()\n private readonly providerIds = new Set<string>()\n\n put(event: StoredIntegrationEvent): void {\n this.events.set(event.id, event)\n if (event.providerEventId) this.providerIds.add(providerKey(event.sourceId, event.providerEventId))\n }\n\n hasProviderEvent(sourceId: string, providerEventId: string): boolean {\n return this.providerIds.has(providerKey(sourceId, providerEventId))\n }\n\n list(): StoredIntegrationEvent[] {\n return [...this.events.values()]\n }\n}\n\nexport async function receiveIntegrationWebhook(input: {\n adapter: ConnectorAdapter\n source: ResolvedDataSource\n rawBody: string\n headers: Record<string, string | string[] | undefined>\n store: IntegrationEventStore\n workflowRuntime?: IntegrationWorkflowRuntime\n allowUnsignedWebhook?: boolean\n now?: () => Date\n}): Promise<IntegrationWebhookReceiverResult> {\n if (!input.adapter.handleInboundEvent) {\n return { status: 405, body: { ok: false, error: 'Connector does not support inbound webhooks.' }, received: [], duplicates: [] }\n }\n if (!input.adapter.verifySignature && !input.allowUnsignedWebhook) {\n return { status: 401, body: { ok: false, error: 'Webhook signature verification is required.' }, received: [], duplicates: [] }\n }\n const signature = input.adapter.verifySignature?.({\n rawBody: input.rawBody,\n headers: input.headers,\n source: input.source,\n })\n if (signature && !signature.valid) {\n return { status: 401, body: { ok: false, error: signature.reason ?? 'Invalid webhook signature.' }, received: [], duplicates: [] }\n }\n\n const handled = await input.adapter.handleInboundEvent({\n source: input.source,\n rawBody: input.rawBody,\n headers: input.headers,\n })\n const received: StoredIntegrationEvent[] = []\n const duplicates: StoredIntegrationEvent[] = []\n for (const inbound of handled.events) {\n const event = storedEvent(input.source, inbound, input.now ?? (() => new Date()))\n if (event.providerEventId && await input.store.hasProviderEvent(event.sourceId, event.providerEventId)) {\n duplicates.push(event)\n continue\n }\n await input.store.put(event)\n received.push(event)\n await dispatchStoredEvent(event, input.source, input.workflowRuntime)\n }\n\n return {\n status: handled.response?.status ?? 200,\n body: handled.response?.body ?? { received: true, count: received.length, duplicateCount: duplicates.length },\n headers: handled.response?.headers,\n received,\n duplicates,\n }\n}\n\nexport function storedEventToTriggerEvent(event: StoredIntegrationEvent, source: ResolvedDataSource): IntegrationTriggerEvent {\n return {\n id: event.id,\n providerId: String(source.metadata.providerId ?? 'first-party'),\n connectorId: event.connectorId,\n connectionId: source.id,\n trigger: event.eventType,\n occurredAt: event.receivedAt,\n payload: event.payload,\n metadata: {\n providerEventId: event.providerEventId,\n sourceId: event.sourceId,\n ...event.metadata,\n },\n }\n}\n\nasync function dispatchStoredEvent(\n event: StoredIntegrationEvent,\n source: ResolvedDataSource,\n workflowRuntime?: IntegrationWorkflowRuntime,\n): Promise<void> {\n if (!workflowRuntime) return\n await workflowRuntime.dispatchEvent(storedEventToTriggerEvent(event, source), () => undefined)\n}\n\nfunction storedEvent(source: ResolvedDataSource, event: InboundEvent, now: () => Date): StoredIntegrationEvent {\n return {\n id: `evt_${source.id}_${event.providerEventId ?? `${event.eventType}_${now().getTime()}`}`,\n sourceId: source.id,\n connectorId: source.kind,\n eventType: event.eventType,\n providerEventId: event.providerEventId,\n receivedAt: now().toISOString(),\n payload: event.payload,\n }\n}\n\nfunction providerKey(sourceId: string, providerEventId: string): string {\n return `${sourceId}:${providerEventId}`\n}\n","import type {\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n} from './index.js'\nimport type { IntegrationAuditSink } from './audit.js'\nimport { createIntegrationAuditEvent } from './audit.js'\nimport type { IntegrationRegistry } from './registry.js'\n\nexport type IntegrationHealthcheckStatus = 'healthy' | 'degraded' | 'unhealthy' | 'unknown'\n\nexport interface IntegrationHealthcheckCheck {\n id: string\n status: IntegrationHealthcheckStatus\n message: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationHealthcheckResult {\n connectionId: string\n providerId: string\n connectorId: string\n status: IntegrationHealthcheckStatus\n checkedAt: string\n checks: IntegrationHealthcheckCheck[]\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationHealthcheckStore {\n put(result: IntegrationHealthcheckResult): Promise<void> | void\n get(connectionId: string): Promise<IntegrationHealthcheckResult | undefined> | IntegrationHealthcheckResult | undefined\n list(): Promise<IntegrationHealthcheckResult[]> | IntegrationHealthcheckResult[]\n}\n\nexport class InMemoryIntegrationHealthcheckStore implements IntegrationHealthcheckStore {\n private readonly results = new Map<string, IntegrationHealthcheckResult>()\n\n put(result: IntegrationHealthcheckResult): void {\n this.results.set(result.connectionId, result)\n }\n\n get(connectionId: string): IntegrationHealthcheckResult | undefined {\n return this.results.get(connectionId)\n }\n\n list(): IntegrationHealthcheckResult[] {\n return [...this.results.values()]\n }\n}\n\nexport async function runIntegrationHealthcheck(input: {\n connection: IntegrationConnection\n connector?: IntegrationConnector\n registry?: IntegrationRegistry\n test?: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean\n audit?: IntegrationAuditSink\n now?: () => Date\n}): Promise<IntegrationHealthcheckResult> {\n const now = input.now ?? (() => new Date())\n const checkedAt = now().toISOString()\n const connector = input.connector ?? input.registry?.byId.get(input.connection.connectorId)?.connector\n const checks: IntegrationHealthcheckCheck[] = []\n\n checks.push(connectionStatusCheck(input.connection, now))\n if (!connector) {\n checks.push({ id: 'connector-known', status: 'unknown', message: `Connector ${input.connection.connectorId} is not in the registry.` })\n } else {\n checks.push(connectorExecutableCheck(connector))\n checks.push(scopeShapeCheck(input.connection, connector))\n if (input.test && input.connection.status === 'active') {\n checks.push(await liveHealthcheck(input.connection, connector, input.test))\n }\n }\n\n const result: IntegrationHealthcheckResult = {\n connectionId: input.connection.id,\n providerId: input.connection.providerId,\n connectorId: input.connection.connectorId,\n status: rollupHealthStatus(checks),\n checkedAt,\n checks,\n }\n await input.audit?.record(createIntegrationAuditEvent({\n type: 'healthcheck.completed',\n actor: input.connection.owner,\n connectionId: input.connection.id,\n providerId: input.connection.providerId,\n connectorId: input.connection.connectorId,\n ok: result.status === 'healthy',\n message: result.status,\n metadata: { checks: checks.map((check) => ({ id: check.id, status: check.status, message: check.message })) },\n occurredAt: checkedAt,\n }))\n return result\n}\n\nexport async function runIntegrationHealthchecks(input: {\n connections: IntegrationConnection[]\n registry?: IntegrationRegistry\n store?: IntegrationHealthcheckStore\n audit?: IntegrationAuditSink\n now?: () => Date\n test?: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean\n}): Promise<IntegrationHealthcheckResult[]> {\n const results: IntegrationHealthcheckResult[] = []\n for (const connection of input.connections) {\n const result = await runIntegrationHealthcheck({\n connection,\n registry: input.registry,\n test: input.test,\n audit: input.audit,\n now: input.now,\n })\n await input.store?.put(result)\n results.push(result)\n }\n return results\n}\n\nexport function healthcheckRequest(action = 'healthcheck'): IntegrationActionRequest {\n return {\n connectionId: '__healthcheck__',\n action,\n input: {},\n dryRun: true,\n metadata: { healthcheck: true },\n }\n}\n\nfunction connectionStatusCheck(connection: IntegrationConnection, now: () => Date): IntegrationHealthcheckCheck {\n if (connection.status !== 'active') {\n return { id: 'connection-active', status: 'unhealthy', message: `Connection is ${connection.status}.` }\n }\n if (connection.expiresAt && Date.parse(connection.expiresAt) <= now().getTime()) {\n return { id: 'connection-active', status: 'unhealthy', message: 'Connection credentials are expired.' }\n }\n return { id: 'connection-active', status: 'healthy', message: 'Connection is active.' }\n}\n\nfunction connectorExecutableCheck(connector: IntegrationConnector): IntegrationHealthcheckCheck {\n const executable = connector.actions.length > 0 || (connector.triggers?.length ?? 0) > 0\n if (!executable) {\n return { id: 'connector-executable', status: 'degraded', message: `${connector.title} is catalog-only.` }\n }\n return { id: 'connector-executable', status: 'healthy', message: `${connector.title} has executable actions or triggers.` }\n}\n\nfunction scopeShapeCheck(connection: IntegrationConnection, connector: IntegrationConnector): IntegrationHealthcheckCheck {\n const declaredScopes = new Set(connector.scopes)\n const undeclared = connection.grantedScopes.filter((scope) => !declaredScopes.has(scope))\n if (connector.scopes.length === 0 && connection.grantedScopes.length > 0) {\n return { id: 'scope-shape', status: 'unknown', message: 'Connector does not declare a scope catalog.', metadata: { grantedScopes: connection.grantedScopes } }\n }\n if (undeclared.length > 0) {\n return { id: 'scope-shape', status: 'degraded', message: 'Connection has scopes not declared by the connector.', metadata: { undeclared } }\n }\n return { id: 'scope-shape', status: 'healthy', message: 'Granted scopes match the connector shape.' }\n}\n\nasync function liveHealthcheck(\n connection: IntegrationConnection,\n connector: IntegrationConnector,\n test: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean,\n): Promise<IntegrationHealthcheckCheck> {\n try {\n const result = await test(connection, connector)\n const ok = typeof result === 'boolean' ? result : result.ok\n return {\n id: 'provider-live-test',\n status: ok ? 'healthy' : 'unhealthy',\n message: ok ? 'Provider live test passed.' : 'Provider live test failed.',\n metadata: typeof result === 'boolean' ? undefined : { action: result.action, warnings: result.warnings },\n }\n } catch (error) {\n return {\n id: 'provider-live-test',\n status: 'unhealthy',\n message: error instanceof Error ? error.message : 'Provider live test failed.',\n }\n }\n}\n\nfunction rollupHealthStatus(checks: IntegrationHealthcheckCheck[]): IntegrationHealthcheckStatus {\n if (checks.some((check) => check.status === 'unhealthy')) return 'unhealthy'\n if (checks.some((check) => check.status === 'degraded')) return 'degraded'\n if (checks.some((check) => check.status === 'unknown')) return 'unknown'\n return 'healthy'\n}\n","import { CANONICAL_INTEGRATION_ACTIONS, canonicalActionConnectorId } from './actions.js'\nimport type {\n IntegrationManifest,\n IntegrationManifestResolution,\n IntegrationRequirement,\n IntegrationRequirementMode,\n} from './runtime.js'\n\nexport interface ManifestValidationIssue {\n path: string\n message: string\n}\n\nexport interface ManifestValidationResult {\n ok: boolean\n issues: ManifestValidationIssue[]\n}\n\nexport interface InferIntegrationRequirementsOptions {\n manifestId: string\n title?: string\n tools: Array<string | { action: string; reason?: string; mode?: IntegrationRequirementMode; connectorId?: string; scopes?: string[] }>\n metadata?: Record<string, unknown>\n}\n\nexport interface MissingRequirementExplanation {\n requirementId: string\n connectorId: string\n status: string\n message: string\n userAction: 'connect' | 'enable' | 'ignore_optional'\n}\n\nexport function validateIntegrationManifest(manifest: IntegrationManifest): ManifestValidationResult {\n const issues: ManifestValidationIssue[] = []\n if (!manifest.id?.trim()) issues.push({ path: 'id', message: 'Manifest id is required.' })\n if (!Array.isArray(manifest.requirements)) issues.push({ path: 'requirements', message: 'Requirements must be an array.' })\n const ids = new Set<string>()\n for (const [index, requirement] of (manifest.requirements ?? []).entries()) {\n const path = `requirements[${index}]`\n if (!requirement.id?.trim()) issues.push({ path: `${path}.id`, message: 'Requirement id is required.' })\n if (ids.has(requirement.id)) issues.push({ path: `${path}.id`, message: `Duplicate requirement id ${requirement.id}.` })\n ids.add(requirement.id)\n if (!requirement.connectorId?.trim()) issues.push({ path: `${path}.connectorId`, message: 'Connector id is required.' })\n if (!['read', 'write', 'trigger'].includes(requirement.mode)) issues.push({ path: `${path}.mode`, message: 'Mode must be read, write, or trigger.' })\n if (!requirement.reason?.trim()) issues.push({ path: `${path}.reason`, message: 'Human-readable reason is required.' })\n if (requirement.mode !== 'trigger' && !requirement.requiredActions?.length) {\n issues.push({ path: `${path}.requiredActions`, message: 'Non-trigger requirements should list required actions.' })\n }\n if (requirement.mode === 'trigger' && !requirement.requiredTriggers?.length) {\n issues.push({ path: `${path}.requiredTriggers`, message: 'Trigger requirements should list required triggers.' })\n }\n }\n return { ok: issues.length === 0, issues }\n}\n\nexport function assertValidIntegrationManifest(manifest: IntegrationManifest): void {\n const result = validateIntegrationManifest(manifest)\n if (!result.ok) {\n throw new Error(`Invalid integration manifest: ${result.issues.map((issue) => `${issue.path}: ${issue.message}`).join('; ')}`)\n }\n}\n\nexport function inferIntegrationManifestFromTools(options: InferIntegrationRequirementsOptions): IntegrationManifest {\n const byConnector = new Map<string, IntegrationRequirement>()\n for (const item of options.tools) {\n const action = typeof item === 'string' ? item : item.action\n const connectorId = typeof item === 'string' ? canonicalActionConnectorId(action) : item.connectorId ?? canonicalActionConnectorId(action)\n if (!connectorId) continue\n const mode = typeof item === 'string' ? inferMode(action) : item.mode ?? inferMode(action)\n const id = `${connectorId}-${mode}`\n const existing = byConnector.get(id)\n const reason = typeof item === 'string' ? defaultReason(connectorId, mode) : item.reason ?? defaultReason(connectorId, mode)\n if (existing) {\n byConnector.set(id, {\n ...existing,\n requiredActions: unique([...(existing.requiredActions ?? []), action]),\n requiredScopes: unique([...(existing.requiredScopes ?? []), ...(typeof item === 'string' ? [] : item.scopes ?? [])]),\n })\n } else {\n byConnector.set(id, {\n id,\n connectorId,\n mode,\n reason,\n requiredActions: mode === 'trigger' ? undefined : [action],\n requiredScopes: typeof item === 'string' ? undefined : item.scopes,\n })\n }\n }\n const manifest: IntegrationManifest = {\n id: options.manifestId,\n title: options.title,\n requirements: [...byConnector.values()],\n metadata: options.metadata,\n }\n assertValidIntegrationManifest(manifest)\n return manifest\n}\n\nexport function explainMissingRequirements(resolution: IntegrationManifestResolution): MissingRequirementExplanation[] {\n return [...resolution.missing, ...resolution.optionalMissing].map((item) => ({\n requirementId: item.requirement.id,\n connectorId: item.requirement.connectorId,\n status: item.status,\n message: item.message,\n userAction: item.requirement.optional ? 'ignore_optional' : item.status === 'not_executable' ? 'enable' : 'connect',\n }))\n}\n\nexport function calendarExercisePlannerManifest(id = 'exercise-calendar-planner'): IntegrationManifest {\n return {\n id,\n title: 'Exercise Calendar Planner',\n requirements: [{\n id: 'calendar-read',\n connectorId: 'google-calendar',\n mode: 'read',\n reason: 'Read busy and free calendar windows to recommend exercise sessions.',\n requiredActions: [CANONICAL_INTEGRATION_ACTIONS.googleCalendarEventsList],\n requiredScopes: ['https://www.googleapis.com/auth/calendar.readonly'],\n }],\n }\n}\n\nfunction inferMode(action: string): IntegrationRequirementMode {\n if (/(create|send|post|update|delete|write|comment|request)$/i.test(action)) return 'write'\n return 'read'\n}\n\nfunction defaultReason(connectorId: string, mode: IntegrationRequirementMode): string {\n if (connectorId === 'google-calendar' && mode === 'read') return 'Read calendar availability for the generated app.'\n if (connectorId === 'google-calendar' && mode === 'write') return 'Create or update calendar events after user approval.'\n return `${mode === 'read' ? 'Read from' : mode === 'write' ? 'Write to' : 'Subscribe to'} ${connectorId} for this app.`\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","import { CANONICAL_INTEGRATION_ACTIONS } from './actions.js'\nimport { IntegrationRuntimeError } from './errors.js'\n\nexport interface ProviderHttpRequestInput {\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'\n path: string\n query?: Record<string, string | number | boolean | undefined>\n headers?: Record<string, string>\n body?: unknown\n}\n\nexport interface ProviderPassthroughPolicy {\n enabled: boolean\n allowedMethods?: ProviderHttpRequestInput['method'][]\n allowedPathPrefixes?: string[]\n maxBodyBytes?: number\n}\n\nexport const PROVIDER_PASSTHROUGH_ACTION = CANONICAL_INTEGRATION_ACTIONS.providerHttpRequest\n\nexport function validateProviderPassthroughRequest(\n input: ProviderHttpRequestInput,\n policy: ProviderPassthroughPolicy,\n): void {\n if (!policy.enabled) {\n throw new IntegrationRuntimeError({\n code: 'passthrough_disabled',\n message: 'Provider-native passthrough is disabled for this connector.',\n })\n }\n if (!input.path.startsWith('/')) {\n throw new IntegrationRuntimeError({ code: 'input_invalid', message: 'Provider passthrough path must start with /.' })\n }\n if (policy.allowedMethods?.length && !policy.allowedMethods.includes(input.method)) {\n throw new IntegrationRuntimeError({ code: 'action_denied', message: `Provider passthrough method ${input.method} is not allowed.` })\n }\n if (policy.allowedPathPrefixes?.length && !policy.allowedPathPrefixes.some((prefix) => input.path.startsWith(prefix))) {\n throw new IntegrationRuntimeError({ code: 'action_denied', message: `Provider passthrough path ${input.path} is not allowed.` })\n }\n const maxBodyBytes = policy.maxBodyBytes ?? 64 * 1024\n const bodyBytes = Buffer.byteLength(JSON.stringify(input.body ?? null), 'utf8')\n if (bodyBytes > maxBodyBytes) {\n throw new IntegrationRuntimeError({ code: 'input_invalid', message: `Provider passthrough body exceeds ${maxBodyBytes} bytes.` })\n }\n for (const key of Object.keys(input.headers ?? {})) {\n if (/authorization|cookie|token|secret|api[_-]?key/i.test(key)) {\n throw new IntegrationRuntimeError({ code: 'input_invalid', message: `Provider passthrough header ${key} is not caller-settable.` })\n }\n }\n}\n","import { StaticIntegrationPolicyEngine, type StaticIntegrationPolicyOptions } from './policy.js'\n\nexport interface PlatformIntegrationPolicyPresetOptions extends Omit<StaticIntegrationPolicyOptions, 'defaultReadEffect' | 'defaultWriteEffect' | 'defaultDestructiveEffect'> {\n allowWritesWithoutApproval?: boolean\n allowDestructiveActions?: boolean\n allowProviderPassthrough?: boolean\n}\n\nexport function createPlatformIntegrationPolicyPreset(options: PlatformIntegrationPolicyPresetOptions = {}): StaticIntegrationPolicyEngine {\n return new StaticIntegrationPolicyEngine({\n ...options,\n defaultReadEffect: 'allow',\n defaultWriteEffect: options.allowWritesWithoutApproval ? 'allow' : 'require_approval',\n defaultDestructiveEffect: options.allowDestructiveActions ? 'require_approval' : 'deny',\n rules: [\n ...(options.allowProviderPassthrough ? [] : [{\n id: 'deny-provider-native-passthrough',\n action: 'provider.http.request',\n effect: 'deny' as const,\n reason: 'Provider-native passthrough is disabled by default. Promote the connector action or enable passthrough explicitly.',\n }]),\n ...(options.rules ?? []),\n ],\n })\n}\n","import type {\n CompleteAuthRequest,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationProvider,\n IntegrationProviderKind,\n IntegrationTriggerEvent,\n IntegrationTriggerSubscription,\n StartAuthRequest,\n StartAuthResult,\n} from './index.js'\nimport { IntegrationError } from './index.js'\n\nexport interface CatalogExecutorInvocation {\n connection: IntegrationConnection\n request: IntegrationActionRequest\n connector: IntegrationConnector\n action: IntegrationConnector['actions'][number]\n}\n\nexport interface CatalogExecutorProviderOptions {\n id: string\n kind: IntegrationProviderKind\n connectors: IntegrationConnector[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n executeAction: (invocation: CatalogExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult\n subscribeTrigger?: (\n connection: IntegrationConnection,\n trigger: NonNullable<IntegrationConnector['triggers']>[number],\n targetUrl?: string,\n ) => Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription\n unsubscribeTrigger?: (subscriptionId: string) => Promise<void> | void\n normalizeTriggerEvent?: (raw: unknown) => Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent\n}\n\nexport function createCatalogExecutorProvider(options: CatalogExecutorProviderOptions): IntegrationProvider {\n const byConnector = new Map(options.connectors.map((connector) => [connector.id, connector]))\n return {\n id: options.id,\n kind: options.kind,\n listConnectors: () => options.connectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n async invokeAction(connection, request) {\n const connector = byConnector.get(connection.connectorId)\n if (!connector) {\n throw new IntegrationError(`Connector ${connection.connectorId} not found.`, 'connector_not_found')\n }\n const action = connector.actions.find((candidate) => candidate.id === request.action)\n if (!action) {\n throw new IntegrationError(`Action ${request.action} is not defined by connector ${connector.id}.`, 'action_not_found')\n }\n return options.executeAction({ connection, request, connector, action })\n },\n async subscribeTrigger(connection, triggerId, targetUrl) {\n if (!options.subscribeTrigger) {\n throw new IntegrationError(`Provider ${options.id} does not support trigger subscriptions.`, 'trigger_not_found')\n }\n const connector = byConnector.get(connection.connectorId)\n if (!connector) {\n throw new IntegrationError(`Connector ${connection.connectorId} not found.`, 'connector_not_found')\n }\n const trigger = connector.triggers?.find((candidate) => candidate.id === triggerId)\n if (!trigger) {\n throw new IntegrationError(`Trigger ${triggerId} is not defined by connector ${connector.id}.`, 'trigger_not_found')\n }\n return options.subscribeTrigger(connection, trigger, targetUrl)\n },\n unsubscribeTrigger: options.unsubscribeTrigger,\n normalizeTriggerEvent: options.normalizeTriggerEvent,\n }\n}\n","import type {\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationDataClass,\n} from './index.js'\n\nexport interface ImportCatalogOptions {\n providerId: string\n connectorId: string\n connectorTitle: string\n category?: IntegrationConnectorCategory\n auth?: IntegrationConnector['auth']\n scopes?: string[]\n dataClass?: IntegrationDataClass\n defaultRisk?: IntegrationActionRisk\n}\n\nexport interface OpenApiDocument {\n openapi?: string\n swagger?: string\n info?: { title?: string }\n paths?: Record<string, Record<string, OpenApiOperation | unknown>>\n}\n\nexport interface OpenApiOperation {\n operationId?: string\n summary?: string\n description?: string\n parameters?: unknown[]\n requestBody?: unknown\n responses?: unknown\n security?: Array<Record<string, string[]>>\n tags?: string[]\n}\n\nexport interface GraphqlOperationSpec {\n name: string\n kind: 'query' | 'mutation'\n description?: string\n inputSchema?: unknown\n outputSchema?: unknown\n requiredScopes?: string[]\n}\n\nexport interface McpCatalogTool {\n name: string\n description?: string\n inputSchema?: unknown\n annotations?: {\n readOnlyHint?: boolean\n destructiveHint?: boolean\n openWorldHint?: boolean\n title?: string\n }\n}\n\nexport interface McpCatalog {\n tools: McpCatalogTool[]\n}\n\nconst HTTP_METHODS = new Set(['get', 'post', 'put', 'patch', 'delete'])\n\nexport function importOpenApiConnector(document: OpenApiDocument, options: ImportCatalogOptions): IntegrationConnector {\n const actions: IntegrationConnectorAction[] = []\n for (const [path, methods] of Object.entries(document.paths ?? {})) {\n for (const [method, rawOperation] of Object.entries(methods)) {\n const normalizedMethod = method.toLowerCase()\n if (!HTTP_METHODS.has(normalizedMethod) || !isObject(rawOperation)) continue\n const operation = rawOperation as OpenApiOperation\n const operationId = operation.operationId ?? `${normalizedMethod}_${path.replace(/[^a-zA-Z0-9]+/g, '_').replace(/^_+|_+$/g, '')}`\n actions.push({\n id: operationId,\n title: operation.summary ?? titleFromId(operationId),\n risk: riskFromHttpMethod(normalizedMethod, operation, options.defaultRisk),\n requiredScopes: scopesFromOpenApiOperation(operation, options.scopes ?? []),\n dataClass: options.dataClass ?? 'private',\n description: operation.description ?? operation.summary ?? `${normalizedMethod.toUpperCase()} ${path}`,\n approvalRequired: riskFromHttpMethod(normalizedMethod, operation, options.defaultRisk) !== 'read',\n inputSchema: openApiInputSchema(path, normalizedMethod, operation),\n outputSchema: operation.responses,\n })\n }\n }\n return connectorFromActions(options, actions)\n}\n\nexport function importGraphqlConnector(operations: GraphqlOperationSpec[], options: ImportCatalogOptions): IntegrationConnector {\n return connectorFromActions(options, operations.map((operation) => ({\n id: operation.name,\n title: titleFromId(operation.name),\n risk: operation.kind === 'query' ? 'read' : options.defaultRisk ?? 'write',\n requiredScopes: operation.requiredScopes ?? options.scopes ?? [],\n dataClass: options.dataClass ?? 'private',\n description: operation.description,\n approvalRequired: operation.kind === 'mutation',\n inputSchema: operation.inputSchema,\n outputSchema: operation.outputSchema,\n })))\n}\n\nexport function importMcpConnector(catalog: McpCatalog, options: ImportCatalogOptions): IntegrationConnector {\n return connectorFromActions(options, catalog.tools.map((tool) => {\n const risk = riskFromMcpTool(tool, options.defaultRisk)\n return {\n id: tool.name,\n title: tool.annotations?.title ?? titleFromId(tool.name),\n risk,\n requiredScopes: options.scopes ?? [],\n dataClass: options.dataClass ?? 'private',\n description: tool.description,\n approvalRequired: risk !== 'read',\n inputSchema: tool.inputSchema,\n }\n }))\n}\n\nfunction connectorFromActions(options: ImportCatalogOptions, actions: IntegrationConnectorAction[]): IntegrationConnector {\n const scopes = unique([\n ...(options.scopes ?? []),\n ...actions.flatMap((action) => action.requiredScopes),\n ])\n return {\n id: options.connectorId,\n providerId: options.providerId,\n title: options.connectorTitle,\n category: options.category ?? 'other',\n auth: options.auth ?? 'custom',\n scopes,\n actions,\n metadata: { source: 'catalog-importer' },\n }\n}\n\nfunction riskFromHttpMethod(method: string, operation: OpenApiOperation, fallback?: IntegrationActionRisk): IntegrationActionRisk {\n if (method === 'get') return 'read'\n if (method === 'delete') return 'destructive'\n const text = `${operation.operationId ?? ''} ${operation.summary ?? ''} ${operation.description ?? ''}`.toLowerCase()\n if (/\\b(delete|remove|destroy|cancel|void|revoke|drop)\\b/.test(text)) return 'destructive'\n return fallback && fallback !== 'read' ? fallback : 'write'\n}\n\nfunction riskFromMcpTool(tool: McpCatalogTool, fallback?: IntegrationActionRisk): IntegrationActionRisk {\n if (tool.annotations?.destructiveHint) return 'destructive'\n if (tool.annotations?.readOnlyHint) return 'read'\n const text = `${tool.name} ${tool.description ?? ''}`.toLowerCase()\n if (/\\b(delete|remove|destroy|cancel|void|revoke|drop)\\b/.test(text)) return 'destructive'\n if (/\\b(get|list|read|search|find|fetch|query)\\b/.test(text)) return 'read'\n return fallback ?? 'write'\n}\n\nfunction scopesFromOpenApiOperation(operation: OpenApiOperation, fallback: string[]): string[] {\n const scopes = (operation.security ?? []).flatMap((entry) => Object.values(entry).flat())\n return unique(scopes.length > 0 ? scopes : fallback)\n}\n\nfunction openApiInputSchema(path: string, method: string, operation: OpenApiOperation): unknown {\n return {\n type: 'object',\n additionalProperties: true,\n properties: {\n path: { const: path },\n method: { const: method.toUpperCase() },\n parameters: { type: 'object', additionalProperties: true },\n body: operation.requestBody ?? { type: 'object', additionalProperties: true },\n },\n }\n}\n\nfunction titleFromId(id: string): string {\n return id\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n .split(/[^a-zA-Z0-9]+/g)\n .filter(Boolean)\n .map((part) => part.slice(0, 1).toUpperCase() + part.slice(1))\n .join(' ')\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","import type {\n CompleteAuthRequest,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationConnectorTrigger,\n IntegrationDataClass,\n IntegrationProvider,\n IntegrationProviderKind,\n StartAuthRequest,\n StartAuthResult,\n} from './index.js'\nimport { IntegrationError } from './index.js'\n\nexport interface GatewayCatalogProviderOptions {\n id: string\n kind: Extract<IntegrationProviderKind, 'nango' | 'pipedream' | 'activepieces' | 'tangle_catalog' | 'zapier' | 'executor' | 'custom'>\n fetchCatalog: () => Promise<GatewayCatalogEntry[]> | GatewayCatalogEntry[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n invokeAction?: (connection: IntegrationConnection, request: IntegrationActionRequest) => Promise<IntegrationActionResult> | IntegrationActionResult\n cacheTtlMs?: number\n now?: () => Date\n}\n\nexport interface GatewayCatalogEntry {\n id?: string\n key?: string\n name?: string\n title?: string\n category?: string\n auth?: 'oauth2' | 'api_key' | 'none' | 'custom' | string\n scopes?: string[]\n actions?: GatewayCatalogAction[]\n triggers?: GatewayCatalogTrigger[]\n metadata?: Record<string, unknown>\n}\n\nexport interface GatewayCatalogAction {\n id?: string\n key?: string\n name?: string\n title?: string\n description?: string\n risk?: 'read' | 'write' | 'destructive' | string\n scopes?: string[]\n requiredScopes?: string[]\n dataClass?: IntegrationDataClass | string\n approvalRequired?: boolean\n inputSchema?: unknown\n outputSchema?: unknown\n}\n\nexport interface GatewayCatalogTrigger {\n id?: string\n key?: string\n name?: string\n title?: string\n description?: string\n scopes?: string[]\n requiredScopes?: string[]\n dataClass?: IntegrationDataClass | string\n payloadSchema?: unknown\n}\n\nexport function createGatewayCatalogProvider(options: GatewayCatalogProviderOptions): IntegrationProvider {\n const now = options.now ?? (() => new Date())\n let cachedAt = 0\n let cached: IntegrationConnector[] | undefined\n\n async function listConnectors(): Promise<IntegrationConnector[]> {\n const ttl = options.cacheTtlMs ?? 60_000\n const current = now().getTime()\n if (cached && current - cachedAt < ttl) return cached\n const entries = await options.fetchCatalog()\n cached = normalizeGatewayCatalog(entries, {\n providerId: options.id,\n providerKind: options.kind,\n })\n cachedAt = current\n return cached\n }\n\n return {\n id: options.id,\n kind: options.kind,\n listConnectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n async invokeAction(connection, request) {\n if (!options.invokeAction) {\n throw new IntegrationError(`Gateway provider ${options.id} does not implement action invocation.`, 'action_not_found')\n }\n await assertKnownGatewayAction(await listConnectors(), connection.connectorId, request.action)\n return options.invokeAction(connection, request)\n },\n }\n}\n\nexport function normalizeGatewayCatalog(\n entries: GatewayCatalogEntry[],\n options: { providerId: string; providerKind: IntegrationProviderKind },\n): IntegrationConnector[] {\n const out: IntegrationConnector[] = []\n const seen = new Set<string>()\n for (const entry of entries) {\n const id = slug(entry.id ?? entry.key ?? entry.name ?? entry.title ?? '')\n if (!id || seen.has(id)) continue\n seen.add(id)\n const title = entry.title ?? entry.name ?? titleFromId(id)\n const actions = normalizeActions(entry.actions ?? [], entry.scopes ?? [])\n out.push({\n id,\n providerId: options.providerId,\n title,\n category: normalizeCategory(entry.category),\n auth: normalizeAuth(entry.auth),\n scopes: unique([\n ...(entry.scopes ?? []),\n ...actions.flatMap((action) => action.requiredScopes),\n ]),\n actions: actions.length > 0 ? actions : defaultActionsFor(entry.category, entry.scopes ?? []),\n triggers: normalizeTriggers(entry.triggers ?? [], entry.scopes ?? []),\n metadata: {\n ...(entry.metadata ?? {}),\n source: 'gateway-catalog',\n providerKind: options.providerKind,\n executable: true,\n },\n })\n }\n return out\n}\n\nasync function assertKnownGatewayAction(connectors: IntegrationConnector[], connectorId: string, actionId: string): Promise<void> {\n const connector = connectors.find((candidate) => candidate.id === connectorId)\n if (!connector) throw new IntegrationError(`Connector ${connectorId} not found.`, 'connector_not_found')\n if (!connector.actions.some((action) => action.id === actionId)) {\n throw new IntegrationError(`Action ${actionId} is not defined by connector ${connectorId}.`, 'action_not_found')\n }\n}\n\nfunction normalizeActions(actions: GatewayCatalogAction[], fallbackScopes: string[]): IntegrationConnectorAction[] {\n return actions.map((action) => {\n const id = slug(action.id ?? action.key ?? action.name ?? action.title ?? '')\n return {\n id,\n title: action.title ?? action.name ?? titleFromId(id),\n risk: normalizeRisk(action.risk),\n requiredScopes: unique([\n ...(action.requiredScopes ?? []),\n ...(action.scopes ?? []),\n ...((action.requiredScopes?.length || action.scopes?.length) ? [] : fallbackScopes),\n ]),\n dataClass: normalizeDataClass(action.dataClass),\n description: action.description,\n approvalRequired: action.approvalRequired ?? normalizeRisk(action.risk) !== 'read',\n inputSchema: action.inputSchema,\n outputSchema: action.outputSchema,\n }\n }).filter((action) => action.id)\n}\n\nfunction normalizeTriggers(triggers: GatewayCatalogTrigger[], fallbackScopes: string[]): IntegrationConnectorTrigger[] | undefined {\n const normalized = triggers.map((trigger) => {\n const id = slug(trigger.id ?? trigger.key ?? trigger.name ?? trigger.title ?? '')\n return {\n id,\n title: trigger.title ?? trigger.name ?? titleFromId(id),\n requiredScopes: unique([\n ...(trigger.requiredScopes ?? []),\n ...(trigger.scopes ?? []),\n ...((trigger.requiredScopes?.length || trigger.scopes?.length) ? [] : fallbackScopes),\n ]),\n dataClass: normalizeDataClass(trigger.dataClass),\n description: trigger.description,\n payloadSchema: trigger.payloadSchema,\n }\n }).filter((trigger) => trigger.id)\n return normalized.length > 0 ? normalized : undefined\n}\n\nfunction defaultActionsFor(category: string | undefined, scopes: string[]): IntegrationConnectorAction[] {\n const readScope = scopes.find((scope) => scope.endsWith('.read')) ?? scopes[0]\n const writeScope = scopes.find((scope) => scope.endsWith('.write')) ?? scopes[1] ?? readScope\n const requiredRead = readScope ? [readScope] : []\n const requiredWrite = writeScope ? [writeScope] : []\n const dataClass = normalizeDataClass(category === 'finance' || category === 'commerce' || category === 'hr' ? 'sensitive' : 'private')\n return [\n {\n id: 'records.search',\n title: 'Search records',\n risk: 'read',\n requiredScopes: requiredRead,\n dataClass,\n description: 'Search provider records.',\n },\n {\n id: 'records.read',\n title: 'Read record',\n risk: 'read',\n requiredScopes: requiredRead,\n dataClass,\n description: 'Read a provider record.',\n },\n {\n id: 'records.upsert',\n title: 'Upsert record',\n risk: 'write',\n requiredScopes: requiredWrite,\n dataClass,\n approvalRequired: true,\n description: 'Create or update a provider record.',\n },\n ]\n}\n\nfunction normalizeCategory(category: string | undefined): IntegrationConnectorCategory {\n const value = slug(category ?? '')\n if (value === 'mail') return 'email'\n if (value === 'messaging' || value === 'communication' || value === 'communications') return 'chat'\n if (value === 'file' || value === 'files') return 'storage'\n if (value === 'project-management' || value === 'automation') return 'workflow'\n if (value === 'developer' || value === 'devops') return 'workflow'\n if (value === 'support') return 'crm'\n if ([\n 'email',\n 'calendar',\n 'chat',\n 'crm',\n 'storage',\n 'docs',\n 'database',\n 'webhook',\n 'workflow',\n 'internal',\n 'other',\n ].includes(value)) return value as IntegrationConnectorCategory\n return 'other'\n}\n\nfunction normalizeAuth(auth: GatewayCatalogEntry['auth']): IntegrationConnector['auth'] {\n if (auth === 'oauth2') return 'oauth2'\n if (auth === 'api_key' || auth === 'api-key' || auth === 'apikey') return 'api_key'\n if (auth === 'none') return 'none'\n return 'custom'\n}\n\nfunction normalizeRisk(risk: GatewayCatalogAction['risk']): IntegrationConnectorAction['risk'] {\n if (risk === 'read' || risk === 'write' || risk === 'destructive') return risk\n return 'write'\n}\n\nfunction normalizeDataClass(dataClass: GatewayCatalogAction['dataClass']): IntegrationDataClass {\n if (dataClass === 'public' || dataClass === 'internal' || dataClass === 'private' || dataClass === 'sensitive' || dataClass === 'secret') return dataClass\n return 'private'\n}\n\nfunction slug(value: string): string {\n return value.trim().toLowerCase()\n .replace(/&/g, 'and')\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n\nfunction titleFromId(id: string): string {\n return id.split('-').filter(Boolean).map((part) => part.slice(0, 1).toUpperCase() + part.slice(1)).join(' ')\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","import type {\n IntegrationActionRisk,\n IntegrationConnectorCategory,\n} from './index.js'\n\nexport interface ActivepiecesPieceOverride {\n category?: IntegrationConnectorCategory\n actionRisks?: Record<string, IntegrationActionRisk>\n approvalRequired?: Record<string, boolean>\n}\n\nexport const ACTIVEPIECES_OVERRIDES: Record<string, ActivepiecesPieceOverride> = {\n slack: {\n category: 'chat',\n actionRisks: {\n 'slack.send.message': 'write',\n 'slack.send.direct.message': 'write',\n 'request.action.message': 'write',\n 'request.action.direct.message': 'write',\n 'request.approval.direct.message': 'write',\n 'request.send.approval.message': 'write',\n 'upload.file': 'write',\n 'search.messages': 'read',\n },\n },\n discord: { category: 'chat' },\n 'microsoft-teams': { category: 'chat' },\n whatsapp: { category: 'chat' },\n telegram: { category: 'chat' },\n\n gmail: {\n category: 'email',\n actionRisks: {\n 'gmail.send.email': 'write',\n 'gmail.reply.to.email': 'write',\n 'gmail.create.draft.reply': 'write',\n 'gmail.search.mail': 'read',\n 'gmail.get.email': 'read',\n 'request.approval.in.email': 'write',\n },\n },\n 'microsoft-outlook': { category: 'email' },\n sendgrid: { category: 'email' },\n postmark: { category: 'email' },\n mailchimp: { category: 'email' },\n resend: { category: 'email' },\n\n 'google-calendar': { category: 'calendar' },\n 'microsoft-outlook-calendar': { category: 'calendar' },\n cal: { category: 'calendar' },\n calendly: { category: 'calendar' },\n zoom: { category: 'calendar' },\n\n 'google-drive': { category: 'storage' },\n dropbox: { category: 'storage' },\n onedrive: { category: 'storage' },\n\n 'google-sheets': { category: 'database' },\n 'google-docs': { category: 'docs' },\n airtable: { category: 'database' },\n notion: { category: 'docs' },\n\n hubspot: { category: 'crm' },\n salesforce: { category: 'crm' },\n pipedrive: { category: 'crm' },\n intercom: { category: 'crm' },\n zendesk: { category: 'crm' },\n neverbounce: { category: 'crm' },\n\n stripe: {\n category: 'crm',\n actionRisks: {\n 'stripe.create.customer': 'write',\n 'stripe.update.customer': 'write',\n 'stripe.retrieve.customer': 'read',\n 'stripe.search.customer': 'read',\n 'stripe.search.subscriptions': 'read',\n 'stripe.create.invoice': 'write',\n 'stripe.retrieve.invoice': 'read',\n 'stripe.find.invoice': 'read',\n 'stripe.create.subscription': 'write',\n 'stripe.cancel.subscription': 'destructive',\n 'stripe.create.payment.intent': 'write',\n 'stripe.retrieve.payment.intent': 'read',\n 'stripe.create.refund': 'destructive',\n 'stripe.create.product': 'write',\n 'stripe.create.price': 'write',\n 'stripe.create.payment.link': 'write',\n 'stripe.deactivate.payment.link': 'destructive',\n 'stripe.retrieve.payout': 'read',\n },\n approvalRequired: {\n 'stripe.create.refund': true,\n 'stripe.cancel.subscription': true,\n 'stripe.deactivate.payment.link': true,\n },\n },\n\n twilio: {\n category: 'chat',\n actionRisks: {\n 'send.sms': 'write',\n 'send.whatsapp.message': 'write',\n 'make.phone.call': 'write',\n },\n },\n\n shopify: { category: 'crm' },\n square: { category: 'crm' },\n}\n\nexport function getActivepiecesOverride(id: string): ActivepiecesPieceOverride | undefined {\n return ACTIVEPIECES_OVERRIDES[id]\n}\n","","import type {\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationConnectorTrigger,\n IntegrationDataClass,\n} from './core-types.js'\nimport { getActivepiecesOverride } from './activepieces-overrides.js'\nimport { catalogData } from './activepieces-catalog-data.mjs'\n\nexport interface ActivepiecesCatalogEntry {\n id: string\n title: string\n description: string\n npmPackage?: string\n version?: string\n category: IntegrationConnectorCategory\n auth: IntegrationConnector['auth']\n authFields?: ActivepiecesCatalogAuthField[]\n domains: string[]\n actions: Array<{\n id: string\n title: string\n risk: IntegrationActionRisk\n upstreamName?: string\n }>\n triggers: Array<{\n id: string\n title: string\n upstreamName?: string\n }>\n source: {\n repository: string\n path: string\n license: 'MIT'\n }\n}\n\nexport interface ActivepiecesCatalogAuthField {\n key: string\n label: string\n required: boolean\n secret: boolean\n kind: 'text' | 'number' | 'boolean' | 'select' | 'object' | 'unknown'\n description?: string\n}\n\nconst CACHED_CATALOG = catalogData as unknown as ReadonlyArray<ActivepiecesCatalogEntry>\n\nfunction loadCatalog(): ReadonlyArray<ActivepiecesCatalogEntry> {\n return CACHED_CATALOG\n}\n\nexport function listActivepiecesCatalogEntries(): ActivepiecesCatalogEntry[] {\n return loadCatalog().map((entry) => ({\n ...entry,\n actions: [...entry.actions],\n triggers: [...entry.triggers],\n domains: [...entry.domains],\n source: { ...entry.source },\n }))\n}\n\nexport function buildActivepiecesConnectors(options: {\n providerId?: string\n includeCatalogActions?: boolean\n executable?: boolean\n} = {}): IntegrationConnector[] {\n const providerId = options.providerId ?? 'activepieces'\n const executable = options.executable === true\n return listActivepiecesCatalogEntries().map((entry) => {\n const override = getActivepiecesOverride(entry.id)\n const category = override?.category ?? entry.category\n const scopes = [`${entry.id}.read`, `${entry.id}.write`]\n const catalogActions = entry.actions.map((action) =>\n toAction(applyActionOverride(action, override), scopes, dataClassFor(category)))\n const catalogTriggers = entry.triggers.map((trigger) => toTrigger(trigger, scopes, dataClassFor(category)))\n // An entry with no runnable catalog actions cannot be executed regardless\n // of the requested executable flag — there is nothing to bind to a runtime\n // action. Such entries are catalog-only (discoverable, not invokable).\n const entryExecutable = executable && catalogActions.length > 0\n return {\n id: entry.id,\n providerId,\n title: entry.title,\n category,\n auth: entry.auth,\n scopes: options.includeCatalogActions ? scopes : [],\n actions: options.includeCatalogActions ? catalogActions : [],\n triggers: options.includeCatalogActions ? catalogTriggers : undefined,\n metadata: {\n source: 'activepieces-community',\n executable: entryExecutable,\n runtime: 'activepieces-piece',\n catalogOnly: !entryExecutable,\n supportTier: entryExecutable ? 'gatewayExecutable' : 'catalogOnly',\n catalogActionCount: catalogActions.length,\n catalogTriggerCount: catalogTriggers.length,\n npmPackage: entry.npmPackage,\n version: entry.version,\n license: entry.source.license,\n sourcePath: entry.source.path,\n domains: entry.domains,\n authFields: entry.authFields,\n ...(override ? { overridden: true } : {}),\n },\n }\n })\n}\n\nfunction applyActionOverride(\n action: ActivepiecesCatalogEntry['actions'][number],\n override: ReturnType<typeof getActivepiecesOverride>,\n): ActivepiecesCatalogEntry['actions'][number] {\n if (!override) return action\n const risk = override.actionRisks?.[action.id] ?? action.risk\n return { ...action, risk }\n}\n\nfunction toAction(\n action: ActivepiecesCatalogEntry['actions'][number],\n scopes: string[],\n dataClass: IntegrationDataClass,\n): IntegrationConnectorAction {\n return {\n id: action.id,\n title: action.title,\n risk: action.risk,\n requiredScopes: action.risk === 'read' ? [scopes[0]!] : [scopes[1]!],\n dataClass,\n approvalRequired: action.risk !== 'read',\n inputSchema: { type: 'object', additionalProperties: true, properties: {} },\n }\n}\n\nfunction toTrigger(\n trigger: ActivepiecesCatalogEntry['triggers'][number],\n scopes: string[],\n dataClass: IntegrationDataClass,\n): IntegrationConnectorTrigger {\n return {\n id: trigger.id,\n title: trigger.title,\n requiredScopes: [scopes[0]!],\n dataClass,\n payloadSchema: { type: 'object', additionalProperties: true, properties: {} },\n }\n}\n\nfunction dataClassFor(category: IntegrationConnectorCategory): IntegrationDataClass {\n if (category === 'database' || category === 'storage' || category === 'email') return 'private'\n if (category === 'crm' || category === 'chat' || category === 'docs') return 'private'\n if (category === 'internal') return 'sensitive'\n return 'internal'\n}\n","import {\n buildActivepiecesConnectors,\n listActivepiecesCatalogEntries,\n type ActivepiecesCatalogEntry,\n} from './activepieces-catalog.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport type {\n CompleteAuthRequest,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationProvider,\n StartAuthRequest,\n StartAuthResult,\n} from './index.js'\nimport { IntegrationError } from './index.js'\n\nexport interface ActivepiecesExecutorInvocation {\n connection: IntegrationConnection\n request: IntegrationActionRequest\n connector: IntegrationConnector\n catalogEntry: ActivepiecesCatalogEntry\n piece: {\n id: string\n npmPackage?: string\n version?: string\n actionId: string\n upstreamActionName?: string\n }\n}\n\nexport interface ActivepiecesExecutorProviderOptions {\n id?: string\n connectors?: IntegrationConnector[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n executeAction: (invocation: ActivepiecesExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult\n}\n\nexport function createActivepiecesExecutorProvider(options: ActivepiecesExecutorProviderOptions): IntegrationProvider {\n const providerId = options.id ?? 'activepieces'\n const connectors = options.connectors ?? buildActivepiecesConnectors({\n providerId,\n includeCatalogActions: true,\n executable: true,\n })\n const byEntry = new Map(listActivepiecesCatalogEntries().map((entry) => [entry.id, entry]))\n\n return createCatalogExecutorProvider({\n id: providerId,\n kind: 'activepieces',\n connectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n executeAction: async ({ connection, request, connector, action }) => {\n const catalogEntry = byEntry.get(connector.id)\n if (!catalogEntry) {\n throw new IntegrationError(`Activepieces catalog entry ${connector.id} not found.`, 'connector_not_found')\n }\n const catalogAction = catalogEntry.actions.find((candidate) => candidate.id === action.id)\n return options.executeAction({\n connection,\n request,\n connector,\n catalogEntry,\n piece: {\n id: catalogEntry.id,\n npmPackage: catalogEntry.npmPackage,\n version: catalogEntry.version,\n actionId: action.id,\n upstreamActionName: catalogAction?.upstreamName,\n },\n })\n },\n })\n}\n","import { buildActivepiecesConnectors, listActivepiecesCatalogEntries } from './activepieces-catalog.js'\nimport { buildTangleIntegrationCatalogConnectors } from './tangle-catalog.js'\nimport type {\n IntegrationCatalogSource,\n IntegrationConnector,\n} from './core-types.js'\nimport {\n composeIntegrationRegistry,\n type IntegrationRegistry,\n type IntegrationSupportTier,\n} from './registry-core.js'\nimport { integrationSpecToConnector, listIntegrationSpecs } from './specs/registry.js'\n\nexport {\n canonicalConnectorId,\n composeIntegrationRegistry,\n inferIntegrationSupportTier,\n summarizeIntegrationRegistry,\n} from './registry-core.js'\nexport type {\n ComposeIntegrationRegistryOptions,\n IntegrationRegistry,\n IntegrationRegistryConflict,\n IntegrationRegistryEntry,\n IntegrationRegistrySourceRef,\n IntegrationRegistrySummary,\n IntegrationSupportTier,\n} from './registry-core.js'\n\nexport function buildDefaultIntegrationRegistry(options: {\n includeSpecs?: boolean\n includeTangleCatalog?: boolean\n tangleCatalogRuntimeExecutable?: boolean\n /** @deprecated Use includeTangleCatalog. */\n includeActivepieces?: boolean\n} = {}): IntegrationRegistry {\n const includeSpecs = options.includeSpecs ?? true\n const includeTangleCatalog = options.includeTangleCatalog ?? options.includeActivepieces ?? true\n const sources: IntegrationCatalogSource[] = []\n if (includeSpecs) {\n sources.push({\n id: 'spec',\n connectors: listIntegrationSpecs().map((spec) => integrationSpecToConnector(spec, 'spec')),\n })\n }\n if (includeTangleCatalog) {\n const tangleConnectors = options.tangleCatalogRuntimeExecutable\n ? buildTangleIntegrationCatalogConnectors({\n providerId: 'tangle-catalog',\n includeCatalogActions: true,\n executable: true,\n })\n : buildActivepiecesConnectors({ providerId: 'tangle-catalog' }).map((connector) => ({\n ...connector,\n providerId: 'tangle-catalog',\n metadata: {\n source: 'tangle-integrations-catalog',\n providerId: 'tangle-catalog',\n executable: connector.metadata?.executable,\n runtime: 'native-adapter-backlog',\n catalogOnly: connector.metadata?.catalogOnly,\n supportTier: connector.metadata?.supportTier,\n catalogActionCount: connector.metadata?.catalogActionCount,\n catalogTriggerCount: connector.metadata?.catalogTriggerCount,\n license: connector.metadata?.license,\n version: connector.metadata?.version,\n domains: Array.isArray(connector.metadata?.domains)\n ? connector.metadata.domains.filter((domain) => typeof domain === 'string' && !domain.toLowerCase().includes('activepieces'))\n : undefined,\n ...(connector.metadata?.overridden ? { overridden: true } : {}),\n },\n }))\n sources.push({\n id: 'tangle-catalog',\n connectors: tangleConnectors,\n })\n }\n return composeIntegrationRegistry(sources)\n}\n\n/** Per-entry executability classification. Pure metadata — never loads or\n * runs a runtime module. The coverage report consumes this to separate\n * \"we can execute this today\" from \"catalog-only / setup-only\". */\nexport interface IntegrationCatalogExecutability {\n canonicalId: string\n /** True when the entry resolves to a runnable action: a first-party /\n * sandbox / gateway-executable support tier, or a tangle-catalog entry\n * with a resolvable npm runtime package. */\n executable: boolean\n supportTier: IntegrationSupportTier\n authKind: IntegrationConnector['auth']\n /** Resolvable npm runtime package name when one is registered for this\n * connector in the vendored catalog; undefined for first-party adapters\n * (which execute in-process) and catalog-only entries. */\n runtimePackage?: string\n actionCount: number\n triggerCount: number\n}\n\n/** Classify every entry in a composed registry by executability + auth kind\n * WITHOUT executing anything. Defaults to {@link buildDefaultIntegrationRegistry}. */\nexport function classifyIntegrationCatalogExecutability(\n registry: IntegrationRegistry = buildDefaultIntegrationRegistry(),\n): IntegrationCatalogExecutability[] {\n const packageByConnector = new Map(\n listActivepiecesCatalogEntries()\n .filter((entry) => entry.npmPackage)\n .map((entry) => [entry.id, entry.npmPackage!]),\n )\n return registry.entries.map((entry) => {\n const runtimePackage = packageByConnector.get(entry.connector.id)\n const tierExecutable =\n entry.supportTier === 'firstPartyExecutable' ||\n entry.supportTier === 'sandboxExecutable' ||\n entry.supportTier === 'gatewayExecutable'\n return {\n canonicalId: entry.canonicalId,\n executable: tierExecutable && entry.connector.actions.length > 0,\n supportTier: entry.supportTier,\n authKind: entry.connector.auth,\n runtimePackage,\n actionCount: entry.connector.actions.length,\n triggerCount: entry.connector.triggers?.length ?? 0,\n }\n })\n}\n","import {\n buildActivepiecesConnectors,\n listActivepiecesCatalogEntries,\n} from './activepieces-catalog.js'\nimport { createActivepiecesExecutorProvider } from './activepieces-provider.js'\nimport { buildIntegrationToolCatalog } from './catalog.js'\nimport {\n buildDefaultIntegrationRegistry,\n composeIntegrationRegistry,\n type IntegrationRegistryConflict,\n type IntegrationRegistrySummary,\n summarizeIntegrationRegistry,\n} from './registry.js'\n\nexport interface IntegrationCatalogFreshnessOptions {\n liveActivepieces?: boolean\n minActivepiecesConnectors?: number\n staleConnectorDelta?: number\n fetchImpl?: typeof fetch\n}\n\nexport interface IntegrationCatalogFreshnessResult {\n ok: boolean\n generatedAt: string\n local: {\n activepiecesEntries: number\n activepiecesConnectors: number\n activepiecesActions: number\n activepiecesTriggers: number\n executableActivepiecesConnectors: number\n executableActivepiecesActions: number\n executableActivepiecesTriggers: number\n executableToolDefinitions: number\n unsupportedExecutableConnectorIds: string[]\n registryEntries: number\n registrySummary: IntegrationRegistrySummary\n conflictSamples: IntegrationRegistryConflict[]\n }\n upstream?: {\n activepiecesPieces?: number\n activepiecesDelta?: number\n checkedUrl: string\n warning?: string\n }\n warnings: string[]\n}\n\nexport const ACTIVEPIECES_PUBLIC_CATALOG_URL = 'https://www.activepieces.com/pieces'\n\nfunction parseCount(value: string | undefined): number | undefined {\n if (!value) return undefined\n const parsed = Number.parseInt(value.replace(/,/g, ''), 10)\n return Number.isFinite(parsed) ? parsed : undefined\n}\n\nexport function extractActivepiecesPublicPieceCount(html: string): number | undefined {\n const showingMatch = html.match(/Showing\\s+([0-9,]+)\\s+pieces/i)\n const integrationMatch = html.match(/([0-9,]+)\\+?\\s+Integrations/i)\n return parseCount(showingMatch?.[1]) ?? parseCount(integrationMatch?.[1])\n}\n\nexport async function auditIntegrationCatalogFreshness(\n options: IntegrationCatalogFreshnessOptions = {},\n): Promise<IntegrationCatalogFreshnessResult> {\n const minActivepiecesConnectors = options.minActivepiecesConnectors ?? 600\n const staleConnectorDelta = options.staleConnectorDelta ?? 25\n const activepiecesEntries = listActivepiecesCatalogEntries()\n const activepiecesConnectors = buildActivepiecesConnectors({\n includeCatalogActions: true,\n })\n const executableActivepiecesProvider = createActivepiecesExecutorProvider({\n executeAction: () => ({ ok: true, action: 'audit.noop' }),\n })\n const executableActivepiecesConnectors = await executableActivepiecesProvider.listConnectors()\n const executableRegistry = composeIntegrationRegistry([\n {\n id: executableActivepiecesProvider.id,\n connectors: executableActivepiecesConnectors,\n },\n ])\n const executableTools = buildIntegrationToolCatalog(executableRegistry.connectors)\n const unsupportedExecutableConnectorIds = executableActivepiecesConnectors\n .filter((connector) => connector.actions.length === 0)\n .map((connector) => connector.id)\n const registry = buildDefaultIntegrationRegistry({\n includeSpecs: true,\n includeActivepieces: true,\n })\n const warnings: string[] = []\n\n if (activepiecesConnectors.length < minActivepiecesConnectors) {\n warnings.push(\n `Activepieces catalog has ${activepiecesConnectors.length} connectors, below floor ${minActivepiecesConnectors}.`,\n )\n }\n // Entries without runnable actions (trigger-only or framework-internal\n // pieces) are an intrinsic property of the upstream catalog, not a freshness\n // defect. Their count is reported via unsupportedExecutableConnectorIds and\n // tool-definition totals; it does not gate the freshness check.\n\n let upstream: IntegrationCatalogFreshnessResult['upstream']\n if (options.liveActivepieces) {\n upstream = await checkActivepiecesPublicCatalog({\n localConnectorCount: activepiecesConnectors.length,\n staleConnectorDelta,\n fetchImpl: options.fetchImpl,\n warnings,\n })\n }\n\n return {\n ok: warnings.length === 0,\n generatedAt: new Date().toISOString(),\n local: {\n activepiecesEntries: activepiecesEntries.length,\n activepiecesConnectors: activepiecesConnectors.length,\n activepiecesActions: activepiecesConnectors.reduce(\n (sum, connector) => sum + connector.actions.length,\n 0,\n ),\n activepiecesTriggers: activepiecesConnectors.reduce(\n (sum, connector) => sum + (connector.triggers?.length ?? 0),\n 0,\n ),\n executableActivepiecesConnectors: executableActivepiecesConnectors.length,\n executableActivepiecesActions: executableActivepiecesConnectors.reduce(\n (sum, connector) => sum + connector.actions.length,\n 0,\n ),\n executableActivepiecesTriggers: executableActivepiecesConnectors.reduce(\n (sum, connector) => sum + (connector.triggers?.length ?? 0),\n 0,\n ),\n executableToolDefinitions: executableTools.length,\n unsupportedExecutableConnectorIds,\n registryEntries: registry.entries.length,\n registrySummary: summarizeIntegrationRegistry(registry),\n conflictSamples: registry.entries\n .flatMap((entry) => entry.conflicts)\n .slice(0, 10),\n },\n upstream,\n warnings,\n }\n}\n\nasync function checkActivepiecesPublicCatalog(input: {\n localConnectorCount: number\n staleConnectorDelta: number\n fetchImpl?: typeof fetch\n warnings: string[]\n}): Promise<IntegrationCatalogFreshnessResult['upstream']> {\n try {\n const res = await (input.fetchImpl ?? fetch)(ACTIVEPIECES_PUBLIC_CATALOG_URL, {\n headers: { accept: 'text/html' },\n signal: AbortSignal.timeout(15_000),\n })\n if (!res.ok) {\n const warning = `Activepieces freshness request failed with HTTP ${res.status}.`\n input.warnings.push(warning)\n return {\n checkedUrl: ACTIVEPIECES_PUBLIC_CATALOG_URL,\n warning,\n }\n }\n const activepiecesPieces = extractActivepiecesPublicPieceCount(await res.text())\n const activepiecesDelta =\n activepiecesPieces === undefined\n ? undefined\n : activepiecesPieces - input.localConnectorCount\n if (\n activepiecesDelta !== undefined &&\n activepiecesDelta > input.staleConnectorDelta\n ) {\n input.warnings.push(\n `Activepieces upstream appears ${activepiecesDelta} connectors ahead of the vendored package catalog.`,\n )\n }\n return {\n activepiecesPieces,\n activepiecesDelta,\n checkedUrl: ACTIVEPIECES_PUBLIC_CATALOG_URL,\n warning:\n activepiecesPieces === undefined\n ? 'Could not parse upstream piece count.'\n : undefined,\n }\n } catch (error) {\n const warning =\n error instanceof Error\n ? error.message\n : 'Activepieces freshness request failed.'\n input.warnings.push(warning)\n return {\n checkedUrl: ACTIVEPIECES_PUBLIC_CATALOG_URL,\n warning,\n }\n }\n}\n","import {\n buildActivepiecesConnectors,\n listActivepiecesCatalogEntries,\n type ActivepiecesCatalogEntry,\n} from './activepieces-catalog.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport {\n auditIntegrationCatalogFreshness,\n extractActivepiecesPublicPieceCount,\n type IntegrationCatalogFreshnessOptions,\n} from './catalog-freshness.js'\nimport {\n IntegrationError,\n type CompleteAuthRequest,\n type IntegrationActionRequest,\n type IntegrationActionResult,\n type IntegrationConnection,\n type IntegrationConnector,\n type IntegrationTriggerEvent,\n type IntegrationTriggerSubscription,\n type StartAuthRequest,\n type StartAuthResult,\n} from './index.js'\nimport {\n CONNECTOR_ADAPTER_FACTORIES,\n listBundledConnectorAdapters,\n} from './connectors/index.js'\nimport { canonicalIntegrationKind } from './integration-kind-aliases.js'\n\nexport {\n type ActivepiecesCatalogEntry,\n} from './activepieces-catalog.js'\n\nexport const TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID = 'tangle-catalog'\nexport const TANGLE_INTEGRATIONS_CATALOG_SOURCE = 'tangle-integrations-catalog'\n\nexport type TangleIntegrationImplementationKind = 'native_adapter' | 'package_runtime'\nexport type TangleIntegrationContractStatus = 'contract_ready' | 'runtime_backed' | 'native_backed'\n\nexport interface TangleIntegrationCatalogEntry {\n id: string\n title: string\n description: string\n category: IntegrationConnector['category']\n auth: IntegrationConnector['auth']\n authFields?: ActivepiecesCatalogEntry['authFields']\n domains: string[]\n actions: Array<{\n id: string\n title: string\n risk: IntegrationConnector['actions'][number]['risk']\n upstreamName?: string\n }>\n triggers: Array<{\n id: string\n title: string\n upstreamName?: string\n }>\n}\n\nexport interface TangleIntegrationContract {\n id: string\n title: string\n description: string\n category: IntegrationConnector['category']\n auth: IntegrationConnector['auth']\n authFields: NonNullable<ActivepiecesCatalogEntry['authFields']>\n actions: Array<{\n id: string\n title: string\n risk: IntegrationConnector['actions'][number]['risk']\n upstreamName: string\n }>\n triggers: Array<{\n id: string\n title: string\n upstreamName: string\n }>\n implementation: {\n kind: TangleIntegrationImplementationKind\n runtimePackage?: string\n version?: string\n }\n status: TangleIntegrationContractStatus\n quality: {\n tangleContract: true\n authFieldsMapped: boolean\n actionNamesMapped: boolean\n triggerNamesMapped: boolean\n runtimePackageMapped: boolean\n nativeAdapter: boolean\n }\n}\n\nexport interface TangleCatalogRuntimePackageManifestOptions {\n name?: string\n includeAgentIntegrationsPackage?: boolean\n agentIntegrationsVersion?: string\n additionalDependencies?: Record<string, string>\n}\n\nexport interface TangleCatalogRuntimePackageManifest {\n name: string\n private: true\n type: 'module'\n dependencies: Record<string, string>\n tangle: {\n integrationContracts: number\n packageRuntimeBackends: number\n generatedFrom: typeof TANGLE_INTEGRATIONS_CATALOG_SOURCE\n }\n}\n\nexport interface TangleCatalogExecutorInvocation {\n connection: IntegrationConnection\n request: IntegrationActionRequest\n connector: IntegrationConnector\n catalogEntry: TangleIntegrationCatalogEntry\n piece: {\n id: string\n packageName?: string\n version?: string\n actionId: string\n upstreamActionName?: string\n }\n}\n\nexport interface TangleCatalogTriggerInvocation {\n connection: IntegrationConnection\n connector: IntegrationConnector\n catalogEntry: TangleIntegrationCatalogEntry\n trigger: NonNullable<IntegrationConnector['triggers']>[number]\n targetUrl?: string\n piece: {\n id: string\n packageName?: string\n version?: string\n triggerId: string\n upstreamTriggerName?: string\n }\n}\n\nexport interface TangleCatalogExecutorProviderOptions {\n id?: string\n connectors?: IntegrationConnector[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n executeAction: (invocation: TangleCatalogExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult\n subscribeTrigger?: (invocation: TangleCatalogTriggerInvocation) => Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription\n unsubscribeTrigger?: (subscriptionId: string) => Promise<void> | void\n normalizeTriggerEvent?: (raw: unknown) => Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent\n}\n\nexport type TangleIntegrationCatalogFreshnessOptions = IntegrationCatalogFreshnessOptions\n\nexport interface TangleIntegrationCatalogFreshnessResult {\n ok: boolean\n generatedAt: string\n local: {\n catalogEntries: number\n catalogConnectors: number\n catalogActions: number\n catalogTriggers: number\n executableCatalogConnectors: number\n executableCatalogActions: number\n executableCatalogTriggers: number\n executableToolDefinitions: number\n unsupportedExecutableConnectorIds: string[]\n registryEntries: number\n registrySummary: Awaited<ReturnType<typeof auditIntegrationCatalogFreshness>>['local']['registrySummary']\n conflictSamples: Awaited<ReturnType<typeof auditIntegrationCatalogFreshness>>['local']['conflictSamples']\n }\n upstream?: {\n externalEntries?: number\n externalDelta?: number\n checkedUrl: string\n warning?: string\n }\n warnings: string[]\n}\n\nexport function listTangleNativeAdapterIds(): string[] {\n const ids = new Set<string>(\n CONNECTOR_ADAPTER_FACTORIES.map(\n (definition) => definition.kind,\n ),\n )\n for (const adapter of listBundledConnectorAdapters()) {\n ids.add(adapter.manifest.kind)\n }\n return [...ids].sort()\n}\n\nexport function listTangleIntegrationCatalogEntries(): TangleIntegrationCatalogEntry[] {\n return listActivepiecesCatalogEntries().map((entry) => sanitizeEntry(entry))\n}\n\nexport function listTangleIntegrationContracts(): TangleIntegrationContract[] {\n const nativeAdapterIds = new Set(listTangleNativeAdapterIds().map(canonicalIntegrationKind))\n return listActivepiecesCatalogEntries().map((entry) => {\n const nativeAdapter = nativeAdapterIds.has(canonicalIntegrationKind(entry.id))\n return {\n id: entry.id,\n title: entry.title,\n description: entry.description,\n category: entry.category,\n auth: entry.auth,\n authFields: entry.authFields ?? [],\n actions: entry.actions.map((action) => ({\n id: action.id,\n title: action.title,\n risk: action.risk,\n upstreamName: action.upstreamName ?? action.id,\n })),\n triggers: entry.triggers.map((trigger) => ({\n id: trigger.id,\n title: trigger.title,\n upstreamName: trigger.upstreamName ?? trigger.id,\n })),\n implementation: {\n kind: nativeAdapter ? 'native_adapter' : 'package_runtime',\n runtimePackage: entry.npmPackage,\n version: entry.version,\n },\n status: nativeAdapter ? 'native_backed' : entry.npmPackage ? 'runtime_backed' : 'contract_ready',\n quality: {\n tangleContract: true,\n authFieldsMapped: entry.auth === 'none' || Boolean(entry.authFields?.length),\n actionNamesMapped: entry.actions.every((action) => Boolean(action.upstreamName)),\n triggerNamesMapped: entry.triggers.every((trigger) => Boolean(trigger.upstreamName)),\n runtimePackageMapped: Boolean(entry.npmPackage),\n nativeAdapter,\n },\n }\n })\n}\n\nexport function listTangleIntegrationCatalogRuntimePackages(): Array<{\n connectorId: string\n packageName: string\n version?: string\n}> {\n const nativeAdapterIds = new Set(listTangleNativeAdapterIds())\n return listActivepiecesCatalogEntries()\n .filter((entry): entry is ActivepiecesCatalogEntry & { npmPackage: string } =>\n Boolean(entry.npmPackage) && !nativeAdapterIds.has(entry.id))\n .map((entry) => ({\n connectorId: entry.id,\n packageName: entry.npmPackage,\n version: entry.version,\n }))\n}\n\nexport function buildTangleCatalogRuntimePackageManifest(\n options: TangleCatalogRuntimePackageManifestOptions = {},\n): TangleCatalogRuntimePackageManifest {\n const dependencies: Record<string, string> = {}\n if (options.includeAgentIntegrationsPackage ?? true) {\n dependencies['@tangle-network/agent-integrations'] = options.agentIntegrationsVersion ?? 'latest'\n }\n for (const pkg of listTangleIntegrationCatalogRuntimePackages()) {\n dependencies[pkg.packageName] = pkg.version ?? 'latest'\n }\n Object.assign(dependencies, options.additionalDependencies)\n return {\n name: options.name ?? '@tangle-network/agent-integrations-runtime-bundle',\n private: true,\n type: 'module',\n dependencies: Object.fromEntries(Object.entries(dependencies).sort(([a], [b]) => a.localeCompare(b))),\n tangle: {\n integrationContracts: listTangleIntegrationContracts().length,\n packageRuntimeBackends: listTangleIntegrationContracts()\n .filter((contract) => contract.implementation.kind === 'package_runtime').length,\n generatedFrom: TANGLE_INTEGRATIONS_CATALOG_SOURCE,\n },\n }\n}\n\nexport function renderTangleCatalogRuntimePnpmAddCommand(options: {\n includeAgentIntegrationsPackage?: boolean\n agentIntegrationsVersion?: string\n} = {}): string {\n const manifest = buildTangleCatalogRuntimePackageManifest({\n includeAgentIntegrationsPackage: options.includeAgentIntegrationsPackage,\n agentIntegrationsVersion: options.agentIntegrationsVersion,\n })\n return [\n 'pnpm',\n 'add',\n ...Object.entries(manifest.dependencies).map(([name, version]) => `${name}@${version}`),\n ].join(' ')\n}\n\nexport function buildTangleIntegrationCatalogConnectors(options: {\n providerId?: string\n includeCatalogActions?: boolean\n executable?: boolean\n} = {}): IntegrationConnector[] {\n const providerId = options.providerId ?? TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID\n return buildActivepiecesConnectors({\n ...options,\n providerId,\n }).map((connector) => sanitizeConnector(connector, providerId))\n}\n\nexport function createTangleCatalogExecutorProvider(options: TangleCatalogExecutorProviderOptions) {\n const providerId = options.id ?? TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID\n const connectors = options.connectors ?? buildTangleIntegrationCatalogConnectors({\n providerId,\n includeCatalogActions: true,\n executable: true,\n })\n const byEntry = new Map(listActivepiecesCatalogEntries().map((entry) => [entry.id, entry]))\n\n return createCatalogExecutorProvider({\n id: providerId,\n kind: 'tangle_catalog',\n connectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n executeAction: async ({ connection, request, connector, action }) => {\n const importedEntry = byEntry.get(connector.id)\n if (!importedEntry) {\n throw new IntegrationError(`Tangle catalog entry ${connector.id} not found.`, 'connector_not_found')\n }\n const catalogAction = importedEntry.actions.find((candidate) => candidate.id === action.id)\n return options.executeAction({\n connection,\n request,\n connector,\n catalogEntry: sanitizeEntry(importedEntry),\n piece: {\n id: importedEntry.id,\n packageName: importedEntry.npmPackage,\n version: importedEntry.version,\n actionId: action.id,\n upstreamActionName: catalogAction?.upstreamName,\n },\n })\n },\n subscribeTrigger: options.subscribeTrigger\n ? async (connection, trigger, targetUrl) => {\n const connector = connectors.find((candidate) => candidate.id === connection.connectorId)\n const importedEntry = byEntry.get(connection.connectorId)\n if (!connector || !importedEntry) {\n throw new IntegrationError(`Tangle catalog entry ${connection.connectorId} not found.`, 'connector_not_found')\n }\n const catalogTrigger = importedEntry.triggers.find((candidate) => candidate.id === trigger.id)\n return options.subscribeTrigger!({\n connection,\n connector,\n catalogEntry: sanitizeEntry(importedEntry),\n trigger,\n targetUrl,\n piece: {\n id: importedEntry.id,\n packageName: importedEntry.npmPackage,\n version: importedEntry.version,\n triggerId: trigger.id,\n upstreamTriggerName: catalogTrigger?.upstreamName,\n },\n })\n }\n : undefined,\n unsubscribeTrigger: options.unsubscribeTrigger,\n normalizeTriggerEvent: options.normalizeTriggerEvent,\n })\n}\n\nexport const extractExternalCatalogPublicCount = extractActivepiecesPublicPieceCount\n\nexport async function auditTangleIntegrationCatalogFreshness(\n options: TangleIntegrationCatalogFreshnessOptions = {},\n): Promise<TangleIntegrationCatalogFreshnessResult> {\n const result = await auditIntegrationCatalogFreshness(options)\n return {\n ok: result.ok,\n generatedAt: result.generatedAt,\n local: {\n catalogEntries: result.local.activepiecesEntries,\n catalogConnectors: result.local.activepiecesConnectors,\n catalogActions: result.local.activepiecesActions,\n catalogTriggers: result.local.activepiecesTriggers,\n executableCatalogConnectors: result.local.executableActivepiecesConnectors,\n executableCatalogActions: result.local.executableActivepiecesActions,\n executableCatalogTriggers: result.local.executableActivepiecesTriggers,\n executableToolDefinitions: result.local.executableToolDefinitions,\n unsupportedExecutableConnectorIds: result.local.unsupportedExecutableConnectorIds,\n registryEntries: result.local.registryEntries,\n registrySummary: result.local.registrySummary,\n conflictSamples: result.local.conflictSamples,\n },\n upstream: result.upstream\n ? {\n externalEntries: result.upstream.activepiecesPieces,\n externalDelta: result.upstream.activepiecesDelta,\n checkedUrl: result.upstream.checkedUrl,\n warning: result.upstream.warning,\n }\n : undefined,\n warnings: result.warnings.map((warning) => warning.replaceAll('Activepieces', 'Tangle Integrations Catalog')),\n }\n}\n\nfunction sanitizeEntry(entry: ActivepiecesCatalogEntry): TangleIntegrationCatalogEntry {\n return {\n id: entry.id,\n title: entry.title,\n description: entry.description,\n category: entry.category,\n auth: entry.auth,\n authFields: entry.authFields,\n domains: entry.domains.filter((domain) => !domain.toLowerCase().includes('activepieces')),\n actions: entry.actions.map((action) => ({\n id: action.id,\n title: action.title,\n risk: action.risk,\n upstreamName: action.upstreamName,\n })),\n triggers: entry.triggers.map((trigger) => ({\n id: trigger.id,\n title: trigger.title,\n upstreamName: trigger.upstreamName,\n })),\n }\n}\n\nfunction sanitizeConnector(connector: IntegrationConnector, providerId: string): IntegrationConnector {\n const metadata = connector.metadata ?? {}\n return {\n ...connector,\n providerId,\n metadata: {\n source: TANGLE_INTEGRATIONS_CATALOG_SOURCE,\n providerId,\n executable: metadata.executable,\n runtime: 'native-adapter-backlog',\n catalogOnly: metadata.catalogOnly,\n supportTier: metadata.supportTier,\n catalogActionCount: metadata.catalogActionCount,\n catalogTriggerCount: metadata.catalogTriggerCount,\n license: metadata.license,\n version: metadata.version,\n domains: Array.isArray(metadata.domains)\n ? metadata.domains.filter((domain) => typeof domain === 'string' && !domain.toLowerCase().includes('activepieces'))\n : undefined,\n ...(metadata.overridden ? { overridden: true } : {}),\n },\n }\n}\n","import type {\n IntegrationActor,\n IntegrationTriggerEvent,\n IntegrationTriggerSubscription,\n} from './index.js'\nimport {\n type IntegrationGrant,\n type IntegrationGrantStore,\n type IntegrationManifest,\n type IntegrationRuntime,\n} from './runtime.js'\n\nexport interface IntegrationWorkflowDefinition {\n id: string\n title?: string\n manifest: IntegrationManifest\n trigger: {\n requirementId: string\n triggerId: string\n targetUrl?: string\n }\n metadata?: Record<string, unknown>\n}\n\nexport interface InstalledIntegrationWorkflow {\n id: string\n workflowId: string\n manifestId: string\n owner: IntegrationActor\n grantee: IntegrationActor\n triggerGrantId: string\n subscription: IntegrationTriggerSubscription\n status: 'active' | 'paused' | 'error'\n createdAt: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationWorkflowStore {\n put(workflow: InstalledIntegrationWorkflow): Promise<void> | void\n get(id: string): Promise<InstalledIntegrationWorkflow | undefined> | InstalledIntegrationWorkflow | undefined\n list(): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[]\n listByWorkflow(workflowId: string): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[]\n listByOwner(owner: IntegrationActor): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[]\n}\n\nexport interface IntegrationWorkflowRuntimeHub {\n subscribeTrigger(connectionId: string, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription\n}\n\nexport interface IntegrationWorkflowRuntimeOptions {\n runtime: IntegrationRuntime\n hub: IntegrationWorkflowRuntimeHub\n grants: IntegrationGrantStore\n store?: IntegrationWorkflowStore\n now?: () => Date\n}\n\nexport class InMemoryIntegrationWorkflowStore implements IntegrationWorkflowStore {\n private readonly workflows = new Map<string, InstalledIntegrationWorkflow>()\n\n put(workflow: InstalledIntegrationWorkflow): void {\n this.workflows.set(workflow.id, workflow)\n }\n\n get(id: string): InstalledIntegrationWorkflow | undefined {\n return this.workflows.get(id)\n }\n\n list(): InstalledIntegrationWorkflow[] {\n return [...this.workflows.values()]\n }\n\n listByWorkflow(workflowId: string): InstalledIntegrationWorkflow[] {\n return [...this.workflows.values()].filter((workflow) => workflow.workflowId === workflowId)\n }\n\n listByOwner(owner: IntegrationActor): InstalledIntegrationWorkflow[] {\n return [...this.workflows.values()].filter((workflow) => sameActor(workflow.owner, owner))\n }\n}\n\nexport class IntegrationWorkflowRuntime {\n private readonly runtime: IntegrationRuntime\n private readonly hub: IntegrationWorkflowRuntimeHub\n private readonly grants: IntegrationGrantStore\n private readonly store: IntegrationWorkflowStore\n private readonly now: () => Date\n\n constructor(options: IntegrationWorkflowRuntimeOptions) {\n this.runtime = options.runtime\n this.hub = options.hub\n this.grants = options.grants\n this.store = options.store ?? new InMemoryIntegrationWorkflowStore()\n this.now = options.now ?? (() => new Date())\n }\n\n async install(input: {\n workflow: IntegrationWorkflowDefinition\n owner: IntegrationActor\n grantee: IntegrationActor\n }): Promise<InstalledIntegrationWorkflow> {\n const grants = await this.runtime.createGrants({\n manifest: input.workflow.manifest,\n owner: input.owner,\n grantee: input.grantee,\n metadata: { workflowId: input.workflow.id },\n })\n const triggerGrant = findTriggerGrant(grants, input.workflow.trigger.requirementId, input.workflow.trigger.triggerId)\n const subscription = await this.hub.subscribeTrigger(\n triggerGrant.connectionId,\n input.workflow.trigger.triggerId,\n input.workflow.trigger.targetUrl,\n )\n const installed: InstalledIntegrationWorkflow = {\n id: `workflow_${input.workflow.id}_${triggerGrant.id}`,\n workflowId: input.workflow.id,\n manifestId: input.workflow.manifest.id,\n owner: input.owner,\n grantee: input.grantee,\n triggerGrantId: triggerGrant.id,\n subscription,\n status: 'active',\n createdAt: this.now().toISOString(),\n metadata: input.workflow.metadata,\n }\n await this.store.put(installed)\n return installed\n }\n\n async dispatchEvent<T = unknown>(\n event: IntegrationTriggerEvent<T>,\n handler: (input: { event: IntegrationTriggerEvent<T>; workflows: InstalledIntegrationWorkflow[] }) => Promise<void> | void,\n ): Promise<{ matched: InstalledIntegrationWorkflow[] }> {\n // A workflow outlives its installation-time grant. Recheck the current\n // grant before routing a new event; an active subscription is not authority.\n // This assumes verified ingress. Deferred effects must recheck authority\n // again at execution time rather than treating this snapshot as a lease.\n const candidates = (await this.store.list()).filter((workflow) =>\n workflow.status === 'active'\n && workflow.subscription.status === 'active'\n && workflow.subscription.connectionId === event.connectionId\n && workflow.subscription.trigger === event.trigger\n )\n // One batched read keeps webhook latency flat as a trigger fans out to\n // many workflows backed by a remote grant store.\n const grantIds = [...new Set(candidates.map((workflow) => workflow.triggerGrantId))]\n const grants = grantIds.length === 0\n ? []\n : this.grants.listByIds\n ? await this.grants.listByIds(grantIds)\n : await Promise.all(grantIds.map((grantId) => this.grants.get(grantId)))\n const grantsById = new Map(\n grants\n .filter((grant): grant is IntegrationGrant => Boolean(grant))\n .map((grant) => [grant.id, grant]),\n )\n const workflows = candidates.filter((workflow) => {\n const grant = grantsById.get(workflow.triggerGrantId)\n if (!grant) return false\n return grant.status === 'active'\n && grant.manifestId === workflow.manifestId\n && sameActor(grant.owner, workflow.owner)\n && sameActor(grant.grantee, workflow.grantee)\n && grant.connectionId === event.connectionId\n && grant.connectorId === event.connectorId\n && grant.allowedTriggers.includes(event.trigger)\n })\n await handler({ event, workflows })\n return { matched: workflows }\n }\n}\n\nexport function createIntegrationWorkflowRuntime(options: IntegrationWorkflowRuntimeOptions): IntegrationWorkflowRuntime {\n return new IntegrationWorkflowRuntime(options)\n}\n\nfunction findTriggerGrant(grants: IntegrationGrant[], requirementId: string, triggerId: string): IntegrationGrant {\n const grant = grants.find((candidate) =>\n candidate.requirementId === requirementId && candidate.allowedTriggers.includes(triggerId)\n )\n if (!grant) throw new Error(`Missing trigger grant ${requirementId}/${triggerId}.`)\n return grant\n}\n\nfunction sameActor(a: IntegrationActor, b: IntegrationActor): boolean {\n return a.type === b.type && a.id === b.id\n}\n","import { IntegrationError } from './core-error.js'\nimport type {\n CompleteAuthRequest,\n HttpIntegrationProviderOptions,\n IntegrationActionGuard,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationActor,\n IntegrationCapability,\n IntegrationConnection,\n IntegrationConnectionStore,\n IntegrationConnector,\n IntegrationHubOptions,\n IntegrationPolicyEngine,\n IntegrationProvider,\n IntegrationTriggerEvent,\n IntegrationTriggerSubscription,\n InvokeWithCapabilityRequest,\n IssueCapabilityRequest,\n IssuedIntegrationCapability,\n StartAuthRequest,\n StartAuthResult,\n} from './core-types.js'\n\nexport * from './core-types.js'\nexport * from './core-error.js'\nexport * from './audit.js'\nexport * from './approval.js'\nexport * from './actions.js'\nexport * from './bridge.js'\nexport * from './billing-access-policy.js'\nexport * from './idempotency.js'\nexport * from './apps.js'\nexport * from './client.js'\nexport * from './consumer.js'\nexport * from './consent.js'\nexport * from './credentials.js'\nexport * from './discovery.js'\nexport * from './errors.js'\nexport * from './events.js'\nexport * from './guard.js'\nexport * from './healthcheck.js'\nexport * from './manifest.js'\nexport * from './passthrough.js'\nexport * from './presets.js'\nexport * from './connect/index.js'\nexport * from './middleware/index.js'\n\nexport class InMemoryConnectionStore implements IntegrationConnectionStore {\n private readonly connections = new Map<string, IntegrationConnection>()\n\n get(connectionId: string): IntegrationConnection | undefined {\n return this.connections.get(connectionId)\n }\n\n put(connection: IntegrationConnection): void {\n this.connections.set(connection.id, connection)\n }\n\n listByOwner(owner: IntegrationActor): IntegrationConnection[] {\n return [...this.connections.values()].filter((connection) =>\n connection.owner.type === owner.type && connection.owner.id === owner.id,\n )\n }\n\n delete(connectionId: string): void {\n this.connections.delete(connectionId)\n }\n}\n\n\nexport function sanitizeConnection(connection: IntegrationConnection): Record<string, unknown> {\n return {\n id: connection.id,\n owner: connection.owner,\n providerId: connection.providerId,\n connectorId: connection.connectorId,\n status: connection.status,\n grantedScopes: connection.grantedScopes,\n account: connection.account,\n hasSecretRef: Boolean(connection.secretRef),\n createdAt: connection.createdAt,\n updatedAt: connection.updatedAt,\n expiresAt: connection.expiresAt,\n lastUsedAt: connection.lastUsedAt,\n }\n}\n\nexport function createMockIntegrationProvider(options: {\n id?: string\n connectors?: IntegrationConnector[]\n onInvoke?: (connection: IntegrationConnection, request: IntegrationActionRequest) => IntegrationActionResult | Promise<IntegrationActionResult>\n} = {}): IntegrationProvider {\n const providerId = options.id ?? 'mock'\n const connectors = options.connectors ?? [{\n id: 'gmail',\n providerId,\n title: 'Gmail',\n category: 'email',\n auth: 'oauth2',\n scopes: ['email.read', 'email.write'],\n actions: [\n { id: 'messages.search', title: 'Search messages', risk: 'read', requiredScopes: ['email.read'], dataClass: 'private' },\n { id: 'drafts.create', title: 'Create draft', risk: 'write', requiredScopes: ['email.write'], dataClass: 'private', approvalRequired: true },\n ],\n triggers: [\n { id: 'message.received', title: 'Message received', requiredScopes: ['email.read'], dataClass: 'private' },\n ],\n }]\n return {\n id: providerId,\n kind: 'custom',\n listConnectors: () => connectors,\n startAuth: (request) => ({\n providerId,\n connectorId: request.connectorId,\n authUrl: `https://auth.example.test/${request.connectorId}?state=${encodeURIComponent(request.state ?? 'state')}`,\n state: request.state ?? 'state',\n }),\n completeAuth: (request) => ({\n id: `conn_${request.connectorId}_${request.owner.id}`,\n owner: request.owner,\n providerId,\n connectorId: request.connectorId,\n status: 'active',\n grantedScopes: connectors.find((connector) => connector.id === request.connectorId)?.scopes ?? [],\n secretRef: { provider: providerId, id: `secret_${request.owner.id}` },\n createdAt: new Date(0).toISOString(),\n updatedAt: new Date(0).toISOString(),\n }),\n invokeAction: async (connection, request) => options.onInvoke?.(connection, request) ?? ({\n ok: true,\n action: request.action,\n output: { echo: request.input ?? null },\n }),\n subscribeTrigger: (connection, trigger, targetUrl) => ({\n id: `sub_${connection.id}_${trigger}`,\n connectionId: connection.id,\n trigger,\n targetUrl,\n status: 'active',\n createdAt: new Date(0).toISOString(),\n }),\n }\n}\n\nexport function createHttpIntegrationProvider(options: HttpIntegrationProviderOptions): IntegrationProvider {\n const fetcher = options.fetchImpl ?? fetch\n const baseUrl = options.baseUrl.replace(/\\/$/, '')\n return {\n id: options.id,\n kind: options.kind ?? 'custom',\n listConnectors: () => options.connectors,\n async startAuth(request) {\n const response = await postJson<StartAuthResult>(fetcher, `${baseUrl}/auth/start`, request, options.bearer)\n return response\n },\n async completeAuth(request) {\n const response = await postJson<IntegrationConnection>(fetcher, `${baseUrl}/auth/complete`, request, options.bearer)\n return response\n },\n async invokeAction(connection, request) {\n return postJson<IntegrationActionResult>(fetcher, `${baseUrl}/actions/invoke`, {\n connection,\n request,\n }, options.bearer)\n },\n async subscribeTrigger(connection, trigger, targetUrl) {\n return postJson<IntegrationTriggerSubscription>(fetcher, `${baseUrl}/triggers/subscribe`, {\n connection,\n trigger,\n targetUrl,\n }, options.bearer)\n },\n async unsubscribeTrigger(subscriptionId) {\n await postJson(fetcher, `${baseUrl}/triggers/unsubscribe`, { subscriptionId }, options.bearer)\n },\n async normalizeTriggerEvent(raw) {\n return postJson<IntegrationTriggerEvent>(fetcher, `${baseUrl}/triggers/normalize`, { raw }, options.bearer)\n },\n }\n}\n\n\nasync function postJson<T = unknown>(\n fetcher: typeof fetch,\n url: string,\n body: unknown,\n bearer?: string,\n): Promise<T> {\n const response = await fetcher(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(bearer ? { Authorization: `Bearer ${bearer}` } : {}),\n },\n body: JSON.stringify(body),\n })\n if (!response.ok) throw new IntegrationError(`Integration provider returned HTTP ${response.status}.`, 'provider_not_found')\n return response.json() as Promise<T>\n}\n\n\n\n// ─── Connectors namespace ───────────────────────────────────────────────\n//\n// Lower-level adapter primitives — the contract a concrete first-party\n// integration (Google Calendar, HubSpot, Stripe, ...) implements. The\n// hub-side `IntegrationProvider` interface is the *catalog* facade above\n// these; one provider can wrap many connectors. See `src/connectors/types.ts`\n// for the layering details.\nexport { IntegrationHub, signCapability, verifyCapabilityToken } from './hub.js'\nexport * from './connectors/index.js'\nexport * from './catalog.js'\nexport * from './catalog-executor.js'\nexport * from './policy.js'\nexport * from './sandbox.js'\nexport * from './adapter-provider.js'\nexport * from './importers.js'\nexport * from './gateway-catalog.js'\nexport * from './activepieces-catalog.js'\nexport * from './activepieces-overrides.js'\nexport * from './activepieces-provider.js'\nexport * from './tangle-catalog.js'\nexport * from './catalog-freshness.js'\nexport * from './registry.js'\nexport * from './runtime.js'\nexport * from './workflow.js'\nexport * from './coverage-catalog.js'\nexport * from './integration-kind-aliases.js'\nexport * from './specs/index.js'\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,IAAa,mCAAb,MAAkF;CAChF,0BAA2B,IAAI,IAAuC;CAEtE,IAAI,YAA2D;EAC7D,OAAO,KAAK,QAAQ,IAAI,UAAU;CACpC;CAEA,IAAI,QAAyC;EAC3C,KAAK,QAAQ,IAAI,OAAO,IAAI,MAAM;CACpC;CAEA,KAAK,SAAoC,CAAC,GAAgC;EACxE,OAAO,CAAC,GAAG,KAAK,QAAQ,OAAO,CAAC,CAAC,CAAC,QAAQ,WAAW,cAAc,QAAQ,MAAM,CAAC;CACpF;AACF;AAEA,IAAa,6BAAb,MAA2E;CACzE;CACA;CACA;CACA;CACA;CAEA,YAAY,SAAsC;EAChD,KAAK,OAA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AAE,eAAe,UAAU,SAAS,IAAI,CAAC;EACxD;EACA,MAAM,KAAK,UAAU,IAAI;CAC3B,CAAC;CACD,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,iBAAiB,sCAAsC,SAAS,OAAO,IAAI,oBAAoB;CAC3H,OAAO,SAAS,KAAK;AACvB"}
1
+ {"version":3,"file":"src-CQjtO44Z.js","names":["unique","toTrigger","unique","titleFromId","unique","catalogData"],"sources":["../src/approval.ts","../src/actions.ts","../src/bridge.ts","../src/apps.ts","../src/client.ts","../src/consent.ts","../src/discovery.ts","../src/events.ts","../src/healthcheck.ts","../src/manifest.ts","../src/passthrough.ts","../src/presets.ts","../src/catalog-executor.ts","../src/importers.ts","../src/gateway-catalog.ts","../src/activepieces-overrides.ts","../data/activepieces-catalog.json","../src/activepieces-catalog.ts","../src/activepieces-provider.ts","../src/registry.ts","../src/catalog-freshness.ts","../src/tangle-catalog.ts","../src/workflow.ts","../src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport type {\n IntegrationActor,\n IntegrationApprovalRequest,\n IntegrationGuardContext,\n IntegrationPolicyDecision,\n IntegrationPolicyEngine,\n} from './index.js'\nimport type { IntegrationAuditSink } from './audit.js'\nimport { createIntegrationAuditEvent } from './audit.js'\n\nexport type IntegrationApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired'\n\nexport interface IntegrationApprovalRecord {\n id: string\n request: IntegrationApprovalRequest\n status: IntegrationApprovalStatus\n requestedAt: string\n resolvedAt?: string\n resolvedBy?: IntegrationActor\n reason?: string\n expiresAt?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationApprovalStore {\n get(approvalId: string): Promise<IntegrationApprovalRecord | undefined> | IntegrationApprovalRecord | undefined\n put(record: IntegrationApprovalRecord): Promise<void> | void\n list(filter?: IntegrationApprovalFilter): Promise<IntegrationApprovalRecord[]> | IntegrationApprovalRecord[]\n}\n\nexport interface IntegrationApprovalFilter {\n status?: IntegrationApprovalStatus\n connectionId?: string\n connectorId?: string\n action?: string\n actor?: IntegrationActor\n}\n\nexport interface ApprovalBackedPolicyOptions {\n base: IntegrationPolicyEngine\n store: IntegrationApprovalStore\n audit?: IntegrationAuditSink\n now?: () => Date\n approvalTtlMs?: number\n}\n\nexport class InMemoryIntegrationApprovalStore implements IntegrationApprovalStore {\n private readonly records = new Map<string, IntegrationApprovalRecord>()\n\n get(approvalId: string): IntegrationApprovalRecord | undefined {\n return this.records.get(approvalId)\n }\n\n put(record: IntegrationApprovalRecord): void {\n this.records.set(record.id, record)\n }\n\n list(filter: IntegrationApprovalFilter = {}): IntegrationApprovalRecord[] {\n return [...this.records.values()].filter((record) => matchesFilter(record, filter))\n }\n}\n\nexport class ApprovalBackedPolicyEngine implements IntegrationPolicyEngine {\n private readonly base: IntegrationPolicyEngine\n private readonly store: IntegrationApprovalStore\n private readonly audit: IntegrationAuditSink | undefined\n private readonly now: () => Date\n private readonly approvalTtlMs: number | undefined\n\n constructor(options: ApprovalBackedPolicyOptions) {\n this.base = options.base\n this.store = options.store\n this.audit = options.audit\n this.now = options.now ?? (() => new Date())\n this.approvalTtlMs = options.approvalTtlMs\n }\n\n async decide(ctx: IntegrationGuardContext & { subject: IntegrationActor }): Promise<IntegrationPolicyDecision> {\n const approved = await this.findApprovedRecord(ctx)\n if (approved) return { decision: 'allow', reason: `Approved by ${approved.resolvedBy?.type ?? 'actor'} ${approved.resolvedBy?.id ?? 'unknown'}.`, metadata: { approvalId: approved.id } }\n\n const decision = await this.base.decide(ctx)\n if (decision.decision !== 'require_approval') return decision\n\n const requestedAt = decision.approval.requestedAt\n const expiresAt = this.approvalTtlMs ? new Date(Date.parse(requestedAt) + this.approvalTtlMs).toISOString() : undefined\n const record: IntegrationApprovalRecord = {\n id: decision.approval.id,\n request: decision.approval,\n status: 'pending',\n requestedAt,\n expiresAt,\n metadata: { ...(decision.metadata ?? {}), inputHash: approvalInputHash(ctx.request.input) },\n }\n await this.store.put(record)\n await this.audit?.record(createIntegrationAuditEvent({\n type: 'approval.requested',\n actor: ctx.subject,\n connectionId: ctx.connection.id,\n providerId: ctx.connection.providerId,\n connectorId: ctx.connection.connectorId,\n action: ctx.request.action,\n risk: ctx.action?.risk,\n dataClass: ctx.action?.dataClass,\n message: decision.reason,\n metadata: { approvalId: record.id },\n now: this.now,\n }))\n return decision\n }\n\n private async findApprovedRecord(ctx: IntegrationGuardContext & { subject: IntegrationActor }): Promise<IntegrationApprovalRecord | undefined> {\n const approvalId = typeof ctx.request.metadata?.approvalId === 'string' ? ctx.request.metadata.approvalId : undefined\n if (!approvalId) return undefined\n const record = await this.store.get(approvalId)\n if (!record || record.status !== 'approved') return undefined\n if (record.expiresAt && Date.parse(record.expiresAt) <= this.now().getTime()) {\n await this.store.put({ ...record, status: 'expired' })\n return undefined\n }\n if (!approvalMatches(record, ctx)) return undefined\n return record\n }\n}\n\nexport function createApprovalBackedPolicyEngine(options: ApprovalBackedPolicyOptions): ApprovalBackedPolicyEngine {\n return new ApprovalBackedPolicyEngine(options)\n}\n\nexport async function resolveIntegrationApproval(input: {\n store: IntegrationApprovalStore\n approvalId: string\n approved: boolean\n resolvedBy: IntegrationActor\n reason?: string\n metadata?: Record<string, unknown>\n audit?: IntegrationAuditSink\n now?: () => Date\n}): Promise<IntegrationApprovalRecord> {\n const record = await input.store.get(input.approvalId)\n if (!record) throw new Error(`Approval ${input.approvalId} not found.`)\n const now = input.now ?? (() => new Date())\n const next: IntegrationApprovalRecord = {\n ...record,\n status: input.approved ? 'approved' : 'denied',\n resolvedAt: now().toISOString(),\n resolvedBy: input.resolvedBy,\n reason: input.reason,\n metadata: { ...(record.metadata ?? {}), ...(input.metadata ?? {}) },\n }\n await input.store.put(next)\n await input.audit?.record(createIntegrationAuditEvent({\n type: 'approval.resolved',\n actor: input.resolvedBy,\n connectionId: record.request.connectionId,\n providerId: record.request.providerId,\n connectorId: record.request.connectorId,\n action: record.request.action,\n risk: record.request.risk,\n dataClass: record.request.dataClass,\n ok: input.approved,\n message: input.reason,\n metadata: { approvalId: record.id, status: next.status },\n now,\n }))\n return next\n}\n\nfunction approvalMatches(record: IntegrationApprovalRecord, ctx: IntegrationGuardContext & { subject: IntegrationActor }): boolean {\n return record.request.connectionId === ctx.connection.id\n && record.request.providerId === ctx.connection.providerId\n && record.request.connectorId === ctx.connection.connectorId\n && record.request.action === ctx.request.action\n && record.request.actor.type === ctx.subject.type\n && record.request.actor.id === ctx.subject.id\n && record.metadata?.inputHash === approvalInputHash(ctx.request.input)\n}\n\nfunction matchesFilter(record: IntegrationApprovalRecord, filter: IntegrationApprovalFilter): boolean {\n if (filter.status && record.status !== filter.status) return false\n if (filter.connectionId && record.request.connectionId !== filter.connectionId) return false\n if (filter.connectorId && record.request.connectorId !== filter.connectorId) return false\n if (filter.action && record.request.action !== filter.action) return false\n if (filter.actor && (record.request.actor.type !== filter.actor.type || record.request.actor.id !== filter.actor.id)) return false\n return true\n}\n\nfunction approvalInputHash(input: unknown): string {\n return createHash('sha256').update(JSON.stringify(input ?? null)).digest('base64url')\n}\n","import type {\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorTrigger,\n} from './index.js'\n\nexport const CANONICAL_INTEGRATION_ACTIONS = {\n googleCalendarEventsList: 'google-calendar.events.list',\n googleCalendarEventsCreate: 'google-calendar.events.create',\n gmailMessagesSearch: 'gmail.messages.search',\n gmailMessagesSend: 'gmail.messages.send',\n googleDriveFilesSearch: 'google-drive.files.search',\n googleDriveFilesRead: 'google-drive.files.read',\n githubRepositoriesGet: 'github.repositories.get',\n githubIssuesSearch: 'github.issues.search',\n githubIssuesCreate: 'github.issues.create',\n githubPullRequestsComment: 'github.pull-requests.comment',\n slackChannelsList: 'slack.channels.list',\n slackMessagesSearch: 'slack.messages.search',\n slackMessagesPost: 'slack.messages.post',\n providerHttpRequest: 'provider.http.request',\n} as const\n\nexport type CanonicalIntegrationActionId =\n typeof CANONICAL_INTEGRATION_ACTIONS[keyof typeof CANONICAL_INTEGRATION_ACTIONS]\n\nexport interface CanonicalLaunchConnectorOptions {\n providerId?: string\n includeProviderPassthrough?: boolean\n}\n\nexport function buildCanonicalLaunchConnectors(options: CanonicalLaunchConnectorOptions = {}): IntegrationConnector[] {\n const providerId = options.providerId ?? 'tangle-platform'\n const connectors = [\n googleCalendarConnector(providerId),\n gmailConnector(providerId),\n googleDriveConnector(providerId),\n githubConnector(providerId),\n slackConnector(providerId),\n ]\n if (!options.includeProviderPassthrough) return connectors\n return connectors.map((connector) => ({\n ...connector,\n actions: [...connector.actions, providerPassthroughAction(connector.id)],\n }))\n}\n\nexport function canonicalActionConnectorId(actionId: string): string | undefined {\n if (actionId.startsWith('google-calendar.')) return 'google-calendar'\n if (actionId.startsWith('gmail.')) return 'gmail'\n if (actionId.startsWith('google-drive.')) return 'google-drive'\n if (actionId.startsWith('github.')) return 'github'\n if (actionId.startsWith('slack.')) return 'slack'\n if (actionId === CANONICAL_INTEGRATION_ACTIONS.providerHttpRequest) return undefined\n return actionId.split('.')[0]\n}\n\nfunction googleCalendarConnector(providerId: string): IntegrationConnector {\n return {\n id: 'google-calendar',\n providerId,\n title: 'Google Calendar',\n category: 'calendar',\n auth: 'oauth2',\n scopes: ['https://www.googleapis.com/auth/calendar.readonly', 'https://www.googleapis.com/auth/calendar.events'],\n actions: [\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleCalendarEventsList,\n title: 'List calendar events',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/calendar.readonly'],\n dataClass: 'private',\n description: 'Read events from a Google Calendar over a bounded time range.',\n inputSchema: objectSchema({\n calendarId: { type: 'string', default: 'primary' },\n timeMin: { type: 'string', description: 'RFC3339 lower bound.' },\n timeMax: { type: 'string', description: 'RFC3339 upper bound.' },\n }, ['timeMin', 'timeMax']),\n },\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleCalendarEventsCreate,\n title: 'Create calendar event',\n risk: 'write',\n requiredScopes: ['https://www.googleapis.com/auth/calendar.events'],\n dataClass: 'private',\n approvalRequired: true,\n description: 'Create an event on a Google Calendar after user approval.',\n inputSchema: objectSchema({\n calendarId: { type: 'string', default: 'primary' },\n start: { type: 'string', description: 'RFC3339 start time.' },\n end: { type: 'string', description: 'RFC3339 end time.' },\n summary: { type: 'string' },\n description: { type: 'string' },\n attendees: { type: 'array', items: { type: 'string' } },\n }, ['start', 'end', 'summary']),\n },\n ],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction gmailConnector(providerId: string): IntegrationConnector {\n return {\n id: 'gmail',\n providerId,\n title: 'Gmail',\n category: 'email',\n auth: 'oauth2',\n scopes: ['https://www.googleapis.com/auth/gmail.readonly', 'https://www.googleapis.com/auth/gmail.send'],\n actions: [\n {\n id: CANONICAL_INTEGRATION_ACTIONS.gmailMessagesSearch,\n title: 'Search Gmail messages',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/gmail.readonly'],\n dataClass: 'private',\n description: 'Search user Gmail messages and return bounded message metadata/snippets.',\n inputSchema: objectSchema({ query: { type: 'string' }, maxResults: { type: 'integer', minimum: 1, maximum: 50 } }, ['query']),\n },\n {\n id: CANONICAL_INTEGRATION_ACTIONS.gmailMessagesSend,\n title: 'Send Gmail message',\n risk: 'write',\n requiredScopes: ['https://www.googleapis.com/auth/gmail.send'],\n dataClass: 'private',\n approvalRequired: true,\n description: 'Send an email from the user account after approval.',\n inputSchema: objectSchema({\n to: { type: 'array', items: { type: 'string' } },\n subject: { type: 'string' },\n body: { type: 'string' },\n }, ['to', 'subject', 'body']),\n },\n ],\n triggers: [{\n id: 'gmail.messages.received',\n title: 'Gmail message received',\n requiredScopes: ['https://www.googleapis.com/auth/gmail.readonly'],\n dataClass: 'private',\n description: 'Triggered when a new matching Gmail message is received.',\n }],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction googleDriveConnector(providerId: string): IntegrationConnector {\n return {\n id: 'google-drive',\n providerId,\n title: 'Google Drive',\n category: 'storage',\n auth: 'oauth2',\n scopes: ['https://www.googleapis.com/auth/drive.readonly', 'https://www.googleapis.com/auth/drive.file'],\n actions: [\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleDriveFilesSearch,\n title: 'Search Drive files',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/drive.readonly'],\n dataClass: 'private',\n description: 'Search user-visible Google Drive files.',\n inputSchema: objectSchema({ query: { type: 'string' }, maxResults: { type: 'integer', minimum: 1, maximum: 50 } }, ['query']),\n },\n {\n id: CANONICAL_INTEGRATION_ACTIONS.googleDriveFilesRead,\n title: 'Read Drive file',\n risk: 'read',\n requiredScopes: ['https://www.googleapis.com/auth/drive.readonly'],\n dataClass: 'private',\n description: 'Read metadata and content for an authorized Drive file.',\n inputSchema: objectSchema({ fileId: { type: 'string' } }, ['fileId']),\n },\n ],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction githubConnector(providerId: string): IntegrationConnector {\n return {\n id: 'github',\n providerId,\n title: 'GitHub',\n category: 'workflow',\n auth: 'oauth2',\n scopes: ['repo', 'read:user'],\n actions: [\n readAction(CANONICAL_INTEGRATION_ACTIONS.githubRepositoriesGet, 'Read repository metadata', ['repo'], objectSchema({ owner: { type: 'string' }, repo: { type: 'string' } }, ['owner', 'repo'])),\n readAction(CANONICAL_INTEGRATION_ACTIONS.githubIssuesSearch, 'Search issues and pull requests', ['repo'], objectSchema({ query: { type: 'string' }, limit: { type: 'integer', minimum: 1, maximum: 50 } }, ['query'])),\n writeAction(CANONICAL_INTEGRATION_ACTIONS.githubIssuesCreate, 'Create issue', ['repo'], objectSchema({ owner: { type: 'string' }, repo: { type: 'string' }, title: { type: 'string' }, body: { type: 'string' } }, ['owner', 'repo', 'title'])),\n writeAction(CANONICAL_INTEGRATION_ACTIONS.githubPullRequestsComment, 'Comment on pull request', ['repo'], objectSchema({ owner: { type: 'string' }, repo: { type: 'string' }, pullNumber: { type: 'integer' }, body: { type: 'string' } }, ['owner', 'repo', 'pullNumber', 'body'])),\n ],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction slackConnector(providerId: string): IntegrationConnector {\n return {\n id: 'slack',\n providerId,\n title: 'Slack',\n category: 'chat',\n auth: 'oauth2',\n scopes: ['channels:read', 'search:read', 'chat:write'],\n actions: [\n readAction(CANONICAL_INTEGRATION_ACTIONS.slackChannelsList, 'List Slack channels', ['channels:read'], objectSchema({ limit: { type: 'integer', minimum: 1, maximum: 200 } })),\n readAction(CANONICAL_INTEGRATION_ACTIONS.slackMessagesSearch, 'Search Slack messages', ['search:read'], objectSchema({ query: { type: 'string' }, count: { type: 'integer', minimum: 1, maximum: 50 } }, ['query'])),\n writeAction(CANONICAL_INTEGRATION_ACTIONS.slackMessagesPost, 'Post Slack message', ['chat:write'], objectSchema({ channel: { type: 'string' }, text: { type: 'string' }, blocks: { type: 'array' } }, ['channel', 'text'])),\n ],\n triggers: [trigger('slack.message.posted', 'Slack message posted', ['channels:read'])],\n metadata: { source: 'canonical-launch', supportTier: 'setupReady' },\n }\n}\n\nfunction readAction(id: string, title: string, scopes: string[], inputSchema: unknown): IntegrationConnectorAction {\n return { id, title, risk: 'read', requiredScopes: scopes, dataClass: 'private', inputSchema }\n}\n\nfunction writeAction(id: string, title: string, scopes: string[], inputSchema: unknown): IntegrationConnectorAction {\n return { id, title, risk: 'write', requiredScopes: scopes, dataClass: 'private', approvalRequired: true, inputSchema }\n}\n\nfunction trigger(id: string, title: string, scopes: string[]): IntegrationConnectorTrigger {\n return { id, title, requiredScopes: scopes, dataClass: 'private' }\n}\n\nfunction providerPassthroughAction(connectorId: string): IntegrationConnectorAction {\n return {\n id: CANONICAL_INTEGRATION_ACTIONS.providerHttpRequest,\n title: 'Provider HTTP request',\n risk: 'write',\n requiredScopes: [],\n dataClass: 'sensitive',\n approvalRequired: true,\n description: `Controlled provider-native passthrough for ${connectorId}. Disabled by default by platform policy.`,\n inputSchema: objectSchema({\n method: { type: 'string', enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] },\n path: { type: 'string' },\n query: { type: 'object' },\n body: { type: 'object' },\n }, ['method', 'path']),\n }\n}\n\nfunction objectSchema(properties: Record<string, unknown>, required: string[] = []): Record<string, unknown> {\n return { type: 'object', additionalProperties: false, properties, required }\n}\n","import type { IntegrationSandboxBundle } from './runtime.js'\n\nexport const DEFAULT_INTEGRATION_BRIDGE_ENV = 'TANGLE_INTEGRATION_BUNDLE'\n\nexport interface IntegrationBridgePayload {\n version: 1\n manifestId: string\n subject: IntegrationSandboxBundle['subject']\n expiresAt: string\n tools: IntegrationBridgeToolBinding[]\n}\n\nexport interface IntegrationBridgeToolBinding {\n name: string\n title: string\n connectorId: string\n connectionId: string\n action: string\n risk: string\n dataClass: string\n requiredScopes: string[]\n capabilityToken: string\n}\n\nexport function buildIntegrationBridgePayload(bundle: IntegrationSandboxBundle): IntegrationBridgePayload {\n return {\n version: 1,\n manifestId: bundle.manifestId,\n subject: bundle.subject,\n expiresAt: bundle.expiresAt,\n tools: bundle.tools.flatMap((tool) => {\n const binding = bundle.capabilities.find((candidate) =>\n candidate.connectorId === tool.connectorId\n && candidate.connectionId\n && candidate.allowedActions.includes(tool.action.id)\n )\n if (!binding) return []\n return [{\n name: tool.name,\n title: tool.title,\n connectorId: tool.connectorId,\n connectionId: binding.connectionId,\n action: tool.action.id,\n risk: tool.risk,\n dataClass: tool.dataClass,\n requiredScopes: tool.requiredScopes,\n capabilityToken: binding.capability.token,\n }]\n }),\n }\n}\n\nexport function encodeIntegrationBridgePayload(payload: IntegrationBridgePayload): string {\n return Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url')\n}\n\nexport function decodeIntegrationBridgePayload(encoded: string): IntegrationBridgePayload {\n const parsed = JSON.parse(Buffer.from(encoded, 'base64url').toString('utf8')) as unknown\n assertBridgePayload(parsed)\n return parsed\n}\n\nexport function buildIntegrationBridgeEnvironment(\n bundle: IntegrationSandboxBundle,\n options: { envVar?: string } = {},\n): Record<string, string> {\n const envVar = options.envVar ?? DEFAULT_INTEGRATION_BRIDGE_ENV\n return {\n [envVar]: encodeIntegrationBridgePayload(buildIntegrationBridgePayload(bundle)),\n }\n}\n\nexport function parseIntegrationBridgeEnvironment(\n env: Record<string, string | undefined>,\n options: { envVar?: string } = {},\n): IntegrationBridgePayload {\n const envVar = options.envVar ?? DEFAULT_INTEGRATION_BRIDGE_ENV\n const encoded = env[envVar]\n if (!encoded) throw new Error(`Missing ${envVar}.`)\n return decodeIntegrationBridgePayload(encoded)\n}\n\nexport function redactIntegrationBridgePayload(payload: IntegrationBridgePayload): IntegrationBridgePayload {\n return {\n ...payload,\n tools: payload.tools.map((tool) => ({\n ...tool,\n capabilityToken: '[REDACTED]',\n })),\n }\n}\n\nfunction assertBridgePayload(value: unknown): asserts value is IntegrationBridgePayload {\n if (!value || typeof value !== 'object') throw new Error('Invalid integration bridge payload.')\n const payload = value as Partial<IntegrationBridgePayload>\n if (payload.version !== 1) throw new Error('Unsupported integration bridge payload version.')\n if (typeof payload.manifestId !== 'string') throw new Error('Invalid integration bridge manifestId.')\n if (typeof payload.expiresAt !== 'string') throw new Error('Invalid integration bridge expiresAt.')\n if (!Array.isArray(payload.tools)) throw new Error('Invalid integration bridge tools.')\n}\n","import { IntegrationRuntimeError, normalizeIntegrationError } from './errors.js'\nimport { TANGLE_API_KEY_PREFIX, TANGLE_BROKER_TOKEN_PREFIX } from './connectors/adapters/tangle-id.js'\n\n/**\n * Self-service external-apps client — the brokered hub-exec path.\n *\n * The operator-allowlist-free way to integrate the Tangle hub (no `TRUSTED_APPS`\n * entry): a product registers itself ONCE (`registerApp` → client_id/secret),\n * the end user consents ONCE per connection from their Tangle session (a browser\n * step — not done here), and the product then mints short-lived\n * `sk-tan-broker-…` tokens unattended (`mintBrokerToken`) for each\n * `/v1/hub/exec` call. The durable grant means only the first consent needs a\n * user; everything after is app-credential-only.\n *\n * Sits alongside {@link TangleIntegrationsClient} in the integrations/hub SDK —\n * same `endpoint` + `fetchImpl` shape and the same `IntegrationRuntimeError`\n * surface. Endpoints (platform API, e.g. https://id.tangle.tools):\n * POST /v1/apps register (owner bearer)\n * GET /v1/apps list (owner bearer)\n * POST /v1/apps/:appId/revoke revoke (owner bearer)\n * POST /v1/apps/grants/:grantId/mint-broker-token durable re-mint (app creds)\n * POST /v1/apps/oauth/token authorization_code → token\n */\n\nexport interface TangleAppsClientOptions {\n /** Platform base URL (e.g. https://id.tangle.tools). */\n endpoint: string\n /** Test seam. Defaults to global `fetch`. */\n fetchImpl?: typeof fetch\n /** Platform-backed owner check for optional user claims on app operations. */\n ownerPolicy?: AppsOwnerPolicy\n}\n\nexport interface AppsOwnerPolicy {\n authorize(input: {\n operation: 'mint_broker_token' | 'exchange_auth_code'\n ownerUserId: string\n grantId?: string\n clientId?: string\n }): Promise<boolean> | boolean\n}\n\nexport interface RegisterAppInput {\n name: string\n redirectUris: string[]\n allowedScopes: string[]\n homepageUrl?: string\n}\n\nexport interface AppSummary {\n id: string\n clientId: string\n name: string\n redirectUris: string[]\n allowedScopes: string[]\n homepageUrl?: string\n createdAt?: string\n}\n\nexport interface RegisteredApp extends AppSummary {\n /** Shown ONCE at registration — persist it as a secret immediately. */\n clientSecret: string\n}\n\nexport interface BrokerToken {\n /** The `sk-tan-broker-…` bearer for a single `/v1/hub/exec` call. */\n accessToken: string\n expiresIn: number\n scope: string\n connectionId?: string\n /** Durable, consented grant identity. Older hosts omit these receipt fields. */\n grantId?: string\n ownerUserId?: string\n clientId?: string\n /** Absolute expiry derived from the broker response. */\n expiresAt: number\n}\n\ninterface PlatformEnvelope<T> {\n success?: boolean\n data?: T\n error?: { code?: string; message?: string } | string\n}\n\ninterface TokenResponse {\n access_token?: unknown\n expires_in?: unknown\n scope?: unknown\n connection_id?: string\n grant_id?: unknown\n user_id?: unknown\n client_id?: unknown\n}\n\nconst MAX_BROKER_TOKEN_TTL_SECONDS = 3_600\n\nexport class TangleAppsClient {\n private readonly endpoint: string\n private readonly fetchImpl: typeof fetch\n private readonly ownerPolicy?: AppsOwnerPolicy\n\n constructor(options: TangleAppsClientOptions) {\n this.endpoint = options.endpoint.replace(/\\/$/, '')\n // Call fetch as a plain function: Workers throw \"Illegal invocation\" when\n // fetch runs with the client as its receiver (this.fetchImpl(...)).\n const fetchImpl = options.fetchImpl ?? fetch\n this.fetchImpl = (input, init) => fetchImpl(input, init)\n this.ownerPolicy = options.ownerPolicy\n }\n\n /**\n * Register a product as an app (ONE-TIME, with the owner's bearer — a Tangle\n * session or `sk-tan-*` key). Returns the client_id + the once-shown\n * client_secret; persist the secret immediately (never retrievable again).\n */\n async registerApp(input: RegisterAppInput, ownerBearer: string): Promise<RegisteredApp> {\n assertOwnerBearer(ownerBearer)\n const data = await this.request<{ app: AppSummary; clientSecret: string }>(\n 'POST',\n '/v1/apps',\n input,\n ownerBearer,\n )\n return { ...data.app, clientSecret: data.clientSecret }\n }\n\n /** List the caller's registered apps (no secrets). */\n async listApps(ownerBearer: string): Promise<AppSummary[]> {\n assertOwnerBearer(ownerBearer)\n const data = await this.request<{ apps: AppSummary[] }>('GET', '/v1/apps', undefined, ownerBearer)\n return data.apps ?? []\n }\n\n /** Revoke an app and cascade-kill its grants + tokens. */\n revokeApp(appId: string, ownerBearer: string): Promise<{ revoked: boolean }> {\n assertNonEmpty(appId, 'appId')\n assertOwnerBearer(ownerBearer)\n return this.request('POST', `/v1/apps/${encodeURIComponent(appId)}/revoke`, {}, ownerBearer)\n }\n\n /**\n * Durable re-mint: mint a fresh single-use `sk-tan-broker-` token against an\n * existing consented grant using ONLY the app credentials — no user session,\n * no `agc_` code. The runtime path: one call per `/v1/hub/exec`.\n */\n async mintBrokerToken(input: {\n clientId: string\n clientSecret: string\n grantId: string\n ttlSeconds?: number\n ownerUserId?: string\n }): Promise<BrokerToken> {\n assertNonEmpty(input.clientId, 'clientId')\n assertNonEmpty(input.clientSecret, 'clientSecret')\n assertNonEmpty(input.grantId, 'grantId')\n await this.authorizeOwner({\n operation: 'mint_broker_token',\n ownerUserId: input.ownerUserId,\n grantId: input.grantId,\n clientId: input.clientId,\n })\n const data = await this.request<TokenResponse>(\n 'POST',\n `/v1/apps/grants/${encodeURIComponent(input.grantId)}/mint-broker-token`,\n {\n client_id: input.clientId,\n client_secret: input.clientSecret,\n grant_id: input.grantId,\n ...(input.ttlSeconds !== undefined ? { ttl_seconds: input.ttlSeconds } : {}),\n },\n )\n return toBrokerToken(data)\n }\n\n /**\n * Exchange an `agc_` authorization code (from the user's one-time consent)\n * for the first broker token + the durable grant. Use on the consent\n * callback; afterward `mintBrokerToken` is enough.\n */\n async exchangeAuthCode(input: {\n clientId: string\n clientSecret: string\n code: string\n redirectUri: string\n connectionId?: string\n ownerUserId?: string\n }): Promise<BrokerToken> {\n assertNonEmpty(input.clientId, 'clientId')\n assertNonEmpty(input.clientSecret, 'clientSecret')\n assertNonEmpty(input.code, 'code')\n assertNonEmpty(input.redirectUri, 'redirectUri')\n await this.authorizeOwner({\n operation: 'exchange_auth_code',\n ownerUserId: input.ownerUserId,\n clientId: input.clientId,\n })\n const data = await this.request<TokenResponse>('POST', '/v1/apps/oauth/token', {\n grant_type: 'authorization_code',\n client_id: input.clientId,\n client_secret: input.clientSecret,\n code: input.code,\n redirect_uri: input.redirectUri,\n ...(input.connectionId ? { connection_id: input.connectionId } : {}),\n })\n return toBrokerToken(data)\n }\n\n private async authorizeOwner(input: {\n operation: 'mint_broker_token' | 'exchange_auth_code'\n ownerUserId?: string\n grantId?: string\n clientId?: string\n }): Promise<void> {\n if (input.ownerUserId === undefined) return\n assertNonEmpty(input.ownerUserId, 'ownerUserId')\n if (!this.ownerPolicy) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 403,\n message: 'Tangle apps ownerUserId requires a Platform-backed ownerPolicy',\n })\n }\n const allowed = await this.ownerPolicy.authorize({\n operation: input.operation,\n ownerUserId: input.ownerUserId.trim(),\n ...(input.grantId ? { grantId: input.grantId } : {}),\n ...(input.clientId ? { clientId: input.clientId } : {}),\n })\n if (!allowed) {\n throw new IntegrationRuntimeError({\n code: 'provider_auth_failed',\n status: 403,\n message: 'Tangle apps owner policy rejected the requested owner',\n })\n }\n }\n\n private async request<T>(\n method: 'GET' | 'POST' | 'DELETE',\n path: string,\n body?: unknown,\n bearer?: string,\n ): Promise<T> {\n try {\n const headers: Record<string, string> = { accept: 'application/json' }\n if (bearer) headers.authorization = `Bearer ${bearer}`\n if (body !== undefined) headers['content-type'] = 'application/json'\n\n const response = await this.fetchImpl(`${this.endpoint}${path}`, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n })\n const json = (await response.json().catch(() => undefined)) as PlatformEnvelope<T> | undefined\n\n if (!response.ok || (json && json.success === false)) {\n const platformCode = json?.error && typeof json.error === 'object' ? json.error.code : undefined\n const message =\n (json?.error && typeof json.error === 'object' && json.error.message) ||\n (typeof json?.error === 'string' ? json.error : `Tangle apps request failed (HTTP ${response.status})`)\n throw new IntegrationRuntimeError({\n code: platformCode === 'BROKER_DISABLED' ? 'passthrough_disabled' : 'unknown',\n message,\n status: response.status,\n metadata: { platformCode, path },\n })\n }\n // The /v1/apps surface wraps in { success, data }; /v1/apps/oauth/token is flat.\n return ((json && 'data' in json ? json.data : json) ?? ({} as T)) as T\n } catch (error) {\n if (error instanceof IntegrationRuntimeError) throw error\n const normalized = normalizeIntegrationError(error)\n throw new IntegrationRuntimeError({\n code: normalized.code,\n message: normalized.message,\n metadata: { path, userAction: normalized.userAction },\n })\n }\n }\n}\n\nexport function createTangleAppsClient(options: TangleAppsClientOptions): TangleAppsClient {\n return new TangleAppsClient(options)\n}\n\nfunction toBrokerToken(data: TokenResponse): BrokerToken {\n if (\n typeof data.access_token !== 'string' ||\n !/^sk-tan-broker-[A-Za-z0-9][A-Za-z0-9._-]*$/.test(data.access_token) ||\n typeof data.expires_in !== 'number' ||\n !Number.isSafeInteger(data.expires_in) ||\n data.expires_in <= 0 ||\n data.expires_in > MAX_BROKER_TOKEN_TTL_SECONDS ||\n typeof data.scope !== 'string' ||\n data.scope.trim().length === 0 ||\n (data.connection_id !== undefined && (typeof data.connection_id !== 'string' || data.connection_id.trim().length === 0)) ||\n [data.grant_id, data.user_id, data.client_id].some(value => value !== undefined && (typeof value !== 'string' || !value.trim() || value.length > 256))\n ) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 502,\n message: 'Tangle broker returned an invalid token, expiry, or scope',\n })\n }\n const accessToken = data.access_token\n const expiresIn = data.expires_in\n const scope = data.scope.trim().split(/\\s+/).join(' ')\n const expiresAt = Date.now() + expiresIn * 1000\n if (!Number.isFinite(expiresAt)) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 502,\n message: 'Tangle broker returned an invalid expiry',\n })\n }\n return {\n accessToken,\n expiresIn,\n scope,\n expiresAt,\n connectionId: data.connection_id,\n ...(typeof data.grant_id === 'string' ? { grantId: data.grant_id } : {}),\n ...(typeof data.user_id === 'string' ? { ownerUserId: data.user_id } : {}),\n ...(typeof data.client_id === 'string' ? { clientId: data.client_id } : {}),\n }\n}\n\nfunction assertNonEmpty(value: unknown, name: string): asserts value is string {\n if (typeof value !== 'string' || !value.trim()) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 400,\n message: `Tangle apps ${name} is required`,\n })\n }\n}\n\nfunction assertOwnerBearer(value: unknown): asserts value is string {\n assertNonEmpty(value, 'owner bearer')\n if (\n value.startsWith('sk-') &&\n (!value.startsWith(TANGLE_API_KEY_PREFIX) ||\n value.startsWith(TANGLE_BROKER_TOKEN_PREFIX) ||\n value.length <= TANGLE_API_KEY_PREFIX.length)\n ) {\n throw new IntegrationRuntimeError({\n code: 'input_invalid',\n status: 400,\n message: 'Tangle apps owner bearer must be a Platform key or session bearer',\n })\n }\n}\n\n/** Require the authenticated host receipt before retaining a grant for unattended\n * use. The browser's state and connection id are expectations, not evidence. */\nexport function requireBrokerGrantReceipt(token: BrokerToken, expected: {\n ownerUserId: string; clientId: string; connectionId: string; scopes: readonly string[]; grantId?: string\n}): { grantId: string; connectionId: string; ownerUserId: string; clientId: string; scopes: string[] } {\n const scopes = [...new Set(token.scope.split(/\\s+/).filter(Boolean))].sort()\n const expectedScopes = [...new Set(expected.scopes)].sort()\n if (!token.grantId || token.ownerUserId !== expected.ownerUserId || token.clientId !== expected.clientId ||\n token.connectionId !== expected.connectionId || (expected.grantId && token.grantId !== expected.grantId) ||\n JSON.stringify(scopes) !== JSON.stringify(expectedScopes)) {\n throw new IntegrationRuntimeError({ code: 'provider_auth_failed', status: 403,\n message: 'The broker grant receipt does not match the authenticated owner, app, connection and requested scopes' })\n }\n return { grantId: token.grantId, connectionId: expected.connectionId, ownerUserId: expected.ownerUserId, clientId: expected.clientId, scopes }\n}\n","import {\n DEFAULT_INTEGRATION_BRIDGE_ENV,\n parseIntegrationBridgeEnvironment,\n type IntegrationBridgePayload,\n type IntegrationBridgeToolBinding,\n} from './bridge.js'\nimport { IntegrationRuntimeError, normalizeIntegrationError } from './errors.js'\n\nexport interface TangleIntegrationsClientOptions {\n endpoint: string\n bridge?: IntegrationBridgePayload\n env?: Record<string, string | undefined>\n envVar?: string\n fetchImpl?: typeof fetch\n getCapabilityToken?: (tool: IntegrationBridgeToolBinding) => string | Promise<string>\n}\n\nexport interface TangleIntegrationInvokeInput<TInput = unknown> {\n tool: string\n input?: TInput\n idempotencyKey?: string\n dryRun?: boolean\n metadata?: Record<string, unknown>\n}\n\nexport interface TangleIntegrationInvokeResult<TOutput = unknown> {\n status: 'ok' | 'approval_required' | 'failed'\n action: string\n output?: TOutput\n approval?: unknown\n error?: string\n metadata?: Record<string, unknown>\n}\n\nexport class TangleIntegrationsClient {\n private readonly endpoint: string\n private readonly bridge: IntegrationBridgePayload\n private readonly fetchImpl: typeof fetch\n private readonly getCapabilityToken: (tool: IntegrationBridgeToolBinding) => string | Promise<string>\n\n constructor(options: TangleIntegrationsClientOptions) {\n this.endpoint = options.endpoint.replace(/\\/$/, '')\n this.bridge = options.bridge ?? parseIntegrationBridgeEnvironment(\n options.env ?? readProcessEnv(),\n { envVar: options.envVar ?? DEFAULT_INTEGRATION_BRIDGE_ENV },\n )\n // Call fetch as a plain function: Workers throw \"Illegal invocation\" when\n // fetch runs with the client as its receiver (this.fetchImpl(...)).\n const fetchImpl = options.fetchImpl ?? fetch\n this.fetchImpl = (input, init) => fetchImpl(input, init)\n this.getCapabilityToken = options.getCapabilityToken ?? ((tool) => tool.capabilityToken)\n }\n\n tools(): IntegrationBridgeToolBinding[] {\n return [...this.bridge.tools]\n }\n\n findTool(toolOrAction: string): IntegrationBridgeToolBinding {\n const found = this.bridge.tools.find((tool) =>\n tool.name === toolOrAction ||\n tool.action === toolOrAction ||\n `${tool.connectorId}.${tool.action}` === toolOrAction\n )\n if (!found) {\n throw new IntegrationRuntimeError({\n code: 'action_not_found',\n message: `Integration tool ${toolOrAction} is not available in this runtime.`,\n metadata: { available: this.bridge.tools.map((tool) => ({ name: tool.name, action: tool.action, connectorId: tool.connectorId })) },\n })\n }\n return found\n }\n\n async invoke<TOutput = unknown, TInput = unknown>(input: TangleIntegrationInvokeInput<TInput>): Promise<TangleIntegrationInvokeResult<TOutput>> {\n try {\n const tool = this.findTool(input.tool)\n const token = await this.getCapabilityToken(tool)\n const response = await this.fetchImpl(`${this.endpoint}/v1/integrations/invoke`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n authorization: `Bearer ${token}`,\n },\n body: JSON.stringify({\n action: tool.action,\n input: input.input,\n idempotencyKey: input.idempotencyKey ?? defaultIdempotencyKey(tool.action),\n dryRun: input.dryRun,\n metadata: input.metadata,\n }),\n })\n const json = await response.json().catch(() => undefined) as TangleIntegrationInvokeResult<TOutput> | undefined\n if (!response.ok && !json) {\n return { status: 'failed', action: tool.action, error: `Integration invoke failed with HTTP ${response.status}` }\n }\n return json ?? { status: 'failed', action: tool.action, error: 'Integration invoke returned an empty response.' }\n } catch (error) {\n const normalized = normalizeIntegrationError(error)\n return { status: 'failed', action: input.tool, error: normalized.message, metadata: { code: normalized.code, userAction: normalized.userAction } }\n }\n }\n}\n\nexport function createTangleIntegrationsClient(options: TangleIntegrationsClientOptions): TangleIntegrationsClient {\n return new TangleIntegrationsClient(options)\n}\n\nfunction defaultIdempotencyKey(action: string): string {\n return `${action}:${Date.now()}:${Math.random().toString(36).slice(2)}`\n}\n\nfunction readProcessEnv(): Record<string, string | undefined> {\n if (typeof process !== 'undefined' && process.env) return process.env\n return {}\n}\n","import type {\n IntegrationConnector,\n IntegrationConnectorAction,\n} from './index.js'\nimport type {\n IntegrationManifest,\n IntegrationManifestResolution,\n IntegrationRequirement,\n} from './runtime.js'\n\nexport interface ConsentSummary {\n title: string\n body: string\n bullets: string[]\n primaryAction: string\n risk: 'read' | 'write' | 'destructive'\n connectorIds: string[]\n}\n\nexport interface RenderConsentOptions {\n appName?: string\n connectors?: IntegrationConnector[]\n}\n\nexport function renderConsentSummary(\n manifestOrResolution: IntegrationManifest | IntegrationManifestResolution,\n options: RenderConsentOptions = {},\n): ConsentSummary {\n const manifest = 'manifest' in manifestOrResolution ? manifestOrResolution.manifest : manifestOrResolution\n const appName = options.appName ?? manifest.title ?? manifest.id\n const requirements = manifest.requirements\n const risk = aggregateRisk(requirements, options.connectors)\n const connectorIds = unique(requirements.map((requirement) => requirement.connectorId))\n const first = requirements[0]\n const body = first ? sentenceForRequirement(appName, first) : `${appName} does not request integrations.`\n return {\n title: `${appName} wants to use ${humanList(connectorIds.map(titleize))}`,\n body,\n bullets: requirements.map((requirement) => bulletForRequirement(requirement, options.connectors)),\n primaryAction: risk === 'read' ? 'Allow access' : risk === 'write' ? 'Review and allow' : 'Review destructive access',\n risk,\n connectorIds,\n }\n}\n\nexport function renderApprovalCopy(input: {\n appName: string\n connectorTitle: string\n action: IntegrationConnectorAction\n approvalId?: string\n}): ConsentSummary {\n return {\n title: `${input.appName} wants to ${input.action.title.toLowerCase()}`,\n body: `${input.appName} is requesting permission to run \"${input.action.title}\" on ${input.connectorTitle}.`,\n bullets: [\n `Risk: ${input.action.risk}`,\n `Data: ${input.action.dataClass}`,\n ...(input.approvalId ? [`Approval id: ${input.approvalId}`] : []),\n ],\n primaryAction: input.action.risk === 'read' ? 'Allow' : 'Approve action',\n risk: input.action.risk,\n connectorIds: [],\n }\n}\n\nfunction sentenceForRequirement(appName: string, requirement: IntegrationRequirement): string {\n if (requirement.connectorId === 'google-calendar' && requirement.mode === 'read') {\n return `${appName} wants to read your Google Calendar to find schedule-aware recommendations.`\n }\n if (requirement.connectorId === 'google-calendar' && requirement.mode === 'write') {\n return `${appName} wants to create or update Google Calendar events after your approval.`\n }\n if (requirement.mode === 'read') return `${appName} wants to read ${titleize(requirement.connectorId)} data.`\n if (requirement.mode === 'write') return `${appName} wants to write ${titleize(requirement.connectorId)} data after approval.`\n return `${appName} wants to subscribe to ${titleize(requirement.connectorId)} events.`\n}\n\nfunction bulletForRequirement(requirement: IntegrationRequirement, connectors: IntegrationConnector[] = []): string {\n const connector = connectors.find((candidate) => candidate.id === requirement.connectorId)\n const actions = requirement.requiredActions?.length\n ? requirement.requiredActions.map((id) => connector?.actions.find((action) => action.id === id)?.title ?? id)\n : requirement.requiredTriggers ?? []\n return `${titleize(requirement.connectorId)}: ${requirement.reason}${actions.length ? ` (${actions.join(', ')})` : ''}`\n}\n\nfunction aggregateRisk(requirements: IntegrationRequirement[], connectors: IntegrationConnector[] = []): 'read' | 'write' | 'destructive' {\n let rank = 0\n for (const requirement of requirements) {\n if (requirement.mode === 'write') rank = Math.max(rank, 1)\n const connector = connectors.find((candidate) => candidate.id === requirement.connectorId)\n for (const actionId of requirement.requiredActions ?? []) {\n const risk = connector?.actions.find((action) => action.id === actionId)?.risk\n if (risk === 'write') rank = Math.max(rank, 1)\n if (risk === 'destructive') rank = Math.max(rank, 2)\n }\n }\n return rank === 2 ? 'destructive' : rank === 1 ? 'write' : 'read'\n}\n\nfunction humanList(values: string[]): string {\n if (values.length <= 1) return values[0] ?? 'integrations'\n if (values.length === 2) return `${values[0]} and ${values[1]}`\n return `${values.slice(0, -1).join(', ')}, and ${values.at(-1)}`\n}\n\nfunction titleize(value: string): string {\n return value.split(/[-_.]/g).filter(Boolean).map((part) => part[0]!.toUpperCase() + part.slice(1)).join(' ')\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","/**\n * Workspace capability discovery — answers \"what can this workspace do?\"\n * with a typed list of MCP-shape tool descriptors that the agent runtime\n * can flatten into a planner's tool registry.\n *\n * The agent runtime's gating question is one level above the existing\n * connector catalog (\"which integrations exist?\") and one level below\n * the issued capability-token surface (\"temporarily delegate scope X\n * via this signed token\"). This module bridges the two:\n *\n * discoverWorkspaceCapabilities({ owner, connectors, connections, scopes })\n * → WorkspaceCapability[]\n *\n * A `WorkspaceCapability` is hand-shaped to be cheap to emit alongside a\n * connector manifest and trivial to render into:\n * - an LLM tool-choice JSON array\n * - an MCP `tools/list` response\n * - a UI surface (\"Connect Gmail to enable: send_reply, list_messages…\")\n *\n * What this is NOT:\n * - A capability-token issuer. That stays in IntegrationHub.issueCapability.\n * - A connector registry. That stays in IntegrationRegistry / catalog.\n *\n * Scopes are the load-bearing input: a connector advertises N actions,\n * but only the subset whose `requiredScopes` are a subset of the\n * connection's `grantedScopes` is reachable. The discovery function\n * filters on that automatically.\n *\n * Stability: `@stable` — additions to WorkspaceCapability must be\n * additive and non-breaking.\n */\n\nimport type {\n IntegrationActor,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationConnectorTrigger,\n IntegrationDataClass,\n IntegrationActionRisk,\n IntegrationConnectionStore,\n IntegrationProvider,\n} from './index.js'\n\n/** MCP-shape tool descriptor. Mirrors the\n * [Model Context Protocol tool schema](https://modelcontextprotocol.io/specification)\n * closely enough that consumers can pipe a WorkspaceCapability straight\n * into a `tools/list` response. */\nexport interface WorkspaceToolSchema {\n name: string\n description?: string\n /** JSON-schema describing the action's input. */\n inputSchema?: unknown\n /** Optional JSON-schema describing the action's output. */\n outputSchema?: unknown\n}\n\n/** One discoverable capability — an action a connector exposes that the\n * workspace has the connection + scopes to invoke. */\nexport interface WorkspaceCapability {\n /** Stable, fully-qualified id. Format `<connector-id>.<action-id>`. */\n id: string\n /** Human label safe for UI. */\n title: string\n /** Optional one-line description. */\n description?: string\n /** Connector category for grouping. */\n category: IntegrationConnectorCategory\n /** Connector that hosts this capability. */\n connectorId: string\n /** Provider that hosts this connector (first-party, gateway, …). */\n providerId: string\n /** Underlying action id on the connector. */\n actionId: string\n /** Scopes required to invoke. The discovery function only returns\n * capabilities whose required scopes are a subset of the connection's\n * grantedScopes. */\n scopes: string[]\n /** Risk class — useful for UI (\"write\" / \"destructive\" lights). */\n risk: IntegrationActionRisk\n /** Data class of the action's output, when known. */\n dataClass: IntegrationDataClass\n /** MCP-shape tool schema the agent runtime can register directly. */\n toolSchema: WorkspaceToolSchema\n /** True iff the workspace has an active connection backing this\n * capability. False capabilities (advertised by the connector but\n * not yet connected) are included when `includeUnconnected: true`\n * is passed — useful for \"connect to unlock\" UI affordances. */\n connected: boolean\n /** Connection id backing this capability. Undefined when\n * `connected: false`. */\n connectionId?: string\n /** Whether the action requires explicit approval before invocation. */\n approvalRequired?: boolean\n}\n\n/** Optional inbound trigger surface. Same shape as a capability so the\n * consumer can render both with one component. */\nexport interface WorkspaceTrigger {\n id: string\n title: string\n description?: string\n category: IntegrationConnectorCategory\n connectorId: string\n providerId: string\n triggerId: string\n scopes: string[]\n dataClass: IntegrationDataClass\n connected: boolean\n connectionId?: string\n}\n\nexport interface DiscoverWorkspaceCapabilitiesInput {\n /** Workspace owner. Used to scope the connection lookup when `store`\n * is supplied (the canonical production path). */\n owner: IntegrationActor\n /** Either an explicit connection list (test/fixture path) or a store\n * the function should query for connections by owner. Exactly one\n * of `connections` / `store` MUST be provided. */\n connections?: IntegrationConnection[]\n store?: IntegrationConnectionStore\n /** Either an explicit connector list (test/fixture path) or a set of\n * providers the function should query via `listConnectors()`. */\n connectors?: IntegrationConnector[]\n providers?: IntegrationProvider[]\n /** Include capabilities whose connector is in the catalog but the\n * workspace has no active connection for. Useful to render\n * \"connect to unlock\" affordances. Default: false. */\n includeUnconnected?: boolean\n /** When true, include capabilities even if some required scopes are\n * missing from the connection grant. The default `false` hides such\n * capabilities — the agent runtime never sees them. */\n includeMissingScopes?: boolean\n}\n\nexport interface WorkspaceCapabilityDiscovery {\n capabilities: WorkspaceCapability[]\n triggers: WorkspaceTrigger[]\n /** Counts grouped by connector for telemetry / UI badges. */\n countsByConnector: Record<string, number>\n /** Connectors the workspace is connected to but the planner cannot\n * reach any actions on (e.g., zero scopes granted, or all actions\n * require an additional scope). */\n unreachableConnectors: Array<{ connectorId: string; reason: string }>\n}\n\n/** Resolve workspace-visible capabilities + triggers. Pure with respect\n * to the inputs — caller decides whether to back `connections` and\n * `connectors` with persistent state or static fixtures. */\nexport async function discoverWorkspaceCapabilities(\n input: DiscoverWorkspaceCapabilitiesInput,\n): Promise<WorkspaceCapabilityDiscovery> {\n const connections = await resolveConnections(input)\n const connectors = await resolveConnectors(input)\n const activeConnectionsByConnector = new Map<string, IntegrationConnection>()\n for (const conn of connections) {\n if (conn.status !== 'active') continue\n if (!activeConnectionsByConnector.has(conn.connectorId)) {\n activeConnectionsByConnector.set(conn.connectorId, conn)\n }\n }\n\n const capabilities: WorkspaceCapability[] = []\n const triggers: WorkspaceTrigger[] = []\n const countsByConnector: Record<string, number> = {}\n const unreachableConnectors: Array<{ connectorId: string; reason: string }> = []\n\n for (const connector of connectors) {\n const connection = activeConnectionsByConnector.get(connector.id)\n const connected = Boolean(connection)\n if (!connected && !input.includeUnconnected) continue\n\n const grantedScopes = new Set(connection?.grantedScopes ?? [])\n let actionsAdded = 0\n\n for (const action of connector.actions) {\n const missing = action.requiredScopes.filter((scope) => !grantedScopes.has(scope))\n if (connected && missing.length > 0 && !input.includeMissingScopes) continue\n capabilities.push(toCapability(connector, action, connection))\n actionsAdded += 1\n }\n for (const trigger of connector.triggers ?? []) {\n const missing = trigger.requiredScopes.filter((scope) => !grantedScopes.has(scope))\n if (connected && missing.length > 0 && !input.includeMissingScopes) continue\n triggers.push(toTrigger(connector, trigger, connection))\n }\n\n countsByConnector[connector.id] = actionsAdded\n if (connected && actionsAdded === 0 && connector.actions.length > 0) {\n unreachableConnectors.push({\n connectorId: connector.id,\n reason: 'all_actions_missing_scope',\n })\n }\n }\n\n return { capabilities, triggers, countsByConnector, unreachableConnectors }\n}\n\nasync function resolveConnections(input: DiscoverWorkspaceCapabilitiesInput): Promise<IntegrationConnection[]> {\n if (input.connections) return input.connections\n if (input.store) return await input.store.listByOwner(input.owner)\n throw new Error('discoverWorkspaceCapabilities: provide either connections or store')\n}\n\nasync function resolveConnectors(input: DiscoverWorkspaceCapabilitiesInput): Promise<IntegrationConnector[]> {\n if (input.connectors) return input.connectors\n if (input.providers) {\n const lists = await Promise.all(input.providers.map((p) => Promise.resolve(p.listConnectors())))\n return lists.flat()\n }\n throw new Error('discoverWorkspaceCapabilities: provide either connectors or providers')\n}\n\nfunction toCapability(\n connector: IntegrationConnector,\n action: IntegrationConnectorAction,\n connection: IntegrationConnection | undefined,\n): WorkspaceCapability {\n return {\n id: `${connector.id}.${action.id}`,\n title: action.title,\n description: action.description,\n category: connector.category,\n connectorId: connector.id,\n providerId: connector.providerId,\n actionId: action.id,\n scopes: action.requiredScopes,\n risk: action.risk,\n dataClass: action.dataClass,\n toolSchema: {\n name: `${connector.id}.${action.id}`,\n description: action.description,\n inputSchema: action.inputSchema,\n outputSchema: action.outputSchema,\n },\n connected: Boolean(connection),\n connectionId: connection?.id,\n approvalRequired: action.approvalRequired,\n }\n}\n\nfunction toTrigger(\n connector: IntegrationConnector,\n trigger: IntegrationConnectorTrigger,\n connection: IntegrationConnection | undefined,\n): WorkspaceTrigger {\n return {\n id: `${connector.id}.${trigger.id}`,\n title: trigger.title,\n description: trigger.description,\n category: connector.category,\n connectorId: connector.id,\n providerId: connector.providerId,\n triggerId: trigger.id,\n scopes: trigger.requiredScopes,\n dataClass: trigger.dataClass,\n connected: Boolean(connection),\n connectionId: connection?.id,\n }\n}\n\n/**\n * Filter a {@link WorkspaceCapabilityDiscovery} result by the calling\n * user's effective id.tangle.tools workspace scopes. Pair with the\n * `tangleIdentity()` adapter's `list_workspaces` / `switch_workspace`\n * output to keep what the agent runtime sees aligned with what the\n * workspace's plan actually permits.\n *\n * Semantics:\n * - Every workspace scope is matched against every capability's\n * `scopes` list. Wildcard scopes (`tangle:*`, `<connectorId>:*`) are\n * respected — a workspace with `tangle:*` sees everything; a\n * workspace with `gmail:*` sees every gmail capability regardless of\n * the upstream OAuth scope.\n * - When `workspaceScopes` is empty, returns the discovery as-is (no\n * workspace gate). Pass an explicit `denyByDefault: true` to flip\n * that to \"empty workspace sees nothing\" — matches the platform's\n * fail-closed posture for production tenants.\n *\n * Pure with respect to the inputs — no side effects.\n */\nexport function filterDiscoveryByWorkspaceScopes(\n discovery: WorkspaceCapabilityDiscovery,\n workspaceScopes: string[],\n opts: { denyByDefault?: boolean } = {},\n): WorkspaceCapabilityDiscovery {\n if (workspaceScopes.length === 0 && !opts.denyByDefault) return discovery\n const granted = new Set(workspaceScopes)\n const hasWildcard = granted.has('tangle:*')\n\n function allowed(connectorId: string, scopes: string[]): boolean {\n if (hasWildcard) return true\n if (granted.has(`${connectorId}:*`)) return true\n // A workspace scope satisfies the capability iff every required\n // upstream scope is also present, OR the workspace explicitly\n // grants the connector. We deliberately do NOT loosen this to\n // \"any granted scope intersects\" — that would let a tenant with\n // a read-only Gmail grant invoke send_reply by accident.\n for (const scope of scopes) {\n if (!granted.has(scope)) return false\n }\n return true\n }\n\n const capabilities = discovery.capabilities.filter((cap) => allowed(cap.connectorId, cap.scopes))\n const triggers = discovery.triggers.filter((t) => allowed(t.connectorId, t.scopes))\n const countsByConnector: Record<string, number> = {}\n for (const cap of capabilities) {\n countsByConnector[cap.connectorId] = (countsByConnector[cap.connectorId] ?? 0) + 1\n }\n return {\n capabilities,\n triggers,\n countsByConnector,\n unreachableConnectors: discovery.unreachableConnectors,\n }\n}\n","import type {\n ConnectorAdapter,\n InboundEvent,\n ResolvedDataSource,\n} from './connectors/types.js'\nimport type {\n IntegrationTriggerEvent,\n} from './index.js'\nimport type { IntegrationWorkflowRuntime } from './workflow.js'\n\nexport interface StoredIntegrationEvent {\n id: string\n sourceId: string\n connectorId: string\n eventType: string\n providerEventId?: string\n receivedAt: string\n payload: Record<string, unknown>\n dispatchedAt?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationEventStore {\n put(event: StoredIntegrationEvent): Promise<void> | void\n hasProviderEvent(sourceId: string, providerEventId: string): Promise<boolean> | boolean\n list(): Promise<StoredIntegrationEvent[]> | StoredIntegrationEvent[]\n}\n\nexport interface IntegrationWebhookReceiverResult {\n status: number\n body: unknown\n headers?: Record<string, string>\n received: StoredIntegrationEvent[]\n duplicates: StoredIntegrationEvent[]\n}\n\nexport class InMemoryIntegrationEventStore implements IntegrationEventStore {\n private readonly events = new Map<string, StoredIntegrationEvent>()\n private readonly providerIds = new Set<string>()\n\n put(event: StoredIntegrationEvent): void {\n this.events.set(event.id, event)\n if (event.providerEventId) this.providerIds.add(providerKey(event.sourceId, event.providerEventId))\n }\n\n hasProviderEvent(sourceId: string, providerEventId: string): boolean {\n return this.providerIds.has(providerKey(sourceId, providerEventId))\n }\n\n list(): StoredIntegrationEvent[] {\n return [...this.events.values()]\n }\n}\n\nexport async function receiveIntegrationWebhook(input: {\n adapter: ConnectorAdapter\n source: ResolvedDataSource\n rawBody: string\n headers: Record<string, string | string[] | undefined>\n store: IntegrationEventStore\n workflowRuntime?: IntegrationWorkflowRuntime\n allowUnsignedWebhook?: boolean\n now?: () => Date\n}): Promise<IntegrationWebhookReceiverResult> {\n if (!input.adapter.handleInboundEvent) {\n return { status: 405, body: { ok: false, error: 'Connector does not support inbound webhooks.' }, received: [], duplicates: [] }\n }\n if (!input.adapter.verifySignature && !input.allowUnsignedWebhook) {\n return { status: 401, body: { ok: false, error: 'Webhook signature verification is required.' }, received: [], duplicates: [] }\n }\n const signature = input.adapter.verifySignature?.({\n rawBody: input.rawBody,\n headers: input.headers,\n source: input.source,\n })\n if (signature && !signature.valid) {\n return { status: 401, body: { ok: false, error: signature.reason ?? 'Invalid webhook signature.' }, received: [], duplicates: [] }\n }\n\n const handled = await input.adapter.handleInboundEvent({\n source: input.source,\n rawBody: input.rawBody,\n headers: input.headers,\n })\n const received: StoredIntegrationEvent[] = []\n const duplicates: StoredIntegrationEvent[] = []\n for (const inbound of handled.events) {\n const event = storedEvent(input.source, inbound, input.now ?? (() => new Date()))\n if (event.providerEventId && await input.store.hasProviderEvent(event.sourceId, event.providerEventId)) {\n duplicates.push(event)\n continue\n }\n await input.store.put(event)\n received.push(event)\n await dispatchStoredEvent(event, input.source, input.workflowRuntime)\n }\n\n return {\n status: handled.response?.status ?? 200,\n body: handled.response?.body ?? { received: true, count: received.length, duplicateCount: duplicates.length },\n headers: handled.response?.headers,\n received,\n duplicates,\n }\n}\n\nexport function storedEventToTriggerEvent(event: StoredIntegrationEvent, source: ResolvedDataSource): IntegrationTriggerEvent {\n return {\n id: event.id,\n providerId: String(source.metadata.providerId ?? 'first-party'),\n connectorId: event.connectorId,\n connectionId: source.id,\n trigger: event.eventType,\n occurredAt: event.receivedAt,\n payload: event.payload,\n metadata: {\n providerEventId: event.providerEventId,\n sourceId: event.sourceId,\n ...event.metadata,\n },\n }\n}\n\nasync function dispatchStoredEvent(\n event: StoredIntegrationEvent,\n source: ResolvedDataSource,\n workflowRuntime?: IntegrationWorkflowRuntime,\n): Promise<void> {\n if (!workflowRuntime) return\n await workflowRuntime.dispatchEvent(storedEventToTriggerEvent(event, source), () => undefined)\n}\n\nfunction storedEvent(source: ResolvedDataSource, event: InboundEvent, now: () => Date): StoredIntegrationEvent {\n return {\n id: `evt_${source.id}_${event.providerEventId ?? `${event.eventType}_${now().getTime()}`}`,\n sourceId: source.id,\n connectorId: source.kind,\n eventType: event.eventType,\n providerEventId: event.providerEventId,\n receivedAt: now().toISOString(),\n payload: event.payload,\n }\n}\n\nfunction providerKey(sourceId: string, providerEventId: string): string {\n return `${sourceId}:${providerEventId}`\n}\n","import type {\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n} from './index.js'\nimport type { IntegrationAuditSink } from './audit.js'\nimport { createIntegrationAuditEvent } from './audit.js'\nimport type { IntegrationRegistry } from './registry.js'\n\nexport type IntegrationHealthcheckStatus = 'healthy' | 'degraded' | 'unhealthy' | 'unknown'\n\nexport interface IntegrationHealthcheckCheck {\n id: string\n status: IntegrationHealthcheckStatus\n message: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationHealthcheckResult {\n connectionId: string\n providerId: string\n connectorId: string\n status: IntegrationHealthcheckStatus\n checkedAt: string\n checks: IntegrationHealthcheckCheck[]\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationHealthcheckStore {\n put(result: IntegrationHealthcheckResult): Promise<void> | void\n get(connectionId: string): Promise<IntegrationHealthcheckResult | undefined> | IntegrationHealthcheckResult | undefined\n list(): Promise<IntegrationHealthcheckResult[]> | IntegrationHealthcheckResult[]\n}\n\nexport class InMemoryIntegrationHealthcheckStore implements IntegrationHealthcheckStore {\n private readonly results = new Map<string, IntegrationHealthcheckResult>()\n\n put(result: IntegrationHealthcheckResult): void {\n this.results.set(result.connectionId, result)\n }\n\n get(connectionId: string): IntegrationHealthcheckResult | undefined {\n return this.results.get(connectionId)\n }\n\n list(): IntegrationHealthcheckResult[] {\n return [...this.results.values()]\n }\n}\n\nexport async function runIntegrationHealthcheck(input: {\n connection: IntegrationConnection\n connector?: IntegrationConnector\n registry?: IntegrationRegistry\n test?: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean\n audit?: IntegrationAuditSink\n now?: () => Date\n}): Promise<IntegrationHealthcheckResult> {\n const now = input.now ?? (() => new Date())\n const checkedAt = now().toISOString()\n const connector = input.connector ?? input.registry?.byId.get(input.connection.connectorId)?.connector\n const checks: IntegrationHealthcheckCheck[] = []\n\n checks.push(connectionStatusCheck(input.connection, now))\n if (!connector) {\n checks.push({ id: 'connector-known', status: 'unknown', message: `Connector ${input.connection.connectorId} is not in the registry.` })\n } else {\n checks.push(connectorExecutableCheck(connector))\n checks.push(scopeShapeCheck(input.connection, connector))\n if (input.test && input.connection.status === 'active') {\n checks.push(await liveHealthcheck(input.connection, connector, input.test))\n }\n }\n\n const result: IntegrationHealthcheckResult = {\n connectionId: input.connection.id,\n providerId: input.connection.providerId,\n connectorId: input.connection.connectorId,\n status: rollupHealthStatus(checks),\n checkedAt,\n checks,\n }\n await input.audit?.record(createIntegrationAuditEvent({\n type: 'healthcheck.completed',\n actor: input.connection.owner,\n connectionId: input.connection.id,\n providerId: input.connection.providerId,\n connectorId: input.connection.connectorId,\n ok: result.status === 'healthy',\n message: result.status,\n metadata: { checks: checks.map((check) => ({ id: check.id, status: check.status, message: check.message })) },\n occurredAt: checkedAt,\n }))\n return result\n}\n\nexport async function runIntegrationHealthchecks(input: {\n connections: IntegrationConnection[]\n registry?: IntegrationRegistry\n store?: IntegrationHealthcheckStore\n audit?: IntegrationAuditSink\n now?: () => Date\n test?: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean\n}): Promise<IntegrationHealthcheckResult[]> {\n const results: IntegrationHealthcheckResult[] = []\n for (const connection of input.connections) {\n const result = await runIntegrationHealthcheck({\n connection,\n registry: input.registry,\n test: input.test,\n audit: input.audit,\n now: input.now,\n })\n await input.store?.put(result)\n results.push(result)\n }\n return results\n}\n\nexport function healthcheckRequest(action = 'healthcheck'): IntegrationActionRequest {\n return {\n connectionId: '__healthcheck__',\n action,\n input: {},\n dryRun: true,\n metadata: { healthcheck: true },\n }\n}\n\nfunction connectionStatusCheck(connection: IntegrationConnection, now: () => Date): IntegrationHealthcheckCheck {\n if (connection.status !== 'active') {\n return { id: 'connection-active', status: 'unhealthy', message: `Connection is ${connection.status}.` }\n }\n if (connection.expiresAt && Date.parse(connection.expiresAt) <= now().getTime()) {\n return { id: 'connection-active', status: 'unhealthy', message: 'Connection credentials are expired.' }\n }\n return { id: 'connection-active', status: 'healthy', message: 'Connection is active.' }\n}\n\nfunction connectorExecutableCheck(connector: IntegrationConnector): IntegrationHealthcheckCheck {\n const executable = connector.actions.length > 0 || (connector.triggers?.length ?? 0) > 0\n if (!executable) {\n return { id: 'connector-executable', status: 'degraded', message: `${connector.title} is catalog-only.` }\n }\n return { id: 'connector-executable', status: 'healthy', message: `${connector.title} has executable actions or triggers.` }\n}\n\nfunction scopeShapeCheck(connection: IntegrationConnection, connector: IntegrationConnector): IntegrationHealthcheckCheck {\n const declaredScopes = new Set(connector.scopes)\n const undeclared = connection.grantedScopes.filter((scope) => !declaredScopes.has(scope))\n if (connector.scopes.length === 0 && connection.grantedScopes.length > 0) {\n return { id: 'scope-shape', status: 'unknown', message: 'Connector does not declare a scope catalog.', metadata: { grantedScopes: connection.grantedScopes } }\n }\n if (undeclared.length > 0) {\n return { id: 'scope-shape', status: 'degraded', message: 'Connection has scopes not declared by the connector.', metadata: { undeclared } }\n }\n return { id: 'scope-shape', status: 'healthy', message: 'Granted scopes match the connector shape.' }\n}\n\nasync function liveHealthcheck(\n connection: IntegrationConnection,\n connector: IntegrationConnector,\n test: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean,\n): Promise<IntegrationHealthcheckCheck> {\n try {\n const result = await test(connection, connector)\n const ok = typeof result === 'boolean' ? result : result.ok\n return {\n id: 'provider-live-test',\n status: ok ? 'healthy' : 'unhealthy',\n message: ok ? 'Provider live test passed.' : 'Provider live test failed.',\n metadata: typeof result === 'boolean' ? undefined : { action: result.action, warnings: result.warnings },\n }\n } catch (error) {\n return {\n id: 'provider-live-test',\n status: 'unhealthy',\n message: error instanceof Error ? error.message : 'Provider live test failed.',\n }\n }\n}\n\nfunction rollupHealthStatus(checks: IntegrationHealthcheckCheck[]): IntegrationHealthcheckStatus {\n if (checks.some((check) => check.status === 'unhealthy')) return 'unhealthy'\n if (checks.some((check) => check.status === 'degraded')) return 'degraded'\n if (checks.some((check) => check.status === 'unknown')) return 'unknown'\n return 'healthy'\n}\n","import { CANONICAL_INTEGRATION_ACTIONS, canonicalActionConnectorId } from './actions.js'\nimport type {\n IntegrationManifest,\n IntegrationManifestResolution,\n IntegrationRequirement,\n IntegrationRequirementMode,\n} from './runtime.js'\n\nexport interface ManifestValidationIssue {\n path: string\n message: string\n}\n\nexport interface ManifestValidationResult {\n ok: boolean\n issues: ManifestValidationIssue[]\n}\n\nexport interface InferIntegrationRequirementsOptions {\n manifestId: string\n title?: string\n tools: Array<string | { action: string; reason?: string; mode?: IntegrationRequirementMode; connectorId?: string; scopes?: string[] }>\n metadata?: Record<string, unknown>\n}\n\nexport interface MissingRequirementExplanation {\n requirementId: string\n connectorId: string\n status: string\n message: string\n userAction: 'connect' | 'enable' | 'ignore_optional'\n}\n\nexport function validateIntegrationManifest(manifest: IntegrationManifest): ManifestValidationResult {\n const issues: ManifestValidationIssue[] = []\n if (!manifest.id?.trim()) issues.push({ path: 'id', message: 'Manifest id is required.' })\n if (!Array.isArray(manifest.requirements)) issues.push({ path: 'requirements', message: 'Requirements must be an array.' })\n const ids = new Set<string>()\n for (const [index, requirement] of (manifest.requirements ?? []).entries()) {\n const path = `requirements[${index}]`\n if (!requirement.id?.trim()) issues.push({ path: `${path}.id`, message: 'Requirement id is required.' })\n if (ids.has(requirement.id)) issues.push({ path: `${path}.id`, message: `Duplicate requirement id ${requirement.id}.` })\n ids.add(requirement.id)\n if (!requirement.connectorId?.trim()) issues.push({ path: `${path}.connectorId`, message: 'Connector id is required.' })\n if (!['read', 'write', 'trigger'].includes(requirement.mode)) issues.push({ path: `${path}.mode`, message: 'Mode must be read, write, or trigger.' })\n if (!requirement.reason?.trim()) issues.push({ path: `${path}.reason`, message: 'Human-readable reason is required.' })\n if (requirement.mode !== 'trigger' && !requirement.requiredActions?.length) {\n issues.push({ path: `${path}.requiredActions`, message: 'Non-trigger requirements should list required actions.' })\n }\n if (requirement.mode === 'trigger' && !requirement.requiredTriggers?.length) {\n issues.push({ path: `${path}.requiredTriggers`, message: 'Trigger requirements should list required triggers.' })\n }\n }\n return { ok: issues.length === 0, issues }\n}\n\nexport function assertValidIntegrationManifest(manifest: IntegrationManifest): void {\n const result = validateIntegrationManifest(manifest)\n if (!result.ok) {\n throw new Error(`Invalid integration manifest: ${result.issues.map((issue) => `${issue.path}: ${issue.message}`).join('; ')}`)\n }\n}\n\nexport function inferIntegrationManifestFromTools(options: InferIntegrationRequirementsOptions): IntegrationManifest {\n const byConnector = new Map<string, IntegrationRequirement>()\n for (const item of options.tools) {\n const action = typeof item === 'string' ? item : item.action\n const connectorId = typeof item === 'string' ? canonicalActionConnectorId(action) : item.connectorId ?? canonicalActionConnectorId(action)\n if (!connectorId) continue\n const mode = typeof item === 'string' ? inferMode(action) : item.mode ?? inferMode(action)\n const id = `${connectorId}-${mode}`\n const existing = byConnector.get(id)\n const reason = typeof item === 'string' ? defaultReason(connectorId, mode) : item.reason ?? defaultReason(connectorId, mode)\n if (existing) {\n byConnector.set(id, {\n ...existing,\n requiredActions: unique([...(existing.requiredActions ?? []), action]),\n requiredScopes: unique([...(existing.requiredScopes ?? []), ...(typeof item === 'string' ? [] : item.scopes ?? [])]),\n })\n } else {\n byConnector.set(id, {\n id,\n connectorId,\n mode,\n reason,\n requiredActions: mode === 'trigger' ? undefined : [action],\n requiredScopes: typeof item === 'string' ? undefined : item.scopes,\n })\n }\n }\n const manifest: IntegrationManifest = {\n id: options.manifestId,\n title: options.title,\n requirements: [...byConnector.values()],\n metadata: options.metadata,\n }\n assertValidIntegrationManifest(manifest)\n return manifest\n}\n\nexport function explainMissingRequirements(resolution: IntegrationManifestResolution): MissingRequirementExplanation[] {\n return [...resolution.missing, ...resolution.optionalMissing].map((item) => ({\n requirementId: item.requirement.id,\n connectorId: item.requirement.connectorId,\n status: item.status,\n message: item.message,\n userAction: item.requirement.optional ? 'ignore_optional' : item.status === 'not_executable' ? 'enable' : 'connect',\n }))\n}\n\nexport function calendarExercisePlannerManifest(id = 'exercise-calendar-planner'): IntegrationManifest {\n return {\n id,\n title: 'Exercise Calendar Planner',\n requirements: [{\n id: 'calendar-read',\n connectorId: 'google-calendar',\n mode: 'read',\n reason: 'Read busy and free calendar windows to recommend exercise sessions.',\n requiredActions: [CANONICAL_INTEGRATION_ACTIONS.googleCalendarEventsList],\n requiredScopes: ['https://www.googleapis.com/auth/calendar.readonly'],\n }],\n }\n}\n\nfunction inferMode(action: string): IntegrationRequirementMode {\n if (/(create|send|post|update|delete|write|comment|request)$/i.test(action)) return 'write'\n return 'read'\n}\n\nfunction defaultReason(connectorId: string, mode: IntegrationRequirementMode): string {\n if (connectorId === 'google-calendar' && mode === 'read') return 'Read calendar availability for the generated app.'\n if (connectorId === 'google-calendar' && mode === 'write') return 'Create or update calendar events after user approval.'\n return `${mode === 'read' ? 'Read from' : mode === 'write' ? 'Write to' : 'Subscribe to'} ${connectorId} for this app.`\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","import { CANONICAL_INTEGRATION_ACTIONS } from './actions.js'\nimport { IntegrationRuntimeError } from './errors.js'\n\nexport interface ProviderHttpRequestInput {\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'\n path: string\n query?: Record<string, string | number | boolean | undefined>\n headers?: Record<string, string>\n body?: unknown\n}\n\nexport interface ProviderPassthroughPolicy {\n enabled: boolean\n allowedMethods?: ProviderHttpRequestInput['method'][]\n allowedPathPrefixes?: string[]\n maxBodyBytes?: number\n}\n\nexport const PROVIDER_PASSTHROUGH_ACTION = CANONICAL_INTEGRATION_ACTIONS.providerHttpRequest\n\nexport function validateProviderPassthroughRequest(\n input: ProviderHttpRequestInput,\n policy: ProviderPassthroughPolicy,\n): void {\n if (!policy.enabled) {\n throw new IntegrationRuntimeError({\n code: 'passthrough_disabled',\n message: 'Provider-native passthrough is disabled for this connector.',\n })\n }\n if (!input.path.startsWith('/')) {\n throw new IntegrationRuntimeError({ code: 'input_invalid', message: 'Provider passthrough path must start with /.' })\n }\n if (policy.allowedMethods?.length && !policy.allowedMethods.includes(input.method)) {\n throw new IntegrationRuntimeError({ code: 'action_denied', message: `Provider passthrough method ${input.method} is not allowed.` })\n }\n if (policy.allowedPathPrefixes?.length && !policy.allowedPathPrefixes.some((prefix) => input.path.startsWith(prefix))) {\n throw new IntegrationRuntimeError({ code: 'action_denied', message: `Provider passthrough path ${input.path} is not allowed.` })\n }\n const maxBodyBytes = policy.maxBodyBytes ?? 64 * 1024\n const bodyBytes = Buffer.byteLength(JSON.stringify(input.body ?? null), 'utf8')\n if (bodyBytes > maxBodyBytes) {\n throw new IntegrationRuntimeError({ code: 'input_invalid', message: `Provider passthrough body exceeds ${maxBodyBytes} bytes.` })\n }\n for (const key of Object.keys(input.headers ?? {})) {\n if (/authorization|cookie|token|secret|api[_-]?key/i.test(key)) {\n throw new IntegrationRuntimeError({ code: 'input_invalid', message: `Provider passthrough header ${key} is not caller-settable.` })\n }\n }\n}\n","import { StaticIntegrationPolicyEngine, type StaticIntegrationPolicyOptions } from './policy.js'\n\nexport interface PlatformIntegrationPolicyPresetOptions extends Omit<StaticIntegrationPolicyOptions, 'defaultReadEffect' | 'defaultWriteEffect' | 'defaultDestructiveEffect'> {\n allowWritesWithoutApproval?: boolean\n allowDestructiveActions?: boolean\n allowProviderPassthrough?: boolean\n}\n\nexport function createPlatformIntegrationPolicyPreset(options: PlatformIntegrationPolicyPresetOptions = {}): StaticIntegrationPolicyEngine {\n return new StaticIntegrationPolicyEngine({\n ...options,\n defaultReadEffect: 'allow',\n defaultWriteEffect: options.allowWritesWithoutApproval ? 'allow' : 'require_approval',\n defaultDestructiveEffect: options.allowDestructiveActions ? 'require_approval' : 'deny',\n rules: [\n ...(options.allowProviderPassthrough ? [] : [{\n id: 'deny-provider-native-passthrough',\n action: 'provider.http.request',\n effect: 'deny' as const,\n reason: 'Provider-native passthrough is disabled by default. Promote the connector action or enable passthrough explicitly.',\n }]),\n ...(options.rules ?? []),\n ],\n })\n}\n","import type {\n CompleteAuthRequest,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationProvider,\n IntegrationProviderKind,\n IntegrationTriggerEvent,\n IntegrationTriggerSubscription,\n StartAuthRequest,\n StartAuthResult,\n} from './index.js'\nimport { IntegrationError } from './index.js'\n\nexport interface CatalogExecutorInvocation {\n connection: IntegrationConnection\n request: IntegrationActionRequest\n connector: IntegrationConnector\n action: IntegrationConnector['actions'][number]\n}\n\nexport interface CatalogExecutorProviderOptions {\n id: string\n kind: IntegrationProviderKind\n connectors: IntegrationConnector[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n executeAction: (invocation: CatalogExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult\n subscribeTrigger?: (\n connection: IntegrationConnection,\n trigger: NonNullable<IntegrationConnector['triggers']>[number],\n targetUrl?: string,\n ) => Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription\n unsubscribeTrigger?: (subscriptionId: string) => Promise<void> | void\n normalizeTriggerEvent?: (raw: unknown) => Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent\n}\n\nexport function createCatalogExecutorProvider(options: CatalogExecutorProviderOptions): IntegrationProvider {\n const byConnector = new Map(options.connectors.map((connector) => [connector.id, connector]))\n return {\n id: options.id,\n kind: options.kind,\n listConnectors: () => options.connectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n async invokeAction(connection, request) {\n const connector = byConnector.get(connection.connectorId)\n if (!connector) {\n throw new IntegrationError(`Connector ${connection.connectorId} not found.`, 'connector_not_found')\n }\n const action = connector.actions.find((candidate) => candidate.id === request.action)\n if (!action) {\n throw new IntegrationError(`Action ${request.action} is not defined by connector ${connector.id}.`, 'action_not_found')\n }\n return options.executeAction({ connection, request, connector, action })\n },\n async subscribeTrigger(connection, triggerId, targetUrl) {\n if (!options.subscribeTrigger) {\n throw new IntegrationError(`Provider ${options.id} does not support trigger subscriptions.`, 'trigger_not_found')\n }\n const connector = byConnector.get(connection.connectorId)\n if (!connector) {\n throw new IntegrationError(`Connector ${connection.connectorId} not found.`, 'connector_not_found')\n }\n const trigger = connector.triggers?.find((candidate) => candidate.id === triggerId)\n if (!trigger) {\n throw new IntegrationError(`Trigger ${triggerId} is not defined by connector ${connector.id}.`, 'trigger_not_found')\n }\n return options.subscribeTrigger(connection, trigger, targetUrl)\n },\n unsubscribeTrigger: options.unsubscribeTrigger,\n normalizeTriggerEvent: options.normalizeTriggerEvent,\n }\n}\n","import type {\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationDataClass,\n} from './index.js'\n\nexport interface ImportCatalogOptions {\n providerId: string\n connectorId: string\n connectorTitle: string\n category?: IntegrationConnectorCategory\n auth?: IntegrationConnector['auth']\n scopes?: string[]\n dataClass?: IntegrationDataClass\n defaultRisk?: IntegrationActionRisk\n}\n\nexport interface OpenApiDocument {\n openapi?: string\n swagger?: string\n info?: { title?: string }\n paths?: Record<string, Record<string, OpenApiOperation | unknown>>\n}\n\nexport interface OpenApiOperation {\n operationId?: string\n summary?: string\n description?: string\n parameters?: unknown[]\n requestBody?: unknown\n responses?: unknown\n security?: Array<Record<string, string[]>>\n tags?: string[]\n}\n\nexport interface GraphqlOperationSpec {\n name: string\n kind: 'query' | 'mutation'\n description?: string\n inputSchema?: unknown\n outputSchema?: unknown\n requiredScopes?: string[]\n}\n\nexport interface McpCatalogTool {\n name: string\n description?: string\n inputSchema?: unknown\n annotations?: {\n readOnlyHint?: boolean\n destructiveHint?: boolean\n openWorldHint?: boolean\n title?: string\n }\n}\n\nexport interface McpCatalog {\n tools: McpCatalogTool[]\n}\n\nconst HTTP_METHODS = new Set(['get', 'post', 'put', 'patch', 'delete'])\n\nexport function importOpenApiConnector(document: OpenApiDocument, options: ImportCatalogOptions): IntegrationConnector {\n const actions: IntegrationConnectorAction[] = []\n for (const [path, methods] of Object.entries(document.paths ?? {})) {\n for (const [method, rawOperation] of Object.entries(methods)) {\n const normalizedMethod = method.toLowerCase()\n if (!HTTP_METHODS.has(normalizedMethod) || !isObject(rawOperation)) continue\n const operation = rawOperation as OpenApiOperation\n const operationId = operation.operationId ?? `${normalizedMethod}_${path.replace(/[^a-zA-Z0-9]+/g, '_').replace(/^_+|_+$/g, '')}`\n actions.push({\n id: operationId,\n title: operation.summary ?? titleFromId(operationId),\n risk: riskFromHttpMethod(normalizedMethod, operation, options.defaultRisk),\n requiredScopes: scopesFromOpenApiOperation(operation, options.scopes ?? []),\n dataClass: options.dataClass ?? 'private',\n description: operation.description ?? operation.summary ?? `${normalizedMethod.toUpperCase()} ${path}`,\n approvalRequired: riskFromHttpMethod(normalizedMethod, operation, options.defaultRisk) !== 'read',\n inputSchema: openApiInputSchema(path, normalizedMethod, operation),\n outputSchema: operation.responses,\n })\n }\n }\n return connectorFromActions(options, actions)\n}\n\nexport function importGraphqlConnector(operations: GraphqlOperationSpec[], options: ImportCatalogOptions): IntegrationConnector {\n return connectorFromActions(options, operations.map((operation) => ({\n id: operation.name,\n title: titleFromId(operation.name),\n risk: operation.kind === 'query' ? 'read' : options.defaultRisk ?? 'write',\n requiredScopes: operation.requiredScopes ?? options.scopes ?? [],\n dataClass: options.dataClass ?? 'private',\n description: operation.description,\n approvalRequired: operation.kind === 'mutation',\n inputSchema: operation.inputSchema,\n outputSchema: operation.outputSchema,\n })))\n}\n\nexport function importMcpConnector(catalog: McpCatalog, options: ImportCatalogOptions): IntegrationConnector {\n return connectorFromActions(options, catalog.tools.map((tool) => {\n const risk = riskFromMcpTool(tool, options.defaultRisk)\n return {\n id: tool.name,\n title: tool.annotations?.title ?? titleFromId(tool.name),\n risk,\n requiredScopes: options.scopes ?? [],\n dataClass: options.dataClass ?? 'private',\n description: tool.description,\n approvalRequired: risk !== 'read',\n inputSchema: tool.inputSchema,\n }\n }))\n}\n\nfunction connectorFromActions(options: ImportCatalogOptions, actions: IntegrationConnectorAction[]): IntegrationConnector {\n const scopes = unique([\n ...(options.scopes ?? []),\n ...actions.flatMap((action) => action.requiredScopes),\n ])\n return {\n id: options.connectorId,\n providerId: options.providerId,\n title: options.connectorTitle,\n category: options.category ?? 'other',\n auth: options.auth ?? 'custom',\n scopes,\n actions,\n metadata: { source: 'catalog-importer' },\n }\n}\n\nfunction riskFromHttpMethod(method: string, operation: OpenApiOperation, fallback?: IntegrationActionRisk): IntegrationActionRisk {\n if (method === 'get') return 'read'\n if (method === 'delete') return 'destructive'\n const text = `${operation.operationId ?? ''} ${operation.summary ?? ''} ${operation.description ?? ''}`.toLowerCase()\n if (/\\b(delete|remove|destroy|cancel|void|revoke|drop)\\b/.test(text)) return 'destructive'\n return fallback && fallback !== 'read' ? fallback : 'write'\n}\n\nfunction riskFromMcpTool(tool: McpCatalogTool, fallback?: IntegrationActionRisk): IntegrationActionRisk {\n if (tool.annotations?.destructiveHint) return 'destructive'\n if (tool.annotations?.readOnlyHint) return 'read'\n const text = `${tool.name} ${tool.description ?? ''}`.toLowerCase()\n if (/\\b(delete|remove|destroy|cancel|void|revoke|drop)\\b/.test(text)) return 'destructive'\n if (/\\b(get|list|read|search|find|fetch|query)\\b/.test(text)) return 'read'\n return fallback ?? 'write'\n}\n\nfunction scopesFromOpenApiOperation(operation: OpenApiOperation, fallback: string[]): string[] {\n const scopes = (operation.security ?? []).flatMap((entry) => Object.values(entry).flat())\n return unique(scopes.length > 0 ? scopes : fallback)\n}\n\nfunction openApiInputSchema(path: string, method: string, operation: OpenApiOperation): unknown {\n return {\n type: 'object',\n additionalProperties: true,\n properties: {\n path: { const: path },\n method: { const: method.toUpperCase() },\n parameters: { type: 'object', additionalProperties: true },\n body: operation.requestBody ?? { type: 'object', additionalProperties: true },\n },\n }\n}\n\nfunction titleFromId(id: string): string {\n return id\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n .split(/[^a-zA-Z0-9]+/g)\n .filter(Boolean)\n .map((part) => part.slice(0, 1).toUpperCase() + part.slice(1))\n .join(' ')\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","import type {\n CompleteAuthRequest,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationConnectorTrigger,\n IntegrationDataClass,\n IntegrationProvider,\n IntegrationProviderKind,\n StartAuthRequest,\n StartAuthResult,\n} from './index.js'\nimport { IntegrationError } from './index.js'\n\nexport interface GatewayCatalogProviderOptions {\n id: string\n kind: Extract<IntegrationProviderKind, 'nango' | 'pipedream' | 'activepieces' | 'tangle_catalog' | 'zapier' | 'executor' | 'custom'>\n fetchCatalog: () => Promise<GatewayCatalogEntry[]> | GatewayCatalogEntry[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n invokeAction?: (connection: IntegrationConnection, request: IntegrationActionRequest) => Promise<IntegrationActionResult> | IntegrationActionResult\n cacheTtlMs?: number\n now?: () => Date\n}\n\nexport interface GatewayCatalogEntry {\n id?: string\n key?: string\n name?: string\n title?: string\n category?: string\n auth?: 'oauth2' | 'api_key' | 'none' | 'custom' | string\n scopes?: string[]\n actions?: GatewayCatalogAction[]\n triggers?: GatewayCatalogTrigger[]\n metadata?: Record<string, unknown>\n}\n\nexport interface GatewayCatalogAction {\n id?: string\n key?: string\n name?: string\n title?: string\n description?: string\n risk?: 'read' | 'write' | 'destructive' | string\n scopes?: string[]\n requiredScopes?: string[]\n dataClass?: IntegrationDataClass | string\n approvalRequired?: boolean\n inputSchema?: unknown\n outputSchema?: unknown\n}\n\nexport interface GatewayCatalogTrigger {\n id?: string\n key?: string\n name?: string\n title?: string\n description?: string\n scopes?: string[]\n requiredScopes?: string[]\n dataClass?: IntegrationDataClass | string\n payloadSchema?: unknown\n}\n\nexport function createGatewayCatalogProvider(options: GatewayCatalogProviderOptions): IntegrationProvider {\n const now = options.now ?? (() => new Date())\n let cachedAt = 0\n let cached: IntegrationConnector[] | undefined\n\n async function listConnectors(): Promise<IntegrationConnector[]> {\n const ttl = options.cacheTtlMs ?? 60_000\n const current = now().getTime()\n if (cached && current - cachedAt < ttl) return cached\n const entries = await options.fetchCatalog()\n cached = normalizeGatewayCatalog(entries, {\n providerId: options.id,\n providerKind: options.kind,\n })\n cachedAt = current\n return cached\n }\n\n return {\n id: options.id,\n kind: options.kind,\n listConnectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n async invokeAction(connection, request) {\n if (!options.invokeAction) {\n throw new IntegrationError(`Gateway provider ${options.id} does not implement action invocation.`, 'action_not_found')\n }\n await assertKnownGatewayAction(await listConnectors(), connection.connectorId, request.action)\n return options.invokeAction(connection, request)\n },\n }\n}\n\nexport function normalizeGatewayCatalog(\n entries: GatewayCatalogEntry[],\n options: { providerId: string; providerKind: IntegrationProviderKind },\n): IntegrationConnector[] {\n const out: IntegrationConnector[] = []\n const seen = new Set<string>()\n for (const entry of entries) {\n const id = slug(entry.id ?? entry.key ?? entry.name ?? entry.title ?? '')\n if (!id || seen.has(id)) continue\n seen.add(id)\n const title = entry.title ?? entry.name ?? titleFromId(id)\n const actions = normalizeActions(entry.actions ?? [], entry.scopes ?? [])\n out.push({\n id,\n providerId: options.providerId,\n title,\n category: normalizeCategory(entry.category),\n auth: normalizeAuth(entry.auth),\n scopes: unique([\n ...(entry.scopes ?? []),\n ...actions.flatMap((action) => action.requiredScopes),\n ]),\n actions: actions.length > 0 ? actions : defaultActionsFor(entry.category, entry.scopes ?? []),\n triggers: normalizeTriggers(entry.triggers ?? [], entry.scopes ?? []),\n metadata: {\n ...(entry.metadata ?? {}),\n source: 'gateway-catalog',\n providerKind: options.providerKind,\n executable: true,\n },\n })\n }\n return out\n}\n\nasync function assertKnownGatewayAction(connectors: IntegrationConnector[], connectorId: string, actionId: string): Promise<void> {\n const connector = connectors.find((candidate) => candidate.id === connectorId)\n if (!connector) throw new IntegrationError(`Connector ${connectorId} not found.`, 'connector_not_found')\n if (!connector.actions.some((action) => action.id === actionId)) {\n throw new IntegrationError(`Action ${actionId} is not defined by connector ${connectorId}.`, 'action_not_found')\n }\n}\n\nfunction normalizeActions(actions: GatewayCatalogAction[], fallbackScopes: string[]): IntegrationConnectorAction[] {\n return actions.map((action) => {\n const id = slug(action.id ?? action.key ?? action.name ?? action.title ?? '')\n return {\n id,\n title: action.title ?? action.name ?? titleFromId(id),\n risk: normalizeRisk(action.risk),\n requiredScopes: unique([\n ...(action.requiredScopes ?? []),\n ...(action.scopes ?? []),\n ...((action.requiredScopes?.length || action.scopes?.length) ? [] : fallbackScopes),\n ]),\n dataClass: normalizeDataClass(action.dataClass),\n description: action.description,\n approvalRequired: action.approvalRequired ?? normalizeRisk(action.risk) !== 'read',\n inputSchema: action.inputSchema,\n outputSchema: action.outputSchema,\n }\n }).filter((action) => action.id)\n}\n\nfunction normalizeTriggers(triggers: GatewayCatalogTrigger[], fallbackScopes: string[]): IntegrationConnectorTrigger[] | undefined {\n const normalized = triggers.map((trigger) => {\n const id = slug(trigger.id ?? trigger.key ?? trigger.name ?? trigger.title ?? '')\n return {\n id,\n title: trigger.title ?? trigger.name ?? titleFromId(id),\n requiredScopes: unique([\n ...(trigger.requiredScopes ?? []),\n ...(trigger.scopes ?? []),\n ...((trigger.requiredScopes?.length || trigger.scopes?.length) ? [] : fallbackScopes),\n ]),\n dataClass: normalizeDataClass(trigger.dataClass),\n description: trigger.description,\n payloadSchema: trigger.payloadSchema,\n }\n }).filter((trigger) => trigger.id)\n return normalized.length > 0 ? normalized : undefined\n}\n\nfunction defaultActionsFor(category: string | undefined, scopes: string[]): IntegrationConnectorAction[] {\n const readScope = scopes.find((scope) => scope.endsWith('.read')) ?? scopes[0]\n const writeScope = scopes.find((scope) => scope.endsWith('.write')) ?? scopes[1] ?? readScope\n const requiredRead = readScope ? [readScope] : []\n const requiredWrite = writeScope ? [writeScope] : []\n const dataClass = normalizeDataClass(category === 'finance' || category === 'commerce' || category === 'hr' ? 'sensitive' : 'private')\n return [\n {\n id: 'records.search',\n title: 'Search records',\n risk: 'read',\n requiredScopes: requiredRead,\n dataClass,\n description: 'Search provider records.',\n },\n {\n id: 'records.read',\n title: 'Read record',\n risk: 'read',\n requiredScopes: requiredRead,\n dataClass,\n description: 'Read a provider record.',\n },\n {\n id: 'records.upsert',\n title: 'Upsert record',\n risk: 'write',\n requiredScopes: requiredWrite,\n dataClass,\n approvalRequired: true,\n description: 'Create or update a provider record.',\n },\n ]\n}\n\nfunction normalizeCategory(category: string | undefined): IntegrationConnectorCategory {\n const value = slug(category ?? '')\n if (value === 'mail') return 'email'\n if (value === 'messaging' || value === 'communication' || value === 'communications') return 'chat'\n if (value === 'file' || value === 'files') return 'storage'\n if (value === 'project-management' || value === 'automation') return 'workflow'\n if (value === 'developer' || value === 'devops') return 'workflow'\n if (value === 'support') return 'crm'\n if ([\n 'email',\n 'calendar',\n 'chat',\n 'crm',\n 'storage',\n 'docs',\n 'database',\n 'webhook',\n 'workflow',\n 'internal',\n 'other',\n ].includes(value)) return value as IntegrationConnectorCategory\n return 'other'\n}\n\nfunction normalizeAuth(auth: GatewayCatalogEntry['auth']): IntegrationConnector['auth'] {\n if (auth === 'oauth2') return 'oauth2'\n if (auth === 'api_key' || auth === 'api-key' || auth === 'apikey') return 'api_key'\n if (auth === 'none') return 'none'\n return 'custom'\n}\n\nfunction normalizeRisk(risk: GatewayCatalogAction['risk']): IntegrationConnectorAction['risk'] {\n if (risk === 'read' || risk === 'write' || risk === 'destructive') return risk\n return 'write'\n}\n\nfunction normalizeDataClass(dataClass: GatewayCatalogAction['dataClass']): IntegrationDataClass {\n if (dataClass === 'public' || dataClass === 'internal' || dataClass === 'private' || dataClass === 'sensitive' || dataClass === 'secret') return dataClass\n return 'private'\n}\n\nfunction slug(value: string): string {\n return value.trim().toLowerCase()\n .replace(/&/g, 'and')\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n\nfunction titleFromId(id: string): string {\n return id.split('-').filter(Boolean).map((part) => part.slice(0, 1).toUpperCase() + part.slice(1)).join(' ')\n}\n\nfunction unique<T>(values: T[]): T[] {\n return [...new Set(values)]\n}\n","import type {\n IntegrationActionRisk,\n IntegrationConnectorCategory,\n} from './index.js'\n\nexport interface ActivepiecesPieceOverride {\n category?: IntegrationConnectorCategory\n actionRisks?: Record<string, IntegrationActionRisk>\n approvalRequired?: Record<string, boolean>\n}\n\nexport const ACTIVEPIECES_OVERRIDES: Record<string, ActivepiecesPieceOverride> = {\n slack: {\n category: 'chat',\n actionRisks: {\n 'slack.send.message': 'write',\n 'slack.send.direct.message': 'write',\n 'request.action.message': 'write',\n 'request.action.direct.message': 'write',\n 'request.approval.direct.message': 'write',\n 'request.send.approval.message': 'write',\n 'upload.file': 'write',\n 'search.messages': 'read',\n },\n },\n discord: { category: 'chat' },\n 'microsoft-teams': { category: 'chat' },\n whatsapp: { category: 'chat' },\n telegram: { category: 'chat' },\n\n gmail: {\n category: 'email',\n actionRisks: {\n 'gmail.send.email': 'write',\n 'gmail.reply.to.email': 'write',\n 'gmail.create.draft.reply': 'write',\n 'gmail.search.mail': 'read',\n 'gmail.get.email': 'read',\n 'request.approval.in.email': 'write',\n },\n },\n 'microsoft-outlook': { category: 'email' },\n sendgrid: { category: 'email' },\n postmark: { category: 'email' },\n mailchimp: { category: 'email' },\n resend: { category: 'email' },\n\n 'google-calendar': { category: 'calendar' },\n 'microsoft-outlook-calendar': { category: 'calendar' },\n cal: { category: 'calendar' },\n calendly: { category: 'calendar' },\n zoom: { category: 'calendar' },\n\n 'google-drive': { category: 'storage' },\n dropbox: { category: 'storage' },\n onedrive: { category: 'storage' },\n\n 'google-sheets': { category: 'database' },\n 'google-docs': { category: 'docs' },\n airtable: { category: 'database' },\n notion: { category: 'docs' },\n\n hubspot: { category: 'crm' },\n salesforce: { category: 'crm' },\n pipedrive: { category: 'crm' },\n intercom: { category: 'crm' },\n zendesk: { category: 'crm' },\n neverbounce: { category: 'crm' },\n\n stripe: {\n category: 'crm',\n actionRisks: {\n 'stripe.create.customer': 'write',\n 'stripe.update.customer': 'write',\n 'stripe.retrieve.customer': 'read',\n 'stripe.search.customer': 'read',\n 'stripe.search.subscriptions': 'read',\n 'stripe.create.invoice': 'write',\n 'stripe.retrieve.invoice': 'read',\n 'stripe.find.invoice': 'read',\n 'stripe.create.subscription': 'write',\n 'stripe.cancel.subscription': 'destructive',\n 'stripe.create.payment.intent': 'write',\n 'stripe.retrieve.payment.intent': 'read',\n 'stripe.create.refund': 'destructive',\n 'stripe.create.product': 'write',\n 'stripe.create.price': 'write',\n 'stripe.create.payment.link': 'write',\n 'stripe.deactivate.payment.link': 'destructive',\n 'stripe.retrieve.payout': 'read',\n },\n approvalRequired: {\n 'stripe.create.refund': true,\n 'stripe.cancel.subscription': true,\n 'stripe.deactivate.payment.link': true,\n },\n },\n\n twilio: {\n category: 'chat',\n actionRisks: {\n 'send.sms': 'write',\n 'send.whatsapp.message': 'write',\n 'make.phone.call': 'write',\n },\n },\n\n shopify: { category: 'crm' },\n square: { category: 'crm' },\n}\n\nexport function getActivepiecesOverride(id: string): ActivepiecesPieceOverride | undefined {\n return ACTIVEPIECES_OVERRIDES[id]\n}\n","","import type {\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorAction,\n IntegrationConnectorCategory,\n IntegrationConnectorTrigger,\n IntegrationDataClass,\n} from './core-types.js'\nimport { getActivepiecesOverride } from './activepieces-overrides.js'\nimport { catalogData } from './activepieces-catalog-data.mjs'\n\nexport interface ActivepiecesCatalogEntry {\n id: string\n title: string\n description: string\n npmPackage?: string\n version?: string\n category: IntegrationConnectorCategory\n auth: IntegrationConnector['auth']\n authFields?: ActivepiecesCatalogAuthField[]\n domains: string[]\n actions: Array<{\n id: string\n title: string\n risk: IntegrationActionRisk\n upstreamName?: string\n }>\n triggers: Array<{\n id: string\n title: string\n upstreamName?: string\n }>\n source: {\n repository: string\n path: string\n license: 'MIT'\n }\n}\n\nexport interface ActivepiecesCatalogAuthField {\n key: string\n label: string\n required: boolean\n secret: boolean\n kind: 'text' | 'number' | 'boolean' | 'select' | 'object' | 'unknown'\n description?: string\n}\n\nconst CACHED_CATALOG = catalogData as unknown as ReadonlyArray<ActivepiecesCatalogEntry>\n\nfunction loadCatalog(): ReadonlyArray<ActivepiecesCatalogEntry> {\n return CACHED_CATALOG\n}\n\nexport function listActivepiecesCatalogEntries(): ActivepiecesCatalogEntry[] {\n return loadCatalog().map((entry) => ({\n ...entry,\n actions: [...entry.actions],\n triggers: [...entry.triggers],\n domains: [...entry.domains],\n source: { ...entry.source },\n }))\n}\n\nexport function buildActivepiecesConnectors(options: {\n providerId?: string\n includeCatalogActions?: boolean\n executable?: boolean\n} = {}): IntegrationConnector[] {\n const providerId = options.providerId ?? 'activepieces'\n const executable = options.executable === true\n return listActivepiecesCatalogEntries().map((entry) => {\n const override = getActivepiecesOverride(entry.id)\n const category = override?.category ?? entry.category\n const scopes = [`${entry.id}.read`, `${entry.id}.write`]\n const catalogActions = entry.actions.map((action) =>\n toAction(applyActionOverride(action, override), scopes, dataClassFor(category)))\n const catalogTriggers = entry.triggers.map((trigger) => toTrigger(trigger, scopes, dataClassFor(category)))\n // An entry with no runnable catalog actions cannot be executed regardless\n // of the requested executable flag — there is nothing to bind to a runtime\n // action. Such entries are catalog-only (discoverable, not invokable).\n const entryExecutable = executable && catalogActions.length > 0\n return {\n id: entry.id,\n providerId,\n title: entry.title,\n category,\n auth: entry.auth,\n scopes: options.includeCatalogActions ? scopes : [],\n actions: options.includeCatalogActions ? catalogActions : [],\n triggers: options.includeCatalogActions ? catalogTriggers : undefined,\n metadata: {\n source: 'activepieces-community',\n executable: entryExecutable,\n runtime: 'activepieces-piece',\n catalogOnly: !entryExecutable,\n supportTier: entryExecutable ? 'gatewayExecutable' : 'catalogOnly',\n catalogActionCount: catalogActions.length,\n catalogTriggerCount: catalogTriggers.length,\n npmPackage: entry.npmPackage,\n version: entry.version,\n license: entry.source.license,\n sourcePath: entry.source.path,\n domains: entry.domains,\n authFields: entry.authFields,\n ...(override ? { overridden: true } : {}),\n },\n }\n })\n}\n\nfunction applyActionOverride(\n action: ActivepiecesCatalogEntry['actions'][number],\n override: ReturnType<typeof getActivepiecesOverride>,\n): ActivepiecesCatalogEntry['actions'][number] {\n if (!override) return action\n const risk = override.actionRisks?.[action.id] ?? action.risk\n return { ...action, risk }\n}\n\nfunction toAction(\n action: ActivepiecesCatalogEntry['actions'][number],\n scopes: string[],\n dataClass: IntegrationDataClass,\n): IntegrationConnectorAction {\n return {\n id: action.id,\n title: action.title,\n risk: action.risk,\n requiredScopes: action.risk === 'read' ? [scopes[0]!] : [scopes[1]!],\n dataClass,\n approvalRequired: action.risk !== 'read',\n inputSchema: { type: 'object', additionalProperties: true, properties: {} },\n }\n}\n\nfunction toTrigger(\n trigger: ActivepiecesCatalogEntry['triggers'][number],\n scopes: string[],\n dataClass: IntegrationDataClass,\n): IntegrationConnectorTrigger {\n return {\n id: trigger.id,\n title: trigger.title,\n requiredScopes: [scopes[0]!],\n dataClass,\n payloadSchema: { type: 'object', additionalProperties: true, properties: {} },\n }\n}\n\nfunction dataClassFor(category: IntegrationConnectorCategory): IntegrationDataClass {\n if (category === 'database' || category === 'storage' || category === 'email') return 'private'\n if (category === 'crm' || category === 'chat' || category === 'docs') return 'private'\n if (category === 'internal') return 'sensitive'\n return 'internal'\n}\n","import {\n buildActivepiecesConnectors,\n listActivepiecesCatalogEntries,\n type ActivepiecesCatalogEntry,\n} from './activepieces-catalog.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport type {\n CompleteAuthRequest,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationConnection,\n IntegrationConnector,\n IntegrationProvider,\n StartAuthRequest,\n StartAuthResult,\n} from './index.js'\nimport { IntegrationError } from './index.js'\n\nexport interface ActivepiecesExecutorInvocation {\n connection: IntegrationConnection\n request: IntegrationActionRequest\n connector: IntegrationConnector\n catalogEntry: ActivepiecesCatalogEntry\n piece: {\n id: string\n npmPackage?: string\n version?: string\n actionId: string\n upstreamActionName?: string\n }\n}\n\nexport interface ActivepiecesExecutorProviderOptions {\n id?: string\n connectors?: IntegrationConnector[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n executeAction: (invocation: ActivepiecesExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult\n}\n\nexport function createActivepiecesExecutorProvider(options: ActivepiecesExecutorProviderOptions): IntegrationProvider {\n const providerId = options.id ?? 'activepieces'\n const connectors = options.connectors ?? buildActivepiecesConnectors({\n providerId,\n includeCatalogActions: true,\n executable: true,\n })\n const byEntry = new Map(listActivepiecesCatalogEntries().map((entry) => [entry.id, entry]))\n\n return createCatalogExecutorProvider({\n id: providerId,\n kind: 'activepieces',\n connectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n executeAction: async ({ connection, request, connector, action }) => {\n const catalogEntry = byEntry.get(connector.id)\n if (!catalogEntry) {\n throw new IntegrationError(`Activepieces catalog entry ${connector.id} not found.`, 'connector_not_found')\n }\n const catalogAction = catalogEntry.actions.find((candidate) => candidate.id === action.id)\n return options.executeAction({\n connection,\n request,\n connector,\n catalogEntry,\n piece: {\n id: catalogEntry.id,\n npmPackage: catalogEntry.npmPackage,\n version: catalogEntry.version,\n actionId: action.id,\n upstreamActionName: catalogAction?.upstreamName,\n },\n })\n },\n })\n}\n","import { buildActivepiecesConnectors, listActivepiecesCatalogEntries } from './activepieces-catalog.js'\nimport { buildTangleIntegrationCatalogConnectors } from './tangle-catalog.js'\nimport type {\n IntegrationCatalogSource,\n IntegrationConnector,\n} from './core-types.js'\nimport {\n composeIntegrationRegistry,\n type IntegrationRegistry,\n type IntegrationSupportTier,\n} from './registry-core.js'\nimport { integrationSpecToConnector, listIntegrationSpecs } from './specs/registry.js'\n\nexport {\n canonicalConnectorId,\n composeIntegrationRegistry,\n inferIntegrationSupportTier,\n summarizeIntegrationRegistry,\n} from './registry-core.js'\nexport type {\n ComposeIntegrationRegistryOptions,\n IntegrationRegistry,\n IntegrationRegistryConflict,\n IntegrationRegistryEntry,\n IntegrationRegistrySourceRef,\n IntegrationRegistrySummary,\n IntegrationSupportTier,\n} from './registry-core.js'\n\nexport function buildDefaultIntegrationRegistry(options: {\n includeSpecs?: boolean\n includeTangleCatalog?: boolean\n tangleCatalogRuntimeExecutable?: boolean\n /** @deprecated Use includeTangleCatalog. */\n includeActivepieces?: boolean\n} = {}): IntegrationRegistry {\n const includeSpecs = options.includeSpecs ?? true\n const includeTangleCatalog = options.includeTangleCatalog ?? options.includeActivepieces ?? true\n const sources: IntegrationCatalogSource[] = []\n if (includeSpecs) {\n sources.push({\n id: 'spec',\n connectors: listIntegrationSpecs().map((spec) => integrationSpecToConnector(spec, 'spec')),\n })\n }\n if (includeTangleCatalog) {\n const tangleConnectors = options.tangleCatalogRuntimeExecutable\n ? buildTangleIntegrationCatalogConnectors({\n providerId: 'tangle-catalog',\n includeCatalogActions: true,\n executable: true,\n })\n : buildActivepiecesConnectors({ providerId: 'tangle-catalog' }).map((connector) => ({\n ...connector,\n providerId: 'tangle-catalog',\n metadata: {\n source: 'tangle-integrations-catalog',\n providerId: 'tangle-catalog',\n executable: connector.metadata?.executable,\n runtime: 'native-adapter-backlog',\n catalogOnly: connector.metadata?.catalogOnly,\n supportTier: connector.metadata?.supportTier,\n catalogActionCount: connector.metadata?.catalogActionCount,\n catalogTriggerCount: connector.metadata?.catalogTriggerCount,\n license: connector.metadata?.license,\n version: connector.metadata?.version,\n domains: Array.isArray(connector.metadata?.domains)\n ? connector.metadata.domains.filter((domain) => typeof domain === 'string' && !domain.toLowerCase().includes('activepieces'))\n : undefined,\n ...(connector.metadata?.overridden ? { overridden: true } : {}),\n },\n }))\n sources.push({\n id: 'tangle-catalog',\n connectors: tangleConnectors,\n })\n }\n return composeIntegrationRegistry(sources)\n}\n\n/** Per-entry executability classification. Pure metadata — never loads or\n * runs a runtime module. The coverage report consumes this to separate\n * \"we can execute this today\" from \"catalog-only / setup-only\". */\nexport interface IntegrationCatalogExecutability {\n canonicalId: string\n /** True when the entry resolves to a runnable action: a first-party /\n * sandbox / gateway-executable support tier, or a tangle-catalog entry\n * with a resolvable npm runtime package. */\n executable: boolean\n supportTier: IntegrationSupportTier\n authKind: IntegrationConnector['auth']\n /** Resolvable npm runtime package name when one is registered for this\n * connector in the vendored catalog; undefined for first-party adapters\n * (which execute in-process) and catalog-only entries. */\n runtimePackage?: string\n actionCount: number\n triggerCount: number\n}\n\n/** Classify every entry in a composed registry by executability + auth kind\n * WITHOUT executing anything. Defaults to {@link buildDefaultIntegrationRegistry}. */\nexport function classifyIntegrationCatalogExecutability(\n registry: IntegrationRegistry = buildDefaultIntegrationRegistry(),\n): IntegrationCatalogExecutability[] {\n const packageByConnector = new Map(\n listActivepiecesCatalogEntries()\n .filter((entry) => entry.npmPackage)\n .map((entry) => [entry.id, entry.npmPackage!]),\n )\n return registry.entries.map((entry) => {\n const runtimePackage = packageByConnector.get(entry.connector.id)\n const tierExecutable =\n entry.supportTier === 'firstPartyExecutable' ||\n entry.supportTier === 'sandboxExecutable' ||\n entry.supportTier === 'gatewayExecutable'\n return {\n canonicalId: entry.canonicalId,\n executable: tierExecutable && entry.connector.actions.length > 0,\n supportTier: entry.supportTier,\n authKind: entry.connector.auth,\n runtimePackage,\n actionCount: entry.connector.actions.length,\n triggerCount: entry.connector.triggers?.length ?? 0,\n }\n })\n}\n","import {\n buildActivepiecesConnectors,\n listActivepiecesCatalogEntries,\n} from './activepieces-catalog.js'\nimport { createActivepiecesExecutorProvider } from './activepieces-provider.js'\nimport { buildIntegrationToolCatalog } from './catalog.js'\nimport {\n buildDefaultIntegrationRegistry,\n composeIntegrationRegistry,\n type IntegrationRegistryConflict,\n type IntegrationRegistrySummary,\n summarizeIntegrationRegistry,\n} from './registry.js'\n\nexport interface IntegrationCatalogFreshnessOptions {\n liveActivepieces?: boolean\n minActivepiecesConnectors?: number\n staleConnectorDelta?: number\n fetchImpl?: typeof fetch\n}\n\nexport interface IntegrationCatalogFreshnessResult {\n ok: boolean\n generatedAt: string\n local: {\n activepiecesEntries: number\n activepiecesConnectors: number\n activepiecesActions: number\n activepiecesTriggers: number\n executableActivepiecesConnectors: number\n executableActivepiecesActions: number\n executableActivepiecesTriggers: number\n executableToolDefinitions: number\n unsupportedExecutableConnectorIds: string[]\n registryEntries: number\n registrySummary: IntegrationRegistrySummary\n conflictSamples: IntegrationRegistryConflict[]\n }\n upstream?: {\n activepiecesPieces?: number\n activepiecesDelta?: number\n checkedUrl: string\n warning?: string\n }\n warnings: string[]\n}\n\nexport const ACTIVEPIECES_PUBLIC_CATALOG_URL = 'https://www.activepieces.com/pieces'\n\nfunction parseCount(value: string | undefined): number | undefined {\n if (!value) return undefined\n const parsed = Number.parseInt(value.replace(/,/g, ''), 10)\n return Number.isFinite(parsed) ? parsed : undefined\n}\n\nexport function extractActivepiecesPublicPieceCount(html: string): number | undefined {\n const showingMatch = html.match(/Showing\\s+([0-9,]+)\\s+pieces/i)\n const integrationMatch = html.match(/([0-9,]+)\\+?\\s+Integrations/i)\n return parseCount(showingMatch?.[1]) ?? parseCount(integrationMatch?.[1])\n}\n\nexport async function auditIntegrationCatalogFreshness(\n options: IntegrationCatalogFreshnessOptions = {},\n): Promise<IntegrationCatalogFreshnessResult> {\n const minActivepiecesConnectors = options.minActivepiecesConnectors ?? 600\n const staleConnectorDelta = options.staleConnectorDelta ?? 25\n const activepiecesEntries = listActivepiecesCatalogEntries()\n const activepiecesConnectors = buildActivepiecesConnectors({\n includeCatalogActions: true,\n })\n const executableActivepiecesProvider = createActivepiecesExecutorProvider({\n executeAction: () => ({ ok: true, action: 'audit.noop' }),\n })\n const executableActivepiecesConnectors = await executableActivepiecesProvider.listConnectors()\n const executableRegistry = composeIntegrationRegistry([\n {\n id: executableActivepiecesProvider.id,\n connectors: executableActivepiecesConnectors,\n },\n ])\n const executableTools = buildIntegrationToolCatalog(executableRegistry.connectors)\n const unsupportedExecutableConnectorIds = executableActivepiecesConnectors\n .filter((connector) => connector.actions.length === 0)\n .map((connector) => connector.id)\n const registry = buildDefaultIntegrationRegistry({\n includeSpecs: true,\n includeActivepieces: true,\n })\n const warnings: string[] = []\n\n if (activepiecesConnectors.length < minActivepiecesConnectors) {\n warnings.push(\n `Activepieces catalog has ${activepiecesConnectors.length} connectors, below floor ${minActivepiecesConnectors}.`,\n )\n }\n // Entries without runnable actions (trigger-only or framework-internal\n // pieces) are an intrinsic property of the upstream catalog, not a freshness\n // defect. Their count is reported via unsupportedExecutableConnectorIds and\n // tool-definition totals; it does not gate the freshness check.\n\n let upstream: IntegrationCatalogFreshnessResult['upstream']\n if (options.liveActivepieces) {\n upstream = await checkActivepiecesPublicCatalog({\n localConnectorCount: activepiecesConnectors.length,\n staleConnectorDelta,\n fetchImpl: options.fetchImpl,\n warnings,\n })\n }\n\n return {\n ok: warnings.length === 0,\n generatedAt: new Date().toISOString(),\n local: {\n activepiecesEntries: activepiecesEntries.length,\n activepiecesConnectors: activepiecesConnectors.length,\n activepiecesActions: activepiecesConnectors.reduce(\n (sum, connector) => sum + connector.actions.length,\n 0,\n ),\n activepiecesTriggers: activepiecesConnectors.reduce(\n (sum, connector) => sum + (connector.triggers?.length ?? 0),\n 0,\n ),\n executableActivepiecesConnectors: executableActivepiecesConnectors.length,\n executableActivepiecesActions: executableActivepiecesConnectors.reduce(\n (sum, connector) => sum + connector.actions.length,\n 0,\n ),\n executableActivepiecesTriggers: executableActivepiecesConnectors.reduce(\n (sum, connector) => sum + (connector.triggers?.length ?? 0),\n 0,\n ),\n executableToolDefinitions: executableTools.length,\n unsupportedExecutableConnectorIds,\n registryEntries: registry.entries.length,\n registrySummary: summarizeIntegrationRegistry(registry),\n conflictSamples: registry.entries\n .flatMap((entry) => entry.conflicts)\n .slice(0, 10),\n },\n upstream,\n warnings,\n }\n}\n\nasync function checkActivepiecesPublicCatalog(input: {\n localConnectorCount: number\n staleConnectorDelta: number\n fetchImpl?: typeof fetch\n warnings: string[]\n}): Promise<IntegrationCatalogFreshnessResult['upstream']> {\n try {\n const res = await (input.fetchImpl ?? fetch)(ACTIVEPIECES_PUBLIC_CATALOG_URL, {\n headers: { accept: 'text/html' },\n signal: AbortSignal.timeout(15_000),\n })\n if (!res.ok) {\n const warning = `Activepieces freshness request failed with HTTP ${res.status}.`\n input.warnings.push(warning)\n return {\n checkedUrl: ACTIVEPIECES_PUBLIC_CATALOG_URL,\n warning,\n }\n }\n const activepiecesPieces = extractActivepiecesPublicPieceCount(await res.text())\n const activepiecesDelta =\n activepiecesPieces === undefined\n ? undefined\n : activepiecesPieces - input.localConnectorCount\n if (\n activepiecesDelta !== undefined &&\n activepiecesDelta > input.staleConnectorDelta\n ) {\n input.warnings.push(\n `Activepieces upstream appears ${activepiecesDelta} connectors ahead of the vendored package catalog.`,\n )\n }\n return {\n activepiecesPieces,\n activepiecesDelta,\n checkedUrl: ACTIVEPIECES_PUBLIC_CATALOG_URL,\n warning:\n activepiecesPieces === undefined\n ? 'Could not parse upstream piece count.'\n : undefined,\n }\n } catch (error) {\n const warning =\n error instanceof Error\n ? error.message\n : 'Activepieces freshness request failed.'\n input.warnings.push(warning)\n return {\n checkedUrl: ACTIVEPIECES_PUBLIC_CATALOG_URL,\n warning,\n }\n }\n}\n","import {\n buildActivepiecesConnectors,\n listActivepiecesCatalogEntries,\n type ActivepiecesCatalogEntry,\n} from './activepieces-catalog.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport {\n auditIntegrationCatalogFreshness,\n extractActivepiecesPublicPieceCount,\n type IntegrationCatalogFreshnessOptions,\n} from './catalog-freshness.js'\nimport {\n IntegrationError,\n type CompleteAuthRequest,\n type IntegrationActionRequest,\n type IntegrationActionResult,\n type IntegrationConnection,\n type IntegrationConnector,\n type IntegrationTriggerEvent,\n type IntegrationTriggerSubscription,\n type StartAuthRequest,\n type StartAuthResult,\n} from './index.js'\nimport {\n CONNECTOR_ADAPTER_FACTORIES,\n listBundledConnectorAdapters,\n} from './connectors/index.js'\nimport { canonicalIntegrationKind } from './integration-kind-aliases.js'\n\nexport {\n type ActivepiecesCatalogEntry,\n} from './activepieces-catalog.js'\n\nexport const TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID = 'tangle-catalog'\nexport const TANGLE_INTEGRATIONS_CATALOG_SOURCE = 'tangle-integrations-catalog'\n\nexport type TangleIntegrationImplementationKind = 'native_adapter' | 'package_runtime'\nexport type TangleIntegrationContractStatus = 'contract_ready' | 'runtime_backed' | 'native_backed'\n\nexport interface TangleIntegrationCatalogEntry {\n id: string\n title: string\n description: string\n category: IntegrationConnector['category']\n auth: IntegrationConnector['auth']\n authFields?: ActivepiecesCatalogEntry['authFields']\n domains: string[]\n actions: Array<{\n id: string\n title: string\n risk: IntegrationConnector['actions'][number]['risk']\n upstreamName?: string\n }>\n triggers: Array<{\n id: string\n title: string\n upstreamName?: string\n }>\n}\n\nexport interface TangleIntegrationContract {\n id: string\n title: string\n description: string\n category: IntegrationConnector['category']\n auth: IntegrationConnector['auth']\n authFields: NonNullable<ActivepiecesCatalogEntry['authFields']>\n actions: Array<{\n id: string\n title: string\n risk: IntegrationConnector['actions'][number]['risk']\n upstreamName: string\n }>\n triggers: Array<{\n id: string\n title: string\n upstreamName: string\n }>\n implementation: {\n kind: TangleIntegrationImplementationKind\n runtimePackage?: string\n version?: string\n }\n status: TangleIntegrationContractStatus\n quality: {\n tangleContract: true\n authFieldsMapped: boolean\n actionNamesMapped: boolean\n triggerNamesMapped: boolean\n runtimePackageMapped: boolean\n nativeAdapter: boolean\n }\n}\n\nexport interface TangleCatalogRuntimePackageManifestOptions {\n name?: string\n includeAgentIntegrationsPackage?: boolean\n agentIntegrationsVersion?: string\n additionalDependencies?: Record<string, string>\n}\n\nexport interface TangleCatalogRuntimePackageManifest {\n name: string\n private: true\n type: 'module'\n dependencies: Record<string, string>\n tangle: {\n integrationContracts: number\n packageRuntimeBackends: number\n generatedFrom: typeof TANGLE_INTEGRATIONS_CATALOG_SOURCE\n }\n}\n\nexport interface TangleCatalogExecutorInvocation {\n connection: IntegrationConnection\n request: IntegrationActionRequest\n connector: IntegrationConnector\n catalogEntry: TangleIntegrationCatalogEntry\n piece: {\n id: string\n packageName?: string\n version?: string\n actionId: string\n upstreamActionName?: string\n }\n}\n\nexport interface TangleCatalogTriggerInvocation {\n connection: IntegrationConnection\n connector: IntegrationConnector\n catalogEntry: TangleIntegrationCatalogEntry\n trigger: NonNullable<IntegrationConnector['triggers']>[number]\n targetUrl?: string\n piece: {\n id: string\n packageName?: string\n version?: string\n triggerId: string\n upstreamTriggerName?: string\n }\n}\n\nexport interface TangleCatalogExecutorProviderOptions {\n id?: string\n connectors?: IntegrationConnector[]\n startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult\n completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection\n executeAction: (invocation: TangleCatalogExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult\n subscribeTrigger?: (invocation: TangleCatalogTriggerInvocation) => Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription\n unsubscribeTrigger?: (subscriptionId: string) => Promise<void> | void\n normalizeTriggerEvent?: (raw: unknown) => Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent\n}\n\nexport type TangleIntegrationCatalogFreshnessOptions = IntegrationCatalogFreshnessOptions\n\nexport interface TangleIntegrationCatalogFreshnessResult {\n ok: boolean\n generatedAt: string\n local: {\n catalogEntries: number\n catalogConnectors: number\n catalogActions: number\n catalogTriggers: number\n executableCatalogConnectors: number\n executableCatalogActions: number\n executableCatalogTriggers: number\n executableToolDefinitions: number\n unsupportedExecutableConnectorIds: string[]\n registryEntries: number\n registrySummary: Awaited<ReturnType<typeof auditIntegrationCatalogFreshness>>['local']['registrySummary']\n conflictSamples: Awaited<ReturnType<typeof auditIntegrationCatalogFreshness>>['local']['conflictSamples']\n }\n upstream?: {\n externalEntries?: number\n externalDelta?: number\n checkedUrl: string\n warning?: string\n }\n warnings: string[]\n}\n\nexport function listTangleNativeAdapterIds(): string[] {\n const ids = new Set<string>(\n CONNECTOR_ADAPTER_FACTORIES.map(\n (definition) => definition.kind,\n ),\n )\n for (const adapter of listBundledConnectorAdapters()) {\n ids.add(adapter.manifest.kind)\n }\n return [...ids].sort()\n}\n\nexport function listTangleIntegrationCatalogEntries(): TangleIntegrationCatalogEntry[] {\n return listActivepiecesCatalogEntries().map((entry) => sanitizeEntry(entry))\n}\n\nexport function listTangleIntegrationContracts(): TangleIntegrationContract[] {\n const nativeAdapterIds = new Set(listTangleNativeAdapterIds().map(canonicalIntegrationKind))\n return listActivepiecesCatalogEntries().map((entry) => {\n const nativeAdapter = nativeAdapterIds.has(canonicalIntegrationKind(entry.id))\n return {\n id: entry.id,\n title: entry.title,\n description: entry.description,\n category: entry.category,\n auth: entry.auth,\n authFields: entry.authFields ?? [],\n actions: entry.actions.map((action) => ({\n id: action.id,\n title: action.title,\n risk: action.risk,\n upstreamName: action.upstreamName ?? action.id,\n })),\n triggers: entry.triggers.map((trigger) => ({\n id: trigger.id,\n title: trigger.title,\n upstreamName: trigger.upstreamName ?? trigger.id,\n })),\n implementation: {\n kind: nativeAdapter ? 'native_adapter' : 'package_runtime',\n runtimePackage: entry.npmPackage,\n version: entry.version,\n },\n status: nativeAdapter ? 'native_backed' : entry.npmPackage ? 'runtime_backed' : 'contract_ready',\n quality: {\n tangleContract: true,\n authFieldsMapped: entry.auth === 'none' || Boolean(entry.authFields?.length),\n actionNamesMapped: entry.actions.every((action) => Boolean(action.upstreamName)),\n triggerNamesMapped: entry.triggers.every((trigger) => Boolean(trigger.upstreamName)),\n runtimePackageMapped: Boolean(entry.npmPackage),\n nativeAdapter,\n },\n }\n })\n}\n\nexport function listTangleIntegrationCatalogRuntimePackages(): Array<{\n connectorId: string\n packageName: string\n version?: string\n}> {\n const nativeAdapterIds = new Set(listTangleNativeAdapterIds())\n return listActivepiecesCatalogEntries()\n .filter((entry): entry is ActivepiecesCatalogEntry & { npmPackage: string } =>\n Boolean(entry.npmPackage) && !nativeAdapterIds.has(entry.id))\n .map((entry) => ({\n connectorId: entry.id,\n packageName: entry.npmPackage,\n version: entry.version,\n }))\n}\n\nexport function buildTangleCatalogRuntimePackageManifest(\n options: TangleCatalogRuntimePackageManifestOptions = {},\n): TangleCatalogRuntimePackageManifest {\n const dependencies: Record<string, string> = {}\n if (options.includeAgentIntegrationsPackage ?? true) {\n dependencies['@tangle-network/agent-integrations'] = options.agentIntegrationsVersion ?? 'latest'\n }\n for (const pkg of listTangleIntegrationCatalogRuntimePackages()) {\n dependencies[pkg.packageName] = pkg.version ?? 'latest'\n }\n Object.assign(dependencies, options.additionalDependencies)\n return {\n name: options.name ?? '@tangle-network/agent-integrations-runtime-bundle',\n private: true,\n type: 'module',\n dependencies: Object.fromEntries(Object.entries(dependencies).sort(([a], [b]) => a.localeCompare(b))),\n tangle: {\n integrationContracts: listTangleIntegrationContracts().length,\n packageRuntimeBackends: listTangleIntegrationContracts()\n .filter((contract) => contract.implementation.kind === 'package_runtime').length,\n generatedFrom: TANGLE_INTEGRATIONS_CATALOG_SOURCE,\n },\n }\n}\n\nexport function renderTangleCatalogRuntimePnpmAddCommand(options: {\n includeAgentIntegrationsPackage?: boolean\n agentIntegrationsVersion?: string\n} = {}): string {\n const manifest = buildTangleCatalogRuntimePackageManifest({\n includeAgentIntegrationsPackage: options.includeAgentIntegrationsPackage,\n agentIntegrationsVersion: options.agentIntegrationsVersion,\n })\n return [\n 'pnpm',\n 'add',\n ...Object.entries(manifest.dependencies).map(([name, version]) => `${name}@${version}`),\n ].join(' ')\n}\n\nexport function buildTangleIntegrationCatalogConnectors(options: {\n providerId?: string\n includeCatalogActions?: boolean\n executable?: boolean\n} = {}): IntegrationConnector[] {\n const providerId = options.providerId ?? TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID\n return buildActivepiecesConnectors({\n ...options,\n providerId,\n }).map((connector) => sanitizeConnector(connector, providerId))\n}\n\nexport function createTangleCatalogExecutorProvider(options: TangleCatalogExecutorProviderOptions) {\n const providerId = options.id ?? TANGLE_INTEGRATIONS_CATALOG_PROVIDER_ID\n const connectors = options.connectors ?? buildTangleIntegrationCatalogConnectors({\n providerId,\n includeCatalogActions: true,\n executable: true,\n })\n const byEntry = new Map(listActivepiecesCatalogEntries().map((entry) => [entry.id, entry]))\n\n return createCatalogExecutorProvider({\n id: providerId,\n kind: 'tangle_catalog',\n connectors,\n startAuth: options.startAuth,\n completeAuth: options.completeAuth,\n executeAction: async ({ connection, request, connector, action }) => {\n const importedEntry = byEntry.get(connector.id)\n if (!importedEntry) {\n throw new IntegrationError(`Tangle catalog entry ${connector.id} not found.`, 'connector_not_found')\n }\n const catalogAction = importedEntry.actions.find((candidate) => candidate.id === action.id)\n return options.executeAction({\n connection,\n request,\n connector,\n catalogEntry: sanitizeEntry(importedEntry),\n piece: {\n id: importedEntry.id,\n packageName: importedEntry.npmPackage,\n version: importedEntry.version,\n actionId: action.id,\n upstreamActionName: catalogAction?.upstreamName,\n },\n })\n },\n subscribeTrigger: options.subscribeTrigger\n ? async (connection, trigger, targetUrl) => {\n const connector = connectors.find((candidate) => candidate.id === connection.connectorId)\n const importedEntry = byEntry.get(connection.connectorId)\n if (!connector || !importedEntry) {\n throw new IntegrationError(`Tangle catalog entry ${connection.connectorId} not found.`, 'connector_not_found')\n }\n const catalogTrigger = importedEntry.triggers.find((candidate) => candidate.id === trigger.id)\n return options.subscribeTrigger!({\n connection,\n connector,\n catalogEntry: sanitizeEntry(importedEntry),\n trigger,\n targetUrl,\n piece: {\n id: importedEntry.id,\n packageName: importedEntry.npmPackage,\n version: importedEntry.version,\n triggerId: trigger.id,\n upstreamTriggerName: catalogTrigger?.upstreamName,\n },\n })\n }\n : undefined,\n unsubscribeTrigger: options.unsubscribeTrigger,\n normalizeTriggerEvent: options.normalizeTriggerEvent,\n })\n}\n\nexport const extractExternalCatalogPublicCount = extractActivepiecesPublicPieceCount\n\nexport async function auditTangleIntegrationCatalogFreshness(\n options: TangleIntegrationCatalogFreshnessOptions = {},\n): Promise<TangleIntegrationCatalogFreshnessResult> {\n const result = await auditIntegrationCatalogFreshness(options)\n return {\n ok: result.ok,\n generatedAt: result.generatedAt,\n local: {\n catalogEntries: result.local.activepiecesEntries,\n catalogConnectors: result.local.activepiecesConnectors,\n catalogActions: result.local.activepiecesActions,\n catalogTriggers: result.local.activepiecesTriggers,\n executableCatalogConnectors: result.local.executableActivepiecesConnectors,\n executableCatalogActions: result.local.executableActivepiecesActions,\n executableCatalogTriggers: result.local.executableActivepiecesTriggers,\n executableToolDefinitions: result.local.executableToolDefinitions,\n unsupportedExecutableConnectorIds: result.local.unsupportedExecutableConnectorIds,\n registryEntries: result.local.registryEntries,\n registrySummary: result.local.registrySummary,\n conflictSamples: result.local.conflictSamples,\n },\n upstream: result.upstream\n ? {\n externalEntries: result.upstream.activepiecesPieces,\n externalDelta: result.upstream.activepiecesDelta,\n checkedUrl: result.upstream.checkedUrl,\n warning: result.upstream.warning,\n }\n : undefined,\n warnings: result.warnings.map((warning) => warning.replaceAll('Activepieces', 'Tangle Integrations Catalog')),\n }\n}\n\nfunction sanitizeEntry(entry: ActivepiecesCatalogEntry): TangleIntegrationCatalogEntry {\n return {\n id: entry.id,\n title: entry.title,\n description: entry.description,\n category: entry.category,\n auth: entry.auth,\n authFields: entry.authFields,\n domains: entry.domains.filter((domain) => !domain.toLowerCase().includes('activepieces')),\n actions: entry.actions.map((action) => ({\n id: action.id,\n title: action.title,\n risk: action.risk,\n upstreamName: action.upstreamName,\n })),\n triggers: entry.triggers.map((trigger) => ({\n id: trigger.id,\n title: trigger.title,\n upstreamName: trigger.upstreamName,\n })),\n }\n}\n\nfunction sanitizeConnector(connector: IntegrationConnector, providerId: string): IntegrationConnector {\n const metadata = connector.metadata ?? {}\n return {\n ...connector,\n providerId,\n metadata: {\n source: TANGLE_INTEGRATIONS_CATALOG_SOURCE,\n providerId,\n executable: metadata.executable,\n runtime: 'native-adapter-backlog',\n catalogOnly: metadata.catalogOnly,\n supportTier: metadata.supportTier,\n catalogActionCount: metadata.catalogActionCount,\n catalogTriggerCount: metadata.catalogTriggerCount,\n license: metadata.license,\n version: metadata.version,\n domains: Array.isArray(metadata.domains)\n ? metadata.domains.filter((domain) => typeof domain === 'string' && !domain.toLowerCase().includes('activepieces'))\n : undefined,\n ...(metadata.overridden ? { overridden: true } : {}),\n },\n }\n}\n","import type {\n IntegrationActor,\n IntegrationTriggerEvent,\n IntegrationTriggerSubscription,\n} from './index.js'\nimport {\n type IntegrationGrant,\n type IntegrationGrantStore,\n type IntegrationManifest,\n type IntegrationRuntime,\n} from './runtime.js'\n\nexport interface IntegrationWorkflowDefinition {\n id: string\n title?: string\n manifest: IntegrationManifest\n trigger: {\n requirementId: string\n triggerId: string\n targetUrl?: string\n }\n metadata?: Record<string, unknown>\n}\n\nexport interface InstalledIntegrationWorkflow {\n id: string\n workflowId: string\n manifestId: string\n owner: IntegrationActor\n grantee: IntegrationActor\n triggerGrantId: string\n subscription: IntegrationTriggerSubscription\n status: 'active' | 'paused' | 'error'\n createdAt: string\n metadata?: Record<string, unknown>\n}\n\nexport interface IntegrationWorkflowStore {\n put(workflow: InstalledIntegrationWorkflow): Promise<void> | void\n get(id: string): Promise<InstalledIntegrationWorkflow | undefined> | InstalledIntegrationWorkflow | undefined\n list(): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[]\n listByWorkflow(workflowId: string): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[]\n listByOwner(owner: IntegrationActor): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[]\n}\n\nexport interface IntegrationWorkflowRuntimeHub {\n subscribeTrigger(connectionId: string, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription\n}\n\nexport interface IntegrationWorkflowRuntimeOptions {\n runtime: IntegrationRuntime\n hub: IntegrationWorkflowRuntimeHub\n grants: IntegrationGrantStore\n store?: IntegrationWorkflowStore\n now?: () => Date\n}\n\nexport class InMemoryIntegrationWorkflowStore implements IntegrationWorkflowStore {\n private readonly workflows = new Map<string, InstalledIntegrationWorkflow>()\n\n put(workflow: InstalledIntegrationWorkflow): void {\n this.workflows.set(workflow.id, workflow)\n }\n\n get(id: string): InstalledIntegrationWorkflow | undefined {\n return this.workflows.get(id)\n }\n\n list(): InstalledIntegrationWorkflow[] {\n return [...this.workflows.values()]\n }\n\n listByWorkflow(workflowId: string): InstalledIntegrationWorkflow[] {\n return [...this.workflows.values()].filter((workflow) => workflow.workflowId === workflowId)\n }\n\n listByOwner(owner: IntegrationActor): InstalledIntegrationWorkflow[] {\n return [...this.workflows.values()].filter((workflow) => sameActor(workflow.owner, owner))\n }\n}\n\nexport class IntegrationWorkflowRuntime {\n private readonly runtime: IntegrationRuntime\n private readonly hub: IntegrationWorkflowRuntimeHub\n private readonly grants: IntegrationGrantStore\n private readonly store: IntegrationWorkflowStore\n private readonly now: () => Date\n\n constructor(options: IntegrationWorkflowRuntimeOptions) {\n this.runtime = options.runtime\n this.hub = options.hub\n this.grants = options.grants\n this.store = options.store ?? new InMemoryIntegrationWorkflowStore()\n this.now = options.now ?? (() => new Date())\n }\n\n async install(input: {\n workflow: IntegrationWorkflowDefinition\n owner: IntegrationActor\n grantee: IntegrationActor\n }): Promise<InstalledIntegrationWorkflow> {\n const grants = await this.runtime.createGrants({\n manifest: input.workflow.manifest,\n owner: input.owner,\n grantee: input.grantee,\n metadata: { workflowId: input.workflow.id },\n })\n const triggerGrant = findTriggerGrant(grants, input.workflow.trigger.requirementId, input.workflow.trigger.triggerId)\n const subscription = await this.hub.subscribeTrigger(\n triggerGrant.connectionId,\n input.workflow.trigger.triggerId,\n input.workflow.trigger.targetUrl,\n )\n const installed: InstalledIntegrationWorkflow = {\n id: `workflow_${input.workflow.id}_${triggerGrant.id}`,\n workflowId: input.workflow.id,\n manifestId: input.workflow.manifest.id,\n owner: input.owner,\n grantee: input.grantee,\n triggerGrantId: triggerGrant.id,\n subscription,\n status: 'active',\n createdAt: this.now().toISOString(),\n metadata: input.workflow.metadata,\n }\n await this.store.put(installed)\n return installed\n }\n\n async dispatchEvent<T = unknown>(\n event: IntegrationTriggerEvent<T>,\n handler: (input: { event: IntegrationTriggerEvent<T>; workflows: InstalledIntegrationWorkflow[] }) => Promise<void> | void,\n ): Promise<{ matched: InstalledIntegrationWorkflow[] }> {\n // A workflow outlives its installation-time grant. Recheck the current\n // grant before routing a new event; an active subscription is not authority.\n // This assumes verified ingress. Deferred effects must recheck authority\n // again at execution time rather than treating this snapshot as a lease.\n const candidates = (await this.store.list()).filter((workflow) =>\n workflow.status === 'active'\n && workflow.subscription.status === 'active'\n && workflow.subscription.connectionId === event.connectionId\n && workflow.subscription.trigger === event.trigger\n )\n // One batched read keeps webhook latency flat as a trigger fans out to\n // many workflows backed by a remote grant store.\n const grantIds = [...new Set(candidates.map((workflow) => workflow.triggerGrantId))]\n const grants = grantIds.length === 0\n ? []\n : this.grants.listByIds\n ? await this.grants.listByIds(grantIds)\n : await Promise.all(grantIds.map((grantId) => this.grants.get(grantId)))\n const grantsById = new Map(\n grants\n .filter((grant): grant is IntegrationGrant => Boolean(grant))\n .map((grant) => [grant.id, grant]),\n )\n const workflows = candidates.filter((workflow) => {\n const grant = grantsById.get(workflow.triggerGrantId)\n if (!grant) return false\n return grant.status === 'active'\n && grant.manifestId === workflow.manifestId\n && sameActor(grant.owner, workflow.owner)\n && sameActor(grant.grantee, workflow.grantee)\n && grant.connectionId === event.connectionId\n && grant.connectorId === event.connectorId\n && grant.allowedTriggers.includes(event.trigger)\n })\n await handler({ event, workflows })\n return { matched: workflows }\n }\n}\n\nexport function createIntegrationWorkflowRuntime(options: IntegrationWorkflowRuntimeOptions): IntegrationWorkflowRuntime {\n return new IntegrationWorkflowRuntime(options)\n}\n\nfunction findTriggerGrant(grants: IntegrationGrant[], requirementId: string, triggerId: string): IntegrationGrant {\n const grant = grants.find((candidate) =>\n candidate.requirementId === requirementId && candidate.allowedTriggers.includes(triggerId)\n )\n if (!grant) throw new Error(`Missing trigger grant ${requirementId}/${triggerId}.`)\n return grant\n}\n\nfunction sameActor(a: IntegrationActor, b: IntegrationActor): boolean {\n return a.type === b.type && a.id === b.id\n}\n","import { IntegrationError } from './core-error.js'\nimport type {\n CompleteAuthRequest,\n HttpIntegrationProviderOptions,\n IntegrationActionGuard,\n IntegrationActionRequest,\n IntegrationActionResult,\n IntegrationActor,\n IntegrationCapability,\n IntegrationConnection,\n IntegrationConnectionStore,\n IntegrationConnector,\n IntegrationHubOptions,\n IntegrationPolicyEngine,\n IntegrationProvider,\n IntegrationTriggerEvent,\n IntegrationTriggerSubscription,\n InvokeWithCapabilityRequest,\n IssueCapabilityRequest,\n IssuedIntegrationCapability,\n StartAuthRequest,\n StartAuthResult,\n} from './core-types.js'\n\nexport * from './core-types.js'\nexport * from './core-error.js'\nexport * from './audit.js'\nexport * from './approval.js'\nexport * from './actions.js'\nexport * from './bridge.js'\nexport * from './billing-access-policy.js'\nexport * from './idempotency.js'\nexport * from './apps.js'\nexport * from './client.js'\nexport * from './consumer.js'\nexport * from './consent.js'\nexport * from './credentials.js'\nexport * from './discovery.js'\nexport * from './errors.js'\nexport * from './events.js'\nexport * from './guard.js'\nexport * from './healthcheck.js'\nexport * from './manifest.js'\nexport * from './passthrough.js'\nexport * from './presets.js'\nexport * from './connect/index.js'\nexport * from './middleware/index.js'\n\nexport class InMemoryConnectionStore implements IntegrationConnectionStore {\n private readonly connections = new Map<string, IntegrationConnection>()\n\n get(connectionId: string): IntegrationConnection | undefined {\n return this.connections.get(connectionId)\n }\n\n put(connection: IntegrationConnection): void {\n this.connections.set(connection.id, connection)\n }\n\n listByOwner(owner: IntegrationActor): IntegrationConnection[] {\n return [...this.connections.values()].filter((connection) =>\n connection.owner.type === owner.type && connection.owner.id === owner.id,\n )\n }\n\n delete(connectionId: string): void {\n this.connections.delete(connectionId)\n }\n}\n\n\nexport function sanitizeConnection(connection: IntegrationConnection): Record<string, unknown> {\n return {\n id: connection.id,\n owner: connection.owner,\n providerId: connection.providerId,\n connectorId: connection.connectorId,\n status: connection.status,\n grantedScopes: connection.grantedScopes,\n account: connection.account,\n hasSecretRef: Boolean(connection.secretRef),\n createdAt: connection.createdAt,\n updatedAt: connection.updatedAt,\n expiresAt: connection.expiresAt,\n lastUsedAt: connection.lastUsedAt,\n }\n}\n\nexport function createMockIntegrationProvider(options: {\n id?: string\n connectors?: IntegrationConnector[]\n onInvoke?: (connection: IntegrationConnection, request: IntegrationActionRequest) => IntegrationActionResult | Promise<IntegrationActionResult>\n} = {}): IntegrationProvider {\n const providerId = options.id ?? 'mock'\n const connectors = options.connectors ?? [{\n id: 'gmail',\n providerId,\n title: 'Gmail',\n category: 'email',\n auth: 'oauth2',\n scopes: ['email.read', 'email.write'],\n actions: [\n { id: 'messages.search', title: 'Search messages', risk: 'read', requiredScopes: ['email.read'], dataClass: 'private' },\n { id: 'drafts.create', title: 'Create draft', risk: 'write', requiredScopes: ['email.write'], dataClass: 'private', approvalRequired: true },\n ],\n triggers: [\n { id: 'message.received', title: 'Message received', requiredScopes: ['email.read'], dataClass: 'private' },\n ],\n }]\n return {\n id: providerId,\n kind: 'custom',\n listConnectors: () => connectors,\n startAuth: (request) => ({\n providerId,\n connectorId: request.connectorId,\n authUrl: `https://auth.example.test/${request.connectorId}?state=${encodeURIComponent(request.state ?? 'state')}`,\n state: request.state ?? 'state',\n }),\n completeAuth: (request) => ({\n id: `conn_${request.connectorId}_${request.owner.id}`,\n owner: request.owner,\n providerId,\n connectorId: request.connectorId,\n status: 'active',\n grantedScopes: connectors.find((connector) => connector.id === request.connectorId)?.scopes ?? [],\n secretRef: { provider: providerId, id: `secret_${request.owner.id}` },\n createdAt: new Date(0).toISOString(),\n updatedAt: new Date(0).toISOString(),\n }),\n invokeAction: async (connection, request) => options.onInvoke?.(connection, request) ?? ({\n ok: true,\n action: request.action,\n output: { echo: request.input ?? null },\n }),\n subscribeTrigger: (connection, trigger, targetUrl) => ({\n id: `sub_${connection.id}_${trigger}`,\n connectionId: connection.id,\n trigger,\n targetUrl,\n status: 'active',\n createdAt: new Date(0).toISOString(),\n }),\n }\n}\n\nexport function createHttpIntegrationProvider(options: HttpIntegrationProviderOptions): IntegrationProvider {\n const fetcher = options.fetchImpl ?? fetch\n const baseUrl = options.baseUrl.replace(/\\/$/, '')\n return {\n id: options.id,\n kind: options.kind ?? 'custom',\n listConnectors: () => options.connectors,\n async startAuth(request) {\n const response = await postJson<StartAuthResult>(fetcher, `${baseUrl}/auth/start`, request, options.bearer)\n return response\n },\n async completeAuth(request) {\n const response = await postJson<IntegrationConnection>(fetcher, `${baseUrl}/auth/complete`, request, options.bearer)\n return response\n },\n async invokeAction(connection, request) {\n return postJson<IntegrationActionResult>(fetcher, `${baseUrl}/actions/invoke`, {\n connection,\n request,\n }, options.bearer)\n },\n async subscribeTrigger(connection, trigger, targetUrl) {\n return postJson<IntegrationTriggerSubscription>(fetcher, `${baseUrl}/triggers/subscribe`, {\n connection,\n trigger,\n targetUrl,\n }, options.bearer)\n },\n async unsubscribeTrigger(subscriptionId) {\n await postJson(fetcher, `${baseUrl}/triggers/unsubscribe`, { subscriptionId }, options.bearer)\n },\n async normalizeTriggerEvent(raw) {\n return postJson<IntegrationTriggerEvent>(fetcher, `${baseUrl}/triggers/normalize`, { raw }, options.bearer)\n },\n }\n}\n\n\nasync function postJson<T = unknown>(\n fetcher: typeof fetch,\n url: string,\n body: unknown,\n bearer?: string,\n): Promise<T> {\n const response = await fetcher(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(bearer ? { Authorization: `Bearer ${bearer}` } : {}),\n },\n body: JSON.stringify(body),\n })\n if (!response.ok) throw new IntegrationError(`Integration provider returned HTTP ${response.status}.`, 'provider_not_found')\n return response.json() as Promise<T>\n}\n\n\n\n// ─── Connectors namespace ───────────────────────────────────────────────\n//\n// Lower-level adapter primitives — the contract a concrete first-party\n// integration (Google Calendar, HubSpot, Stripe, ...) implements. The\n// hub-side `IntegrationProvider` interface is the *catalog* facade above\n// these; one provider can wrap many connectors. See `src/connectors/types.ts`\n// for the layering details.\nexport { IntegrationHub, signCapability, verifyCapabilityToken } from './hub.js'\nexport * from './connectors/index.js'\nexport * from './catalog.js'\nexport * from './catalog-executor.js'\nexport * from './policy.js'\nexport * from './sandbox.js'\nexport * from './adapter-provider.js'\nexport * from './importers.js'\nexport * from './gateway-catalog.js'\nexport * from './activepieces-catalog.js'\nexport * from './activepieces-overrides.js'\nexport * from './activepieces-provider.js'\nexport * from './tangle-catalog.js'\nexport * from './catalog-freshness.js'\nexport * from './registry.js'\nexport * from './runtime.js'\nexport * from './workflow.js'\nexport * from './coverage-catalog.js'\nexport * from './integration-kind-aliases.js'\nexport * from './specs/index.js'\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,IAAa,mCAAb,MAAkF;CAChF,0BAA2B,IAAI,IAAuC;CAEtE,IAAI,YAA2D;EAC7D,OAAO,KAAK,QAAQ,IAAI,UAAU;CACpC;CAEA,IAAI,QAAyC;EAC3C,KAAK,QAAQ,IAAI,OAAO,IAAI,MAAM;CACpC;CAEA,KAAK,SAAoC,CAAC,GAAgC;EACxE,OAAO,CAAC,GAAG,KAAK,QAAQ,OAAO,CAAC,CAAC,CAAC,QAAQ,WAAW,cAAc,QAAQ,MAAM,CAAC;CACpF;AACF;AAEA,IAAa,6BAAb,MAA2E;CACzE;CACA;CACA;CACA;CACA;CAEA,YAAY,SAAsC;EAChD,KAAK,OAAO,QAAQ;EACpB,KAAK,QAAQ,QAAQ;EACrB,KAAK,QAAQ,QA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