Skip to content

feat(core): ship every adapter's webhook mapping in @relayfile/adapter-core - #280

Merged
khaliqgant merged 1 commit into
mainfrom
feat/core-bundles-adapter-mappings
Sep 17, 2026
Merged

khaliqgant merged 1 commit into
mainfrom
feat/core-bundles-adapter-mappings

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Why

Consumers that depend only on @relayfile/adapter-core see two mapping files — the github and slack fallbacks under mappings/. AgentWorkforce/flows generates its typed trigger namespaces (flow().on(github.pull_request('opened'), …)) from those webhooks: blocks, so the 23 other adapters that declare webhooks (notion 13, gitlab, cloudflare, ramp 47, neon, shortcut, gmail, …) can never trigger a flow from the published package. The repo has the data; the tarball didn't.

What

  • scripts/bundle-adapter-mappings.mjs copies every packages/<adapter>/<provider>.mapping.yaml verbatim to packages/core/mappings/adapters/<provider>.mapping.yaml (25 today). --check fails on a missing, stale or orphaned copy.
  • Committed like the other generated catalogs; mappings:check is part of catalog:check (so turbo test) and of prepublishOnly, so a tarball cannot carry a stale bundle. files already includes mappings/.
  • Core fallbacks untouched. Consumers apply adapter-local over fallback — the precedence flows' generator already uses against a repo checkout (--adapters-dir).
  • Root npm test gains test:adapter-mapping-bundle, which also proves the bundle resolves at dirname(require.resolve('@relayfile/adapter-core/package.json')) + '/mappings', exactly how flows reads it.

Release

Additive; a patch publish of core is enough. flows will pin that version and regenerate (AgentWorkforce/flows PR to follow).

Verified

npx turbo build typecheck --filter=@relayfile/adapter-core... and npx turbo run catalog:check (53/53 tasks, bundle verified: 25 providers); npm run test:adapter-mapping-bundle 2/2; test:catalog-task-graph green.

🤖 Generated with Claude Code

Review in cubic


Note

Low Risk
Additive packaging and CI guardrails; no runtime adapter logic changes, only duplicated YAML and publish-time checks.

Overview
Ships every adapter’s mapping YAML inside @relayfile/adapter-core, so consumers that only install core (e.g. flows trigger codegen) see full webhooks: catalogs—not just the github and slack fallbacks under mappings/.

Adds scripts/bundle-adapter-mappings.mjs, which copies each packages/<adapter>/*.mapping.yaml verbatim into committed packages/core/mappings/adapters/ (25 providers in this PR). --check fails on missing, stale, or orphaned copies. mappings:check is wired into catalog:check and prepublishOnly, and root npm test gains test:adapter-mapping-bundle with tests that mirror how consumers resolve mappings/ via require.resolve('@relayfile/adapter-core/package.json'). Core README documents layout and refresh via npm run mappings:bundle -w @relayfile/adapter-core.

Reviewed by Cursor Bugbot for commit 9d6c281. Bugbot is set up for automated code reviews on this repo. Configure here.

…r-core

Consumers that depend only on @relayfile/adapter-core saw two mapping
files: the github and slack fallbacks under mappings/. AgentWorkforce/flows
generates its typed trigger namespaces from those `webhooks:` blocks, so
23 adapters that declare webhooks (notion, gitlab, cloudflare, ramp, neon,
shortcut, gmail, …) could never trigger a flow from the published package.

The package now also ships mappings/adapters/<provider>.mapping.yaml, a
verbatim copy of each packages/<adapter>/<provider>.mapping.yaml, generated
by scripts/bundle-adapter-mappings.mjs and committed like the other
catalogs. `catalog:check` (turbo test) and prepublishOnly run its --check,
which fails on a missing, stale or orphaned copy, so a tarball cannot carry
a stale bundle. The fallbacks are untouched; consumers apply adapter-local
over fallback, the precedence flows' generator already uses against a repo
checkout. Additive: a patch release suffices.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4b6671af-d87c-47ca-9a6f-379ecd0d0ca3

📥 Commits

Reviewing files that changed from the base of the PR and between 79684ce and 9d6c281.

📒 Files selected for processing (30)
  • package.json
  • packages/core/README.md
  • packages/core/mappings/adapters/azure-blob.mapping.yaml
  • packages/core/mappings/adapters/box.mapping.yaml
  • packages/core/mappings/adapters/cloudflare.mapping.yaml
  • packages/core/mappings/adapters/daytona.mapping.yaml
  • packages/core/mappings/adapters/dropbox.mapping.yaml
  • packages/core/mappings/adapters/fathom.mapping.yaml
  • packages/core/mappings/adapters/gcp.mapping.yaml
  • packages/core/mappings/adapters/gcs.mapping.yaml
  • packages/core/mappings/adapters/github.mapping.yaml
  • packages/core/mappings/adapters/gitlab.mapping.yaml
  • packages/core/mappings/adapters/gmail.mapping.yaml
  • packages/core/mappings/adapters/google-drive.mapping.yaml
  • packages/core/mappings/adapters/granola.mapping.yaml
  • packages/core/mappings/adapters/neon.mapping.yaml
  • packages/core/mappings/adapters/notion.mapping.yaml
  • packages/core/mappings/adapters/onedrive.mapping.yaml
  • packages/core/mappings/adapters/postgres.mapping.yaml
  • packages/core/mappings/adapters/posthog.mapping.yaml
  • packages/core/mappings/adapters/ramp.mapping.yaml
  • packages/core/mappings/adapters/recall.mapping.yaml
  • packages/core/mappings/adapters/redis.mapping.yaml
  • packages/core/mappings/adapters/s3.mapping.yaml
  • packages/core/mappings/adapters/sharepoint.mapping.yaml
  • packages/core/mappings/adapters/shortcut.mapping.yaml
  • packages/core/mappings/adapters/teams.mapping.yaml
  • packages/core/package.json
  • scripts/bundle-adapter-mappings.mjs
  • scripts/bundle-adapter-mappings.test.mjs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request adds adapter mapping catalogs, bundles them into @relayfile/adapter-core, adds drift checks to package workflows, documents the bundle layout, and validates the committed mappings with Node tests.

Changes

Adapter mapping bundle

Layer / File(s) Summary
Adapter mapping catalogs
packages/core/mappings/adapters/*
Adds provider mappings for webhook events, resources, storage events, subscriptions, and writeback operations.
Mapping bundler and drift detection
scripts/bundle-adapter-mappings.mjs
Adds generation and --check modes for the core adapter mapping bundle. The script validates input, duplicate providers, missing files, stale files, and orphaned files.
Package wiring, documentation, and validation
package.json, packages/core/package.json, packages/core/README.md, scripts/bundle-adapter-mappings.test.mjs
Adds package scripts, publication checks, bundle documentation, and tests for bundle consistency, file inclusion, and fallback mappings.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AdapterPackages as Adapter packages
  participant Bundler as bundle-adapter-mappings.mjs
  participant CoreMappings as Core mapping bundle
  participant BundleTests as bundle-adapter-mappings.test.mjs
  AdapterPackages->>Bundler: provide mapping YAML files
  Bundler->>CoreMappings: generate or check bundled files
  BundleTests->>Bundler: run --check
  BundleTests->>CoreMappings: compare bundled files with sources
Loading

Merge Risk: ⚪ Minimal · up to 9d6c2

The mapping bundle retains its passing drift check, and the package-resolution test is correctly configured for the repository workspace installation. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: shipping all adapter webhook mappings in @relayfile/adapter-core.
Description check ✅ Passed The description directly explains the motivation, implementation, validation, and release impact of the adapter mapping bundle changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit bundles maps in rows
YAML paths line up as it goes
Drift checks guard the core
Tests compare each file once more
The adapter catalog grows anew

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@khaliqgant
khaliqgant merged commit 5596436 into main Sep 17, 2026
5 checks passed
@khaliqgant
khaliqgant deleted the feat/core-bundles-adapter-mappings branch September 17, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant