Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(connect): Macro Connect as an independent backend (#9231)

Eric Hayesc04d82e0dd1c
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 4f5bce4faf..299982f182 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -2,7 +2,7 @@
#
# `cargo x <subcommand>` runs xtask from anywhere in the repository:
# cargo x workflows [--check] # regenerate / verify .github/workflows
-# cargo x deps [--check] # regenerate / verify workspace-hack + dep closures
+# cargo x deps [--check] # check Connect boundary; regenerate / verify dependency artifacts
# cargo x nextest-filter <file> <base-revision> # affected packages for changed files
# cargo x doppler-bins <file> # Doppler config-validation bins affected by changed files
# cargo x graphql-soup-schema <file> # export GraphQL Soup SDL to a file
diff --git a/.github/workflows/cargo_deny.yml b/.github/workflows/cargo_deny.yml
index 9e8ef3fbd4..7e024ed600 100644
--- a/.github/workflows/cargo_deny.yml
+++ b/.github/workflows/cargo_deny.yml
@@ -14,6 +14,7 @@ name: cargo deny check
- Cargo.toml
- crates/**/Cargo.toml
- services/**/Cargo.toml
+ - connect/**/Cargo.toml
- tooling/xtask/**/Cargo.toml
- Cargo.lock
- deny.toml
diff --git a/.github/workflows/cargo_workspace_dependency_check.yml b/.github/workflows/cargo_workspace_dependency_check.yml
index aac7b46ad3..33aa1db45f 100644
--- a/.github/workflows/cargo_workspace_dependency_check.yml
+++ b/.github/workflows/cargo_workspace_dependency_check.yml
@@ -12,6 +12,8 @@ name: cargo workspace dependency check
- main
paths:
- Cargo.toml
+ - '**/Cargo.toml'
+ - connect/**
- crates/**/Cargo.toml
- services/**/Cargo.toml
- tooling/xtask/**/Cargo.toml
@@ -122,7 +124,7 @@ jobs:
else
echo "::warning::Namespace remote sccache setup failed; using local cache fallback"
fi
- - name: generated dependency artifacts are up to date
+ - name: check Connect boundary and dependency artifacts
run: |
cargo run -p xtask --locked -- deps --check
- name: Teardown Nix
diff --git a/.github/workflows/code_check_cloud_storage.yml b/.github/workflows/code_check_cloud_storage.yml
index a297fa1797..638753be24 100644
--- a/.github/workflows/code_check_cloud_storage.yml
+++ b/.github/workflows/code_check_cloud_storage.yml
@@ -55,6 +55,7 @@ jobs:
- '.sqlx/**'
- 'crates/**'
- 'services/**'
+ - 'connect/**'
- 'tooling/xtask/**'
- 'static_assets/**'
- 'nix/**'
diff --git a/.github/workflows/code_check_conventions.yml b/.github/workflows/code_check_conventions.yml
index e86007b67a..131056db38 100644
--- a/.github/workflows/code_check_conventions.yml
+++ b/.github/workflows/code_check_conventions.yml
@@ -31,6 +31,7 @@ jobs:
should_run:
- 'crates/**'
- 'services/**'
+ - 'connect/**'
- 'tooling/xtask/**'
- 'apps/web/**'
- 'packages/**'
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.json
index 21e895b9ec..164bb902f9 100644
--- a/.github/workspace-dep-closures.json
+++ b/.github/workspace-dep-closures.json
@@ -4211,6 +4211,33 @@
"crates/work_feed",
"crates/workspace-hack"
],
+ "connect_api": [
+ "connect/crates/connect_client",
+ "connect/crates/connect_platform",
+ "connect/crates/connect_registry",
+ "connect/services/connect_api",
+ "crates/workspace-hack"
+ ],
+ "connect_client": [
+ "connect/crates/connect_client",
+ "connect/crates/connect_platform",
+ "crates/workspace-hack"
+ ],
+ "connect_integration": [
+ "connect/crates/connect_client",
+ "connect/crates/connect_platform",
+ "connect/crates/connect_registry",
+ "connect/tests/connect_integration",
+ "crates/workspace-hack"
+ ],
+ "connect_platform": [
+ "connect/crates/connect_platform",
+ "crates/workspace-hack"
+ ],
+ "connect_registry": [
+ "connect/crates/connect_registry",
+ "crates/workspace-hack"
+ ],
"connection": [
"crates/agent",
"crates/ai_toolset",
diff --git a/CLAUDE.md b/CLAUDE.md
index 4eb65897bd..f875fd62fa 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -29,6 +29,7 @@ patterns in older code.
| `infra/` | Deployment definitions and local infrastructure. |
| `tooling/` | Development tools, scripts, and imported `just` recipes. |
| `docs/` | Development guides, architecture, designs, runbooks, and the browser agent guide; see [the index](docs/README.md). |
+| `connect/` | Macro Connect, a separate product built as if in its own repo; Macro uses only its public client and SDK. Start at [its guide](connect/AGENTS.md). |
## Where agent guidance lives
diff --git a/Cargo.lock b/Cargo.lock
index 91b38e89e4..4adcf9e922 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4875,6 +4875,118 @@ dependencies = [
"crossbeam-utils",
]
+[[package]]
+name = "connect_api"
+version = "0.1.0"
+dependencies = [
+ "aes-gcm 0.10.3",
+ "async-stream",
+ "async-trait",
+ "aws-sdk-kms",
+ "axum",
+ "base64 0.22.1",
+ "bytes",
+ "chrono",
+ "clap",
+ "connect_client",
+ "connect_platform",
+ "connect_registry",
+ "futures",
+ "http-body-util",
+ "opentelemetry",
+ "opentelemetry-http",
+ "rand 0.9.4",
+ "reqwest 0.13.4",
+ "rmcp",
+ "rootcause",
+ "serde",
+ "serde_json",
+ "sha2 0.10.9",
+ "sqlx",
+ "strum 0.27.2",
+ "subtle",
+ "thiserror 2.0.18",
+ "tokio",
+ "tower 0.5.3",
+ "tracing",
+ "tracing-opentelemetry",
+ "url",
+ "utoipa",
+ "uuid",
+ "wiremock",
+ "workspace-hack",
+ "zeroize",
+]
+
+[[package]]
+name = "connect_client"
+version = "0.1.0"
+dependencies = [
+ "chrono",
+ "connect_platform",
+ "reqwest 0.13.4",
+ "rootcause",
+ "serde",
+ "serde_json",
+ "strum 0.27.2",
+ "thiserror 2.0.18",
+ "tokio",
+ "tracing",
+ "url",
+ "utoipa",
+ "wiremock",
+ "workspace-hack",
+ "zeroize",
+]
+
+[[package]]
+name = "connect_integration"
+version = "0.1.0"
+dependencies = [
+ "clap",
+ "connect_client",
+ "connect_registry",
+ "reqwest 0.13.4",
+ "rmcp",
+ "serde_json",
+ "tokio",
+ "url",
+ "uuid",
+ "workspace-hack",
+ "zeroize",
+]
+
+[[package]]
+name = "connect_platform"
+version = "0.1.0"
+dependencies = [
+ "aws-config",
+ "http 1.4.0",
+ "opentelemetry",
+ "opentelemetry-http",
+ "opentelemetry-otlp",
+ "opentelemetry_sdk",
+ "serde_json",
+ "thiserror 2.0.18",
+ "tower-http",
+ "tracing",
+ "tracing-opentelemetry",
+ "tracing-subscriber",
+ "workspace-hack",
+]
+
+[[package]]
+name = "connect_registry"
+version = "0.1.0"
+dependencies = [
+ "chrono",
+ "serde",
+ "thiserror 2.0.18",
+ "toml 0.8.23",
+ "url",
+ "workspace-hack",
+]
+
[[package]]
name = "connection"
version = "0.1.0"
@@ -23058,6 +23170,7 @@ dependencies = [
"tokio-rustls",
"tokio-stream",
"tokio-util",
+ "toml_edit 0.22.27",
"tower 0.5.3",
"tower-http",
"tracing",
diff --git a/Cargo.toml b/Cargo.toml
index 2c8f7a0aaa..b924516bac 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,6 +4,11 @@ resolver = "2"
exclude = ["vendor"]
members = [
+ "connect/crates/connect_registry",
+ "connect/crates/connect_platform",
+ "connect/crates/connect_client",
+ "connect/tests/connect_integration",
+ "connect/services/connect_api",
"crates/access_requests",
"crates/agent_api_keys",
"crates/routines",
diff --git a/connect/.agents/skills/connect-add-app/SKILL.md b/connect/.agents/skills/connect-add-app/SKILL.md
new file mode 100644
index 0000000000..b9a9ac74d9
--- /dev/null
+++ b/connect/.agents/skills/connect-add-app/SKILL.md
@@ -0,0 +1,29 @@
+---
+name: connect-add-app
+description: Add or re-check an app in the Macro Connect catalog. Use when adding a vendor's MCP server to `connect/registry/`, refreshing an app's OAuth classification, or writing its catalog description or icon.
+---
+
+# Add an app to the catalog
+
+The catalog spec is `connect/docs/catalog.md`; read it first.
+
+1. **Confirm it is first-party.** The vendor itself hosts the MCP server, per
+ its own docs or developer site. A third-party or community server stops
+ here: report it, add nothing.
+2. **Probe** the server with `connect/docs/probing.md`, all six steps. Keep
+ the fetched URLs.
+3. **Set `client_registration`** from the probe. For `own_app`, open or update
+ `connect/submissions/<vendor>.md` and set `status = "pending"`; the app
+ goes live when that record reaches `approved`.
+4. **Write `app.toml`.** `description` comes from the server's `tools/list`
+ (fetch it unauthenticated where the server allows, otherwise from the
+ vendor's tool reference): one line of plain verbs.
+5. **Add `icon.svg`** per the spec.
+6. **Run conformance** for `live` apps once it exists: sign in with the
+ vendor's test account, refresh, list tools, one read-only call. Until then,
+ say in the pull request that the app is probed but not conformance-tested.
+7. **Commit** on a feature branch with the probed URLs in the commit body.
+
+Done when `app.toml` and `icon.svg` exist, `client_registration` is backed by
+fetched metadata, and an `own_app` app has a submission record with a next
+action.
diff --git a/connect/.agents/skills/connect-pm/SKILL.md b/connect/.agents/skills/connect-pm/SKILL.md
new file mode 100644
index 0000000000..77490dcc9c
--- /dev/null
+++ b/connect/.agents/skills/connect-pm/SKILL.md
@@ -0,0 +1,38 @@
+---
+name: connect-pm
+description: Run Macro Connect project management. Use when taking over Macro Connect, starting a Connect work session, asked for its status, or deciding what Connect work comes next.
+---
+
+# Macro Connect project manager
+
+You own the schedule, the human queue, and the truth of `connect/STATUS.md`.
+Other agents build and file; you make sure the right work is in flight and
+nothing waits silently.
+
+1. **Load the state.** Read `connect/STATUS.md`, `connect/docs/plan.md`, and
+ `connect/docs/decisions.md`. Then `git log --since=<STATUS date> -- connect/`
+ and the open pull requests touching `connect/` (`gh pr list --search`).
+2. **Reconcile.** For each item under "In flight", check what actually
+ happened: its branch, pull request, CI, and deploy. Move finished items to
+ "Done" with the date; mark stalled ones with what they wait on. STATUS says
+ only what you verified.
+3. **Sweep submissions.** Read the frontmatter of every
+ `connect/submissions/*.md` except `answers.md`. Each record needs a
+ `next_action`, an owner, and a `due` date. Overdue agent actions: run the
+ `connect-submission` skill for that vendor. Overdue human actions: move to
+ the top of the human queue.
+4. **Rebuild the human queue.** One checkbox per human step, each ready for one
+ sitting: the link, what to click or sign, and what the agent already
+ prepared. Batch steps on the same vendor or portal. Remove what is done.
+5. **Choose next work** from the plan's schedule, earliest unblocked first.
+ Assign each item one owner (a subagent, a skill run, or the human) and list
+ it under "In flight" with its branch or record.
+6. **Record.** Update `STATUS.md` (date and author in the first line), add any
+ decision the human made to `docs/decisions.md`, and commit on a feature
+ branch per the root `CLAUDE.md`.
+7. **Report** to the human: what moved since last time, the human queue, and
+ anything the plan's dates no longer support, with the date it now supports.
+
+Done when every "In flight" item has a verified state and an owner, every
+submission has a next action with a due date, and the human queue holds only
+steps a human must take.
diff --git a/connect/.agents/skills/connect-submission/SKILL.md b/connect/.agents/skills/connect-submission/SKILL.md
new file mode 100644
index 0000000000..c4a2f7b49b
--- /dev/null
+++ b/connect/.agents/skills/connect-submission/SKILL.md
@@ -0,0 +1,42 @@
+---
+name: connect-submission
+description: Run a vendor OAuth app submission for Macro Connect, from requirements to approval. Use when registering Macro Connect's own OAuth app with a vendor, filing or answering an app review, or advancing a record in `connect/submissions/`.
+---
+
+# Vendor OAuth app submission
+
+One vendor per run. The record format, states, and human gates are in
+`connect/docs/submissions.md`; read it first. The record is
+`connect/submissions/<vendor>.md`; create it from that format if missing.
+
+1. **Requirements.** Read the vendor's current developer docs for app
+ registration and review. Fill the record's "Requirements" checklist, one
+ linked item each: account type, app fields, required pages (privacy, terms,
+ homepage), domain verification, demo video, security assessment, reviewer
+ SLA, user caps before approval, costs. Re-read the docs whenever the record
+ is older than a week.
+2. **Scopes.** List the narrowest scopes the app's MCP server needs, with a
+ one-line justification each. Split scopes that trigger a heavier review
+ into their own request so they don't hold up the rest.
+3. **Draft.** Fill every form field offline in the record first. Reuse
+ `connect/submissions/answers.md` verbatim; mark new wording for the human's
+ approval. Record the demo video with a browser agent against the real
+ connect flow when the vendor wants one.
+4. **Human gates.** For each step only a human can take (see
+ `submissions.md`), add one ready-to-do item to the human queue in
+ `connect/STATUS.md` and set `state: needs-human`. Prepare everything else
+ first so the human's part is one sitting.
+5. **Submit** through the vendor's portal in the browser, signed in as
+ `[email protected]`. Store any client ID and secret in Doppler project
+ `connect-api` (`<ID>_CLIENT_ID`, `<ID>_CLIENT_SECRET`) without printing them.
+ Set `state: submitted` and `submitted`.
+6. **Correspond.** Check `[email protected]` and the portal for reviewer
+ messages. Answer the same day; log each exchange in the record. A request
+ that changes scope or wording beyond `answers.md` goes to the human first.
+7. **Update the record**: `state`, `last_contact`, `next_action`,
+ `next_action_owner`, `due`. On approval, set the catalog app's `status` to
+ `live` (run `connect-add-app` to re-check it) and log where the secrets
+ live.
+
+Done when the record's state moved forward or its blocker is in the human
+queue, and `next_action`, owner, and `due` say exactly what happens next.
diff --git a/connect/.claude/skills b/connect/.claude/skills
new file mode 120000
index 0000000000..2b7a412b8f
--- /dev/null
+++ b/connect/.claude/skills
@@ -0,0 +1 @@
+../.agents/skills
\ No newline at end of file
diff --git a/connect/AGENTS.md b/connect/AGENTS.md
new file mode 100644
index 0000000000..692ef1bb07
--- /dev/null
+++ b/connect/AGENTS.md
@@ -0,0 +1,84 @@
+# Macro Connect
+
+A separate product that lives in Macro's monorepo: first-party, OAuth-only
+access to vendors' own MCP servers, run by agents. Macro is its first customer.
+The plan is [`docs/plan.md`](docs/plan.md).
+
+## Start here
+
+1. [`STATUS.md`](STATUS.md): what is done, in flight, blocked on the human, and
+ next. Update it before you stop.
+2. [`docs/plan.md`](docs/plan.md): guarantees, scope, architecture, schedule.
+3. [`docs/decisions.md`](docs/decisions.md): settled questions; reopen one only
+ with new facts.
+
+Taking over as project manager: run the `connect-pm` skill. Planner and builder
+roles are in [`docs/building.md`](docs/building.md).
+
+## Map
+
+| Path | Contents |
+| --- | --- |
+| `registry/apps/<id>/` | One app per directory: `app.toml` and `icon.svg`. The catalog's source of truth; spec in [`docs/catalog.md`](docs/catalog.md). |
+| `submissions/` | One record per vendor OAuth app submission; process in [`docs/submissions.md`](docs/submissions.md). |
+| `crates/` | Rust crates, all named `connect_*`. `connect_client` is the public client. |
+| `services/` | Deployable services; `connect_api` first. |
+| `infra/` | Standalone Pulumi project for Connect's ECS, ALB, database, KMS key, and runtime secret. |
+| `docker-compose.yml` | Local Connect API and PostgreSQL 17. |
+| `packages/` | TypeScript packages; `@macro-connect/sdk` is the public web SDK. |
+| `docs/` | Plan, decisions, catalog spec, probing, submissions, research, and deployment runbooks. |
+| `tasks/` | One spec per builder task, with its Result; process in [`docs/building.md`](docs/building.md). |
+| `tooling/` | `dispatch.sh` runs a builder on a task spec; `builder-brief.md` is its shared prompt. |
+| `.agents/skills/` | Workflows: `connect-pm`, `connect-add-app`, `connect-submission`. `.claude/skills` symlinks here. |
+
+## Boundary
+
+Build Macro Connect as if it were its own repository.
+
+- Connect code depends only on `connect_*` crates, `@macro-connect/*`
+ packages, and third-party libraries. Copy a Macro helper into `connect/`
+ rather than importing it.
+- Macro depends only on `connect_client` (Rust) and `@macro-connect/sdk`
+ (web), as any customer would. Macro never reads Connect's database,
+ Doppler project, or internals.
+- Connect has its own database, Pulumi project, deploy stack, and runtime secret.
+- Enforced by ast-grep rules `connect-*` in `rules/ast-grep/` and, once built
+ (day 1 in the plan), a Cargo dependency check. A failing boundary check
+ means the design is wrong, not the rule.
+
+## Rules for agents
+
+- Probe before you classify: a server's client registration (CIMD, DCR, or
+ Macro Connect's own app) comes from its live OAuth metadata
+ ([`docs/probing.md`](docs/probing.md)), never from docs alone.
+- Only vendors' own MCP servers enter the registry.
+- Steps only the human can take go to the human queue in `STATUS.md`, batched:
+ legal attestations and terms acceptance, identity checks, payments, 2FA and
+ CAPTCHAs, deploys, production access. Prepare everything around them so the
+ human's part is one sitting.
+- Vendor client secrets for live `own_app` entries go into encrypted Connect
+ Pulumi config and then its own Secrets Manager runtime secret. Doppler
+ project `connect` holds operations credentials only; never print, log, or
+ commit any secret.
+- Vendor correspondence goes out from `[email protected]` only, and is logged
+ in the vendor's submission record.
+- Record every decision the human makes in `docs/decisions.md`, dated, with the
+ reason.
+
+Macro's root `CLAUDE.md` rules (commits, checks, production, deploys) apply
+here too.
+
+## Checks
+
+- `just check`: runs the `connect-*` boundary rules with the rest.
+- `cargo x deps --check`: enforces the Rust crate boundary (including normal,
+ dev, and build dependencies) and checks generated dependency artifacts.
+- Run per-crate tests for each changed Connect crate.
+
+## Gotchas
+
+- Advertised DCR is not permission: Figma and Vercel reject unapproved
+ clients anyway. Probing step 6 catches these.
+- A probe proves metadata, not a working connection; only conformance does.
+- Users connected through Pipedream's own OAuth apps cannot be exported; every
+ migrated user reconnects.
diff --git a/connect/CLAUDE.md b/connect/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/STATUS.md b/connect/STATUS.md
new file mode 100644
index 0000000000..6e6724b0da
--- /dev/null
+++ b/connect/STATUS.md
@@ -0,0 +1,109 @@
+# Status
+
+Last updated 2026-10-30 by Claude (planning session). Slice 1: Connect as an
+independent backend with integration tests. Target: Macro's own
+users off Pipedream for catalog apps by 2026-11-06 ([plan](docs/plan.md#week-one)).
+
+## Human queue
+
+Eric. Each item is ready for one sitting; agents prepare the rest.
+
+- [ ] **Review PR #9231** (Connect as an independent backend; touches none of
+ Macro's deployed services).
+- [ ] **First dev deploy** (after T016 and your review): Connect's own Pulumi
+ project in `connect/infra`, stack `dev`. You provide Pulumi access
+ (`PULUMI_ACCESS_TOKEN`) and approve `pulumi up` after seeing the preview.
+ It creates Connect-only AWS resources plus one DNS record,
+ `connect-dev.macro.com`.
+- [ ] **Test workspaces** for the first slice (Linear, Notion, PostHog,
+ Sentry): accounts an agent may sign in to, or the `[email protected]`
+ browser sign-in below so agents create free ones.
+- [ ] **Company facts every vendor form asks for** (unblocks Zoom, Xero,
+ Figma, Vercel, Box, Discord): legal company name; contact name, title,
+ and email; Connect's production host and OAuth callback (proposed:
+ `https://connect.macro.com`, callback `/v1/oauth/callback`); landing,
+ privacy, terms, and support URLs (proposed: that host's `/`, `/privacy`,
+ `/terms`, `/support`; agents draft the pages for your approval); a logo
+ and wordmark. Approve the product description in each record's Draft.
+- [ ] Xero: approve the Core plan (AUD$35/month, card on file) and choose
+ read-only or read-write for v1.
+- [ ] Box: approve sending the drafted email to `[email protected]`
+ ([record](submissions/box.md)).
+- [ ] Zoom: say which security evidence exists (SSDLC, SAST, DAST, pen test,
+ security and incident policies); Zoom's review asks for it.
+- [ ] Rotate the `[email protected]` password (it was shared in a chat
+ transcript on 2026-10-30), then update `CONNECT_ACCOUNT_PASSWORD` in
+ Doppler `connect/prd`.
+- [ ] Sign in once in Macro Connect's browser: `ssh -L 6081:localhost:6081
+ big-pickle`, open http://localhost:6081/vnc.html; the Google sign-in page
+ for `[email protected]` is open. While signed in, enroll an
+ authenticator-app (TOTP) second factor and save its setup key as
+ `CONNECT_ACCOUNT_TOTP_SECRET` in Doppler `connect/prd`, so agents can
+ sign in again without you. ([how it works](docs/submissions.md#browser))
+- [ ] Give the submission agents read access to the `[email protected]` inbox
+ (an IMAP app password or API token in Doppler `connect/prd`).
+- [ ] GitHub and Slack (v1 reuses Macro's apps): approve copying their client ID
+ and secret from Macro's Doppler into `connect-api` (once T012 adds it) as `GITHUB_CLIENT_*` and
+ `SLACK_CLIENT_*` (an agent pipes them without printing), and add
+ Connect's callback (`<host>/v1/oauth/callback`) to each app's allowed
+ redirect URLs. Needed by T006.
+- [ ] HubSpot, Asana: confirm whether Macro already has OAuth apps for their
+ MCP servers (Macro users connect them today).
+- [ ] Approve the Macro Connect landing, privacy, and terms pages once drafted
+ (vendors require them).
+
+## In flight
+
+Nothing: waiting on your review of PR #9231 and the first dev deploy.
+
+## Next
+
+After the deploy: `connect/tooling/integration.sh dev`, then a real consent per
+live app with test accounts and the browser (T018). Later slices: [T010](tasks/T010-macro-adapter.md) Macro integration,
+then reconnect prompts (T011). Submissions wait on the company
+facts above.
+
+## Done
+
+- 2026-10-30: [T014](tasks/T014-deny-wrappers.md), [T015](tasks/T015-test-databases.md)
+ CI fixes; [T016](tasks/T016-independent-hosting.md) Connect hosted
+ independently in `connect/infra` with a local Compose run;
+ [T017](tasks/T017-integration-tests.md) `connect_client` and integration tests
+ (all 11 scenarios pass locally, including each live app's real authorize
+ redirect). PR #9231 touches none of Macro's deployed services.
+- 2026-10-30: [T013](tasks/T013-dev-slice-infra.md) Connect's own RDS (PostgreSQL
+ 17), Pulumi-written Doppler values through a project-scoped token, one-pass
+ bootstrap ([runbook](docs/runbooks/bootstrap.md)); live catalog is Linear,
+ Notion, PostHog, Sentry. Reviewed and merged.
+- 2026-10-30: [T008](tasks/T008-mcp-gateway.md) streaming MCP gateway with
+ refresh-and-retry and a header allowlist (customer keys never reach vendors);
+ reviewed and merged. Not yet run against a live vendor.
+- 2026-10-30: [T012](tasks/T012-deploy-stack.md) deploy inventory, `connect-api`
+ Pulumi stack with grant KMS key, service URL, local stack (`/connect` through
+ the local proxy); reviewed and merged.
+- 2026-10-30: [T006](tasks/T006-oauth-flow.md) OAuth connect flow (CIMD, DCR, own
+ app), single-use state, refresh; reviewed and merged. Not yet run against a
+ live vendor: needs a public HTTPS URL (dev deploy).
+- 2026-10-30: [T005](tasks/T005-connections-store.md) Connect database, hashed
+ customer keys, KMS envelope-encrypted grants, connections API; reviewed and
+ merged.
+- 2026-10-30: [T007](tasks/T007-ci-covers-connect.md) CI runs Rust, ast-grep, and
+ cargo-deny checks on `connect/` changes; reviewed and merged.
+- 2026-10-30: [T003](tasks/T003-connect-api-skeleton.md) `connect_api` serves
+ the catalog on `connect_platform`; [T004](tasks/T004-press-kit-icons.md)
+ five press-kit icons (Apollo, Klaviyo, monday.com, Pipedrive publish no
+ SVG). Reviewed and merged. `just check` now covers `connect/`.
+- 2026-10-30: [T002](tasks/T002-registry.md) 36 day-1 apps in
+ `registry/apps/` and the `connect_registry` crate; reviewed and merged.
+- 2026-10-30: [T001](tasks/T001-cargo-boundary.md) Cargo boundary check in
+ `cargo x deps --check`; reviewed and merged.
+- 2026-10-30: Six vendor submissions drafted (Zoom, Xero, Figma, Vercel, Box,
+ Discord); blocked on the company facts in the human queue.
+- 2026-10-30: Measured Macro's MCP usage (4,057 Pipedream connections, 1,546
+ native) and probed about 80 vendors' OAuth; results in
+ [`docs/research/`](docs/research/).
+- 2026-10-30: Plan, decisions, catalog spec, probing and submission
+ procedures, skills.
+- 2026-10-30: Doppler project `connect` created (configs `dev`, `prd`, `lcl`,
+ `lcl_personal`); `CONNECT_ACCOUNT_EMAIL` and `CONNECT_ACCOUNT_PASSWORD` set in
+ `prd`.
diff --git a/connect/crates/connect_client/AGENTS.md b/connect/crates/connect_client/AGENTS.md
new file mode 100644
index 0000000000..2e76046dfa
--- /dev/null
+++ b/connect/crates/connect_client/AGENTS.md
@@ -0,0 +1,26 @@
+# Connect client
+
+## What it is
+
+The public Rust surface for Macro Connect customers. API changes here are breaking for customers.
+
+## Start here
+
+- `src/lib.rs`: authenticated async client, error mapping, and MCP gateway address.
+- `src/wire.rs`: shared request and response types used by the client and `connect_api`.
+
+## Scope
+
+- Owns: customer-facing Rust API and HTTP wire contract.
+- Not here: Connect server policy or storage → `connect_api`.
+
+## Boundaries
+
+- Depends on: `connect_platform` for trace injection and third-party crates.
+- Used by: Macro and other Connect customers; `connect_api` imports only `wire`.
+
+## Checks
+
+- `cargo nextest run --all-features -p connect_client`
+- `cargo clippy -p connect_client --all-features --all-targets -- -D warnings`
+- `cargo x deps --check` after `just hakari` when dependencies change.
diff --git a/connect/crates/connect_client/CLAUDE.md b/connect/crates/connect_client/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/crates/connect_client/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/crates/connect_client/Cargo.toml b/connect/crates/connect_client/Cargo.toml
new file mode 100644
index 0000000000..1046071c8e
--- /dev/null
+++ b/connect/crates/connect_client/Cargo.toml
@@ -0,0 +1,24 @@
+[package]
+name = "connect_client"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
+chrono = { workspace = true }
+connect_platform = { path = "../connect_platform" }
+reqwest = { workspace = true }
+rootcause = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+strum = { workspace = true }
+thiserror = { workspace = true }
+tracing = { workspace = true }
+url = { workspace = true }
+utoipa = { workspace = true }
+zeroize = { workspace = true }
+workspace-hack = { version = "0.1", path = "../../../crates/workspace-hack" }
+
+[dev-dependencies]
+tokio = { workspace = true }
+wiremock = { workspace = true }
diff --git a/connect/crates/connect_client/src/lib.rs b/connect/crates/connect_client/src/lib.rs
new file mode 100644
index 0000000000..6850722869
--- /dev/null
+++ b/connect/crates/connect_client/src/lib.rs
@@ -0,0 +1,284 @@
+#![deny(missing_docs)]
+
+//! Typed, authenticated Rust client for the Macro Connect API.
+
+pub mod wire;
+
+use std::{fmt, time::Duration};
+
+use connect_platform::inject_trace_headers;
+use reqwest::{Method, StatusCode, header::HeaderMap};
+use tracing::Span;
+use url::Url;
+use zeroize::{Zeroize as _, Zeroizing};
+
+use wire::{
+ CatalogEntry, ConnectSessionRequest, ConnectSessionResponse, Connection, DeleteResponse,
+ ErrorResponse, TokenResponse,
+};
+
+/// A failure a Connect customer can act on.
+#[derive(Debug, thiserror::Error)]
+pub enum Error {
+ /// The user has no connection to the requested app.
+ #[error("app is not connected")]
+ NotConnected,
+ /// The user must reconnect the app.
+ #[error("connection needs reauthorization")]
+ NeedsReauth,
+ /// The customer key was rejected.
+ #[error("customer key was rejected")]
+ Unauthorized,
+ /// Connect could not be reached or is temporarily unavailable.
+ #[error("Connect is unavailable")]
+ Unavailable,
+ /// Connect returned another API error.
+ #[error("Connect API returned {status}: {message}")]
+ Api {
+ /// HTTP status code.
+ status: StatusCode,
+ /// API error code or response message.
+ message: String,
+ },
+ /// Request construction or decoding failed.
+ #[error("Connect client failed: {0}")]
+ Internal(rootcause::Report),
+}
+
+/// Authenticated client for one Connect customer.
+pub struct ConnectClient {
+ base_url: Url,
+ customer_key: Zeroizing<String>,
+ http: reqwest::Client,
+}
+
+impl fmt::Debug for ConnectClient {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+ formatter
+ .debug_struct("ConnectClient")
+ .field("base_url", &self.base_url)
+ .field("customer_key", &"[REDACTED]")
+ .finish_non_exhaustive()
+ }
+}
+
+/// Address and customer credential for an MCP client to dial Connect's gateway.
+pub struct McpUpstream {
+ /// Customer-scoped MCP gateway URL.
+ pub url: Url,
+ /// Customer bearer token to send to the gateway.
+ pub bearer_token: String,
+}
+
+impl fmt::Debug for McpUpstream {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+ formatter
+ .debug_struct("McpUpstream")
+ .field("url", &self.url)
+ .field("bearer_token", &"[REDACTED]")
+ .finish()
+ }
+}
+
+impl Drop for McpUpstream {
+ fn drop(&mut self) {
+ self.bearer_token.zeroize();
+ }
+}
+
+impl ConnectClient {
+ /// Construct a client for a Connect origin or prefixed base URL.
+ pub fn new(base_url: &str, customer_key: impl Into<String>) -> Result<Self, Error> {
+ let base_url = Url::parse(base_url)
+ .map_err(|error| Error::Internal(rootcause::Report::new(error).into_dynamic()))?;
+ if !matches!(base_url.scheme(), "http" | "https")
+ || base_url.cannot_be_a_base()
+ || !base_url.username().is_empty()
+ || base_url.password().is_some()
+ || base_url.query().is_some()
+ || base_url.fragment().is_some()
+ {
+ return Err(Error::Internal(
+ rootcause::Report::new(std::io::Error::new(
+ std::io::ErrorKind::InvalidInput,
+ "invalid Connect base URL",
+ ))
+ .into_dynamic(),
+ ));
+ }
+ let http = reqwest::Client::builder()
+ .connect_timeout(Duration::from_secs(10))
+ .timeout(Duration::from_secs(30))
+ .build()
+ .map_err(|error| Error::Internal(rootcause::Report::new(error).into_dynamic()))?;
+ Ok(Self {
+ base_url,
+ customer_key: Zeroizing::new(customer_key.into()),
+ http,
+ })
+ }
+
+ /// List apps available to connect.
+ #[tracing::instrument(
+ name = "connect.client.catalog",
+ skip_all,
+ fields(app_id, outcome),
+ err
+ )]
+ pub async fn catalog(&self) -> Result<Vec<CatalogEntry>, Error> {
+ self.request(Method::GET, &["v1", "catalog"], None).await
+ }
+
+ /// Create a browser session for connecting a user's app.
+ #[tracing::instrument(name = "connect.client.create_connect_session", skip_all, fields(app_id = %app_id, outcome), err)]
+ pub async fn create_connect_session(
+ &self,
+ external_user_id: &str,
+ app_id: &str,
+ redirect_url: &str,
+ ) -> Result<ConnectSessionResponse, Error> {
+ let body = ConnectSessionRequest {
+ external_user_id: external_user_id.to_owned(),
+ app_id: app_id.to_owned(),
+ redirect_url: redirect_url.to_owned(),
+ };
+ self.request(Method::POST, &["v1", "connect-sessions"], Some(&body))
+ .await
+ }
+
+ /// List a user's app connections.
+ #[tracing::instrument(
+ name = "connect.client.connections",
+ skip_all,
+ fields(app_id, outcome),
+ err
+ )]
+ pub async fn connections(&self, external_user_id: &str) -> Result<Vec<Connection>, Error> {
+ self.request(
+ Method::GET,
+ &["v1", "users", external_user_id, "connections"],
+ None,
+ )
+ .await
+ }
+
+ /// Delete a user's app connection locally. The vendor grant is not revoked.
+ #[tracing::instrument(name = "connect.client.delete_connection", skip_all, fields(app_id = %app_id, outcome), err)]
+ pub async fn delete_connection(
+ &self,
+ external_user_id: &str,
+ app_id: &str,
+ ) -> Result<DeleteResponse, Error> {
+ self.request(
+ Method::DELETE,
+ &["v1", "users", external_user_id, "connections", app_id],
+ None,
+ )
+ .await
+ }
+
+ /// Export a user's current vendor access token.
+ #[tracing::instrument(name = "connect.client.access_token", skip_all, fields(app_id = %app_id, outcome), err)]
+ pub async fn access_token(
+ &self,
+ external_user_id: &str,
+ app_id: &str,
+ ) -> Result<TokenResponse, Error> {
+ self.request(
+ Method::GET,
+ &[
+ "v1",
+ "users",
+ external_user_id,
+ "connections",
+ app_id,
+ "token",
+ ],
+ None,
+ )
+ .await
+ }
+
+ /// Return the gateway address and credential without making a network call.
+ #[tracing::instrument(name = "connect.client.mcp_upstream", skip_all, fields(app_id = %app_id, outcome = "ready"))]
+ pub fn mcp_upstream(&self, external_user_id: &str, app_id: &str) -> McpUpstream {
+ McpUpstream {
+ url: self.route(&["v1", "users", external_user_id, "mcp", app_id]),
+ bearer_token: self.customer_key.to_string(),
+ }
+ }
+
+ fn route(&self, parts: &[&str]) -> Url {
+ let mut url = self.base_url.clone();
+ // `new` accepts only hierarchical HTTP URLs, so path segments are available.
+ let mut segments = url.path_segments_mut().expect("validated HTTP base URL");
+ segments.pop_if_empty();
+ segments.extend(parts.iter().copied());
+ drop(segments);
+ url
+ }
+
+ async fn request<T: serde::de::DeserializeOwned>(
+ &self,
+ method: Method,
+ parts: &[&str],
+ body: Option<&ConnectSessionRequest>,
+ ) -> Result<T, Error> {
+ let mut headers = HeaderMap::new();
+ inject_trace_headers(&mut headers);
+ let mut request = self
+ .http
+ .request(method, self.route(parts))
+ .headers(headers)
+ .bearer_auth(self.customer_key.as_str());
+ if let Some(body) = body {
+ request = request.json(body);
+ }
+ let response = request.send().await.map_err(|error| {
+ if error.is_connect() || error.is_timeout() {
+ Span::current().record("outcome", "unavailable");
+ Error::Unavailable
+ } else {
+ Span::current().record("outcome", "internal");
+ Error::Internal(rootcause::Report::new(error).into_dynamic())
+ }
+ })?;
+ let status = response.status();
+ let bytes = response.bytes().await.map_err(|error| {
+ Span::current().record("outcome", "internal");
+ Error::Internal(rootcause::Report::new(error).into_dynamic())
+ })?;
+ if !status.is_success() {
+ let message = serde_json::from_slice::<ErrorResponse>(&bytes)
+ .map(|response| response.error)
+ .unwrap_or_else(|_| status.canonical_reason().unwrap_or("API error").to_owned());
+ let error = match (status, message.as_str()) {
+ (StatusCode::UNAUTHORIZED | StatusCode::FORBIDDEN, _) => Error::Unauthorized,
+ (status, _) if status.is_server_error() => Error::Unavailable,
+ (StatusCode::NOT_FOUND, _) => Error::NotConnected,
+ (StatusCode::CONFLICT, "needs_reauth") => Error::NeedsReauth,
+ _ => Error::Api { status, message },
+ };
+ Span::current().record(
+ "outcome",
+ match error {
+ Error::NotConnected => "not_connected",
+ Error::NeedsReauth => "needs_reauth",
+ Error::Unauthorized => "unauthorized",
+ Error::Unavailable => "unavailable",
+ _ => "api_error",
+ },
+ );
+ return Err(error);
+ }
+ let value = serde_json::from_slice(&bytes).map_err(|error| {
+ Span::current().record("outcome", "decode_error");
+ Error::Internal(rootcause::Report::new(error).into_dynamic())
+ })?;
+ Span::current().record("outcome", "ok");
+ Ok(value)
+ }
+}
+
+#[cfg(test)]
+mod test;
diff --git a/connect/crates/connect_client/src/test.rs b/connect/crates/connect_client/src/test.rs
new file mode 100644
index 0000000000..8ce0a1c18a
--- /dev/null
+++ b/connect/crates/connect_client/src/test.rs
@@ -0,0 +1,141 @@
+use super::*;
+use wiremock::{
+ Mock, MockServer, ResponseTemplate,
+ matchers::{body_json, header, method, path},
+};
+
+#[tokio::test]
+async fn calls_every_customer_route_with_the_shared_wire_contract() {
+ let server = MockServer::start().await;
+ let client =
+ ConnectClient::new(&format!("{}/connect", server.uri()), "ck_test_secret").unwrap();
+ Mock::given(method("GET"))
+ .and(path("/connect/v1/catalog"))
+ .and(header("authorization", "Bearer ck_test_secret"))
+ .respond_with(
+ ResponseTemplate::new(200).set_body_json(serde_json::json!([{
+ "id": "notion", "name": "Notion", "description": "Notes", "access": ["mcp"],
+ "mcp_url": "https://mcp.notion.com/mcp", "icon_url": null
+ }])),
+ )
+ .mount(&server)
+ .await;
+ assert_eq!(client.catalog().await.unwrap()[0].id, "notion");
+
+ Mock::given(method("POST"))
+ .and(path("/connect/v1/connect-sessions"))
+ .and(body_json(serde_json::json!({
+ "external_user_id": "user-1", "app_id": "notion", "redirect_url": "https://customer.test/done"
+ })))
+ .respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({
+ "connect_url": "https://connect.test/v1/connect/session", "expires_at": "2026-10-30T10:00:00Z"
+ })))
+ .mount(&server).await;
+ let session = client
+ .create_connect_session("user-1", "notion", "https://customer.test/done")
+ .await
+ .unwrap();
+ assert_eq!(
+ session.connect_url,
+ "https://connect.test/v1/connect/session"
+ );
+
+ Mock::given(method("GET"))
+ .and(path("/connect/v1/users/user-1/connections"))
+ .respond_with(
+ ResponseTemplate::new(200).set_body_json(serde_json::json!([{
+ "appId": "notion", "status": "active", "scopes": ["read"],
+ "createdAt": "2026-10-30T09:00:00Z"
+ }])),
+ )
+ .mount(&server)
+ .await;
+ let connections = client.connections("user-1").await.unwrap();
+ assert_eq!(connections[0].app_id, "notion");
+ assert!(matches!(
+ connections[0].status,
+ wire::ConnectionStatus::Active
+ ));
+
+ Mock::given(method("DELETE"))
+ .and(path("/connect/v1/users/user-1/connections/notion"))
+ .respond_with(
+ ResponseTemplate::new(200)
+ .set_body_json(serde_json::json!({"vendorGrantRevoked": false})),
+ )
+ .mount(&server)
+ .await;
+ assert!(
+ !client
+ .delete_connection("user-1", "notion")
+ .await
+ .unwrap()
+ .vendor_grant_revoked
+ );
+
+ Mock::given(method("GET"))
+ .and(path("/connect/v1/users/user-1/connections/notion/token"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({
+ "accessToken": "vendor-secret", "expiresAt": null
+ })))
+ .mount(&server)
+ .await;
+ let token = client.access_token("user-1", "notion").await.unwrap();
+ assert_eq!(token.access_token, "vendor-secret");
+ assert!(!format!("{token:?}").contains("vendor-secret"));
+
+ let upstream = client.mcp_upstream("user-1", "notion");
+ assert_eq!(
+ upstream.url.as_str(),
+ format!("{}/connect/v1/users/user-1/mcp/notion", server.uri())
+ );
+ assert_eq!(upstream.bearer_token, "ck_test_secret");
+ assert!(!format!("{client:?} {upstream:?}").contains("ck_test_secret"));
+ assert_eq!(server.received_requests().await.unwrap().len(), 5);
+}
+
+#[tokio::test]
+async fn maps_status_and_error_codes_for_callers() {
+ for (status, code, expected) in [
+ (404, "not_found", "not_connected"),
+ (409, "needs_reauth", "needs_reauth"),
+ (401, "invalid_key", "unauthorized"),
+ (401, "not_found", "unauthorized"),
+ (500, "internal_error", "unavailable"),
+ (500, "not_found", "unavailable"),
+ (503, "internal_error", "unavailable"),
+ (400, "invalid_redirect_url", "api"),
+ ] {
+ let server = MockServer::start().await;
+ Mock::given(method("GET"))
+ .and(path("/v1/users/user-1/connections"))
+ .respond_with(
+ ResponseTemplate::new(status).set_body_json(serde_json::json!({"error": code})),
+ )
+ .mount(&server)
+ .await;
+ let client = ConnectClient::new(&server.uri(), "ck_test_secret").unwrap();
+ let error = client.connections("user-1").await.unwrap_err();
+ match expected {
+ "not_connected" => assert!(matches!(error, Error::NotConnected)),
+ "needs_reauth" => assert!(matches!(error, Error::NeedsReauth)),
+ "unauthorized" => assert!(matches!(error, Error::Unauthorized)),
+ "unavailable" => assert!(matches!(error, Error::Unavailable)),
+ "api" => assert!(
+ matches!(error, Error::Api { status: StatusCode::BAD_REQUEST, message } if message == code)
+ ),
+ _ => unreachable!(),
+ }
+ }
+}
+
+#[tokio::test]
+async fn mcp_gateway_path_escapes_customer_identifiers() {
+ let client = ConnectClient::new("https://connect.test/connect/", "private-key").unwrap();
+ let upstream = client.mcp_upstream("user/one", "notion");
+ assert_eq!(
+ upstream.url.as_str(),
+ "https://connect.test/connect/v1/users/user%2Fone/mcp/notion"
+ );
+ assert!(!format!("{client:?} {upstream:?}").contains("private-key"));
+}
diff --git a/connect/crates/connect_client/src/wire.rs b/connect/crates/connect_client/src/wire.rs
new file mode 100644
index 0000000000..75e3aa12f7
--- /dev/null
+++ b/connect/crates/connect_client/src/wire.rs
@@ -0,0 +1,123 @@
+//! Shared JSON bodies for Macro Connect's customer-facing routes.
+
+use chrono::{DateTime, Utc};
+use serde::{Deserialize, Serialize};
+use utoipa::ToSchema;
+use zeroize::Zeroize as _;
+
+/// An app available in Connect's catalog.
+#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
+pub struct CatalogEntry {
+ /// Stable app identifier.
+ pub id: String,
+ /// Display name.
+ pub name: String,
+ /// Short capabilities description.
+ pub description: String,
+ /// Access methods, such as `mcp`.
+ pub access: Vec<String>,
+ /// Vendor-owned MCP server URL.
+ pub mcp_url: String,
+ /// Connect-served icon path when an official SVG is available.
+ pub icon_url: Option<String>,
+}
+
+/// Body for creating a browser connect session.
+#[derive(Debug, Deserialize, Serialize, ToSchema)]
+pub struct ConnectSessionRequest {
+ /// Customer's user identifier.
+ #[serde(alias = "externalUserId")]
+ pub external_user_id: String,
+ /// App to connect.
+ #[serde(alias = "appId")]
+ pub app_id: String,
+ /// Customer callback URL.
+ #[serde(alias = "redirectUrl")]
+ pub redirect_url: String,
+}
+
+/// URL and expiration of a browser connect session.
+#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
+pub struct ConnectSessionResponse {
+ /// URL for the user's browser to visit.
+ pub connect_url: String,
+ /// Session expiration.
+ pub expires_at: DateTime<Utc>,
+}
+
+/// One of a customer's user connections.
+#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct Connection {
+ /// Stable app identifier.
+ pub app_id: String,
+ /// Whether the grant can be used.
+ pub status: ConnectionStatus,
+ /// Granted OAuth scopes.
+ pub scopes: Vec<String>,
+ /// Creation time.
+ pub created_at: DateTime<Utc>,
+}
+
+/// Current usability of a connection.
+#[derive(
+ Clone, Copy, Debug, Deserialize, Serialize, ToSchema, strum::EnumString, strum::Display,
+)]
+#[serde(rename_all = "snake_case")]
+#[strum(serialize_all = "snake_case")]
+pub enum ConnectionStatus {
+ /// Grant is available.
+ Active,
+ /// User must grant access again.
+ NeedsReauth,
+}
+
+/// Result of deleting a connection locally.
+#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct DeleteResponse {
+ /// Always false: deleting locally does not revoke the vendor grant.
+ pub vendor_grant_revoked: bool,
+}
+
+/// An exported OAuth access token.
+#[derive(Deserialize, Serialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct TokenResponse {
+ /// Bearer token for the vendor API.
+ pub access_token: String,
+ /// Expiration, when supplied by the vendor.
+ pub expires_at: Option<DateTime<Utc>>,
+}
+
+impl std::fmt::Debug for TokenResponse {
+ fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ formatter
+ .debug_struct("TokenResponse")
+ .field("access_token", &"[REDACTED]")
+ .field("expires_at", &self.expires_at)
+ .finish()
+ }
+}
+
+impl Drop for TokenResponse {
+ fn drop(&mut self) {
+ self.access_token.zeroize();
+ }
+}
+
+/// Connect API error body.
+#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
+pub struct ErrorResponse {
+ /// Stable machine-readable error code.
+ pub error: String,
+}
+
+/// MCP gateway error body.
+#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
+pub struct McpErrorResponse {
+ /// Stable machine-readable error code.
+ pub error: String,
+ /// App for which the request failed.
+ pub app_id: String,
+}
diff --git a/connect/crates/connect_platform/AGENTS.md b/connect/crates/connect_platform/AGENTS.md
new file mode 100644
index 0000000000..993b1efa4a
--- /dev/null
+++ b/connect/crates/connect_platform/AGENTS.md
@@ -0,0 +1,33 @@
+# Connect platform
+
+## What it is
+
+Shared startup configuration, AWS SDK config loading, OpenTelemetry setup, and
+inbound HTTP tracing for Macro Connect services.
+
+## Start here
+
+- `src/config.rs`: one environment snapshot and `APP_SECRETS_JSON` precedence.
+- `src/lib.rs`: default AWS SDK config loading.
+- `src/telemetry.rs`: tracing subscriber and optional OTLP export.
+- `src/http.rs`: request spans, W3C parent extraction, and outbound trace header injection.
+
+## Scope
+
+- Owns: Connect's process configuration and transport telemetry.
+- Not here: service-specific settings or routes → `connect/services/connect_api`.
+
+## Boundaries
+
+- Depends on: third-party crates and generated `workspace-hack` only.
+- Used by: `connect_api`, `connect_client`, and future Connect services.
+
+## Recipes
+
+- Run `connect_api` locally with a dedicated Connect Postgres database and either `CONNECT_KMS_KEY_ID` or a base64-encoded 32-byte `CONNECT_LOCAL_WRAPPING_KEY`; see `../../services/connect_api/AGENTS.md` for the command. Then request `http://localhost:8080/health`.
+
+## Checks
+
+- `cargo nextest run --all-features -p connect_platform`
+- `cargo clippy -p connect_platform --all-features --all-targets -- -D warnings`
+- `cargo x deps --check` after `just hakari` when dependencies change.
diff --git a/connect/crates/connect_platform/CLAUDE.md b/connect/crates/connect_platform/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/crates/connect_platform/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/crates/connect_platform/Cargo.toml b/connect/crates/connect_platform/Cargo.toml
new file mode 100644
index 0000000000..9ca8391ee3
--- /dev/null
+++ b/connect/crates/connect_platform/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "connect_platform"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
+aws-config = { workspace = true }
+http = { workspace = true }
+opentelemetry = { workspace = true }
+opentelemetry-http = { workspace = true }
+opentelemetry-otlp = { workspace = true }
+opentelemetry_sdk = { workspace = true }
+serde_json = { workspace = true }
+thiserror = { workspace = true }
+tower-http = { workspace = true }
+tracing = { workspace = true }
+tracing-opentelemetry = { workspace = true }
+tracing-subscriber = { workspace = true }
+workspace-hack = { version = "0.1", path = "../../../crates/workspace-hack" }
diff --git a/connect/crates/connect_platform/src/config.rs b/connect/crates/connect_platform/src/config.rs
new file mode 100644
index 0000000000..6f5c170ae2
--- /dev/null
+++ b/connect/crates/connect_platform/src/config.rs
@@ -0,0 +1,98 @@
+use std::{collections::HashMap, str::FromStr};
+
+/// A configuration loading error that names the offending variable.
+#[derive(Debug, thiserror::Error)]
+pub enum ConfigError {
+ /// `APP_SECRETS_JSON` was malformed.
+ #[error("APP_SECRETS_JSON contains invalid JSON: {0}")]
+ InvalidSecretsJson(#[source] serde_json::Error),
+ /// A required variable was absent.
+ #[error("missing required config value: {0}")]
+ Missing(&'static str),
+ /// A variable could not be parsed as its expected type.
+ #[error("invalid config value: {0}")]
+ Invalid(&'static str),
+ /// A process variable was not valid Unicode.
+ #[error("invalid process variable: {0}")]
+ InvalidProcessVariable(String),
+}
+
+/// A single snapshot of process configuration.
+///
+/// When `APP_SECRETS_JSON` is present, its keys are the sole source of values.
+pub struct ConfigLoader {
+ values: HashMap<String, String>,
+}
+
+impl ConfigLoader {
+ /// Load the named process variables once at service startup.
+ pub fn load(keys: &[&str]) -> Result<Self, ConfigError> {
+ let mut values = HashMap::new();
+ for key in std::iter::once("APP_SECRETS_JSON").chain(keys.iter().copied()) {
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect reads its declared process configuration once at startup"
+ )]
+ let value = std::env::var(key);
+ match value {
+ Ok(value) => {
+ values.insert(key.to_owned(), value);
+ }
+ Err(std::env::VarError::NotPresent) => {}
+ Err(std::env::VarError::NotUnicode(_)) => {
+ return Err(ConfigError::InvalidProcessVariable(key.to_owned()));
+ }
+ }
+ if key == "APP_SECRETS_JSON" && values.contains_key(key) {
+ break;
+ }
+ }
+ Self::from_values(values)
+ }
+
+ fn from_values(mut values: HashMap<String, String>) -> Result<Self, ConfigError> {
+ if let Some(secrets) = values.remove("APP_SECRETS_JSON") {
+ let parsed: HashMap<String, serde_json::Value> =
+ serde_json::from_str(&secrets).map_err(ConfigError::InvalidSecretsJson)?;
+ values = parsed
+ .into_iter()
+ .map(|(key, value)| {
+ let value = match value {
+ serde_json::Value::String(text) => text,
+ other => other.to_string(),
+ };
+ (key, value)
+ })
+ .collect();
+ }
+ Ok(Self { values })
+ }
+
+ /// Parse a required value or identify its missing or invalid key.
+ pub fn required<T>(&self, key: &'static str) -> Result<T, ConfigError>
+ where
+ T: FromStr,
+ {
+ let value = self.values.get(key).ok_or(ConfigError::Missing(key))?;
+ value.parse().map_err(|_| ConfigError::Invalid(key))
+ }
+
+ /// Parse a value, using `default` when it is absent.
+ pub fn with_default<T>(&self, key: &'static str, default: T) -> Result<T, ConfigError>
+ where
+ T: FromStr,
+ {
+ match self.values.get(key) {
+ Some(value) => value.parse().map_err(|_| ConfigError::Invalid(key)),
+ None => Ok(default),
+ }
+ }
+
+ /// Return an optional raw value from the same snapshot.
+ pub fn optional(&self, key: &str) -> Option<&str> {
+ self.values.get(key).map(String::as_str)
+ }
+}
+
+#[cfg(test)]
+mod test;
diff --git a/connect/crates/connect_platform/src/config/test.rs b/connect/crates/connect_platform/src/config/test.rs
new file mode 100644
index 0000000000..9890e518dd
--- /dev/null
+++ b/connect/crates/connect_platform/src/config/test.rs
@@ -0,0 +1,44 @@
+use super::*;
+
+#[test]
+fn loads_environment_values() {
+ let config = ConfigLoader::from_values(HashMap::from([
+ ("PORT".to_owned(), "9090".to_owned()),
+ ("REQUIRED_VALUE".to_owned(), "ready".to_owned()),
+ ]))
+ .unwrap();
+
+ assert_eq!(config.with_default("PORT", 8080_u16).unwrap(), 9090);
+ assert_eq!(
+ config.required::<String>("REQUIRED_VALUE").unwrap(),
+ "ready"
+ );
+}
+
+#[test]
+fn app_secrets_json_takes_precedence_over_process_environment() {
+ let config = ConfigLoader::from_values(HashMap::from([
+ ("APP_SECRETS_JSON".to_owned(), r#"{"PORT":7070}"#.to_owned()),
+ ("PORT".to_owned(), "9090".to_owned()),
+ ("REQUIRED_VALUE".to_owned(), "outside".to_owned()),
+ ]))
+ .unwrap();
+
+ assert_eq!(config.with_default("PORT", 8080_u16).unwrap(), 7070);
+ assert!(matches!(
+ config.required::<String>("REQUIRED_VALUE"),
+ Err(ConfigError::Missing("REQUIRED_VALUE"))
+ ));
+}
+
+#[test]
+fn missing_required_value_names_its_variable() {
+ let config = ConfigLoader::from_values(HashMap::new()).unwrap();
+ assert_eq!(
+ config
+ .required::<String>("CLIENT_ID")
+ .unwrap_err()
+ .to_string(),
+ "missing required config value: CLIENT_ID"
+ );
+}
diff --git a/connect/crates/connect_platform/src/http.rs b/connect/crates/connect_platform/src/http.rs
new file mode 100644
index 0000000000..d7d4a1d9cd
--- /dev/null
+++ b/connect/crates/connect_platform/src/http.rs
@@ -0,0 +1,42 @@
+use http::{HeaderMap, Request};
+use opentelemetry::global;
+use opentelemetry::trace::TraceContextExt as _;
+use opentelemetry_http::HeaderInjector;
+use tower_http::{
+ classify::{ServerErrorsAsFailures, SharedClassifier},
+ trace::{MakeSpan, TraceLayer},
+};
+use tracing::Span;
+use tracing_opentelemetry::OpenTelemetrySpanExt as _;
+
+/// Inject the current span's W3C trace context into outbound HTTP headers.
+pub fn inject_trace_headers(headers: &mut HeaderMap) {
+ global::get_text_map_propagator(|propagator| {
+ propagator.inject_context(&Span::current().context(), &mut HeaderInjector(headers));
+ });
+}
+
+/// Build a request tracing layer that adopts an inbound W3C `traceparent`.
+pub fn http_trace_layer() -> TraceLayer<SharedClassifier<ServerErrorsAsFailures>, RequestSpan> {
+ TraceLayer::new_for_http().make_span_with(RequestSpan)
+}
+
+/// Creates one span for each inbound HTTP request.
+#[derive(Clone, Copy)]
+pub struct RequestSpan;
+
+impl<B> MakeSpan<B> for RequestSpan {
+ fn make_span(&mut self, request: &Request<B>) -> Span {
+ let span = tracing::info_span!("http.request", http.request.method = %request.method());
+ let parent = opentelemetry::global::get_text_map_propagator(|propagator| {
+ propagator.extract(&opentelemetry_http::HeaderExtractor(request.headers()))
+ });
+ if parent.span().span_context().is_valid() {
+ let _ = span.set_parent(parent);
+ }
+ span
+ }
+}
+
+#[cfg(test)]
+mod test;
diff --git a/connect/crates/connect_platform/src/http/test.rs b/connect/crates/connect_platform/src/http/test.rs
new file mode 100644
index 0000000000..e5437c1de8
--- /dev/null
+++ b/connect/crates/connect_platform/src/http/test.rs
@@ -0,0 +1,41 @@
+use super::*;
+use opentelemetry::trace::TracerProvider as _;
+use tracing::subscriber::with_default;
+use tracing_subscriber::layer::SubscriberExt as _;
+
+#[test]
+fn adopts_remote_traceparent() {
+ opentelemetry::global::set_text_map_propagator(
+ opentelemetry_sdk::propagation::TraceContextPropagator::new(),
+ );
+ let provider = opentelemetry_sdk::trace::SdkTracerProvider::builder().build();
+ let subscriber = tracing_subscriber::registry()
+ .with(tracing_opentelemetry::layer().with_tracer(provider.tracer("test")));
+
+ with_default(subscriber, || {
+ let request = Request::builder()
+ .uri("/health")
+ .header(
+ "traceparent",
+ "00-5b8aa5a2d2c872e8321cf37308d69df2-051581bf3cb55c13-01",
+ )
+ .body(())
+ .unwrap();
+ let span = RequestSpan.make_span(&request);
+ assert_eq!(
+ span.context().span().span_context().trace_id().to_string(),
+ "5b8aa5a2d2c872e8321cf37308d69df2"
+ );
+ let _entered = span.enter();
+ let mut outbound = http::HeaderMap::new();
+ inject_trace_headers(&mut outbound);
+ assert!(
+ outbound
+ .get("traceparent")
+ .unwrap()
+ .to_str()
+ .unwrap()
+ .starts_with("00-5b8aa5a2d2c872e8321cf37308d69df2-")
+ );
+ });
+}
diff --git a/connect/crates/connect_platform/src/lib.rs b/connect/crates/connect_platform/src/lib.rs
new file mode 100644
index 0000000000..ccc9c56d83
--- /dev/null
+++ b/connect/crates/connect_platform/src/lib.rs
@@ -0,0 +1,16 @@
+#![deny(missing_docs)]
+
+//! Configuration, AWS SDK setup, telemetry, and HTTP tracing for Macro Connect services.
+
+mod config;
+mod http;
+mod telemetry;
+
+pub use config::{ConfigError, ConfigLoader};
+pub use http::{http_trace_layer, inject_trace_headers};
+pub use telemetry::{Telemetry, TelemetryError};
+
+/// Load the default AWS SDK configuration for Connect services.
+pub async fn load_aws_config() -> aws_config::SdkConfig {
+ aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await
+}
diff --git a/connect/crates/connect_platform/src/telemetry.rs b/connect/crates/connect_platform/src/telemetry.rs
new file mode 100644
index 0000000000..811f183cfb
--- /dev/null
+++ b/connect/crates/connect_platform/src/telemetry.rs
@@ -0,0 +1,66 @@
+use opentelemetry::trace::TracerProvider as _;
+use opentelemetry_otlp::WithExportConfig as _;
+use opentelemetry_sdk::trace::SdkTracerProvider;
+use tracing_subscriber::layer::SubscriberExt as _;
+
+use crate::ConfigLoader;
+
+/// A telemetry initialization error.
+#[derive(Debug, thiserror::Error)]
+pub enum TelemetryError {
+ /// The OTLP span exporter could not be created.
+ #[error("failed to create OTLP span exporter: {0}")]
+ Exporter(#[from] opentelemetry_otlp::ExporterBuildError),
+ /// A global subscriber was already installed.
+ #[error("failed to install tracing subscriber: {0}")]
+ Subscriber(#[from] tracing::subscriber::SetGlobalDefaultError),
+}
+
+/// Owns the tracing provider so pending spans can be flushed at shutdown.
+pub struct Telemetry {
+ provider: SdkTracerProvider,
+}
+
+impl Telemetry {
+ /// Install tracing with OTLP export when a standard OTLP endpoint is set.
+ pub fn init(service_name: &'static str, config: &ConfigLoader) -> Result<Self, TelemetryError> {
+ opentelemetry::global::set_text_map_propagator(
+ opentelemetry_sdk::propagation::TraceContextPropagator::new(),
+ );
+
+ let endpoint = config
+ .optional("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT")
+ .or_else(|| config.optional("OTEL_EXPORTER_OTLP_ENDPOINT"))
+ .filter(|value| !value.is_empty());
+ let resource = opentelemetry_sdk::Resource::builder()
+ .with_service_name(
+ config
+ .optional("OTEL_SERVICE_NAME")
+ .unwrap_or(service_name)
+ .to_owned(),
+ )
+ .build();
+ let mut builder = SdkTracerProvider::builder().with_resource(resource);
+ if let Some(endpoint) = endpoint {
+ let exporter = opentelemetry_otlp::SpanExporter::builder()
+ .with_tonic()
+ .with_endpoint(endpoint)
+ .build()?;
+ builder = builder.with_batch_exporter(exporter);
+ }
+ let provider = builder.build();
+ let subscriber = tracing_subscriber::registry()
+ .with(tracing_subscriber::EnvFilter::new(
+ config.optional("RUST_LOG").unwrap_or("info"),
+ ))
+ .with(tracing_subscriber::fmt::layer())
+ .with(tracing_opentelemetry::layer().with_tracer(provider.tracer(service_name)));
+ tracing::subscriber::set_global_default(subscriber)?;
+ Ok(Self { provider })
+ }
+
+ /// Flush spans before the service exits.
+ pub fn shutdown(self) -> Result<(), opentelemetry_sdk::error::OTelSdkError> {
+ self.provider.shutdown()
+ }
+}
diff --git a/connect/crates/connect_registry/AGENTS.md b/connect/crates/connect_registry/AGENTS.md
new file mode 100644
index 0000000000..a1280bda32
--- /dev/null
+++ b/connect/crates/connect_registry/AGENTS.md
@@ -0,0 +1,41 @@
+# Connect registry
+
+## What it is
+
+The typed, compile-time-embedded Macro Connect catalog. App data and optional
+icons live in `connect/registry/apps/<id>/`.
+
+## Start here
+
+- `src/lib.rs`: app types, embedded entries, and registry validation.
+- `../../docs/catalog.md`: the source format and field rules.
+
+## Scope
+
+- Owns: parsing and validating the vendor app catalog.
+- Not here: OAuth connections or HTTP serving.
+
+## Boundaries
+
+- Depends on: third-party workspace dependencies, plus the generated
+ `workspace-hack` dependency required by root hakari tooling.
+- Used by: future Connect services; Macro consumes the public client or SDK.
+
+## Recipes
+
+- Add an app: run the `connect-add-app` skill; embed the new `app.toml` and
+ `icon.svg` in `src/embedded.rs`.
+
+## Checks
+
+- `cargo nextest run --all-features -p connect_registry`
+- `cargo x deps --check` after `just hakari` when Cargo dependencies change.
+
+## Gotchas
+
+- Icons are unaltered vendor marks: Simple Icons 16.36.0 where it has the
+ brand, otherwise the vendor's press kit (sources in git history).
+ `NO_OFFICIAL_SVG_ICON` in `src/lib.rs` lists live apps with no official SVG
+ yet; the catalog tests fail for any other live app without an icon.
+- `own_app` entries may request explicit OAuth scopes; Slack's user scopes
+ come from Macro's registered Slack app manifest.
diff --git a/connect/crates/connect_registry/CLAUDE.md b/connect/crates/connect_registry/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/crates/connect_registry/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/crates/connect_registry/Cargo.toml b/connect/crates/connect_registry/Cargo.toml
new file mode 100644
index 0000000000..19e89fb318
--- /dev/null
+++ b/connect/crates/connect_registry/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+name = "connect_registry"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
+chrono = { workspace = true }
+serde = { workspace = true }
+thiserror = { workspace = true }
+toml = { workspace = true }
+url = { workspace = true }
+workspace-hack = { version = "0.1", path = "../../../crates/workspace-hack" }
diff --git a/connect/crates/connect_registry/src/embedded.rs b/connect/crates/connect_registry/src/embedded.rs
new file mode 100644
index 0000000000..1c847bc832
--- /dev/null
+++ b/connect/crates/connect_registry/src/embedded.rs
@@ -0,0 +1,184 @@
+use super::EmbeddedApp;
+
+pub(super) const EMBEDDED: &[EmbeddedApp] = &[
+ EmbeddedApp {
+ directory: "airtable",
+ toml: include_str!("../../../registry/apps/airtable/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/airtable/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "apollo",
+ toml: include_str!("../../../registry/apps/apollo/app.toml"),
+ icon_svg: None,
+ },
+ EmbeddedApp {
+ directory: "attio",
+ toml: include_str!("../../../registry/apps/attio/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/attio/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "calendly",
+ toml: include_str!("../../../registry/apps/calendly/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/calendly/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "canva",
+ toml: include_str!("../../../registry/apps/canva/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/canva/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "clickup",
+ toml: include_str!("../../../registry/apps/clickup/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/clickup/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "cloudflare",
+ toml: include_str!("../../../registry/apps/cloudflare/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/cloudflare/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "coda",
+ toml: include_str!("../../../registry/apps/coda/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/coda/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "confluence",
+ toml: include_str!("../../../registry/apps/confluence/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/confluence/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "datadog",
+ toml: include_str!("../../../registry/apps/datadog/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/datadog/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "dropbox",
+ toml: include_str!("../../../registry/apps/dropbox/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/dropbox/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "fathom",
+ toml: include_str!("../../../registry/apps/fathom/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/fathom/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "github",
+ toml: include_str!("../../../registry/apps/github/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/github/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "grafana",
+ toml: include_str!("../../../registry/apps/grafana/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/grafana/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "granola",
+ toml: include_str!("../../../registry/apps/granola/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/granola/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "intercom",
+ toml: include_str!("../../../registry/apps/intercom/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/intercom/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "jira",
+ toml: include_str!("../../../registry/apps/jira/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/jira/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "klaviyo",
+ toml: include_str!("../../../registry/apps/klaviyo/app.toml"),
+ icon_svg: None,
+ },
+ EmbeddedApp {
+ directory: "linear",
+ toml: include_str!("../../../registry/apps/linear/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/linear/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "monday",
+ toml: include_str!("../../../registry/apps/monday/app.toml"),
+ icon_svg: None,
+ },
+ EmbeddedApp {
+ directory: "netlify",
+ toml: include_str!("../../../registry/apps/netlify/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/netlify/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "notion",
+ toml: include_str!("../../../registry/apps/notion/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/notion/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "paypal",
+ toml: include_str!("../../../registry/apps/paypal/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/paypal/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "pipedrive",
+ toml: include_str!("../../../registry/apps/pipedrive/app.toml"),
+ icon_svg: None,
+ },
+ EmbeddedApp {
+ directory: "posthog",
+ toml: include_str!("../../../registry/apps/posthog/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/posthog/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "quo",
+ toml: include_str!("../../../registry/apps/quo/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/quo/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "sentry",
+ toml: include_str!("../../../registry/apps/sentry/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/sentry/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "shopify",
+ toml: include_str!("../../../registry/apps/shopify/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/shopify/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "slack",
+ toml: include_str!("../../../registry/apps/slack/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/slack/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "square",
+ toml: include_str!("../../../registry/apps/square/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/square/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "stripe",
+ toml: include_str!("../../../registry/apps/stripe/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/stripe/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "supabase",
+ toml: include_str!("../../../registry/apps/supabase/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/supabase/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "todoist",
+ toml: include_str!("../../../registry/apps/todoist/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/todoist/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "trello",
+ toml: include_str!("../../../registry/apps/trello/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/trello/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "typeform",
+ toml: include_str!("../../../registry/apps/typeform/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/typeform/icon.svg")),
+ },
+ EmbeddedApp {
+ directory: "webflow",
+ toml: include_str!("../../../registry/apps/webflow/app.toml"),
+ icon_svg: Some(include_str!("../../../registry/apps/webflow/icon.svg")),
+ },
+];
diff --git a/connect/crates/connect_registry/src/lib.rs b/connect/crates/connect_registry/src/lib.rs
new file mode 100644
index 0000000000..92fc0465be
--- /dev/null
+++ b/connect/crates/connect_registry/src/lib.rs
@@ -0,0 +1,250 @@
+#![deny(missing_docs)]
+
+//! Macro Connect's embedded, validated app catalog.
+
+use std::{collections::HashSet, fmt, str::FromStr, sync::LazyLock};
+
+use chrono::NaiveDate;
+use serde::Deserialize;
+use url::Url;
+
+mod embedded;
+
+#[cfg(test)]
+mod test;
+
+/// A stable catalog app identifier.
+#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize)]
+#[serde(try_from = "String")]
+pub struct AppId(String);
+
+impl AppId {
+ /// Parse a lowercase ASCII identifier, with internal digits, hyphens, or underscores.
+ pub fn parse(value: &str) -> Result<Self, AppIdError> {
+ let valid = value
+ .bytes()
+ .next()
+ .is_some_and(|first| first.is_ascii_lowercase())
+ && value.bytes().all(|byte| {
+ byte.is_ascii_lowercase() || byte.is_ascii_digit() || byte == b'-' || byte == b'_'
+ });
+ if valid {
+ Ok(Self(value.to_owned()))
+ } else {
+ Err(AppIdError {
+ value: value.to_owned(),
+ })
+ }
+ }
+
+ /// Return the stable identifier as text.
+ pub fn as_str(&self) -> &str {
+ &self.0
+ }
+}
+
+impl TryFrom<String> for AppId {
+ type Error = AppIdError;
+
+ fn try_from(value: String) -> Result<Self, Self::Error> {
+ Self::parse(&value)
+ }
+}
+
+impl FromStr for AppId {
+ type Err = AppIdError;
+
+ fn from_str(value: &str) -> Result<Self, Self::Err> {
+ Self::parse(value)
+ }
+}
+
+impl fmt::Display for AppId {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ f.write_str(&self.0)
+ }
+}
+
+/// The supplied app identifier has an invalid shape.
+#[derive(Debug, thiserror::Error)]
+#[error("invalid app id: {value}")]
+pub struct AppIdError {
+ value: String,
+}
+
+/// A way to use a vendor connection.
+#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
+#[serde(rename_all = "snake_case")]
+pub enum Access {
+ /// Connect through the vendor's MCP server.
+ Mcp,
+ /// Connect through the vendor's API.
+ Api,
+}
+
+/// How Connect obtains an OAuth client for the vendor.
+#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
+#[serde(rename_all = "snake_case")]
+pub enum ClientRegistration {
+ /// Client ID metadata document.
+ Cimd,
+ /// Dynamic client registration.
+ Dcr,
+ /// A pre-registered Connect OAuth app.
+ OwnApp,
+ /// An API key when the vendor offers no OAuth.
+ ApiKey,
+}
+
+/// Whether an app can be shown in the catalog.
+#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
+#[serde(rename_all = "snake_case")]
+pub enum Status {
+ /// The app is available to connect.
+ Live,
+ /// The app is awaiting approval or conformance.
+ Pending,
+}
+
+/// A vendor app in the Macro Connect catalog.
+#[derive(Clone, Debug, Deserialize)]
+#[serde(deny_unknown_fields)]
+pub struct App {
+ /// Stable id, matching the app's directory name.
+ pub id: AppId,
+ /// Display name.
+ pub name: String,
+ /// One-line account capabilities, based on the vendor's tools.
+ pub description: String,
+ /// Supported ways to use this connection.
+ pub access: Vec<Access>,
+ /// Vendor-owned remote MCP URL.
+ pub mcp_url: String,
+ /// How Connect obtains an OAuth client.
+ pub client_registration: ClientRegistration,
+ /// Explicit OAuth scopes, if required by the vendor.
+ pub scopes: Vec<String>,
+ /// Pipedream app slugs replaced by this app.
+ pub pipedream_app_slugs: Vec<String>,
+ /// Catalog availability.
+ pub status: Status,
+ /// Date of the last OAuth metadata probe.
+ #[serde(deserialize_with = "deserialize_date")]
+ pub probed: NaiveDate,
+ /// The vendor's embedded SVG icon, when available.
+ #[serde(skip)]
+ pub icon_svg: Option<&'static str>,
+}
+
+/// A malformed or inconsistent embedded catalog.
+#[derive(Debug, thiserror::Error)]
+pub enum RegistryError {
+ /// An app TOML file could not be parsed.
+ #[error("invalid app.toml for {directory}: {source}")]
+ Parse {
+ /// The containing app directory.
+ directory: &'static str,
+ /// TOML parse error.
+ #[source]
+ source: toml::de::Error,
+ },
+ /// An id differs from its directory name.
+ #[error("app id {id} differs from directory {directory}")]
+ IdMismatch {
+ /// Parsed app id.
+ id: AppId,
+ /// Containing app directory.
+ directory: &'static str,
+ },
+ /// Two app entries use one id.
+ #[error("duplicate app id: {0}")]
+ DuplicateId(AppId),
+ /// A Pipedream slug maps to multiple apps.
+ #[error("duplicate Pipedream app slug: {0}")]
+ DuplicatePipedreamSlug(String),
+ /// An MCP URL is not HTTPS or has a trailing slash.
+ #[error("invalid MCP URL for {0}")]
+ InvalidMcpUrl(AppId),
+ /// The access list is not one of the catalog's supported combinations.
+ #[error("invalid access for {0}")]
+ InvalidAccess(AppId),
+ /// A live app has no icon and is absent from the known exception list.
+ #[error("live app has no icon: {0}")]
+ MissingIcon(AppId),
+}
+
+struct EmbeddedApp {
+ directory: &'static str,
+ toml: &'static str,
+ icon_svg: Option<&'static str>,
+}
+
+// Apps without a qualifying official SVG mark.
+const NO_OFFICIAL_SVG_ICON: &[&str] = &["apollo", "klaviyo", "monday", "pipedrive"];
+
+static APPS: LazyLock<Result<Vec<App>, RegistryError>> = LazyLock::new(load_apps);
+
+fn deserialize_date<'de, D>(deserializer: D) -> Result<NaiveDate, D::Error>
+where
+ D: serde::Deserializer<'de>,
+{
+ let value = toml::value::Datetime::deserialize(deserializer)?;
+ NaiveDate::parse_from_str(&value.to_string(), "%Y-%m-%d").map_err(serde::de::Error::custom)
+}
+
+/// Return every embedded app, after parsing and validating the full catalog.
+///
+/// An error indicates a broken build artifact and should fail service startup.
+pub fn all_apps() -> Result<&'static [App], &'static RegistryError> {
+ APPS.as_ref().map(Vec::as_slice)
+}
+
+fn load_apps() -> Result<Vec<App>, RegistryError> {
+ let mut apps = Vec::with_capacity(embedded::EMBEDDED.len());
+ let mut ids = HashSet::new();
+ let mut slugs = HashSet::new();
+
+ for embedded in embedded::EMBEDDED {
+ let mut app: App =
+ toml::from_str(embedded.toml).map_err(|source| RegistryError::Parse {
+ directory: embedded.directory,
+ source,
+ })?;
+ app.icon_svg = embedded.icon_svg;
+
+ if app.id.as_str() != embedded.directory {
+ return Err(RegistryError::IdMismatch {
+ id: app.id,
+ directory: embedded.directory,
+ });
+ }
+ if !ids.insert(app.id.clone()) {
+ return Err(RegistryError::DuplicateId(app.id));
+ }
+ for slug in &app.pipedream_app_slugs {
+ if !slugs.insert(slug.clone()) {
+ return Err(RegistryError::DuplicatePipedreamSlug(slug.clone()));
+ }
+ }
+ if app.mcp_url.ends_with('/')
+ || !Url::parse(&app.mcp_url).is_ok_and(|url| url.scheme() == "https")
+ {
+ return Err(RegistryError::InvalidMcpUrl(app.id));
+ }
+ if !matches!(
+ app.access.as_slice(),
+ [Access::Mcp] | [Access::Mcp, Access::Api]
+ ) {
+ return Err(RegistryError::InvalidAccess(app.id));
+ }
+ if app.status == Status::Live
+ && app.icon_svg.is_none()
+ && !NO_OFFICIAL_SVG_ICON.contains(&app.id.as_str())
+ {
+ return Err(RegistryError::MissingIcon(app.id));
+ }
+ apps.push(app);
+ }
+
+ Ok(apps)
+}
diff --git a/connect/crates/connect_registry/src/test.rs b/connect/crates/connect_registry/src/test.rs
new file mode 100644
index 0000000000..a89fec6b2c
--- /dev/null
+++ b/connect/crates/connect_registry/src/test.rs
@@ -0,0 +1,100 @@
+use super::*;
+
+#[test]
+fn every_app_toml_parses() {
+ let apps = all_apps().expect("embedded registry must parse");
+ assert_eq!(apps.len(), 36);
+ assert!(apps.iter().all(|app| !app.name.is_empty()));
+}
+
+#[test]
+fn only_first_slice_apps_are_live() {
+ let live: HashSet<_> = all_apps()
+ .expect("embedded registry must parse")
+ .iter()
+ .filter(|app| app.status == Status::Live)
+ .map(|app| app.id.as_str())
+ .collect();
+ assert_eq!(
+ live,
+ HashSet::from(["linear", "notion", "posthog", "sentry"])
+ );
+}
+
+#[test]
+fn app_ids_are_unique_and_match_directories() {
+ let apps = all_apps().expect("embedded registry must parse");
+ let ids: HashSet<_> = apps.iter().map(|app| app.id.as_str()).collect();
+ assert_eq!(ids.len(), apps.len());
+
+ let root = format!("{}/../../registry/apps", env!("CARGO_MANIFEST_DIR"));
+ let directories: HashSet<_> = std::fs::read_dir(root)
+ .expect("registry directory exists")
+ .map(|entry| {
+ entry
+ .expect("registry directory entry")
+ .file_name()
+ .into_string()
+ .expect("app directory is UTF-8")
+ })
+ .collect();
+ assert_eq!(ids, directories.iter().map(String::as_str).collect());
+}
+
+#[test]
+fn pipedream_slugs_belong_to_at_most_one_app() {
+ let apps = all_apps().expect("embedded registry must parse");
+ let mut slugs = HashSet::new();
+ for app in apps {
+ for slug in &app.pipedream_app_slugs {
+ assert!(slugs.insert(slug), "duplicate Pipedream slug: {slug}");
+ }
+ }
+}
+
+#[test]
+fn mcp_urls_are_https_without_trailing_slashes() {
+ let apps = all_apps().expect("embedded registry must parse");
+ for app in apps {
+ assert!(!app.mcp_url.ends_with('/'), "{}", app.id);
+ assert_eq!(
+ Url::parse(&app.mcp_url).expect("valid URL").scheme(),
+ "https"
+ );
+ }
+}
+
+#[test]
+fn live_apps_have_an_icon_or_a_known_official_svg_gap() {
+ let apps = all_apps().expect("embedded registry must parse");
+ for app in apps {
+ if app.status == Status::Live && app.icon_svg.is_none() {
+ assert!(
+ NO_OFFICIAL_SVG_ICON.contains(&app.id.as_str()),
+ "{}",
+ app.id
+ );
+ }
+ if let Some(icon) = app.icon_svg {
+ assert!(icon.starts_with("<svg"), "{}", app.id);
+ assert!(icon.len() < 10_000, "{}", app.id);
+ }
+ }
+ let absent: HashSet<_> = apps
+ .iter()
+ .filter(|app| app.icon_svg.is_none())
+ .map(|app| app.id.as_str())
+ .collect();
+ assert_eq!(absent, NO_OFFICIAL_SVG_ICON.iter().copied().collect());
+}
+
+#[test]
+fn app_ids_reject_invalid_shapes() {
+ for invalid in ["", "GitHub", "-github", "github/path", "github space"] {
+ assert!(AppId::parse(invalid).is_err(), "{invalid}");
+ }
+ assert_eq!(
+ AppId::parse("github_2").expect("valid id").as_str(),
+ "github_2"
+ );
+}
diff --git a/connect/docker-compose.yml b/connect/docker-compose.yml
new file mode 100644
index 0000000000..9f36e49900
--- /dev/null
+++ b/connect/docker-compose.yml
@@ -0,0 +1,29 @@
+services:
+ db:
+ image: postgres:17
+ environment:
+ POSTGRES_DB: connect
+ POSTGRES_USER: connect
+ POSTGRES_PASSWORD: connect_local_only
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U connect -d connect"]
+ interval: 2s
+ retries: 20
+ volumes:
+ - connect_db:/var/lib/postgresql/data
+ api:
+ build:
+ context: ..
+ dockerfile: connect/services/connect_api/Dockerfile
+ ports:
+ - "${CONNECT_PORT:-8080}:8080"
+ environment:
+ DATABASE_URL: postgresql://connect:connect_local_only@db:5432/connect
+ CONNECT_PUBLIC_URL: http://localhost:${CONNECT_PORT:-8080}
+ CONNECT_LOCAL_WRAPPING_KEY: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
+ depends_on:
+ db:
+ condition: service_healthy
+
+volumes:
+ connect_db:
diff --git a/connect/docs/building.md b/connect/docs/building.md
new file mode 100644
index 0000000000..23c0991a82
--- /dev/null
+++ b/connect/docs/building.md
@@ -0,0 +1,49 @@
+# Building with agents
+
+## Roles
+
+| Role | Model | Does |
+| --- | --- | --- |
+| Planner | Claude Opus 5.5 (Claude Code) | Runs `connect-pm`: writes task specs, dispatches builders, reviews and merges their branches, keeps `STATUS.md` true. Writes no product code itself. |
+| Builder | GPT-6-Sol on the Fast tier (Codex CLI, `gpt-6-sol`, `service_tier = "priority"`) | Implements one task spec in its own worktree and branch, runs the task's checks, reports in the spec. Leaves changes uncommitted: Codex's sandbox keeps `.git` read-only. |
+
+Eric chose this split on 2026-10-30 ([decisions](decisions.md)).
+
+## Task specs
+
+One file per task: `connect/tasks/T<NNN>-<slug>.md`, committed before
+dispatch so the builder's worktree has it. Sections:
+
+- **Goal**: the outcome, in one paragraph.
+- **Context**: files and docs to read; prior art to mine.
+- **Do**: the work, concrete enough that a builder makes no product decisions.
+- **Done when**: checkable criteria, including the exact checks to run.
+- **Out of scope**: what to leave alone.
+- **Result**: left empty; the builder fills it (what changed, each check and
+ its outcome, open questions).
+
+## Dispatch
+
+```sh
+connect/tooling/dispatch.sh connect/tasks/T001-cargo-boundary.md [base-ref]
+```
+
+The script adds a worktree on branch `connect/T001-cargo-boundary` from
+`base-ref` (default `HEAD`), runs the builder there in Codex's
+`workspace-write` sandbox with network access, and writes the event log next to
+the worktree. Builders read `AGENTS.md` files natively; the shared brief is
+[`../tooling/builder-brief.md`](../tooling/builder-brief.md).
+
+## Review
+
+The planner reviews every builder branch before it merges into the
+integration branch:
+
+1. Read the spec's Result and the diff (`git diff <base>...connect/T<NNN>-*`).
+2. Re-run the spec's checks; a check the builder reports as passing must pass.
+3. Check the diff against the spec's Out of scope and the boundary rules.
+4. Commit the work on the builder's branch in logical pieces (the Result
+ proposes messages), crediting the builder, then merge with `--no-ff`; or
+ add a "Review (planner)" section above the Result in the builder's
+ worktree copy of the spec and run `dispatch.sh` on it again: it resumes in
+ the same worktree.
diff --git a/connect/docs/catalog.md b/connect/docs/catalog.md
new file mode 100644
index 0000000000..9a25feff93
--- /dev/null
+++ b/connect/docs/catalog.md
@@ -0,0 +1,61 @@
+# Catalog
+
+The registry is every app in `registry/apps/`. The Connect API serves only
+`status = "live"` entries in the public catalog; customers render those.
+The first live slice is Linear, Notion, PostHog, and Sentry. Other entries
+remain pending until they pass conformance.
+
+## What belongs
+
+An app enters the catalog only when the vendor runs its own remote MCP server
+and Macro Connect can obtain an OAuth client for it (`cimd`, `dcr`, or an
+approved `own_app`). API-key-only vendors enter only when the vendor offers no
+OAuth at all. Pipedream-style servers built on a vendor's API never enter.
+
+An app whose `own_app` is still in review is registered with
+`status = "pending"`: listed nowhere until approved.
+
+## `app.toml`
+
+```toml
+id = "notion" # stable; matches the directory name
+name = "Notion"
+description = "Search, read, and edit pages and databases."
+access = ["mcp"] # ["mcp"] or ["mcp", "api"]
+mcp_url = "https://mcp.notion.com/mcp"
+client_registration = "dcr" # cimd | dcr | own_app | api_key
+scopes = [] # only when the server needs explicit scopes
+pipedream_app_slugs = ["notion"] # Pipedream apps this replaces, for migration
+status = "live" # live | pending
+probed = 2026-10-30 # last probe date; see probing.md
+```
+
+Field rules:
+
+- `description`: one line, what the agent can do once connected, written from
+ the server's own `tools/list` (many servers list tools before sign-in).
+ Plain verbs, no marketing.
+- `access`: the catalog shows `MCP` or `MCP + API` from this.
+- `scopes`: Linear needs `["read", "write"]`: with no scope requested it
+ records the approval as empty but grants write, and the flow fails after the
+ user approves.
+- `own_app` apps use encrypted Connect Pulumi `ownAppCredentials` config,
+ keyed by app id with `clientId` and `clientSecret`. The standalone stack
+ injects `<ID>_CLIENT_ID` and `<ID>_CLIENT_SECRET` through its own Secrets
+ Manager runtime secret only when the app is live. They may list the scopes
+ granted by their registered app; Slack lists its user scopes explicitly.
+- Two apps may share an `mcp_url` (Jira and Confluence share Atlassian's
+ server); each keeps its own entry so migration maps each Pipedream app.
+
+## `icon.svg`
+
+Square, single file, under 10 KB, from Simple Icons when the brand is there,
+otherwise the vendor's press kit. Use the vendor's mark unaltered.
+
+## Starting set
+
+[`research/vendor-auth.csv`](research/vendor-auth.csv) holds the probed apps
+with Macro's Pipedream connection counts. Rows with `custom_oauth_app = no`
+and a vendor `mcp_url` are the day-1 registry, except Exa, Mailchimp, Zendesk,
+HighLevel, Raindrop, and Apify, which each need a conformance pass first
+(odd metadata or unconfirmed official status; notes in the CSV).
diff --git a/connect/docs/decisions.md b/connect/docs/decisions.md
new file mode 100644
index 0000000000..6f1d3fc55f
--- /dev/null
+++ b/connect/docs/decisions.md
@@ -0,0 +1,73 @@
+# Decisions
+
+Newest first. Each entry: date, decision, reason, who decided.
+
+## 2026-10-30
+
+- **First pass: an entirely independent backend, not wired to Macro.** Connect
+ hosts itself (own Pulumi project in `connect/infra`: ECS cluster, ALB, RDS,
+ KMS key, Secrets Manager runtime secret; `connect-dev.macro.com` at the host
+ root) and is proven with integration tests before Macro integrates. The first
+ PR touches none of Macro's deployed services, gateway, deploy pipeline, or
+ local stack. Doppler `connect` holds operations credentials only. This
+ replaces running on Macro's platform. (Eric)
+- **Connect's RDS runs PostgreSQL 17** on `db.t4g.micro` (dev) and
+ `db.t4g.small` (prod). Reason: AWS documents those classes for 17, and
+ Connect needs nothing from 18. (Claude, answering the T013 builder)
+- **Build in vertical slices.** First slice: a dev deploy with a few apps that
+ pass a real connect, refresh, and tool call; an app is `live` only after it
+ passes conformance, the rest stay `pending`. Infra is provisioned with
+ Pulumi, including Connect's own small RDS instance. (Eric)
+- **Connect uses runtime-checked SQLx queries,** each exercised by a
+ `#[tokio::test]` with Connect's migrations on `template0`, instead of Macro's
+ workspace query cache. Reason: Connect has its own database; one
+ `DATABASE_URL` cannot serve both at compile time. (Claude)
+- **Generated Cargo artifacts are accepted in Connect changes:** hakari adds
+ `workspace-hack` to Connect crates and updates `Cargo.lock` and the
+ dependency closures. The boundary check exempts `workspace-hack`. (Claude,
+ answering the T002 builder)
+- **Planner and builder:** Claude Opus 5.5 plans, dispatches, and reviews;
+ GPT-6-Sol on the Fast tier (Codex CLI) builds, one task spec per worktree.
+ Process in [`building.md`](building.md). (Eric)
+- **v1 reuses Macro's existing GitHub and Slack OAuth apps;** Macro Connect
+ registers its own later. Their client secrets go into encrypted Connect
+ Pulumi config when those apps become live. Connect never reads Macro's
+ projects at runtime. Reason: those apps work today; owning them is not on
+ the week-one path. (Eric)
+- **Microsoft is excluded** from v1. Reason: its MCP servers need Agent 365
+ and Copilot licences per user. (Eric)
+- **The 451 connections with no first-party MCP are removed at cutover.**
+ (Eric)
+- **Google is punted:** no Google submission for now; Google connections stay
+ on Pipedream, so Pipedream is not cancelled until Google moves. (Eric)
+- **Doppler project `connect` exists;** the `[email protected]` account
+ credentials are `CONNECT_ACCOUNT_EMAIL` and `CONNECT_ACCOUNT_PASSWORD` in
+ `prd`. (Eric)
+- **Submission records live in `connect/submissions/`** as one Markdown file
+ per vendor with tracker frontmatter. Reason: git history audits every change
+ and any agent can read them without new infrastructure. (Claude)
+- **Macro Connect is its own product in `connect/`, separated as if it were
+ another repository**, enforced by ast-grep and a Cargo dependency check.
+ Macro consumes it through `connect_client` and `@macro-connect/sdk` only.
+ Reason: it will serve other companies; Macro must be an ordinary customer.
+ (Eric)
+- **The registry lives in Connect, not Macro.** The prototype that put an app
+ table in Macro's `mcp_client` (branch `eric/macro-connect-registry`) is
+ superseded; mine it for the per-app data and the Linear scope note, then
+ delete the branch. (Eric)
+- **v1 is MCP only.** Each catalog entry is labelled `MCP` or `MCP + API`; v1
+ ships `MCP`. Apps without a first-party MCP server are not in the catalog.
+ Reason: Pipedream's wrappers over vendor APIs are the low-quality part of its
+ catalog. (Eric)
+- **Week-one goal is Macro's own users.** Other companies as customers come
+ after. (Eric)
+- **Gmail, Drive, and Chat stay on Pipedream until the CASA assessment
+ passes**, rather than going through a bridge vendor. (Eric)
+- **Eric is the human for attestations, contracts, and the human queue** until
+ someone else is named. (Eric)
+- **Submission management is agent-run.** Agents read vendor requirements,
+ write and file submissions, correspond with reviewers, and track state; the
+ human only clears the human queue. (Eric)
+- **Catalog entries carry `id`, `name`, `description`, `icon`.** Icons are
+ SVGs committed next to `app.toml`; descriptions are written from the
+ server's own tool list. (Eric, Claude)
diff --git a/connect/docs/plan.md b/connect/docs/plan.md
new file mode 100644
index 0000000000..cd3cbf518c
--- /dev/null
+++ b/connect/docs/plan.md
@@ -0,0 +1,127 @@
+# Macro Connect plan
+
+Macro Connect gives products first-party access to their users' tools: it
+connects users to each vendor's own MCP server over the vendor's OAuth, through
+OAuth apps Macro Connect owns and operates. Macro is its first customer; it
+replaces Pipedream Connect, which charges Macro $2 per user per month, owns the
+OAuth grants, and often falls back to API keys or its own API wrappers.
+
+Current state lives in [`../STATUS.md`](../STATUS.md); decisions and their
+reasons in [`decisions.md`](decisions.md).
+
+## Guarantees
+
+1. **First-party MCP.** Every connector is the vendor's own MCP server. A
+ wrapper over a vendor's API is never presented as MCP.
+2. **OAuth whenever the vendor offers it.** API keys only for vendors with no
+ OAuth (Anthropic, OpenAI, Cursor, Firecrawl, Telegram).
+3. **Customers own their users.** Grants are exportable; a customer can bring
+ its own OAuth app for any vendor.
+4. **Honest labels.** The catalog says, per connector, `MCP` or `MCP + API`.
+
+## Scope
+
+**v1 (week one): Macro's own users, MCP only.** Every Macro user connects
+through Macro Connect for each app in the catalog. Pipedream stays for
+Google (punted) and apps still waiting on vendor review, and is cancelled when
+the last one moves.
+
+**Later:** API access next to MCP (`MCP + API`), other companies as customers
+(their own OAuth apps, token export, billing), a public catalog site.
+
+Out of scope for v1: apps with no first-party MCP server. At the 2026-10-30
+measurement they held 451 of Macro's 4,057 Pipedream connections (LinkedIn,
+Spotify, Google Forms, YouTube, Pinterest, QuickBooks, API-key apps, and
+Microsoft, whose MCP servers need Agent 365 licences). They stay on Pipedream
+until cutover, then are removed.
+
+## Product boundary
+
+Macro Connect lives in `connect/` but is built as if it were its own
+repository; see [`../AGENTS.md`](../AGENTS.md#boundary). Macro integrates
+through Macro Connect's public surface only, the way any customer would:
+
+- Rust: the `connect_client` crate.
+- Web: the `@macro-connect/sdk` package (catalog and the hosted connect flow).
+
+Macro's own `mcp_client` keeps serving custom MCP servers a user adds by URL;
+the Pipedream integration (`pipedream_mcp`) is replaced by an adapter over
+`connect_client` behind the same ports.
+
+## Architecture
+
+| Part | Where | Does |
+| --- | --- | --- |
+| Registry | `connect/registry/apps/<id>/` | One directory per app: `app.toml` (name, description, MCP URL, access, client registration, scopes, Pipedream slugs it replaces) and `icon.svg`. Source of truth for the catalog. |
+| Connect API | `connect/services/connect_api` | Catalog, connect flow (authorize, callback), connection list and delete, token export. Its own Postgres database and Secrets Manager runtime secret. |
+| Hosting | `connect/infra` | Its own Pulumi project: ECS cluster, ALB and certificate (`connect-dev.macro.com`), RDS, KMS key, Secrets Manager. Touches nothing of Macro's but one DNS record. |
+| MCP gateway | in `connect_api` | Per-connection MCP endpoint: injects the vendor token, refreshes it, forwards to the vendor's server. Customers call this, as Macro called Pipedream's remote MCP. |
+| OAuth client | `connect/crates/` | Client registration in order: CIMD, DCR, then Macro Connect's own OAuth app. Ported from Macro's `mcp_client`, which already does all three. |
+| Token store | `connect_api` database | Grants stored as KMS ciphertext bound to the connection (Macro rule CS-72). |
+| Ops agents | `connect/.agents/skills/` | Probing, conformance, catalog authoring, submissions, project management. |
+
+Client registration per app comes from probing the server, never from docs
+alone: [`probing.md`](probing.md).
+
+## Week one
+
+Target: 2026-11-06. Vendor reviews run in parallel from day 1 and are the long
+pole; engineering does not wait on them.
+
+Revised 2026-10-30 (see [decisions](decisions.md)): build in vertical slices.
+
+1. **Independent backend** (first PR): Connect deployed on its own to
+ `connect-dev.macro.com`, proven by integration tests that run against the
+ local compose stack and the dev deploy: catalog, customer keys, connect
+ flow, refresh, and MCP gateway, with real vendors for the live apps.
+2. **Macro integration**: Macro uses Connect through `connect_client` behind
+ `pipedream_mcp`'s ports and a flag ([T010](../tasks/T010-macro-adapter.md)).
+3. **Migration**: reconnect prompts, then remove Pipedream per app.
+
+The day plan below predates the revision; its order still holds within each
+slice.
+
+| Day | Engineering | Vendors and operations |
+| --- | --- | --- |
+| 1 | Boundary checks (ast-grep, Cargo dependency check). Registry format; generate entries from [`research/vendor-auth.csv`](research/vendor-auth.csv). `connect_api` skeleton and database. | File every submission: [`../submissions/`](../submissions/). Create `[email protected]`, the Macro Connect landing, privacy, and terms pages. |
+| 2 | Catalog endpoint. Connect flow with CIMD, DCR, and own-app registration. Encrypted token store. | Test accounts for the top 20 apps. |
+| 3 | MCP gateway with token refresh. Conformance test per app: connect, refresh, list tools, one read-only call. | Prober and conformance runs scheduled nightly. |
+| 4 | `connect_client` and `@macro-connect/sdk`. Macro adapter replacing `pipedream_mcp`; Macro web catalog and connect flow on the SDK. | Answer reviewer mail same day. |
+| 5 | Deploy `connect_api` (needs the human's approval). Macro behind a feature flag: internal users, then 10%. | |
+| 6-7 | 100% for catalog apps. Reconnect prompts; delete each user's Pipedream account once they reconnect. | Daily human queue. |
+
+After week one: the marketplace apps (Zoom, Xero, Box) as reviews pass, then
+Google when Eric reopens it (verification, plus CASA for Gmail, Drive, and
+Chat). Microsoft is excluded.
+
+## Coverage at launch
+
+From [`research/vendor-auth.csv`](research/vendor-auth.csv) (Pipedream
+connections, 2026-10-30):
+
+| Group | Connections | Path |
+| --- | --- | --- |
+| Server registers our client (CIMD or DCR) | 1,198 | Day 1 registry |
+| Own OAuth app already registered: Macro's GitHub and Slack apps (Connect's own later), HubSpot and Asana to confirm | 608 | Day 1 registry |
+| Google, first-party MCP | 1,612 | Punted; stays on Pipedream |
+| Own-app vendors under review or allowlist (Figma, Zoom, Xero, Discord, Vercel, Box) | 102 | As approved |
+| No first-party MCP, or Microsoft (excluded: needs Agent 365 licences) | 451 | Removed at cutover (confirmed) |
+
+3,973 of 4,057 connections are classified; the rest are apps with one
+connection each.
+
+Users who connected through Pipedream's own OAuth apps must reconnect;
+Pipedream does not export those grants.
+
+## Risks
+
+- **Vendor review time.** Google CASA takes weeks to months; marketplace
+ reviews take weeks. Mitigation: file on day 1, ask for the narrowest scopes,
+ answer reviewers the same day.
+- **Serving other companies' users through our OAuth apps.** Google Limited
+ Use, Slack, and LinkedIn terms restrict passing user data to third parties.
+ Before external customers: legal review, and default them to their own OAuth
+ apps.
+- **Reconnect churn.** Every migrated user signs in again per app.
+- **Human-only steps.** Legal attestations, identity checks, payments, 2FA,
+ CAPTCHAs, and deploys need a person; the human queue batches them daily.
diff --git a/connect/docs/probing.md b/connect/docs/probing.md
new file mode 100644
index 0000000000..163a09ba9d
--- /dev/null
+++ b/connect/docs/probing.md
@@ -0,0 +1,52 @@
+# Probing an MCP server's OAuth
+
+How to find out, from the live server, how Macro Connect gets an OAuth client
+for it. Used when adding an app (`connect-add-app`) and by the nightly prober.
+
+## Steps
+
+Use `curl -sS -m10`. Record every URL you fetch.
+
+1. **Find the server.** The vendor's own MCP URL, from the vendor's docs or
+ developer site. A server hosted by anyone other than the vendor is not a
+ candidate.
+2. **Trigger the challenge.** POST an MCP `initialize` request (a bare `{}`
+ is rejected by some servers, e.g. Apollo):
+
+ ```sh
+ curl -sS -m10 -i -X POST "$MCP_URL" \
+ -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
+ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"macro-connect-probe","version":"0"}}}'
+ ```
+
+ Read `WWW-Authenticate` for `resource_metadata`. Some servers only
+ challenge on `tools/call` (Google), so a 200 here is not "no auth".
+3. **Protected-resource metadata.** Fetch `resource_metadata`, or
+ `<origin>/.well-known/oauth-protected-resource<path>`, then the same at the
+ origin root (Apify publishes only there). Note `authorization_servers`,
+ `scopes_supported`, and whether `resource` equals the MCP URL (Raindrop's
+ does not).
+4. **Authorization-server metadata.** For each authorization server fetch
+ `/.well-known/oauth-authorization-server` (path-style per RFC 8414 when the
+ issuer has a path, as Airtable's does), then `/.well-known/openid-configuration`.
+5. **Classify** by what step 4 advertises:
+
+ | Metadata | `client_registration` |
+ | --- | --- |
+ | `client_id_metadata_document_supported: true` | `cimd` (also `dcr` if below) |
+ | `registration_endpoint` | `dcr` |
+ | neither | `own_app`: Macro Connect must register an OAuth app with the vendor |
+
+ Also note `token_endpoint_auth_methods_supported` (`none` means public
+ clients are allowed; some servers only register confidential clients).
+6. **Check for a gate the metadata hides.** Search the vendor's docs and
+ forums for a client allowlist (Figma and Vercel advertise DCR but reject
+ unapproved clients), licence requirements (Microsoft Agent 365), per-region
+ URLs (Datadog), and admin enablement (Box, Atlassian domain allowlists).
+
+## Done when
+
+The app has a `client_registration` value backed by the fetched metadata, the
+fetched URLs are listed, and any gate from step 6 is recorded. Probing alone
+does not prove a connection works; conformance (a real sign-in, refresh, tool
+list, and one read-only call) does.
diff --git a/connect/docs/research/README.md b/connect/docs/research/README.md
new file mode 100644
index 0000000000..fa488d9a67
--- /dev/null
+++ b/connect/docs/research/README.md
@@ -0,0 +1,17 @@
+# Research
+
+## `vendor-auth.csv`
+
+How each app Macro users connect through Pipedream authenticates, gathered
+2026-10-30 by probing each vendor's MCP server ([`../probing.md`](../probing.md))
+and reading its docs. `verified` says which.
+
+`pipedream_connections` is Macro's count of Pipedream connections for the app
+on 2026-10-30, from the production read replica's
+`pipedream_mcp_connections` table. Re-measure with
+`tooling/scripts/mcp_connection_usage.sh` (Macro side; needs an SSM port
+forward to the replica, see the script's header).
+
+`custom_oauth_app` is `yes` when Macro Connect needs its own OAuth app. One
+row is misleading: Granola's MCP server supports CIMD and DCR (no own app);
+only its REST API is API-key-only.
diff --git a/connect/docs/research/vendor-auth.csv b/connect/docs/research/vendor-auth.csv
new file mode 100644
index 0000000000..5adc9b257e
--- /dev/null
+++ b/connect/docs/research/vendor-auth.csv
@@ -0,0 +1,90 @@
+app,pipedream_connections,mcp_url,mcp_auth,verified,api_auth,custom_oauth_app,friction,notes
+notion,683,https://mcp.notion.com/mcp,cimd+dcr,probed,"oauth2, api_key",no,,"Notion MCP (Beta)"
+google_drive,520,https://drivemcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"drive/drive.readonly RESTRICTED: verification + annual CASA (~$500-4.5k/yr, weeks-months); 100-user cap until verified","Developer Preview enrollment required"
+github,345,https://api.githubcopilot.com/mcp/,preregistered_only,probed,"oauth2 (OAuth/GitHub App), PAT",yes,"Low: no review; ours already exists",
+google_sheets,317,https://sheetsmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE; RESTRICTED if drive/drive.readonly requested","Developer Preview; 6 tools"
+gmail,315,https://gmailmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"All needed scopes RESTRICTED: verification + annual CASA; 100-user cap","Developer Preview; no send tool; per-tool PRM quirk"
+google_calendar,276,https://calendarmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE: verification, no CASA","Developer Preview"
+linear,229,https://mcp.linear.app/mcp,cimd+dcr,probed,"oauth2, api_key",no,,
+slack_v2,186,https://mcp.slack.com/mcp,preregistered_only,probed,oauth2 (user/bot token),yes,"Marketplace publication for broad distribution; workspace admin approval may apply","Our pre-registered Slack app already covers this"
+google_docs,97,https://docsmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE; RESTRICTED if drive/drive.readonly requested","Developer Preview; 2 tools"
+linkedin,72,none,n/a,probed,oauth2,yes,"Self-serve OIDC + w_member_social (post only); reading posts closed; org pages need Community Management API vetting; 60-day tokens, no refresh unless partner","No official MCP"
+anthropic,60,none,n/a,docs,api_key,n/a (api key),,
+openai,57,none,n/a,docs,api_key,n/a (api key),,
+spotify,52,none,n/a,probed,oauth2,yes,"Dev Mode capped ~5 users (Feb 2026); Extended Quota needs registered business + ~250k MAU (forum/press)","Effectively blocked"
+google_forms,42,none,n/a,probed,oauth2,yes,"SENSITIVE (unverified): verification, no CASA",
+hubspot,42,https://mcp.hubspot.com,preregistered_only,probed,"oauth2 (or private app token)",yes,"Self-serve app on HubSpot developer platform; install limits for unlisted apps may apply","No DCR/CIMD; native stack already has users here so an app likely exists"
+figma,38,https://mcp.figma.com/mcp,preregistered_only,probed+docs,"oauth2, PAT","yes (and still blocked)","DCR allowlisted by client_name (403 for unknown); custom OAuth apps can't get mcp:connect; catalog entry by request only","Fallback: REST API with our own OAuth app"
+microsoft_teams,37,https://agent365.svc.cloud.microsoft/agents/servers/mcp_TeamsServer,preregistered_only,probed,oauth2 (Entra/Graph),yes,"Multitenant Entra app + publisher verification (free, days); Teams read scopes need tenant admin consent","Agent 365 MCP needs Agent 365 + Copilot licences; realistically Graph"
+google_analytics,35,https://analyticsdata.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE (unverified): verification","Also undocumented Admin server"
+asana,29,https://mcp.asana.com/v2/mcp,preregistered_only,probed,"oauth2 (or PAT)",yes,"Self-serve MCP app in Asana developer console","No DCR/CIMD; native stack already has users here so an app likely exists"
+youtube_data_api,27,none,n/a,probed,"oauth2 (or api_key for public)",yes,"SENSITIVE (unverified); quota raise needs YouTube compliance audit",
+airtable_oauth,23,https://mcp.airtable.com/mcp,cimd+dcr,probed,"oauth2 (or PAT)",no,,
+trello,23,https://mcp.trello.com/v1,cimd+dcr,probed,"api_key + user token; Atlassian OAuth",no,,"Auth on auth.atlassian.com"
+zoom,23,https://mcp.zoom.us/mcp/zoom/streamable,preregistered_only,probed,oauth2,yes,"Zoom Marketplace app; public multi-account app needs Marketplace review (weeks)","Docs: no DCR/CIMD"
+granola,21,https://mcp.granola.ai/mcp,cimd+dcr,probed,"api_key (Bearer grn_…)","no (MCP); api key for REST","REST keys Business/Enterprise only","Granola sync uses REST: no OAuth there; MCP may not cover bulk sync"
+todoist,21,https://ai.todoist.net/mcp,cimd+dcr,probed,"oauth2 (or API token)",no,,
+google_tasks,20,https://tasksmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE (unverified)","Undocumented; tools/list empty"
+calendly_v2,18,https://mcp.calendly.com,dcr,probed,"oauth2 (or PAT)",no,,
+pinterest,18,none,n/a,probed,oauth2,yes,"Trial access sandboxed; Standard needs review with demo video (days to 30+)",
+clickup,15,https://mcp.clickup.com/mcp,dcr,probed,"oauth2 (or personal token)",no,,
+jira,15,https://mcp.atlassian.com/v1/mcp/authv2,cimd+dcr,probed,"oauth2 (3LO) or api_token",no,"Org admin may need to allow our domain in Rovo MCP settings","One server covers Jira + Confluence"
+quickbooks,15,none (public),n/a,probed,oauth2,yes,"Intuit production keys need app assessment; App Partner Program meters some reads","Intuit hosted MCP restricted to Claude/ChatGPT connectors"
+xero_accounting_api,15,https://mcp.xero.com/mcp,preregistered_only,probed,oauth2,yes,"No DCR/CIMD; app tiers: Starter free/5 conns, Core AUD$35/mo/50, Plus AUD$245/mo/1000; needs App Certification",
+discord,13,https://mcp.discord.com/mcp,preregistered_only,probed,"oauth2 / bot_token",yes,"Undocumented personal.* scopes likely allowlisted","Unannounced MCP; treat as unavailable"
+microsoft_onedrive,13,https://agent365.svc.cloud.microsoft/agents/servers/mcp_ODSPRemoteServer,preregistered_only,probed,oauth2 (Entra/Graph),yes,same Entra app,"Licensed Agent 365 only; personal MSA not covered"
+microsoft_outlook,13,https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools,preregistered_only,probed,oauth2 (Entra/Graph),yes,same Entra app,"Licensed Agent 365 only; otherwise Graph"
+netlify,11,https://netlify-mcp.netlify.app/mcp,dcr,probed,"PAT, oauth2",no,,
+posthog,11,https://mcp.posthog.com/mcp,cimd+dcr,probed,"oauth2, api_key",no,,
+stripe,11,https://mcp.stripe.com,dcr,probed,"api_key, oauth2 (Connect)",no,,"Admins can disable MCP per account"
+dropbox,10,https://mcp.dropbox.com/mcp,dcr,probed,oauth2,no,,
+google_search_console,10,https://searchconsole.googleapis.com/mcp,preregistered_only,probed,oauth2,yes,"SENSITIVE (unverified)","Undocumented but live"
+apollo_io_oauth,9,https://mcp.apollo.io/mcp,cimd+dcr,probed,"api_key; oauth2 for partners",no,,
+cloudflare_api_key,9,https://mcp.cloudflare.com/mcp,cimd+dcr,probed,"api_token, oauth2",no,,
+attio,8,https://mcp.attio.com/mcp,dcr,probed,"oauth2 (or API key)",no,,
+microsoft_outlook_calendar,8,https://agent365.svc.cloud.microsoft/agents/servers/mcp_CalendarTools,preregistered_only,probed,oauth2 (Entra/Graph),yes,same Entra app,"Licensed Agent 365 only; otherwise Graph"
+supabase,8,https://mcp.supabase.com/mcp,dcr,probed,"PAT, oauth2",no,,"DCR registers confidential clients only"
+exa,7,https://mcp.exa.ai/mcp,cimd+dcr,probed,api_key,no,,"Keyless tier also works"
+google_slides,7,https://slidesmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE; RESTRICTED if drive.readonly requested","Developer Preview"
+google_gemini,6,none,n/a,probed,api_key,n/a (api key),,
+openphone,6,https://mcp.quo.com/mcp,dcr,probed,api_key,no,,"Now Quo"
+zoho_mail,6,per-user Zoho MCP console URL,api_key,docs,oauth2,"no for MCP; yes for direct API","Zoho API console self-serve; multi data-center","No fixed URL; each user builds a key-bearing server URL"
+mailchimp,5,https://ai-inc.mailchimp.com/claude/mcp/v2,dcr,probed,oauth2,no,,"Per-client path, undocumented; may not be supported for us"
+raindrop,5,https://api.raindrop.io/rest/v2/ai/mcp,dcr,probed,"oauth2",no,,"PRM resource != MCP URL; strict resource check may reject"
+slack,5,https://mcp.slack.com/mcp,preregistered_only,probed,oauth2,yes,same as slack_v2,"Old slug; migrate to same app"
+vercel_token_auth,5,https://mcp.vercel.com,cimd+dcr,probed+docs,"api_token, oauth2","yes (client allowlist)","Vercel approves MCP clients via form; timeline unknown","Fallback: pasted access token (current behaviour)"
+webflow,5,https://mcp.webflow.com/mcp,dcr,probed,oauth2,no,,
+youtube_analytics_api,5,none,n/a,probed,oauth2,yes,"SENSITIVE (unverified)",
+zoho_crm,5,per-user Zoho MCP console URL,api_key,docs,oauth2,"no for MCP; yes for direct API",same as zoho_mail,same as zoho_mail
+zoom_admin,5,https://mcp.zoom.us/mcp/admin/streamable,preregistered_only,probed,oauth2,yes,same as zoom; admin scopes,
+coda,4,https://coda.io/apis/mcp,dcr,probed,"api_key",no,,"Rebranded Superhuman Docs MCP"
+confluence,4,https://mcp.atlassian.com/v1/mcp/authv2,cimd+dcr,probed,"oauth2 (3LO) or api_token",no,same as jira,
+cursor,4,none,n/a,docs,api_key,n/a (api key),,
+google_classroom,4,https://classroommcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE (unverified); edu admins often restrict","tools/list empty"
+google_cloud,4,https://<service>.googleapis.com/mcp,preregistered_only,probed,oauth2,yes,"SENSITIVE (unverified)","One server per GCP product"
+google_meet,4,https://meetmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"SENSITIVE (unverified)","Undocumented; tools/list empty"
+roblox,4,none,n/a,probed,oauth2 (Open Cloud),yes,"Private apps capped at 10 users; public needs review + ID-verified registrant",
+shopify_developer_app,4,https://mcp.shopify.com/mcp,cimd,probed,oauth2,no,,"Same server as shopify"
+box,3,https://mcp.box.com,preregistered_only,probed,oauth2,yes,"Each customer's Box admin must enable the integration; predefined listing needs Box partnership",
+canva,3,https://mcp.canva.com/mcp,cimd+dcr,probed,oauth2,no,,
+datadog,3,https://mcp.datadoghq.com/api/unstable/mcp-server/mcp,dcr,probed,"api_key + app_key, oauth2",no,"Org needs MCP Preview access + MCP Read permission","Per-site URL (US1/US3/US5/EU1/AP1/AP2)"
+fathom,3,https://api.fathom.ai/mcp,dcr,probed,"api_key; oauth2",no,,
+google_chat,3,https://chatmcp.googleapis.com/mcp/v1,preregistered_only,probed,oauth2,yes,"RESTRICTED: verification + annual CASA; needs Chat app config","Developer Preview"
+highlevel_oauth,3,https://services.leadconnectorhq.com/mcp/,dcr,probed,"oauth2 (or private token)",no,,"Official status not confirmed in docs"
+pipedrive,3,https://mcp.pipedrive.ai/mcp,dcr,probed,"oauth2 (or API token)",no,,"Host is .ai not .com"
+sentry,3,https://mcp.sentry.dev/mcp,cimd+dcr,probed,"auth_token, oauth2",no,,"sentry.io SaaS only"
+shopify,3,https://mcp.shopify.com/mcp,cimd,probed,oauth2,no,,"CIMD only"
+telegram_bot_api,3,none,n/a,docs,bot_token,n/a (api key),,
+zoho_books,3,per-user Zoho MCP console URL,api_key,docs,oauth2,"no for MCP; yes for direct API",same as zoho_mail,same as zoho_mail
+firecrawl,2,https://mcp.firecrawl.dev/mcp,api_key,probed,api_key,n/a (api key),,"Key in URL path"
+intercom,2,https://mcp.intercom.com/mcp,dcr,probed,oauth2,no,,
+klaviyo,2,https://mcp.klaviyo.com/mcp,cimd+dcr,probed,"oauth2 / api_key",no,,
+square,2,https://mcp.squareup.com/mcp,dcr,probed,oauth2,no,,
+zendesk,2,https://mcp.zendesk.com/mcp,cimd,probed,oauth2,no,,"CIMD only; not documented as GA"
+apify,1,https://mcp.apify.com,cimd+dcr,probed,"api_token, oauth2",no,,"PRM only at root path"
+microsoft_excel,1,none,n/a,docs,oauth2 (Entra/Graph),yes,same Entra app,
+monday,1,https://mcp.monday.com/mcp,cimd+dcr,probed,"oauth2 (or API token)",no,,
+paypal,1,https://mcp.paypal.com/mcp,dcr,probed,oauth2,no,,
+slack_bot,1,https://mcp.slack.com/mcp,preregistered_only,probed,bot_token,yes,same as slack_v2,"MCP is user-token only; bot use needs Web API"
+typeform,1,https://api.typeform.com/mcp,cimd+dcr,probed,"oauth2 (or PAT)",no,,
+grafana,0,https://mcp.grafana.com/mcp,cimd+dcr,probed,"service account token",no,,"Grafana Cloud only"
diff --git a/connect/docs/runbooks/bootstrap.md b/connect/docs/runbooks/bootstrap.md
new file mode 100644
index 0000000000..b82894d1e1
--- /dev/null
+++ b/connect/docs/runbooks/bootstrap.md
@@ -0,0 +1,89 @@
+# Standalone Connect bootstrap
+
+Connect runs at `https://connect-dev.macro.com` on its own ALB and ECS cluster.
+The service serves `/health`, `/v1/catalog`, and all other routes at the host
+root. It applies its own SQLx migrations at startup. Nothing in Macro's
+gateway, deploy pipeline, or shared security groups is changed.
+
+## Local
+
+From the repository root, start PostgreSQL 17 and the API, then create a
+customer with a localhost redirect origin:
+
+```sh
+docker compose -f connect/docker-compose.yml up -d --build && docker compose -f connect/docker-compose.yml run --rm api create-customer local --redirect-origin http://localhost:3000
+```
+
+The CLI prints the customer key once. Store it locally; do not put it in a
+repository file. Check `curl http://localhost:8080/health` and
+`curl http://localhost:8080/v1/catalog`. The Compose wrapping key and database
+password are fixed development values; do not use this stack for real grants.
+Stop it with `docker compose -f connect/docker-compose.yml down`.
+If port 8080 is in use, set `CONNECT_PORT` for both Compose commands and use
+that port in the health and catalog URLs.
+
+## Dev AWS stack
+
+Prerequisites: `PULUMI_ACCESS_TOKEN`, AWS credentials for the target account,
+Docker, Bun, and Pulumi. The AWS identity must be allowed to read the existing
+VPC and manage the standalone resources and DNS in Route 53 zone
+`Z0766278GIHB3CVV9CIL`. The human supplies the existing VPC id and public
+and private subnet ids; Connect creates its own security groups.
+
+From `connect/infra`, install dependencies and select `dev`:
+
+```sh
+bun install --frozen-lockfile
+pulumi stack select dev --create
+pulumi config set vpcId <existing-vpc-id>
+pulumi config set --path 'publicSubnetIds[0]' <public-subnet-id-1>
+pulumi config set --path 'publicSubnetIds[1]' <public-subnet-id-2>
+pulumi config set --path 'privateSubnetIds[0]' <private-subnet-id-1>
+pulumi config set --path 'privateSubnetIds[1]' <private-subnet-id-2>
+```
+
+Add more subnet ids if needed. For each live `own_app` entry, the human sets
+its credentials in encrypted config; no own-app credentials are required for
+the current live catalog:
+
+```sh
+pulumi config set --secret --path 'ownAppCredentials.<app-id>.clientId' <client-id>
+pulumi config set --secret --path 'ownAppCredentials.<app-id>.clientSecret' <client-secret>
+```
+
+The human reviews and approves each of these commands separately:
+
+```sh
+pulumi preview --stack dev
+pulumi up --stack dev
+```
+
+Pulumi builds the API image from the repository root, creates the database
+with an RDS-managed password, and writes `APP_SECRETS_JSON` to its own Secrets
+Manager secret for ECS injection. Connect reads no runtime Doppler project.
+After the deploy succeeds, check:
+
+```sh
+curl --fail https://connect-dev.macro.com/health
+curl --fail https://connect-dev.macro.com/v1/catalog
+```
+
+The `prod` stack uses PostgreSQL 17 on `db.t4g.small`, 14-day backups, RDS
+deletion protection, and Pulumi protection. Its public hostname is deliberately
+unset until the product owner chooses it; set `publicHost` before previewing
+production.
+
+## Verify
+
+Run the live integration checks against dev with a customer key whose redirect
+origins include `http://localhost:3000`:
+
+```sh
+CONNECT_IT_CUSTOMER_KEY=<customer-key> nix develop --command connect/tooling/integration.sh dev
+```
+
+The runner follows each live app's authorization URL and checks that the vendor
+accepts the request up to the consent or sign-in page. It does not complete
+consent. For the local Compose stack, run
+`nix develop --command connect/tooling/integration.sh local`; the script creates
+a temporary customer and stops its own Compose project afterward.
diff --git a/connect/docs/submissions.md b/connect/docs/submissions.md
new file mode 100644
index 0000000000..71c29358ff
--- /dev/null
+++ b/connect/docs/submissions.md
@@ -0,0 +1,99 @@
+# Submission management
+
+Vendors whose servers support neither CIMD nor DCR need Macro Connect's own
+OAuth app, and most review it before it can serve real users. Agents run these
+submissions end to end; the goal is the shortest time from "needed" to
+"approved". The workflow is the `connect-submission` skill; this file is the
+reference it uses.
+
+## The record
+
+One file per vendor: `submissions/<vendor>.md`. Frontmatter is the tracker;
+the body is the working file.
+
+```markdown
+---
+vendor: google
+apps: [google_drive, gmail, google_calendar]
+state: needs-human # see States
+portal: https://console.cloud.google.com/apis/credentials/consent
+account: [email protected] # who owns the developer account
+submitted: 2026-11-02 # first submission date, or empty
+last_contact: 2026-11-04 # last message to or from the vendor
+next_action: Eric signs the CASA assessor contract
+next_action_owner: human # human | agent
+due: 2026-11-05
+---
+
+## Requirements
+Checklist from the vendor's current docs, with links. Each item: done or not.
+
+## Scopes
+Requested scopes and the one-line justification for each.
+
+## Log
+Dated entries: what was submitted, what the vendor said, what we answered.
+```
+
+## States
+
+`not-started → drafting → needs-human → submitted → changes-requested →
+approved`, or `rejected`, `blocked`, `deferred` (the human postponed it), or
+`excluded` (out of scope). `needs-human` and `blocked` carry the
+reason in `next_action`. An approved record lists where the client ID and
+secret live in encrypted Connect Pulumi config (names only).
+
+## How agents keep approval fast
+
+- File everything at once; vendors review in parallel.
+- Ask for the narrowest scopes that work. On Google, `drive.file` keeps Docs,
+ Sheets, and Slides out of CASA; restricted scopes (Gmail, full Drive, Chat)
+ are requested separately so they don't hold up the rest.
+- Reuse approved wording from `submissions/answers.md` (data handling,
+ retention, security contact, product description). New wording the human
+ approves goes there.
+- Record demo videos with a browser agent against the real flow.
+- Answer reviewers the same day; the vendor's clock stops while we are silent.
+- Check each portal daily for status changes vendors don't email about.
+
+## Human gates
+
+The agent prepares everything, then queues the human step in `STATUS.md` and
+sets `state: needs-human`:
+
+- signing in where 2FA or a CAPTCHA blocks the agent
+- accepting terms, legal attestations, and contracts (e.g. CASA assessor)
+- identity verification and payments
+- choosing between options with business or legal weight
+
+## Known requirements (2026-10-30)
+
+From [`research/vendor-auth.csv`](research/vendor-auth.csv); re-verify before
+filing.
+
+| Vendor | Needs |
+| --- | --- |
+| Google | OAuth consent verification for sensitive scopes; plus annual CASA assessment (about $500-4,500, weeks to months) for restricted scopes; 100-user cap until verified; Workspace MCP Developer Preview enrollment. |
+| Microsoft | Multitenant Entra app, publisher verification (Microsoft AI Cloud Partner Program ID). MCP needs Agent 365 licences, so out of v1. |
+| Zoom | Marketplace app; public apps need review (weeks). |
+| Xero | App certification; paid tiers by connection count (Core AUD$35/mo for 50). |
+| Figma, Vercel | Client allowlist; request inclusion. |
+| HubSpot, Asana | Self-serve app; confirm whether Macro already has one. |
+| Box | Each customer's admin enables the integration; listing needs a Box partnership. |
+| Discord | MCP server unannounced; ask before building. |
+
+## Browser
+
+Submission agents use Macro Connect's own Chromium, never the shared agent
+browser: `connect/tooling/browser/run.sh` starts it (Docker, loopback only)
+with a profile volume that holds only `[email protected]` sessions.
+
+- Agents drive it over CDP at `http://localhost:9333` (raw CDP over a
+ WebSocket; Playwright's `connectOverCDP` hangs against this image).
+- The human watches and takes over at `http://localhost:6081/vnc.html`,
+ through `ssh -L 6081:localhost:6081 <host>` from their machine.
+- Sessions persist across restarts. When a sign-in is needed, the agent fills
+ the email and the password from Doppler (`CONNECT_ACCOUNT_*`, `connect/prd`)
+ without logging them, and completes TOTP 2FA from
+ `CONNECT_ACCOUNT_TOTP_SECRET`. A CAPTCHA or device check goes to the human
+ queue with the tab left open on it.
diff --git a/connect/infra/AGENTS.md b/connect/infra/AGENTS.md
new file mode 100644
index 0000000000..10581541f0
--- /dev/null
+++ b/connect/infra/AGENTS.md
@@ -0,0 +1,24 @@
+# Connect infrastructure
+
+## Scope
+
+Standalone Pulumi project `macro-connect` for Connect's own ECS service,
+load balancer, Postgres database, grant KMS key, and runtime secret. It may
+read the existing VPC and use the `macro.com` Route 53 zone, but must not
+mutate shared security groups or import Macro's `infra/` packages.
+
+## Configuration
+
+`dev` has the public host `connect-dev.macro.com`. Each stack requires
+`vpcId`, `publicSubnetIds`, and `privateSubnetIds` config from the existing
+VPC. `prod` also requires `publicHost`; choose it before previewing prod.
+Live `own_app` credentials go in encrypted `ownAppCredentials` config as an
+object keyed by app id, with `clientId` and `clientSecret` per entry.
+
+## Checks
+
+- `bun install --frozen-lockfile`
+- `bunx tsc --noEmit`
+- `bunx biome check .`
+
+No agent deploys this stack without explicit human authorization.
diff --git a/connect/infra/CLAUDE.md b/connect/infra/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/infra/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/infra/Pulumi.dev.yaml b/connect/infra/Pulumi.dev.yaml
new file mode 100644
index 0000000000..daccda1d42
--- /dev/null
+++ b/connect/infra/Pulumi.dev.yaml
@@ -0,0 +1,13 @@
+config:
+ aws:region: us-east-1
+ macro-connect:publicHost: connect-dev.macro.com
+ # Macro's existing VPC and subnets (read only; Connect creates its own
+ # security groups). Same ids as infra/packages/vpc get_coparse_api_vpc.
+ macro-connect:vpcId: vpc-0c7510191d4fc9263
+ macro-connect:publicSubnetIds:
+ - subnet-042a406ca5480af5d
+ - subnet-09bb402ca097d0aa9
+ - subnet-0b7efc5a66eef73e3
+ macro-connect:privateSubnetIds:
+ - subnet-03c3753c5342f434e
+ - subnet-0e2530cd19536fe10
diff --git a/connect/infra/Pulumi.prod.yaml b/connect/infra/Pulumi.prod.yaml
new file mode 100644
index 0000000000..1a38cefb17
--- /dev/null
+++ b/connect/infra/Pulumi.prod.yaml
@@ -0,0 +1,2 @@
+config:
+ aws:region: us-east-1
diff --git a/connect/infra/Pulumi.yaml b/connect/infra/Pulumi.yaml
new file mode 100644
index 0000000000..0bbb1ce43c
--- /dev/null
+++ b/connect/infra/Pulumi.yaml
@@ -0,0 +1,3 @@
+name: macro-connect
+runtime: nodejs
+description: Independent Macro Connect backend
diff --git a/connect/infra/biome.json b/connect/infra/biome.json
new file mode 100644
index 0000000000..e0d99fbfe3
--- /dev/null
+++ b/connect/infra/biome.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "https://biomejs.dev/schemas/2.4.12/schema.json",
+ "formatter": { "indentStyle": "space", "indentWidth": 2 },
+ "javascript": { "formatter": { "quoteStyle": "single" } },
+ "files": { "includes": ["**", "!bun.lock"] }
+}
diff --git a/connect/infra/bun.lock b/connect/infra/bun.lock
new file mode 100644
index 0000000000..96628ff8e6
--- /dev/null
+++ b/connect/infra/bun.lock
@@ -0,0 +1,557 @@
+{
+ "lockfileVersion": 1,
+ "configVersion": 1,
+ "workspaces": {
+ "": {
+ "name": "macro-connect-infra",
+ "dependencies": {
+ "@pulumi/aws": "^7.34.0",
+ "@pulumi/awsx": "^3.1.0",
+ "@pulumi/pulumi": "^3.209.0",
+ "smol-toml": "^1.5.2",
+ },
+ "devDependencies": {
+ "@biomejs/biome": "2.4.12",
+ "@types/node": "^20.8.10",
+ "typescript": "^5.2.2",
+ },
+ },
+ },
+ "packages": {
+ "@aws-sdk/client-ecs": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/credential-provider-node": "^3.972.92", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-JUJfskVw/BbVL0FHNiS5cvJF5SMSb0FuySL6/CXZWJtjWN6JPebw2afnmXjruN/H5Be1CgMtjtNZnvxU9DszxA=="],
+
+ "@aws-sdk/core": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
+
+ "@aws-sdk/credential-provider-env": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-uO5TiSvb6j1w9RTe5z28OaOmsrOxVQUPaC5+wZl50RfOXcrYD/KgnS8I9lfyGXc7sGbkCopK6VnhNIAoLqfewQ=="],
+
+ "@aws-sdk/credential-provider-http": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-vQzlDHlC24Yz42p+rT4NBoP/5VdetkBoujbOLq9h6QYWC8THuZSPYnXIR9OP3XcOrdMgPBBipOrdssfxnIiWUg=="],
+
+ "@aws-sdk/credential-provider-ini": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/credential-provider-env": "^3.972.80", "@aws-sdk/credential-provider-http": "^3.972.82", "@aws-sdk/credential-provider-login": "^3.972.87", "@aws-sdk/credential-provider-process": "^3.972.80", "@aws-sdk/credential-provider-sso": "^3.973.24", "@aws-sdk/credential-provider-web-identity": "^3.972.86", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-b5xl71uCRdWsu7P1VeGpiGuCf6zfYETsSNOv8AmYVTrsgbvTJRXdmmOPVfxkvGGVNsiKkGctClQW3jAn0SZLug=="],
+
+ "@aws-sdk/credential-provider-login": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-C4ZFmcwM+Zj14Z8huVUk54Gv4uzT1ZdzG9cY3Gdh8FePakq7Bss1OFsgZjAhWFOkFOGpBvFBeu0OWjWf8HNKRQ=="],
+
+ "@aws-sdk/credential-provider-node": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.80", "@aws-sdk/credential-provider-http": "^3.972.82", "@aws-sdk/credential-provider-ini": "^3.973.25", "@aws-sdk/credential-provider-process": "^3.972.80", "@aws-sdk/credential-provider-sso": "^3.973.24", "@aws-sdk/credential-provider-web-identity": "^3.972.86", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-jC3zmOo7Qxlk+oBivvSsS1Ph7sFGm0QfuhqDGbqgRXi4cxUYMG+dWtBwS2XYYXgc8TIVXJiwgQ65sbNpbYupTA=="],
+
+ "@aws-sdk/credential-provider-process": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-xqfixO5aclje7tbQJDias+iNND5wp/3QZixCdZcVQpgWPTZ0V5DfTW9A804A5Z7ezu7sH3WRO+vzUjtiJBA8yg=="],
+
+ "@aws-sdk/credential-provider-sso": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/token-providers": "3.1161.0", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-nlg3BKG03Cgzvv/dMnhxvDJPhAhQSpaN0RUdwgU7ziwkasoev7iI8el8Xy4Rd5sqzgaDUbV269fOXck5SargqA=="],
+
+ "@aws-sdk/credential-provider-web-identity": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-zKTyLJBEyfQBVlYqT6Jt+mYV4r8kGbWM7dn6v4Y4MRARizhYafjDXP/iMu76UMRhToSPNmIKX1XAb24gtpBFIA=="],
+
+ "@aws-sdk/nested-clients": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="],
+
+ "@aws-sdk/signature-v4-multi-region": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
+
+ "@aws-sdk/token-providers": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-ypbXSofNcSHwf/KA40bFCXJb0MLaAKrfT7sot4dFaA+2lsuXNah4zLRJIAU7Qmvs9PFJ6rnY0bZFEC+mE7attA=="],
+
+ "@aws-sdk/types": ["@aws-sdk/[email protected]", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
+
+ "@aws-sdk/xml-builder": ["@aws-sdk/[email protected]", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
+
+ "@aws/lambda-invoke-store": ["@aws/[email protected]", "", {}, "sha512-sl4Bm6yiMNYrZKkqqDFWN0UfnWhlS8ivKxrYl+6t0gCLrqr8y3B2IqZZbFRkfaVVp7C/baApyh71P+LeE1A2sQ=="],
+
+ "@biomejs/biome": ["@biomejs/[email protected]", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.12", "@biomejs/cli-darwin-x64": "2.4.12", "@biomejs/cli-linux-arm64": "2.4.12", "@biomejs/cli-linux-arm64-musl": "2.4.12", "@biomejs/cli-linux-x64": "2.4.12", "@biomejs/cli-linux-x64-musl": "2.4.12", "@biomejs/cli-win32-arm64": "2.4.12", "@biomejs/cli-win32-x64": "2.4.12" }, "bin": { "biome": "bin/biome" } }, "sha512-Rro7adQl3NLq/zJCIL98eElXKI8eEiBtoeu5TbXF/U3qbjuSc7Jb5rjUbeHHcquDWeSf3HnGP7XI5qGrlRk/pA=="],
+
+ "@biomejs/cli-darwin-arm64": ["@biomejs/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BnMU4Pc3ciEVteVpZ0BK33MLr7X57F5w1dwDLDn+/iy/yTrA4Q/N2yftidFtsA4vrDh0FMXDpacNV/Tl3fbmng=="],
+
+ "@biomejs/cli-darwin-x64": ["@biomejs/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-x9uJ0bI1rJsWICp3VH8w/5PnAVD3A7SqzDpbrfoUQX1QyWrK5jSU4fRLo/wSgGeplCivbxBRKmt5Xq4/nWvq8A=="],
+
+ "@biomejs/cli-linux-arm64": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-tOwuCuZZtKi1jVzbk/5nXmIsziOB6yqN8c9r9QM0EJYPU6DpQWf11uBOSCfFKKM4H3d9ZoarvlgMfbcuD051Pw=="],
+
+ "@biomejs/cli-linux-arm64-musl": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-FhfpkAAlKL6kwvcVap0Hgp4AhZmtd3YImg0kK1jd7C/aSoh4SfsB2f++yG1rU0lr8Y5MCFJrcSkmssiL9Xnnig=="],
+
+ "@biomejs/cli-linux-x64": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-8pFeAnLU9QdW9jCIslB/v82bI0lhBmz2ZAKc8pVMFPO0t0wAHsoEkrUQUbMkIorTRIjbqyNZHA3lEXavsPWYSw=="],
+
+ "@biomejs/cli-linux-x64-musl": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-dwTIgZrGutzhkQCuvHynCkyW6hJxUuyZqKKO0YNfaS2GUoRO+tOvxXZqZB6SkWAOdfZTzwaw8IEdUnIkHKHoew=="],
+
+ "@biomejs/cli-win32-arm64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-B0DLnx0vA9ya/3v7XyCaP+/lCpnbWbMOfUFFve+xb5OxyYvdHaS55YsSddr228Y+JAFk58agCuZTsqNiw2a6ig=="],
+
+ "@biomejs/cli-win32-x64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-yMckRzTyZ83hkk8iDFWswqSdU8tvZxspJKnYNh7JZr/zhZNOlzH13k4ecboU6MurKExCe2HUkH75pGI/O2JwGA=="],
+
+ "@gar/promise-retry": ["@gar/[email protected]", "", {}, "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA=="],
+
+ "@grpc/grpc-js": ["@grpc/[email protected]", "", { "dependencies": { "@grpc/proto-loader": "^0.8.0", "@js-sdsl/ordered-map": "^4.4.2" } }, "sha512-W4W/fcBMGRVtG6dW2c7cw2mnpS3hvbBd+oQXjh2iYFTZDk1JJmcNqkM5KSaPubQpamlUUurrlb7G1s9NJeERmQ=="],
+
+ "@grpc/proto-loader": ["@grpc/[email protected]", "", { "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", "protobufjs": "^7.5.5", "yargs": "^17.7.2" }, "bin": { "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" } }, "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg=="],
+
+ "@isaacs/fs-minipass": ["@isaacs/[email protected]", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="],
+
+ "@isaacs/string-locale-compare": ["@isaacs/[email protected]", "", {}, "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ=="],
+
+ "@js-sdsl/ordered-map": ["@js-sdsl/[email protected]", "", {}, "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw=="],
+
+ "@logdna/tail-file": ["@logdna/[email protected]", "", {}, "sha512-XGSsWDweP80Fks16lwkAUIr54ICyBs6PsI4mpfTLQaWgEJRtY9xEV+PeyDpJ+sJEGZxqINlpmAwe/6tS1pP8Ng=="],
+
+ "@npmcli/agent": ["@npmcli/[email protected]", "", { "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.1", "lru-cache": "^11.2.1", "socks-proxy-agent": "^8.0.3" } }, "sha512-EUEuWAxnL07Sp5/iC/1X6Xj+XThUvnbei9zfRWZdEXa7lss9RTHMhAHBeg+MZ5To9s/gGaSI+UwZTPdYMvKSeg=="],
+
+ "@npmcli/arborist": ["@npmcli/[email protected]", "", { "dependencies": { "@gar/promise-retry": "^1.0.0", "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^5.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/map-workspaces": "^5.0.0", "@npmcli/metavuln-calculator": "^9.0.2", "@npmcli/name-from-folder": "^4.0.0", "@npmcli/node-gyp": "^5.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/query": "^5.0.0", "@npmcli/redact": "^4.0.0", "@npmcli/run-script": "^10.0.0", "bin-links": "^6.0.0", "cacache": "^20.0.1", "common-ancestor-path": "^2.0.0", "hosted-git-info": "^9.0.0", "json-stringify-nice": "^1.1.4", "lru-cache": "^11.2.1", "minimatch": "^10.0.3", "nopt": "^9.0.0", "npm-install-checks": "^8.0.0", "npm-package-arg": "^13.0.0", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "pacote": "^21.0.2", "parse-conflict-json": "^5.0.1", "proc-log": "^6.0.0", "proggy": "^4.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^3.0.1", "semver": "^7.3.7", "ssri": "^13.0.0", "treeverse": "^3.0.0", "walk-up-path": "^4.0.0" }, "bin": { "arborist": "bin/index.js" } }, "sha512-OxRSMNRPzL2/x2zsVrzdMZItfNj3cVXZIYgGNlUaBRUyH16YKdwN1r9z+I13keR1mjVNKelMfi2a7A/0JJ4NCw=="],
+
+ "@npmcli/fs": ["@npmcli/[email protected]", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-7OsC1gNORBEawOa5+j2pXN9vsicaIOH5cPXxoR6fJOmH6/EXpJB2CajXOu1fPRFun2m1lktEFX11+P89hqO/og=="],
+
+ "@npmcli/git": ["@npmcli/[email protected]", "", { "dependencies": { "@gar/promise-retry": "^1.0.0", "@npmcli/promise-spawn": "^9.0.0", "ini": "^6.0.0", "lru-cache": "^11.2.1", "npm-pick-manifest": "^11.0.1", "proc-log": "^6.0.0", "semver": "^7.3.5", "which": "^6.0.0" } }, "sha512-oeolHDjExNAJAnlYP2qzNjMX/Xi9bmu78C9dIGr4xjobrSKbuMYCph8lTzn4vnW3NjIqVmw/f8BCfouqyJXlRg=="],
+
+ "@npmcli/installed-package-contents": ["@npmcli/[email protected]", "", { "dependencies": { "npm-bundled": "^5.0.0", "npm-normalize-package-bin": "^5.0.0" }, "bin": { "installed-package-contents": "bin/index.js" } }, "sha512-yNyAdkBxB72gtZ4GrwXCM0ZUedo9nIbOMKfGjt6Cu6DXf0p8y1PViZAKDC8q8kv/fufx0WTjRBdSlyrvnP7hmA=="],
+
+ "@npmcli/map-workspaces": ["@npmcli/[email protected]", "", { "dependencies": { "@npmcli/name-from-folder": "^4.0.0", "@npmcli/package-json": "^7.0.0", "glob": "^13.0.0", "minimatch": "^10.0.3" } }, "sha512-o2grssXo1e774E5OtEwwrgoszYRh0lqkJH+Pb9r78UcqdGJRDRfhpM8DvZPjzNLLNYeD/rNbjOKM3Ss5UABROw=="],
+
+ "@npmcli/metavuln-calculator": ["@npmcli/[email protected]", "", { "dependencies": { "cacache": "^20.0.0", "json-parse-even-better-errors": "^5.0.0", "pacote": "^21.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5" } }, "sha512-94GLSYhLXF2t2LAC7pDwLaM4uCARzxShyAQKsirmlNcpidH89VA4/+K1LbJmRMgz5gy65E/QBBWQdUvGLe2Frg=="],
+
+ "@npmcli/name-from-folder": ["@npmcli/[email protected]", "", {}, "sha512-qfrhVlOSqmKM8i6rkNdZzABj8MKEITGFAY+4teqBziksCQAOLutiAxM1wY2BKEd8KjUSpWmWCYxvXr0y4VTlPg=="],
+
+ "@npmcli/node-gyp": ["@npmcli/[email protected]", "", {}, "sha512-uuG5HZFXLfyFKqg8QypsmgLQW7smiRjVc45bqD/ofZZcR/uxEjgQU8qDPv0s9TEeMUiAAU/GC5bR6++UdTirIQ=="],
+
+ "@npmcli/package-json": ["@npmcli/[email protected]", "", { "dependencies": { "@npmcli/git": "^7.0.0", "glob": "^13.0.0", "hosted-git-info": "^9.0.0", "json-parse-even-better-errors": "^5.0.0", "proc-log": "^6.0.0", "semver": "^7.5.3", "spdx-expression-parse": "^4.0.0" } }, "sha512-iVuTlG3ORq2iaVa1IWUxAO/jIp77tUKBhoMjuzYW2kL4MLN1bi/ofqkZ7D7OOwh8coAx1/S2ge0rMdGv8sLSOQ=="],
+
+ "@npmcli/promise-spawn": ["@npmcli/[email protected]", "", { "dependencies": { "which": "^6.0.0" } }, "sha512-h7b1j0egrruBm/32eVA6/zMw5VJxxaB3vT+uVGGQ4SAAMrQVFHNuzL4+EAXn66j+huj0jApINc1fW3fC+kVoeA=="],
+
+ "@npmcli/query": ["@npmcli/[email protected]", "", { "dependencies": { "postcss-selector-parser": "^7.0.0" } }, "sha512-8TZWfTQOsODpLqo9SVhVjHovmKXNpevHU0gO9e+y4V4fRIOneiXy0u0sMP9LmS71XivrEWfZWg50ReH4WRT4aQ=="],
+
+ "@npmcli/redact": ["@npmcli/[email protected]", "", {}, "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q=="],
+
+ "@npmcli/run-script": ["@npmcli/[email protected]", "", { "dependencies": { "@npmcli/node-gyp": "^5.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "node-gyp": "^12.1.0", "proc-log": "^6.0.0" } }, "sha512-mGUWr1uMnf0le2TwfOZY4SFxZGXGfm4Jtay/nwAa2FLNAKXUoUwaGwBMNH36UHPtinWfTSJ3nqFQr0091CxVGg=="],
+
+ "@opentelemetry/api": ["@opentelemetry/[email protected]", "", {}, "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ=="],
+
+ "@opentelemetry/api-logs": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-CmVa4ImJ+ynfrPMNaAXHET6Bhb44SwzmfyVJFq9ni2jgXJR/l7C6gfVFddNmHP+ZOkP9cf4f9DBe68qVLTHc9w=="],
+
+ "@opentelemetry/context-async-hooks": ["@opentelemetry/[email protected]", "", { "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-iK/1nD7mmZVkuYjVjkdFBiCvzntJdFny1S3CYbUYyOq7V5enL6XX+gJ7eh965L1LnS11VA8mQ7Ej/ck04SB0MQ=="],
+
+ "@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-1HsSAuvT4/my0QrXWsyXFdWjKaPeCHsismKZgEEIb8NK13LP6DrMRlsUbvD/0F9mDWK3xDom9AMv3IscxgOnOQ=="],
+
+ "@opentelemetry/exporter-trace-otlp-grpc": ["@opentelemetry/[email protected]", "", { "dependencies": { "@grpc/grpc-js": "^1.14.3", "@opentelemetry/otlp-exporter-base": "0.220.0", "@opentelemetry/otlp-grpc-exporter-base": "0.220.0", "@opentelemetry/otlp-transformer": "0.220.0", "@opentelemetry/sdk-trace": "2.9.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-bv1xmNhmNwIM6MdUBw4yYuJeVcEViVLk3uD69vOQMwueHBnfyl/u0HnBlB1FNY/Te0UOzJzvcbyR8wN6b+iGbA=="],
+
+ "@opentelemetry/exporter-zipkin": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.12.0", "@opentelemetry/resources": "2.12.0", "@opentelemetry/sdk-trace": "2.12.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "sha512-XfHO6VxPkVD/QaXqgppdHK2DTqmtHLH06ggslhm5hVYAS+dwD3okaeIyhxXBbhmWn9HhCYcv285eK1TgyF0wYQ=="],
+
+ "@opentelemetry/instrumentation": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/api-logs": "0.220.0", "import-in-the-middle": "^3.0.0", "require-in-the-middle": "^8.0.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-xQx3E2WxP1mDvKzxLxX+CTCtNLa560YJZ3087qYHerl2YmiKpv7AH+dAy7vmx+eVrZ5BwhfWUAVoKOoxCNHcpw=="],
+
+ "@opentelemetry/instrumentation-grpc": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/instrumentation": "0.220.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-U1EF8KKu52XwH2ybUkjVDmaVQZGf3mXirRSw1KJQrOV5aymgJgkPJV7+kRPqawZe0rpVc/BK+pPSyMWuQoyJJQ=="],
+
+ "@opentelemetry/otlp-exporter-base": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/otlp-transformer": "0.220.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-CXYo8UD5Mn9YbgebO2EL4wejtA+gxLmLiu6HCk2KH2BR7XhFN6/6p1UlCb23DYCjeYkndevLHuejCCN1yx4+OQ=="],
+
+ "@opentelemetry/otlp-grpc-exporter-base": ["@opentelemetry/[email protected]", "", { "dependencies": { "@grpc/grpc-js": "^1.14.3", "@opentelemetry/core": "2.9.0", "@opentelemetry/otlp-exporter-base": "0.220.0", "@opentelemetry/otlp-transformer": "0.220.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-/eIkBPMBTIvM3x/0mDX4aJeSkYifYClnBPr68PL1h5LV4VQv4+SV6CGrpiZ4fIWDnobVmhTWCm1J/QRdAWUfvA=="],
+
+ "@opentelemetry/otlp-transformer": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/api-logs": "0.220.0", "@opentelemetry/core": "2.9.0", "@opentelemetry/resources": "2.9.0", "@opentelemetry/sdk-logs": "0.220.0", "@opentelemetry/sdk-metrics": "2.9.0", "@opentelemetry/sdk-trace": "2.9.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-lXGrv7KXZ0gNH9SVNUaa6vv6phVYGvJxfXAlMbzbakiXru75f5MZl8Z7oqiMMQD77riVHJCFlQvbZs/VVN2/4A=="],
+
+ "@opentelemetry/resources": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.12.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-+rSRoOdln6NhXTVcBdHSlZxJDNzwxadeweK2ltZO3tVtfp6aklABc06xclDk6ovRR+EiGgIcSbh/6NgjFhnb3A=="],
+
+ "@opentelemetry/sdk-logs": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/api-logs": "0.220.0", "@opentelemetry/core": "2.9.0", "@opentelemetry/resources": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, "sha512-WywcTkQtv2iNmt+6y5Kcd4rzvx9bLVsBa2Nwcmg01IUaBTkTow3W4d9KE5vNBpEDtb9tp21WcRBY/lANRrApYA=="],
+
+ "@opentelemetry/sdk-metrics": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/resources": "2.9.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.9.0 <1.10.0" } }, "sha512-Xx8RGS4H5XEBl01WuCreMIpiah9cCXMbSkeuIePPdD2cUpq/vUzYmj8E/MK1OsbOc93FuAD4jfn2WOacKwLn7Q=="],
+
+ "@opentelemetry/sdk-trace": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/resources": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-sGA19HvtrrSKYsseHphluH6j3p6Xa3fqc7c7y8f/7mYWejc1lyDFcpSdD1kYa50HCLUeEo4zA5bW0pniaPszuw=="],
+
+ "@opentelemetry/sdk-trace-base": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.12.0", "@opentelemetry/resources": "2.12.0", "@opentelemetry/sdk-trace": "2.12.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-JOERgZCxRM06FEJ5kEWxlSRChah6MmXDx3KwCruqEv/iEyLkTokCSemf2y1w8oIHtfrr8EVTpzebq/31vn2Cpg=="],
+
+ "@opentelemetry/sdk-trace-node": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/context-async-hooks": "2.12.0", "@opentelemetry/core": "2.12.0", "@opentelemetry/sdk-trace-base": "2.12.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-9DufH1IlmQMoKAfot5y/FhTP1RnmhLb5K6eKmJO/bvzPjYwPAazoiAUbTZFdPbqxOXN0FEbhZx/e6SB1Og4jmg=="],
+
+ "@opentelemetry/semantic-conventions": ["@opentelemetry/[email protected]", "", {}, "sha512-E3JkOlMBi3N8OGGkbl7tFyqk2MAS6/lySRZBK3Mu7AzjF1fT8oIChH9ChE48SUWzDn9Kdwta+G/p5LJ4xW4CLQ=="],
+
+ "@protobufjs/aspromise": ["@protobufjs/[email protected]", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],
+
+ "@protobufjs/base64": ["@protobufjs/[email protected]", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],
+
+ "@protobufjs/codegen": ["@protobufjs/[email protected]", "", {}, "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g=="],
+
+ "@protobufjs/eventemitter": ["@protobufjs/[email protected]", "", {}, "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg=="],
+
+ "@protobufjs/fetch": ["@protobufjs/[email protected]", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.1" } }, "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw=="],
+
+ "@protobufjs/float": ["@protobufjs/[email protected]", "", {}, "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="],
+
+ "@protobufjs/path": ["@protobufjs/[email protected]", "", {}, "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="],
+
+ "@protobufjs/pool": ["@protobufjs/[email protected]", "", {}, "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="],
+
+ "@protobufjs/utf8": ["@protobufjs/[email protected]", "", {}, "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug=="],
+
+ "@pulumi/aws": ["@pulumi/[email protected]", "", { "dependencies": { "@pulumi/pulumi": "^3.142.0", "mime": "^2.0.0" } }, "sha512-EkiZJacWBqwxq+LLeiDA131OWaoFGAnPKKx8aCpcn6lWKyYNqdZIgUhY8OrHefYtirWL5rnabDuPJ9YuluTPQQ=="],
+
+ "@pulumi/awsx": ["@pulumi/[email protected]", "", { "dependencies": { "@aws-sdk/client-ecs": "^3.974.0", "@pulumi/aws": "^7.43.0", "@pulumi/docker": "^4.6.0", "@pulumi/docker-build": "^0.0.14", "@pulumi/pulumi": "^3.142.0", "@types/aws-lambda": "^8.10.23", "docker-classic": "npm:@pulumi/[email protected]", "mime": "^2.0.0" } }, "sha512-uk3zIpTPkVCRmWB8oiV7eNrHzm3dOd5v6231Y8ULk5WHCgAjezotOZQ/Wt6zlYm8e8Q9NsgCbP+D51rnbYY3Wg=="],
+
+ "@pulumi/docker": ["@pulumi/[email protected]", "", { "dependencies": { "@pulumi/pulumi": "^3.142.0", "semver": "^5.4.0" } }, "sha512-mm8Uscb/3S7OieYyg1E/vvFx3OS4bAkZvtFvi1yTqYda9NbnYOMbJi7a5fU5xB0N0Kd/uliS8olJ/e6nnvVVPg=="],
+
+ "@pulumi/docker-build": ["@pulumi/[email protected]", "", { "dependencies": { "@pulumi/pulumi": "^3.142.0" } }, "sha512-dLCta3BOrYRxHyp22QnVh06qlSiSORtmIypcQ6yb4+GZ2+ThbML06pINyERc5ClgJXGQFSVTtuWhMSiurTWU2w=="],
+
+ "@pulumi/pulumi": ["@pulumi/[email protected]", "", { "dependencies": { "@grpc/grpc-js": "^1.10.1", "@logdna/tail-file": "^2.0.6", "@npmcli/arborist": "^9.0.0", "@opentelemetry/api": "^1.9", "@opentelemetry/core": "^2.9", "@opentelemetry/exporter-trace-otlp-grpc": "^0.220", "@opentelemetry/exporter-zipkin": "^2.9", "@opentelemetry/instrumentation": "^0.220", "@opentelemetry/instrumentation-grpc": "^0.220", "@opentelemetry/resources": "^2.9", "@opentelemetry/sdk-trace-base": "^2.9", "@opentelemetry/sdk-trace-node": "^2.9", "@opentelemetry/semantic-conventions": "^1.42", "@types/google-protobuf": "^3.15.5", "@types/semver": "^7.5.6", "execa": "^5.1.0", "google-protobuf": "^3.21.4", "ini": "^2.0.0", "js-yaml": "^4.3.2", "minimist": "^1.2.6", "normalize-package-data": "^6.0.0", "require-from-string": "^2.0.1", "semver": "^7.5.2", "source-map-support": "^0.5.6", "upath": "^1.1.0" }, "peerDependencies": { "ts-node": ">= 7.0.1 < 12", "typescript": ">= 3.8.3 < 7" }, "optionalPeers": ["ts-node", "typescript"] }, "sha512-Yh2k0Kry4u5LM730KUO5HZFnqHdlW9ypoQ8zgO0Tqam1G6urFXjIUTUaLxvWrdsm6gKCoyVS6CPdeOGcV+Msvg=="],
+
+ "@sigstore/bundle": ["@sigstore/[email protected]", "", { "dependencies": { "@sigstore/protobuf-specs": "^0.5.0" } }, "sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A=="],
+
+ "@sigstore/core": ["@sigstore/[email protected]", "", {}, "sha512-qRsxPnCrbC/puegGxKuynfnxgLiHqWStrSjxkoB4YKqq3Z3s4cyZyj42ZdWFAEblNP65C+rBH8EuREHIXoi83g=="],
+
+ "@sigstore/protobuf-specs": ["@sigstore/[email protected]", "", {}, "sha512-SQqvFMt4V78fdjcDdYX6HbiVSOR4QK3ZgwCa2KOsopAgPIHy1rU5UDUmzLl02r5oyyaYcYHR1hpwDRk/yUe+Mw=="],
+
+ "@sigstore/sign": ["@sigstore/[email protected]", "", { "dependencies": { "@gar/promise-retry": "^1.0.2", "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.2.0", "@sigstore/protobuf-specs": "^0.5.0", "make-fetch-happen": "^15.0.4", "proc-log": "^6.1.0" } }, "sha512-Hf4xglukg0XXQ2RiD5vSoLjdPe8OBUPA8XeVjUObheuDcWdYWrnH/BNmxZCzkAy68MzmNCxXLeurJvs6hcP2OQ=="],
+
+ "@sigstore/tuf": ["@sigstore/[email protected]", "", { "dependencies": { "@sigstore/protobuf-specs": "^0.5.0", "tuf-js": "^4.1.0" } }, "sha512-TCAzTy0xzdP79EnxSjq9KQ3eaR7+FmudLC6eRKknVKZbV7ZNlGLClAAQb/HMNJ5n2OBNk2GT1tEmU0xuPr+SLQ=="],
+
+ "@sigstore/verify": ["@sigstore/[email protected]", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.2.1", "@sigstore/protobuf-specs": "^0.5.0" } }, "sha512-qv7+G3J2cc6wwFj3yKvXOamzqhMwSk1ogPGmhpS8iXllcPrJaIIBA+4HbttlHVu1pqWTdmaCH/WE7UOC51kdoA=="],
+
+ "@smithy/core": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-aLyyCnK2p4yvNA2TaM+5owXqb+rZGSiUKEsNP329AzeYnERtAz7NrlTbRsaxqmZ0ooxwoID8LMm959UGQQDIsg=="],
+
+ "@smithy/credential-provider-imds": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.33.2", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg=="],
+
+ "@smithy/fetch-http-handler": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
+
+ "@smithy/node-http-handler": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-j24RS5V9J52u0z81RpgF7H55p4bS6UCEIxF4ZYzTYh6M9hzXvjAIAYwgLobqf7vJq3xib5VXc7nX3YesV8Rx4A=="],
+
+ "@smithy/signature-v4": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
+
+ "@smithy/types": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
+
+ "@tufjs/canonical-json": ["@tufjs/[email protected]", "", {}, "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA=="],
+
+ "@tufjs/models": ["@tufjs/[email protected]", "", { "dependencies": { "@tufjs/canonical-json": "2.0.0", "minimatch": "^10.1.1" } }, "sha512-Y8cK9aggNRsqJVaKUlEYs4s7CvQ1b1ta2DVPyAimb0I2qhzjNk+A+mxvll/klL0RlfuIUei8BF7YWiua4kQqww=="],
+
+ "@types/aws-lambda": ["@types/[email protected]", "", {}, "sha512-XOnrazWcOd6yWPnR7DxqCBPPYciDjHq+NN8LPwwqBCJNXLyPJgKo47fZpJ113+oyAn9Zti0Cf6H4k6yPcE3WFg=="],
+
+ "@types/google-protobuf": ["@types/[email protected]", "", {}, "sha512-40um9QqwHjRS92qnOaDpL7RmDK15NuZYo9HihiJRbYkMQZlWnuH8AdvbMy8/o6lgLmKbDUKa+OALCltHdbOTpQ=="],
+
+ "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA=="],
+
+ "@types/semver": ["@types/[email protected]", "", {}, "sha512-1mAINjtQCXXeLkJ9ehXkwOcBpqtLxiVtKhpUf83DdRNdQKV0iXZpaHYqRr7nj+wvxuJzoAmAwXI+sCNMv1CzLQ=="],
+
+ "abbrev": ["[email protected]", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="],
+
+ "agent-base": ["[email protected]", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
+
+ "ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
+
+ "argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
+
+ "balanced-match": ["[email protected]", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
+
+ "bin-links": ["[email protected]", "", { "dependencies": { "cmd-shim": "^8.0.0", "npm-normalize-package-bin": "^5.0.0", "proc-log": "^6.0.0", "read-cmd-shim": "^6.0.0", "write-file-atomic": "^7.0.0" } }, "sha512-Qg5FD7/YSReWJB1zaM8VIi1l4O637JKK/WPaF/JzJGy/9FcMDWtSklF0dOX5S9X2OMrPGhifIHIKuwtHG0IGFg=="],
+
+ "bowser": ["[email protected]", "", {}, "sha512-xic6KSZglg/I4ymp45fdM4GWfYpBK79Fxd/TOvJktlaPgQqqDxvmGwOPZl2V0dyeS3Lj5c180bLhXF43iyAjZQ=="],
+
+ "brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ=="],
+
+ "buffer-from": ["[email protected]", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="],
+
+ "cacache": ["[email protected]", "", { "dependencies": { "@npmcli/fs": "^5.0.0", "fs-minipass": "^3.0.0", "glob": "^13.0.0", "lru-cache": "^11.1.0", "minipass": "^7.0.3", "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^7.0.2", "ssri": "^13.0.0" } }, "sha512-M3Lab8NPYlZU2exsL3bMVvMrMqgwCnMWfdZbK28bn3pK6APT/Te/I8hjRPNu1uwORY9a1eEQoifXbKPQMfMTOA=="],
+
+ "chownr": ["[email protected]", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="],
+
+ "cjs-module-lexer": ["[email protected]", "", {}, "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ=="],
+
+ "cliui": ["[email protected]", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],
+
+ "cmd-shim": ["[email protected]", "", {}, "sha512-Jk/BK6NCapZ58BKUxlSI+ouKRbjH1NLZCgJkYoab+vEHUY3f6OzpNBN9u7HFSv9J6TRDGs4PLOHezoKGaFRSCA=="],
+
+ "color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
+
+ "color-name": ["[email protected]", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
+
+ "common-ancestor-path": ["[email protected]", "", {}, "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng=="],
+
+ "content-type": ["[email protected]", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="],
+
+ "cross-spawn": ["[email protected]", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
+
+ "cssesc": ["[email protected]", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="],
+
+ "debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
+
+ "docker-classic": ["@pulumi/[email protected]", "", { "dependencies": { "@pulumi/pulumi": "^3.0.0", "semver": "^5.4.0" } }, "sha512-BZME50QkT556v+LvmTXPT8ssB2xxNkp9+msB5xYFEnUnWcdGAx5yUysQw70RJCb+U0GbkJSbxtlgMJgOQf/now=="],
+
+ "emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "env-paths": ["[email protected]", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="],
+
+ "es-module-lexer": ["[email protected]", "", {}, "sha512-BldNY5mwkVu+cQ5Ymn3e6hB9Sx8XHx4ZevWbiUyZbfKxJxYO27Hf0wfzkxIaD5CAJMaGl3YspKELj0ff/7nCMA=="],
+
+ "escalade": ["[email protected]", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
+
+ "execa": ["[email protected]", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="],
+
+ "exponential-backoff": ["[email protected]", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="],
+
+ "fdir": ["[email protected]", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
+
+ "fs-minipass": ["[email protected]", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw=="],
+
+ "get-caller-file": ["[email protected]", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
+
+ "get-stream": ["[email protected]", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="],
+
+ "glob": ["[email protected]", "", { "dependencies": { "minimatch": "^10.2.2", "minipass": "^7.1.3", "path-scurry": "^2.0.2" } }, "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw=="],
+
+ "google-protobuf": ["[email protected]", "", {}, "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ=="],
+
+ "graceful-fs": ["[email protected]", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],
+
+ "hosted-git-info": ["[email protected]", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-Hc+ghLoSt6QaYZUv0WBiIvmMDZuZZ7oaDvdH8MbfOO4lOsxdXLEvuC6ePoGs9H1X9oCLyq6+NVN0MKqD+ydxyg=="],
+
+ "http-cache-semantics": ["[email protected]", "", {}, "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA=="],
+
+ "http-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
+
+ "https-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
+
+ "human-signals": ["[email protected]", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="],
+
+ "iconv-lite": ["[email protected]", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="],
+
+ "ignore-walk": ["[email protected]", "", { "dependencies": { "minimatch": "^10.0.3" } }, "sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A=="],
+
+ "import-in-the-middle": ["[email protected]", "", { "dependencies": { "cjs-module-lexer": "^2.2.0", "es-module-lexer": "^3.0.3", "module-details-from-path": "^1.0.4" } }, "sha512-usm/IiY63VtOyx/dm7uEoZV+EsanCDmwRUroQZIkFLGu1NVXZ8mZqIOhaN4QIJ7EsbMTuQbJXwCySCx+ozMA8g=="],
+
+ "ini": ["[email protected]", "", {}, "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA=="],
+
+ "ip-address": ["[email protected]", "", {}, "sha512-t2v0rkILYv9WXmSL7TpAaU3HXgaFYOPUcH3QHgwQ++gpJuH3bqyMy4Fvt/DJCTKwzH3Cf+bAp5W/mFL39KPLzA=="],
+
+ "is-fullwidth-code-point": ["[email protected]", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
+
+ "is-stream": ["[email protected]", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="],
+
+ "isexe": ["[email protected]", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
+
+ "js-yaml": ["[email protected]", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA=="],
+
+ "json-parse-even-better-errors": ["[email protected]", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="],
+
+ "json-stringify-nice": ["[email protected]", "", {}, "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw=="],
+
+ "jsonparse": ["[email protected]", "", {}, "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg=="],
+
+ "just-diff": ["[email protected]", "", {}, "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA=="],
+
+ "just-diff-apply": ["[email protected]", "", {}, "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw=="],
+
+ "lodash.camelcase": ["[email protected]", "", {}, "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="],
+
+ "long": ["[email protected]", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="],
+
+ "lru-cache": ["[email protected]", "", {}, "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg=="],
+
+ "make-fetch-happen": ["[email protected]", "", { "dependencies": { "@gar/promise-retry": "^1.0.0", "@npmcli/agent": "^4.0.0", "@npmcli/redact": "^4.0.0", "cacache": "^20.0.1", "http-cache-semantics": "^4.1.1", "minipass": "^7.0.2", "minipass-fetch": "^5.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^1.0.0", "proc-log": "^6.0.0", "ssri": "^13.0.0" } }, "sha512-Je0fLJ0F5atA7F+eIlLzk+Wkcl57JDf4kf+EW8xiP5E31xOQxkIxTbgf1Oi1Lw9tRI9UEMRdI5Vz2xTzoNU1Jw=="],
+
+ "merge-stream": ["[email protected]", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="],
+
+ "mime": ["[email protected]", "", { "bin": { "mime": "cli.js" } }, "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="],
+
+ "mimic-fn": ["[email protected]", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="],
+
+ "minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="],
+
+ "minimist": ["[email protected]", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
+
+ "minipass": ["[email protected]", "", {}, "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A=="],
+
+ "minipass-collect": ["[email protected]", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw=="],
+
+ "minipass-fetch": ["[email protected]", "", { "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^2.0.0", "minizlib": "^3.0.1" }, "optionalDependencies": { "iconv-lite": "^0.7.2" } }, "sha512-2d0q2a8eCi2IRg/IGubCNRJoYbA1+YPXAzQVRFmB45gdGZafyivnZ5YSEfo3JikbjGxOdntGFvBQGqaSMXlAFQ=="],
+
+ "minipass-flush": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA=="],
+
+ "minipass-pipeline": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A=="],
+
+ "minipass-sized": ["[email protected]", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-zSsHhto5BcUVM2m1LurnXY6M//cGhVaegT71OfOXoprxT6o780GZd792ea6FfrQkuU4usHZIUczAQMRUE2plzA=="],
+
+ "minizlib": ["[email protected]", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw=="],
+
+ "module-details-from-path": ["[email protected]", "", {}, "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w=="],
+
+ "ms": ["[email protected]", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
+
+ "negotiator": ["[email protected]", "", { "dependencies": { "content-type": "^2.1.0" } }, "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg=="],
+
+ "node-gyp": ["[email protected]", "", { "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", "graceful-fs": "^4.2.6", "nopt": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "tar": "^7.5.4", "tinyglobby": "^0.2.12", "undici": "^6.25.0", "which": "^6.0.0" }, "bin": { "node-gyp": "bin/node-gyp.js" } }, "sha512-OMcPNvqTCFUnNaBlmdgq+lfNqY7gTiSmNRDjY3uAXRyudeKZEZxu3CLtjMQrx4zZxCX2b/mpNqTtwuCJgXhHkw=="],
+
+ "nopt": ["[email protected]", "", { "dependencies": { "abbrev": "^4.0.0" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw=="],
+
+ "normalize-package-data": ["[email protected]", "", { "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g=="],
+
+ "npm-bundled": ["[email protected]", "", { "dependencies": { "npm-normalize-package-bin": "^5.0.0" } }, "sha512-JLSpbzh6UUXIEoqPsYBvVNVmyrjVZ1fzEFbqxKkTJQkWBO3xFzFT+KDnSKQWwOQNbuWRwt5LSD6HOTLGIWzfrw=="],
+
+ "npm-install-checks": ["[email protected]", "", { "dependencies": { "semver": "^7.1.1" } }, "sha512-ScAUdMpyzkbpxoNekQ3tNRdFI8SJ86wgKZSQZdUxT+bj0wVFpsEMWnkXP0twVe1gJyNF5apBWDJhhIbgrIViRA=="],
+
+ "npm-normalize-package-bin": ["[email protected]", "", {}, "sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag=="],
+
+ "npm-package-arg": ["[email protected]", "", { "dependencies": { "hosted-git-info": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^7.0.0" } }, "sha512-IciCE3SY3uE84Ld8WZU23gAPPV9rIYod4F+rc+vJ7h7cwAJt9Vk6TVsK60ry7Uj3SRS3bqRRIGuTp9YVlk6WNA=="],
+
+ "npm-packlist": ["[email protected]", "", { "dependencies": { "ignore-walk": "^8.0.0", "proc-log": "^6.0.0" } }, "sha512-uMW73iajD8hiH4ZBxEV3HC+eTnppIqwakjOYuvgddnalIw2lJguKviK1pcUJDlIWm1wSJkchpDZDSVVsZEYRng=="],
+
+ "npm-pick-manifest": ["[email protected]", "", { "dependencies": { "npm-install-checks": "^8.0.0", "npm-normalize-package-bin": "^5.0.0", "npm-package-arg": "^13.0.0", "semver": "^7.3.5" } }, "sha512-buzyCfeoGY/PxKqmBqn1IUJrZnUi1VVJTdSSRPGI60tJdUhUoSQFhs0zycJokDdOznQentgrpf8LayEHyyYlqQ=="],
+
+ "npm-registry-fetch": ["[email protected]", "", { "dependencies": { "@npmcli/redact": "^4.0.0", "jsonparse": "^1.3.1", "make-fetch-happen": "^15.0.0", "minipass": "^7.0.2", "minipass-fetch": "^5.0.0", "minizlib": "^3.0.1", "npm-package-arg": "^13.0.0", "proc-log": "^6.0.0" } }, "sha512-TakBap6OM1w0H73VZVDf44iFXsOS3h+L4wVMXmbWOQroZgFhMch0juN6XSzBNlD965yIKvWg2dfu7NSiaYLxtw=="],
+
+ "npm-run-path": ["[email protected]", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
+
+ "onetime": ["[email protected]", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="],
+
+ "p-map": ["[email protected]", "", {}, "sha512-6Lh3jQPLthYujSrlw6ccWXBGZTkoTCz27Hd92g79LH/kjAbgoEu0t442cCCNbegPSJsA0lwDX8z0bcKtkpA32g=="],
+
+ "pacote": ["[email protected]", "", { "dependencies": { "@gar/promise-retry": "^1.0.0", "@npmcli/git": "^7.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "@npmcli/run-script": "^10.0.0", "cacache": "^20.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^13.0.0", "npm-packlist": "^10.0.1", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "proc-log": "^6.0.0", "sigstore": "^4.0.0", "ssri": "^13.0.0", "tar": "^7.4.3" }, "bin": { "pacote": "bin/index.js" } }, "sha512-rifBXawDMv3nLvABWr1kTpSk0UjeglTT4Vt9t8nU9xSnfdZcCTy+FOjO6TgXWAS77lIfbZlRkl2eKQcdY0++jA=="],
+
+ "parse-conflict-json": ["[email protected]", "", { "dependencies": { "json-parse-even-better-errors": "^5.0.0", "just-diff": "^6.0.0", "just-diff-apply": "^5.2.0" } }, "sha512-ZHEmNKMq1wyJXNwLxyHnluPfRAFSIliBvbK/UiOceROt4Xh9Pz0fq49NytIaeaCUf5VR86hwQ/34FCcNU5/LKQ=="],
+
+ "path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
+
+ "path-scurry": ["[email protected]", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg=="],
+
+ "picomatch": ["[email protected]", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],
+
+ "postcss-selector-parser": ["[email protected]", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g=="],
+
+ "proc-log": ["[email protected]", "", {}, "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ=="],
+
+ "proggy": ["[email protected]", "", {}, "sha512-MbA4R+WQT76ZBm/5JUpV9yqcJt92175+Y0Bodg3HgiXzrmKu7Ggq+bpn6y6wHH+gN9NcyKn3yg1+d47VaKwNAQ=="],
+
+ "promise-all-reject-late": ["[email protected]", "", {}, "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw=="],
+
+ "promise-call-limit": ["[email protected]", "", {}, "sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw=="],
+
+ "protobufjs": ["[email protected]", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.1", "@protobufjs/fetch": "^1.1.1", "@protobufjs/float": "^1.0.2", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.3.2" } }, "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg=="],
+
+ "read-cmd-shim": ["[email protected]", "", {}, "sha512-1zM5HuOfagXCBWMN83fuFI/x+T/UhZ7k+KIzhrHXcQoeX5+7gmaDYjELQHmmzIodumBHeByBJT4QYS7ufAgs7A=="],
+
+ "require-directory": ["[email protected]", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
+
+ "require-from-string": ["[email protected]", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="],
+
+ "require-in-the-middle": ["[email protected]", "", { "dependencies": { "debug": "^4.3.5", "module-details-from-path": "^1.0.3" } }, "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ=="],
+
+ "safer-buffer": ["[email protected]", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
+
+ "semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "shebang-command": ["[email protected]", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
+
+ "shebang-regex": ["[email protected]", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
+
+ "signal-exit": ["[email protected]", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
+
+ "sigstore": ["[email protected]", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.2.1", "@sigstore/protobuf-specs": "^0.5.0", "@sigstore/sign": "^4.1.1", "@sigstore/tuf": "^4.0.2", "@sigstore/verify": "^3.1.1" } }, "sha512-endqECJkfhozrXMK5ngu/UAA0xVcVEFdnHJCElGaExypjW+HK5i6zu3NteLoaX/iFbRUbC3+DjttQs0GARr+5w=="],
+
+ "smart-buffer": ["[email protected]", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
+
+ "smol-toml": ["[email protected]", "", {}, "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ=="],
+
+ "socks": ["[email protected]", "", { "dependencies": { "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" } }, "sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ=="],
+
+ "socks-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
+
+ "source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
+
+ "source-map-support": ["[email protected]", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="],
+
+ "spdx-correct": ["[email protected]", "", { "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA=="],
+
+ "spdx-exceptions": ["[email protected]", "", {}, "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="],
+
+ "spdx-expression-parse": ["[email protected]", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ=="],
+
+ "spdx-license-ids": ["[email protected]", "", {}, "sha512-cLS9TtWkIQFyLkJ3/5aFQAOHOSKTlOs/7WDut/XPSdjom1fJhUdkepeJAKXa9Y05+FabHd0sti+Et559vDtkpQ=="],
+
+ "ssri": ["[email protected]", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-QUiRf1+u9wPTL/76GTYlKttDEBWV1ga9ZXW8BG6kfdeyyM8LGPix9gROyg9V2+P0xNyF3X2Go526xKFdMZrHSQ=="],
+
+ "string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "strip-final-newline": ["[email protected]", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="],
+
+ "tar": ["[email protected]", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA=="],
+
+ "tinyglobby": ["[email protected]", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="],
+
+ "treeverse": ["[email protected]", "", {}, "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ=="],
+
+ "tslib": ["[email protected]", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="],
+
+ "tuf-js": ["[email protected]", "", { "dependencies": { "@tufjs/models": "4.1.0", "debug": "^4.4.3", "make-fetch-happen": "^15.0.1" } }, "sha512-50QV99kCKH5P/Vs4E2Gzp7BopNV+KzTXqWeaxrfu5IQJBOULRsTIS9seSsOVT8ZnGXzCyx55nYWAi4qJzpZKEQ=="],
+
+ "typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
+
+ "undici": ["[email protected]", "", {}, "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA=="],
+
+ "undici-types": ["[email protected]", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
+
+ "upath": ["[email protected]", "", {}, "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="],
+
+ "util-deprecate": ["[email protected]", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
+
+ "validate-npm-package-license": ["[email protected]", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="],
+
+ "validate-npm-package-name": ["[email protected]", "", {}, "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A=="],
+
+ "walk-up-path": ["[email protected]", "", {}, "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A=="],
+
+ "which": ["[email protected]", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
+
+ "wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
+
+ "write-file-atomic": ["[email protected]", "", { "dependencies": { "signal-exit": "^4.0.1" } }, "sha512-OTIk8iR8/aCRWBqvxrzxR0hgxWpnYBblY1S5hDWBQfk/VFmJwzmJgQFN3WsoUKHISv2eAwe+PpbUzyL1CKTLXg=="],
+
+ "y18n": ["[email protected]", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="],
+
+ "yallist": ["[email protected]", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="],
+
+ "yargs": ["[email protected]", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g=="],
+
+ "yargs-parser": ["[email protected]", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
+
+ "@npmcli/git/ini": ["[email protected]", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="],
+
+ "@npmcli/git/which": ["[email protected]", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
+
+ "@npmcli/promise-spawn/which": ["[email protected]", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
+
+ "@opentelemetry/exporter-zipkin/@opentelemetry/sdk-trace": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.12.0", "@opentelemetry/resources": "2.12.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-ImVuRQ6faOsTi1Wna88s2avgrrf/iDgXPigIeynkUhjstMuoQUDOJXgkez2j1mlU4btjXcXBGa+q7qKFYR3GsA=="],
+
+ "@opentelemetry/otlp-exporter-base/@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
+
+ "@opentelemetry/otlp-grpc-exporter-base/@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
+
+ "@opentelemetry/otlp-transformer/@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
+
+ "@opentelemetry/otlp-transformer/@opentelemetry/resources": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg=="],
+
+ "@opentelemetry/sdk-logs/@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
+
+ "@opentelemetry/sdk-logs/@opentelemetry/resources": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg=="],
+
+ "@opentelemetry/sdk-metrics/@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
+
+ "@opentelemetry/sdk-metrics/@opentelemetry/resources": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg=="],
+
+ "@opentelemetry/sdk-trace/@opentelemetry/core": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
+
+ "@opentelemetry/sdk-trace/@opentelemetry/resources": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg=="],
+
+ "@opentelemetry/sdk-trace-base/@opentelemetry/sdk-trace": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/core": "2.12.0", "@opentelemetry/resources": "2.12.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-ImVuRQ6faOsTi1Wna88s2avgrrf/iDgXPigIeynkUhjstMuoQUDOJXgkez2j1mlU4btjXcXBGa+q7qKFYR3GsA=="],
+
+ "@pulumi/docker/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
+
+ "docker-classic/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
+
+ "minipass-flush/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-pipeline/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "node-gyp/which": ["[email protected]", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
+
+ "normalize-package-data/hosted-git-info": ["[email protected]", "", { "dependencies": { "lru-cache": "^10.0.1" } }, "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w=="],
+
+ "spdx-correct/spdx-expression-parse": ["[email protected]", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q=="],
+
+ "validate-npm-package-license/spdx-expression-parse": ["[email protected]", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q=="],
+
+ "write-file-atomic/signal-exit": ["[email protected]", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
+
+ "@npmcli/git/which/isexe": ["[email protected]", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
+ "@npmcli/promise-spawn/which/isexe": ["[email protected]", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
+ "minipass-flush/minipass/yallist": ["[email protected]", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
+
+ "minipass-pipeline/minipass/yallist": ["[email protected]", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
+
+ "node-gyp/which/isexe": ["[email protected]", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
+ "normalize-package-data/hosted-git-info/lru-cache": ["[email protected]", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
+ }
+}
diff --git a/connect/infra/index.ts b/connect/infra/index.ts
new file mode 100644
index 0000000000..9ac6dbc327
--- /dev/null
+++ b/connect/infra/index.ts
@@ -0,0 +1,433 @@
+import { readdirSync, readFileSync } from 'node:fs';
+import { join, resolve } from 'node:path';
+import * as aws from '@pulumi/aws';
+import * as awsx from '@pulumi/awsx';
+import * as pulumi from '@pulumi/pulumi';
+import { parse } from 'smol-toml';
+
+const stack = pulumi.getStack();
+if (stack !== 'dev' && stack !== 'prod') {
+ throw new Error('Only dev and prod stacks are supported');
+}
+const config = new pulumi.Config();
+const vpcId = config.require('vpcId');
+const publicSubnetIds = config.requireObject<string[]>('publicSubnetIds');
+const privateSubnetIds = config.requireObject<string[]>('privateSubnetIds');
+if (publicSubnetIds.length < 2 || privateSubnetIds.length < 2) {
+ throw new Error('At least two public and two private subnets are required');
+}
+const host = config.require('publicHost');
+const publicUrl = `https://${host}`;
+const tags = { project: 'macro-connect', environment: stack };
+const name = `macro-connect-${stack}`;
+const zoneId = 'Z0766278GIHB3CVV9CIL';
+const vpc = aws.ec2.getVpcOutput({ id: vpcId });
+
+// Keep own-app credentials in encrypted stack config and include only live apps.
+const registry = resolve(__dirname, '../registry/apps');
+const liveOwnApps = readdirSync(registry).filter((id) => {
+ const app = parse(readFileSync(join(registry, id, 'app.toml'), 'utf8'));
+ return app.status === 'live' && app.client_registration === 'own_app';
+});
+type OwnAppCredentials = Record<
+ string,
+ { clientId: string; clientSecret: string }
+>;
+const ownAppCredentials =
+ config.getSecretObject<OwnAppCredentials>('ownAppCredentials');
+if (liveOwnApps.length > 0 && !ownAppCredentials) {
+ throw new Error(
+ 'Live own-app entries require encrypted ownAppCredentials config',
+ );
+}
+const ownAppSecrets = pulumi
+ .all([
+ ownAppCredentials ?? pulumi.output({} as OwnAppCredentials),
+ pulumi.output(liveOwnApps),
+ ])
+ .apply(([credentials, ids]) => {
+ const result: Record<string, string> = {};
+ for (const id of ids) {
+ const client = credentials[id];
+ if (!client?.clientId || !client.clientSecret) {
+ throw new Error(`Missing own-app credentials for ${id}`);
+ }
+ const prefix = id.toUpperCase();
+ result[`${prefix}_CLIENT_ID`] = client.clientId;
+ result[`${prefix}_CLIENT_SECRET`] = client.clientSecret;
+ }
+ return result;
+ });
+
+const repository = new aws.ecr.Repository(`${name}-repo`, {
+ name,
+ imageScanningConfiguration: { scanOnPush: true },
+ tags,
+});
+const image = new awsx.ecr.Image(`${name}-image`, {
+ repositoryUrl: repository.repositoryUrl,
+ context: '../..',
+ dockerfile: '../../connect/services/connect_api/Dockerfile',
+ platform: 'linux/amd64',
+});
+const cluster = new aws.ecs.Cluster(`${name}-cluster`, { tags });
+const logs = new aws.cloudwatch.LogGroup(`${name}-logs`, {
+ name: `/ecs/${name}`,
+ retentionInDays: stack === 'prod' ? 30 : 7,
+ tags,
+});
+
+const assumeTask = JSON.stringify({
+ Version: '2012-10-17',
+ Statement: [
+ {
+ Effect: 'Allow',
+ Principal: { Service: 'ecs-tasks.amazonaws.com' },
+ Action: 'sts:AssumeRole',
+ },
+ ],
+});
+const taskRole = new aws.iam.Role(`${name}-task-role`, {
+ assumeRolePolicy: assumeTask,
+ tags,
+});
+const executionRole = new aws.iam.Role(`${name}-execution-role`, {
+ assumeRolePolicy: assumeTask,
+ tags,
+});
+new aws.iam.RolePolicyAttachment(`${name}-execution-base`, {
+ role: executionRole.name,
+ policyArn:
+ 'arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy',
+});
+
+const account = aws.getCallerIdentityOutput();
+const grantKey = new aws.kms.Key(
+ `${name}-grants`,
+ {
+ description: 'Macro Connect grant envelope key',
+ enableKeyRotation: true,
+ deletionWindowInDays: 30,
+ tags,
+ policy: pulumi.jsonStringify({
+ Version: '2012-10-17',
+ Statement: [
+ {
+ Sid: 'Administration',
+ Effect: 'Allow',
+ Principal: {
+ AWS: pulumi.interpolate`arn:aws:iam::${account.accountId}:root`,
+ },
+ Action: [
+ 'kms:Create*',
+ 'kms:Describe*',
+ 'kms:Enable*',
+ 'kms:List*',
+ 'kms:Put*',
+ 'kms:Update*',
+ 'kms:Revoke*',
+ 'kms:Disable*',
+ 'kms:Get*',
+ 'kms:Delete*',
+ 'kms:TagResource',
+ 'kms:UntagResource',
+ 'kms:ScheduleKeyDeletion',
+ 'kms:CancelKeyDeletion',
+ ],
+ Resource: '*',
+ },
+ {
+ Sid: 'TaskCryptography',
+ Effect: 'Allow',
+ Principal: { AWS: taskRole.arn },
+ Action: ['kms:Encrypt', 'kms:Decrypt', 'kms:GenerateDataKey'],
+ Resource: '*',
+ },
+ ],
+ }),
+ },
+ { protect: stack === 'prod' },
+);
+new aws.iam.RolePolicy(`${name}-task-kms`, {
+ role: taskRole.name,
+ policy: pulumi.jsonStringify({
+ Version: '2012-10-17',
+ Statement: [
+ {
+ Effect: 'Allow',
+ Action: ['kms:Encrypt', 'kms:Decrypt', 'kms:GenerateDataKey'],
+ Resource: grantKey.arn,
+ },
+ ],
+ }),
+});
+
+const albSg = new aws.ec2.SecurityGroup(`${name}-alb-sg`, {
+ vpcId: vpc.id,
+ egress: [],
+ tags,
+});
+const taskSg = new aws.ec2.SecurityGroup(`${name}-task-sg`, {
+ vpcId: vpc.id,
+ egress: [],
+ tags,
+});
+const dbSg = new aws.ec2.SecurityGroup(`${name}-db-sg`, {
+ vpcId: vpc.id,
+ egress: [],
+ tags,
+});
+for (const port of [80, 443]) {
+ new aws.vpc.SecurityGroupIngressRule(`${name}-alb-${port}`, {
+ securityGroupId: albSg.id,
+ ipProtocol: 'tcp',
+ fromPort: port,
+ toPort: port,
+ cidrIpv4: '0.0.0.0/0',
+ tags,
+ });
+}
+new aws.vpc.SecurityGroupEgressRule(`${name}-alb-to-task`, {
+ securityGroupId: albSg.id,
+ ipProtocol: 'tcp',
+ fromPort: 8080,
+ toPort: 8080,
+ referencedSecurityGroupId: taskSg.id,
+ tags,
+});
+new aws.vpc.SecurityGroupIngressRule(`${name}-task-from-alb`, {
+ securityGroupId: taskSg.id,
+ ipProtocol: 'tcp',
+ fromPort: 8080,
+ toPort: 8080,
+ referencedSecurityGroupId: albSg.id,
+ tags,
+});
+new aws.vpc.SecurityGroupEgressRule(`${name}-task-out`, {
+ securityGroupId: taskSg.id,
+ ipProtocol: '-1',
+ cidrIpv4: '0.0.0.0/0',
+ tags,
+});
+new aws.vpc.SecurityGroupIngressRule(`${name}-db-from-task`, {
+ securityGroupId: dbSg.id,
+ ipProtocol: 'tcp',
+ fromPort: 5432,
+ toPort: 5432,
+ referencedSecurityGroupId: taskSg.id,
+ tags,
+});
+
+const dbSubnets = new aws.rds.SubnetGroup(`${name}-db-subnets`, {
+ subnetIds: privateSubnetIds,
+ tags,
+});
+const database = new aws.rds.Instance(
+ `${name}-db`,
+ {
+ identifier: `${name}-db`,
+ engine: 'postgres',
+ engineVersion: '17',
+ instanceClass: stack === 'prod' ? 'db.t4g.small' : 'db.t4g.micro',
+ allocatedStorage: 20,
+ storageType: 'gp3',
+ storageEncrypted: true,
+ dbName: 'macro_connect',
+ username: 'connect_api',
+ manageMasterUserPassword: true,
+ dbSubnetGroupName: dbSubnets.name,
+ vpcSecurityGroupIds: [dbSg.id],
+ publiclyAccessible: false,
+ backupRetentionPeriod: stack === 'prod' ? 14 : 7,
+ deletionProtection: stack === 'prod',
+ skipFinalSnapshot: stack !== 'prod',
+ finalSnapshotIdentifier: stack === 'prod' ? `${name}-db-final` : undefined,
+ tags,
+ },
+ { protect: stack === 'prod' },
+);
+const dbSecretArn = database.masterUserSecrets.apply((secrets) => {
+ if (secrets.length !== 1) throw new Error('RDS master secret is missing');
+ return secrets[0].secretArn;
+});
+const dbSecret = aws.secretsmanager.getSecretVersionOutput({
+ secretId: dbSecretArn,
+});
+const databaseUrl = pulumi.secret(
+ pulumi
+ .all([database.address, dbSecret.secretString])
+ .apply(([address, secret]) => {
+ const credentials = JSON.parse(secret) as { password: string };
+ return `postgresql://connect_api:${encodeURIComponent(credentials.password)}@${address}:5432/macro_connect`;
+ }),
+);
+const runtimeSecret = new aws.secretsmanager.Secret(`${name}-runtime`, {
+ name: `${name}-runtime`,
+ tags,
+});
+const runtimeSecretVersion = new aws.secretsmanager.SecretVersion(
+ `${name}-runtime-version`,
+ {
+ secretId: runtimeSecret.id,
+ secretString: pulumi.secret(
+ pulumi
+ .all([databaseUrl, grantKey.keyId, ownAppSecrets])
+ .apply(([url, keyId, ownApps]) =>
+ JSON.stringify({
+ DATABASE_URL: url,
+ CONNECT_KMS_KEY_ID: keyId,
+ CONNECT_PUBLIC_URL: publicUrl,
+ ...ownApps,
+ }),
+ ),
+ ),
+ },
+);
+new aws.iam.RolePolicy(`${name}-execution-secret`, {
+ role: executionRole.name,
+ policy: pulumi.jsonStringify({
+ Version: '2012-10-17',
+ Statement: [
+ {
+ Effect: 'Allow',
+ Action: 'secretsmanager:GetSecretValue',
+ Resource: runtimeSecret.arn,
+ },
+ ],
+ }),
+});
+
+const certificate = new aws.acm.Certificate(`${name}-cert`, {
+ domainName: host,
+ validationMethod: 'DNS',
+ tags,
+});
+const dnsValidation = certificate.domainValidationOptions.apply((options) => {
+ if (options.length !== 1)
+ throw new Error('Expected one DNS validation record');
+ const option = options[0];
+ return new aws.route53.Record(`${name}-cert-dns`, {
+ zoneId,
+ name: option.resourceRecordName,
+ type: option.resourceRecordType,
+ records: [option.resourceRecordValue],
+ ttl: 60,
+ });
+});
+const certificateValidation = new aws.acm.CertificateValidation(
+ `${name}-cert-valid`,
+ {
+ certificateArn: certificate.arn,
+ validationRecordFqdns: dnsValidation.apply((record) => [record.fqdn]),
+ },
+);
+const alb = new aws.lb.LoadBalancer(`${name}-alb`, {
+ loadBalancerType: 'application',
+ internal: false,
+ subnets: publicSubnetIds,
+ securityGroups: [albSg.id],
+ enableDeletionProtection: stack === 'prod',
+ tags,
+});
+const target = new aws.lb.TargetGroup(`${name}-target`, {
+ port: 8080,
+ protocol: 'HTTP',
+ targetType: 'ip',
+ vpcId: vpc.id,
+ healthCheck: { path: '/health', protocol: 'HTTP', matcher: '200' },
+ tags,
+});
+new aws.lb.Listener(`${name}-http`, {
+ loadBalancerArn: alb.arn,
+ port: 80,
+ protocol: 'HTTP',
+ defaultActions: [
+ {
+ type: 'redirect',
+ redirect: {
+ port: '443',
+ protocol: 'HTTPS',
+ statusCode: 'HTTP_301',
+ },
+ },
+ ],
+ tags,
+});
+const https = new aws.lb.Listener(`${name}-https`, {
+ loadBalancerArn: alb.arn,
+ port: 443,
+ protocol: 'HTTPS',
+ certificateArn: certificateValidation.certificateArn,
+ sslPolicy: 'ELBSecurityPolicy-TLS13-1-2-2021-06',
+ defaultActions: [{ type: 'forward', targetGroupArn: target.arn }],
+ tags,
+});
+new aws.route53.Record(`${name}-alias`, {
+ zoneId,
+ name: host,
+ type: 'A',
+ aliases: [
+ { name: alb.dnsName, zoneId: alb.zoneId, evaluateTargetHealth: true },
+ ],
+});
+
+const task = new aws.ecs.TaskDefinition(`${name}-task`, {
+ family: name,
+ cpu: '256',
+ memory: '512',
+ networkMode: 'awsvpc',
+ requiresCompatibilities: ['FARGATE'],
+ taskRoleArn: taskRole.arn,
+ executionRoleArn: executionRole.arn,
+ containerDefinitions: pulumi.jsonStringify([
+ {
+ name: 'connect_api',
+ image: image.imageUri,
+ essential: true,
+ portMappings: [{ containerPort: 8080, protocol: 'tcp' }],
+ secrets: [
+ {
+ name: 'APP_SECRETS_JSON',
+ valueFrom: pulumi.interpolate`${runtimeSecret.arn}:::${runtimeSecretVersion.versionId}`,
+ },
+ ],
+ logConfiguration: {
+ logDriver: 'awslogs',
+ options: {
+ 'awslogs-group': logs.name,
+ 'awslogs-region': aws.config.region ?? 'us-east-1',
+ 'awslogs-stream-prefix': 'connect_api',
+ },
+ },
+ },
+ ]),
+ tags,
+});
+const service = new aws.ecs.Service(
+ `${name}-service`,
+ {
+ cluster: cluster.arn,
+ taskDefinition: task.arn,
+ desiredCount: 1,
+ launchType: 'FARGATE',
+ deploymentCircuitBreaker: { enable: true, rollback: true },
+ networkConfiguration: {
+ subnets: privateSubnetIds,
+ securityGroups: [taskSg.id],
+ assignPublicIp: false,
+ },
+ loadBalancers: [
+ {
+ targetGroupArn: target.arn,
+ containerName: 'connect_api',
+ containerPort: 8080,
+ },
+ ],
+ tags,
+ },
+ { dependsOn: [https, runtimeSecretVersion] },
+);
+
+export const connectUrl = publicUrl;
+export const clusterArn = cluster.arn;
+export const serviceArn = service.id;
diff --git a/connect/infra/package.json b/connect/infra/package.json
new file mode 100644
index 0000000000..6b596013da
--- /dev/null
+++ b/connect/infra/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "macro-connect-infra",
+ "private": true,
+ "scripts": {
+ "check": "tsc --noEmit && biome check ."
+ },
+ "dependencies": {
+ "@pulumi/aws": "^7.34.0",
+ "@pulumi/awsx": "^3.1.0",
+ "@pulumi/pulumi": "^3.209.0",
+ "smol-toml": "^1.5.2"
+ },
+ "devDependencies": {
+ "@biomejs/biome": "2.4.12",
+ "@types/node": "^20.8.10",
+ "typescript": "^5.2.2"
+ },
+ "packageManager": "[email protected]"
+}
diff --git a/connect/infra/tsconfig.json b/connect/infra/tsconfig.json
new file mode 100644
index 0000000000..3fce6b2830
--- /dev/null
+++ b/connect/infra/tsconfig.json
@@ -0,0 +1,13 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "CommonJS",
+ "moduleResolution": "Node",
+ "strict": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "types": ["node"]
+ },
+ "include": ["index.ts"]
+}
diff --git a/connect/registry/apps/airtable/app.toml b/connect/registry/apps/airtable/app.toml
new file mode 100644
index 0000000000..ea40797fde
--- /dev/null
+++ b/connect/registry/apps/airtable/app.toml
@@ -0,0 +1,10 @@
+id = "airtable"
+name = "Airtable"
+description = "Read and update bases, tables, and records."
+access = ["mcp"]
+mcp_url = "https://mcp.airtable.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["airtable_oauth"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/airtable/icon.svg b/connect/registry/apps/airtable/icon.svg
new file mode 100644
index 0000000000..df8575e529
--- /dev/null
+++ b/connect/registry/apps/airtable/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Airtable</title><path d="M11.992 1.966c-.434 0-.87.086-1.28.257L1.779 5.917c-.503.208-.49.908.012 1.116l8.982 3.558a3.266 3.266 0 0 0 2.454 0l8.982-3.558c.503-.196.503-.908.012-1.116l-8.957-3.694a3.255 3.255 0 0 0-1.272-.257zM23.4 8.056a.589.589 0 0 0-.222.045l-10.012 3.877a.612.612 0 0 0-.38.564v8.896a.6.6 0 0 0 .821.552L23.62 18.1a.583.583 0 0 0 .38-.551V8.653a.6.6 0 0 0-.6-.596zM.676 8.095a.644.644 0 0 0-.48.19C.086 8.396 0 8.53 0 8.69v8.355c0 .442.515.737.908.54l6.27-3.006.307-.147 2.969-1.436c.466-.22.43-.908-.061-1.092L.883 8.138a.57.57 0 0 0-.207-.044z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/apollo/app.toml b/connect/registry/apps/apollo/app.toml
new file mode 100644
index 0000000000..be69773ed1
--- /dev/null
+++ b/connect/registry/apps/apollo/app.toml
@@ -0,0 +1,10 @@
+id = "apollo"
+name = "Apollo"
+description = "Search people and companies and manage sequences."
+access = ["mcp"]
+mcp_url = "https://mcp.apollo.io/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["apollo_io_oauth"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/attio/app.toml b/connect/registry/apps/attio/app.toml
new file mode 100644
index 0000000000..1fc7b9648d
--- /dev/null
+++ b/connect/registry/apps/attio/app.toml
@@ -0,0 +1,10 @@
+id = "attio"
+name = "Attio"
+description = "Search and update CRM records, lists, and notes."
+access = ["mcp"]
+mcp_url = "https://mcp.attio.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["attio"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/attio/icon.svg b/connect/registry/apps/attio/icon.svg
new file mode 100644
index 0000000000..02c1a64fc2
--- /dev/null
+++ b/connect/registry/apps/attio/icon.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="37" height="30" fill="none" viewBox="0 0 37 30">
+ <path fill="#000"
+ d="m35.705 20.45-3.014-4.778s-.011-.02-.018-.029l-.238-.375a2.44 2.44 0 0 0-2.072-1.142l-4.854-.015-.34.537-5.8 9.195-.32.509 2.43 3.846a2.43 2.43 0 0 0 2.079 1.142h6.803c.839 0 1.633-.438 2.077-1.14l.24-.38s.009-.01.01-.015l3.02-4.784a2.41 2.41 0 0 0 0-2.572zm-.92 2-3.018 4.784q-.021.032-.042.058a.41.41 0 0 1-.652-.06l-3.02-4.784a1.3 1.3 0 0 1-.154-.344 1.37 1.37 0 0 1 0-.737c.034-.118.085-.236.152-.342l3.014-4.78.007-.01a.38.38 0 0 1 .24-.172c.031-.009.058-.011.08-.015h.034c.07 0 .243.022.35.195l3.014 4.777a1.34 1.34 0 0 1 0 1.43zM26.786 8.89a2.42 2.42 0 0 0 0-2.572l-3.014-4.777-.251-.402A2.44 2.44 0 0 0 21.442 0H14.64c-.85 0-1.626.426-2.08 1.142L.378 20.452A2.4 2.4 0 0 0 0 21.738c0 .453.13.9.374 1.284l3.268 5.181a2.44 2.44 0 0 0 2.076 1.14h6.804c.854 0 1.63-.427 2.079-1.142l.248-.391v-.005s.005-.006.005-.008l2.429-3.847 7.198-11.409 2.3-3.649zm-.71-1.286c0 .247-.07.496-.212.715L13.93 27.237a.41.41 0 0 1-.35.19c-.07 0-.24-.02-.35-.19l-3.016-4.786a1.35 1.35 0 0 1 0-1.428L22.15 2.11a.41.41 0 0 1 .35-.193c.069 0 .242.02.352.195l3.013 4.777c.142.22.211.469.211.715" />
+</svg>
\ No newline at end of file
diff --git a/connect/registry/apps/calendly/app.toml b/connect/registry/apps/calendly/app.toml
new file mode 100644
index 0000000000..647cd1d212
--- /dev/null
+++ b/connect/registry/apps/calendly/app.toml
@@ -0,0 +1,10 @@
+id = "calendly"
+name = "Calendly"
+description = "See event types and availability, and manage bookings."
+access = ["mcp"]
+mcp_url = "https://mcp.calendly.com"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["calendly_v2"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/calendly/icon.svg b/connect/registry/apps/calendly/icon.svg
new file mode 100644
index 0000000000..943dc88246
--- /dev/null
+++ b/connect/registry/apps/calendly/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Calendly</title><path d="M19.655 14.262c.281 0 .557.023.828.064 0 .005-.005.01-.005.014-.105.267-.234.534-.381.786l-1.219 2.106c-1.112 1.936-3.177 3.127-5.411 3.127h-2.432c-2.23 0-4.294-1.191-5.412-3.127l-1.218-2.106a6.251 6.251 0 0 1 0-6.252l1.218-2.106C6.736 4.832 8.8 3.641 11.035 3.641h2.432c2.23 0 4.294 1.191 5.411 3.127l1.219 2.106c.147.252.271.519.381.786 0 .004.005.009.005.014-.267.041-.543.064-.828.064-1.816 0-2.501-.607-3.291-1.306-.764-.676-1.711-1.517-3.44-1.517h-1.029c-1.251 0-2.387.455-3.2 1.278-.796.805-1.233 1.904-1.233 3.099v1.411c0 1.196.437 2.295 1.233 3.099.813.823 1.949 1.278 3.2 1.278h1.034c1.729 0 2.676-.841 3.439-1.517.791-.703 1.471-1.306 3.287-1.301Zm.005-3.237c.399 0 .794-.036 1.179-.11-.002-.004-.002-.01-.002-.014-.073-.414-.193-.823-.349-1.218.731-.12 1.407-.396 1.986-.819 0-.004-.005-.013-.005-.018-.331-1.085-.832-2.101-1.489-3.03-.649-.915-1.435-1.719-2.331-2.395-1.867-1.398-4.088-2.138-6.428-2.138-1.448 0-2.855.28-4.175.841-1.273.543-2.423 1.315-3.407 2.299S2.878 6.552 2.341 7.83c-.557 1.324-.842 2.726-.842 4.175 0 1.448.281 2.855.842 4.174.542 1.274 1.314 2.423 2.298 3.407s2.129 1.761 3.407 2.299c1.324.556 2.727.841 4.175.841 2.34 0 4.561-.74 6.428-2.137a10.815 10.815 0 0 0 2.331-2.396c.652-.929 1.158-1.949 1.489-3.03 0-.004.005-.014.005-.018-.579-.423-1.255-.699-1.986-.819.161-.395.276-.804.349-1.218.005-.009.005-.014.005-.023.869.166 1.692.506 2.404 1.035.685.505.552 1.075.446 1.416C22.184 20.437 17.619 24 12.221 24c-6.625 0-12-5.375-12-12s5.37-12 12-12c5.398 0 9.963 3.563 11.471 8.464.106.341.239.915-.446 1.421-.717.529-1.535.873-2.404 1.034.128.716.128 1.45 0 2.166-.387-.074-.782-.11-1.182-.11-4.184 0-3.968 2.823-6.736 2.823h-1.029c-1.899 0-3.15-1.357-3.15-3.095v-1.411c0-1.738 1.251-3.094 3.15-3.094h1.034c2.768 0 2.552 2.823 6.731 2.827Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/canva/app.toml b/connect/registry/apps/canva/app.toml
new file mode 100644
index 0000000000..8daaeffb57
--- /dev/null
+++ b/connect/registry/apps/canva/app.toml
@@ -0,0 +1,10 @@
+id = "canva"
+name = "Canva"
+description = "Search, create, and export designs."
+access = ["mcp"]
+mcp_url = "https://mcp.canva.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["canva"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/canva/icon.svg b/connect/registry/apps/canva/icon.svg
new file mode 100644
index 0000000000..b969fd131e
--- /dev/null
+++ b/connect/registry/apps/canva/icon.svg
@@ -0,0 +1,27 @@
+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z" fill="#7D2AE7"/>
+<path d="M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z" fill="url(#paint0_radial_1_40)"/>
+<path d="M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z" fill="url(#paint1_radial_1_40)"/>
+<path d="M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z" fill="url(#paint2_radial_1_40)"/>
+<path d="M32 64C49.6731 64 64 49.6731 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z" fill="url(#paint3_radial_1_40)"/>
+<path d="M45.8152 38.5644C45.5511 38.5644 45.3187 38.7874 45.0769 39.2745C42.3458 44.8125 37.6286 48.731 32.17 48.731C25.8582 48.731 21.9495 43.0333 21.9495 35.1619C21.9495 21.8286 29.3785 14.1195 35.9037 14.1195C38.9527 14.1195 40.8148 16.0357 40.8148 19.0849C40.8148 22.7039 38.7587 24.62 38.7587 25.8964C38.7587 26.4693 39.1151 26.8162 39.8218 26.8162C42.661 26.8162 45.9934 23.5538 45.9934 18.9449C45.9934 14.476 42.1039 11.1912 35.5789 11.1912C24.7951 11.1912 15.2113 21.1888 15.2113 35.0218C15.2113 45.7294 21.3257 52.8051 30.7599 52.8051C40.7734 52.8051 46.5634 42.8423 46.5634 39.6086C46.5634 38.8925 46.1972 38.5644 45.8152 38.5644Z" fill="white"/>
+<defs>
+<radialGradient id="paint0_radial_1_40" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.3621 56.7242) rotate(-49.4156) scale(49.4986)">
+<stop stop-color="#6420FF"/>
+<stop offset="1" stop-color="#6420FF" stop-opacity="0"/>
+</radialGradient>
+<radialGradient id="paint1_radial_1_40" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(16.9432 7.27579) rotate(54.7035) scale(55.8188)">
+<stop stop-color="#00C4CC"/>
+<stop offset="1" stop-color="#00C4CC" stop-opacity="0"/>
+</radialGradient>
+<radialGradient id="paint2_radial_1_40" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.3621 56.7242) rotate(-45.1954) scale(48.8994 22.4895)">
+<stop stop-color="#6420FF"/>
+<stop offset="1" stop-color="#6420FF" stop-opacity="0"/>
+</radialGradient>
+<radialGradient id="paint3_radial_1_40" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(26.1726 8.62316) rotate(66.5198) scale(50.3869 84.4093)">
+<stop stop-color="#00C4CC" stop-opacity="0.725916"/>
+<stop offset="0.0001" stop-color="#00C4CC"/>
+<stop offset="1" stop-color="#00C4CC" stop-opacity="0"/>
+</radialGradient>
+</defs>
+</svg>
diff --git a/connect/registry/apps/clickup/app.toml b/connect/registry/apps/clickup/app.toml
new file mode 100644
index 0000000000..ccc25f7788
--- /dev/null
+++ b/connect/registry/apps/clickup/app.toml
@@ -0,0 +1,10 @@
+id = "clickup"
+name = "ClickUp"
+description = "Search and update tasks, lists, and docs."
+access = ["mcp"]
+mcp_url = "https://mcp.clickup.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["clickup"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/clickup/icon.svg b/connect/registry/apps/clickup/icon.svg
new file mode 100644
index 0000000000..4bf99cfd82
--- /dev/null
+++ b/connect/registry/apps/clickup/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>ClickUp</title><path d="M2 18.439l3.69-2.828c1.961 2.56 4.044 3.739 6.363 3.739 2.307 0 4.33-1.166 6.203-3.704L22 18.405C19.298 22.065 15.941 24 12.053 24 8.178 24 4.788 22.078 2 18.439zM12.04 6.15l-6.568 5.66-3.036-3.52L12.055 0l9.543 8.296-3.05 3.509z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/cloudflare/app.toml b/connect/registry/apps/cloudflare/app.toml
new file mode 100644
index 0000000000..8928f781fe
--- /dev/null
+++ b/connect/registry/apps/cloudflare/app.toml
@@ -0,0 +1,10 @@
+id = "cloudflare"
+name = "Cloudflare"
+description = "Manage Workers, DNS, and other Cloudflare resources."
+access = ["mcp"]
+mcp_url = "https://mcp.cloudflare.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["cloudflare_api_key"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/cloudflare/icon.svg b/connect/registry/apps/cloudflare/icon.svg
new file mode 100644
index 0000000000..a1cf2d6d3d
--- /dev/null
+++ b/connect/registry/apps/cloudflare/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/coda/app.toml b/connect/registry/apps/coda/app.toml
new file mode 100644
index 0000000000..1e8af0618e
--- /dev/null
+++ b/connect/registry/apps/coda/app.toml
@@ -0,0 +1,10 @@
+id = "coda"
+name = "Coda"
+description = "Read and edit docs, pages, and tables."
+access = ["mcp"]
+mcp_url = "https://coda.io/apis/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["coda"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/coda/icon.svg b/connect/registry/apps/coda/icon.svg
new file mode 100644
index 0000000000..5d061565c9
--- /dev/null
+++ b/connect/registry/apps/coda/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Coda</title><path d="M21.194 0H2.806A2.01 2.01 0 0 0 .8 2v20c0 1.1.903 2 2.006 2h18.388a2.01 2.01 0 0 0 2.006-2v-.933c-.033-1.2-.067-3.7-.067-4.834 0-.633-.468-1.166-1.07-1.166-.668 0-1.103.4-1.437.733-1.003.9-2.508 1.067-3.812.833-.601-.133-1.17-.3-1.638-.6-1.438-.833-2.374-2.4-2.374-4.066 0-1.667.936-3.2 2.374-4.067.502-.3 1.07-.467 1.638-.6 1.27-.233 2.809-.067 3.812.833.367.334.802.734 1.437.734.602 0 1.07-.534 1.07-1.167 0-1.1.034-3.633.067-4.833V2c0-1.1-.903-2-2.006-2Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/confluence/app.toml b/connect/registry/apps/confluence/app.toml
new file mode 100644
index 0000000000..d56750ec5e
--- /dev/null
+++ b/connect/registry/apps/confluence/app.toml
@@ -0,0 +1,10 @@
+id = "confluence"
+name = "Confluence"
+description = "Search, read, and write Confluence pages through Atlassian's server."
+access = ["mcp"]
+mcp_url = "https://mcp.atlassian.com/v1/mcp/authv2"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["confluence"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/confluence/icon.svg b/connect/registry/apps/confluence/icon.svg
new file mode 100644
index 0000000000..2ac98a7dff
--- /dev/null
+++ b/connect/registry/apps/confluence/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Confluence</title><path d="M.87 18.257c-.248.382-.53.875-.763 1.245a.764.764 0 0 0 .255 1.04l4.965 3.054a.764.764 0 0 0 1.058-.26c.199-.332.454-.763.733-1.221 1.967-3.247 3.945-2.853 7.508-1.146l4.957 2.337a.764.764 0 0 0 1.028-.382l2.364-5.346a.764.764 0 0 0-.382-1 599.851 599.851 0 0 1-4.965-2.361C10.911 10.97 5.224 11.185.87 18.257zM23.131 5.743c.249-.405.531-.875.764-1.25a.764.764 0 0 0-.256-1.034L18.675.404a.764.764 0 0 0-1.058.26c-.195.335-.451.763-.734 1.225-1.966 3.246-3.945 2.85-7.508 1.146L4.437.694a.764.764 0 0 0-1.027.382L1.046 6.422a.764.764 0 0 0 .382 1c1.039.49 3.105 1.467 4.965 2.361 6.698 3.246 12.392 3.029 16.738-4.04z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/datadog/app.toml b/connect/registry/apps/datadog/app.toml
new file mode 100644
index 0000000000..be85b88d00
--- /dev/null
+++ b/connect/registry/apps/datadog/app.toml
@@ -0,0 +1,10 @@
+id = "datadog"
+name = "Datadog"
+description = "Query metrics, logs, traces, monitors, and incidents."
+access = ["mcp"]
+mcp_url = "https://mcp.datadoghq.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["datadog"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/datadog/icon.svg b/connect/registry/apps/datadog/icon.svg
new file mode 100644
index 0000000000..fafc6d5ccf
--- /dev/null
+++ b/connect/registry/apps/datadog/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Datadog</title><path d="M19.57 17.04l-1.997-1.316-1.665 2.782-1.937-.567-1.706 2.604.087.82 9.274-1.71-.538-5.794zm-8.649-2.498l1.488-.204c.241.108.409.15.697.223.45.117.97.23 1.741-.16.18-.088.553-.43.704-.625l6.096-1.106.622 7.527-10.444 1.882zm11.325-2.712l-.602.115L20.488 0 .789 2.285l2.427 19.693 2.306-.334c-.184-.263-.471-.581-.96-.989-.68-.564-.44-1.522-.039-2.127.53-1.022 3.26-2.322 3.106-3.956-.056-.594-.15-1.368-.702-1.898-.02.22.017.432.017.432s-.227-.289-.34-.683c-.112-.15-.2-.199-.319-.4-.085.233-.073.503-.073.503s-.186-.437-.216-.807c-.11.166-.137.48-.137.48s-.241-.69-.186-1.062c-.11-.323-.436-.965-.343-2.424.6.421 1.924.321 2.44-.439.171-.251.288-.939-.086-2.293-.24-.868-.835-2.16-1.066-2.651l-.028.02c.122.395.374 1.223.47 1.625.293 1.218.372 1.642.234 2.204-.116.488-.397.808-1.107 1.165-.71.358-1.653-.514-1.713-.562-.69-.55-1.224-1.447-1.284-1.883-.062-.477.275-.763.445-1.153-.243.07-.514.192-.514.192s.323-.334.722-.624c.165-.109.262-.178.436-.323a9.762 9.762 0 0 0-.456.003s.42-.227.855-.392c-.318-.014-.623-.003-.623-.003s.937-.419 1.678-.727c.509-.208 1.006-.147 1.286.257.367.53.752.817 1.569.996.501-.223.653-.337 1.284-.509.554-.61.99-.688.99-.688s-.216.198-.274.51c.314-.249.66-.455.66-.455s-.134.164-.259.426l.03.043c.366-.22.797-.394.797-.394s-.123.156-.268.358c.277-.002.838.012 1.056.037 1.285.028 1.552-1.374 2.045-1.55.618-.22.894-.353 1.947.68.903.888 1.609 2.477 1.259 2.833-.294.295-.874-.115-1.516-.916a3.466 3.466 0 0 1-.716-1.562 1.533 1.533 0 0 0-.497-.85s.23.51.23.96c0 .246.03 1.165.424 1.68-.039.076-.057.374-.1.43-.458-.554-1.443-.95-1.604-1.067.544.445 1.793 1.468 2.273 2.449.453.927.186 1.777.416 1.997.065.063.976 1.197 1.15 1.767.306.994.019 2.038-.381 2.685l-1.117.174c-.163-.045-.273-.068-.42-.153.08-.143.241-.5.243-.572l-.063-.111c-.348.492-.93.97-1.414 1.245-.633.359-1.363.304-1.838.156-1.348-.415-2.623-1.327-2.93-1.566 0 0-.01.191.048.234.34.383 1.119 1.077 1.872 1.56l-1.605.177.759 5.908c-.337.048-.39.071-.757.124-.325-1.147-.946-1.895-1.624-2.332-.599-.384-1.424-.47-2.214-.314l-.05.059a2.851 2.851 0 0 1 1.863.444c.654.413 1.181 1.481 1.375 2.124.248.822.42 1.7-.248 2.632-.476.662-1.864 1.028-2.986.237.3.481.705.876 1.25.95.809.11 1.577-.03 2.106-.574.452-.464.69-1.434.628-2.456l.714-.104.258 1.834 11.827-1.424zM15.05 6.848c-.034.075-.085.125-.007.37l.004.014.013.032.032.073c.14.287.295.558.552.696.067-.011.136-.019.207-.023.242-.01.395.028.492.08.009-.048.01-.119.005-.222-.018-.364.072-.982-.626-1.308-.264-.122-.634-.084-.757.068a.302.302 0 0 1 .058.013c.186.066.06.13.027.207m1.958 3.392c-.092-.05-.52-.03-.821.005-.574.068-1.193.267-1.328.372-.247.191-.135.523.047.66.511.382.96.638 1.432.575.29-.038.546-.497.728-.914.124-.288.124-.598-.058-.698m-5.077-2.942c.162-.154-.805-.355-1.556.156-.554.378-.571 1.187-.041 1.646.053.046.096.078.137.104a4.77 4.77 0 0 1 1.396-.412c.113-.125.243-.345.21-.745-.044-.542-.455-.456-.146-.749"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/dropbox/app.toml b/connect/registry/apps/dropbox/app.toml
new file mode 100644
index 0000000000..f67bd2d5db
--- /dev/null
+++ b/connect/registry/apps/dropbox/app.toml
@@ -0,0 +1,10 @@
+id = "dropbox"
+name = "Dropbox"
+description = "Search, read, and organize files and folders."
+access = ["mcp"]
+mcp_url = "https://mcp.dropbox.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["dropbox"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/dropbox/icon.svg b/connect/registry/apps/dropbox/icon.svg
new file mode 100644
index 0000000000..8faa251731
--- /dev/null
+++ b/connect/registry/apps/dropbox/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Dropbox</title><path d="M6 1.807L0 5.629l6 3.822 6.001-3.822L6 1.807zM18 1.807l-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zM18 9.452l-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/fathom/app.toml b/connect/registry/apps/fathom/app.toml
new file mode 100644
index 0000000000..a14213445f
--- /dev/null
+++ b/connect/registry/apps/fathom/app.toml
@@ -0,0 +1,10 @@
+id = "fathom"
+name = "Fathom"
+description = "Search meeting recordings, summaries, and action items."
+access = ["mcp"]
+mcp_url = "https://api.fathom.ai/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["fathom"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/fathom/icon.svg b/connect/registry/apps/fathom/icon.svg
new file mode 100644
index 0000000000..3a2025e31c
--- /dev/null
+++ b/connect/registry/apps/fathom/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Fathom</title><path d="M14.185 0c-1.702.008-3.693.467-6.068 1.331C.115 4.244-1.581 7.881 1.33 15.883c2.912 8.002 6.55 9.698 14.552 6.786 8.002-2.913 9.699-6.55 6.786-14.552C20.62 2.491 18.214-.018 14.185 0zm2.77 6.57h1.253a.25.25 0 01.199.098.25.25 0 01.043.217L15.672 17.22a.25.25 0 01-.241.186h-1.254a.25.25 0 01-.242-.315l.169-.628.123-.457 2.486-9.252a.25.25 0 01.241-.185zm-9.184.808h.504a.25.25 0 01.25.25v.844a.25.25 0 01-.25.25h-.428a1.7 1.7 0 00-.258.012.221.221 0 00-.12.048.197.197 0 00-.049.078.886.886 0 00-.043.315v.641h.898a.25.25 0 01.25.25v.844a.25.25 0 01-.25.25h-.898v5.094a.25.25 0 01-.25.25h-.985a.25.25 0 01-.25-.25v-7.23a1.723 1.723 0 01.169-.78 1.395 1.395 0 01.453-.523c.37-.257.826-.341 1.257-.343zm3.85 2.344c.767 0 1.419.218 1.883.622.465.404.725.994.723 1.668v1.683l-.755 2.809h-.48a.25.25 0 01-.25-.25v-.187a1.84 1.84 0 01-.223.167c-.335.213-.79.352-1.39.352a2.936 2.936 0 01-1.337-.29 1.898 1.898 0 01-.883-.907 2.193 2.193 0 01-.187-.916 1.907 1.907 0 01.245-.99 1.724 1.724 0 01.646-.618c.52-.293 1.16-.396 1.788-.48H11.4c.342-.046.616-.075.827-.103a1.968 1.968 0 00.431-.088.147.147 0 00.065-.04l.01-.021a.319.319 0 00.009-.086v-.035a.809.809 0 00-.274-.638c-.178-.155-.458-.26-.847-.261-.385 0-.686.106-.89.262a.821.821 0 00-.338.588.25.25 0 01-.249.228H9.101a.25.25 0 01-.25-.261 2.139 2.139 0 01.825-1.593c.491-.391 1.165-.615 1.945-.615zm1.121 3.783c-.09.024-.187.047-.296.068-.303.06-.67.113-1.025.163a2.855 2.855 0 00-.692.171c-.196.082-.333.186-.407.308a.569.569 0 00-.08.307v.007a.604.604 0 00.062.275.554.554 0 00.176.198c.16.115.428.194.79.194.56-.002.915-.164 1.14-.39.223-.228.33-.542.332-.896v-.404z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/github/app.toml b/connect/registry/apps/github/app.toml
new file mode 100644
index 0000000000..69ac53cd3e
--- /dev/null
+++ b/connect/registry/apps/github/app.toml
@@ -0,0 +1,10 @@
+id = "github"
+name = "GitHub"
+description = "Read and manage repositories, pull requests, issues, and code."
+access = ["mcp"]
+mcp_url = "https://api.githubcopilot.com/mcp"
+client_registration = "own_app"
+scopes = []
+pipedream_app_slugs = ["github"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/github/icon.svg b/connect/registry/apps/github/icon.svg
new file mode 100644
index 0000000000..538ec5bf2a
--- /dev/null
+++ b/connect/registry/apps/github/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/grafana/app.toml b/connect/registry/apps/grafana/app.toml
new file mode 100644
index 0000000000..77121838ef
--- /dev/null
+++ b/connect/registry/apps/grafana/app.toml
@@ -0,0 +1,10 @@
+id = "grafana"
+name = "Grafana"
+description = "Search dashboards and query Grafana Cloud data sources."
+access = ["mcp"]
+mcp_url = "https://mcp.grafana.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["grafana"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/grafana/icon.svg b/connect/registry/apps/grafana/icon.svg
new file mode 100644
index 0000000000..a495a66250
--- /dev/null
+++ b/connect/registry/apps/grafana/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Grafana</title><path d="M23.02 10.59a8.578 8.578 0 0 0-.862-3.034 8.911 8.911 0 0 0-1.789-2.445c.337-1.342-.413-2.505-.413-2.505-1.292-.08-2.113.4-2.416.62-.052-.02-.102-.044-.154-.064-.22-.089-.446-.172-.677-.247-.231-.073-.47-.14-.711-.197a9.867 9.867 0 0 0-.875-.161C14.557.753 12.94 0 12.94 0c-1.804 1.145-2.147 2.744-2.147 2.744l-.018.093c-.098.029-.2.057-.298.088-.138.042-.275.094-.413.143-.138.055-.275.107-.41.166a8.869 8.869 0 0 0-1.557.87l-.063-.029c-2.497-.955-4.716.195-4.716.195-.203 2.658.996 4.33 1.235 4.636a11.608 11.608 0 0 0-.607 2.635C1.636 12.677.953 15.014.953 15.014c1.926 2.214 4.171 2.351 4.171 2.351.003-.002.006-.002.006-.005.285.509.615.994.986 1.446.156.19.32.371.488.548-.704 2.009.099 3.68.099 3.68 2.144.08 3.553-.937 3.849-1.173a9.784 9.784 0 0 0 3.164.501h.08l.055-.003.107-.002.103-.005.003.002c1.01 1.44 2.788 1.646 2.788 1.646 1.264-1.332 1.337-2.653 1.337-2.94v-.058c0-.02-.003-.039-.003-.06.265-.187.52-.387.758-.6a7.875 7.875 0 0 0 1.415-1.7c1.43.083 2.437-.885 2.437-.885-.236-1.49-1.085-2.216-1.264-2.354l-.018-.013-.016-.013a.217.217 0 0 1-.031-.02c.008-.092.016-.18.02-.27.011-.162.016-.323.016-.48v-.253l-.005-.098-.008-.135a1.891 1.891 0 0 0-.01-.13c-.003-.042-.008-.083-.013-.125l-.016-.124-.018-.122a6.215 6.215 0 0 0-2.032-3.73 6.015 6.015 0 0 0-3.222-1.46 6.292 6.292 0 0 0-.85-.048l-.107.002h-.063l-.044.003-.104.008a4.777 4.777 0 0 0-3.335 1.695c-.332.4-.592.84-.768 1.297a4.594 4.594 0 0 0-.312 1.817l.003.091c.005.055.007.11.013.164a3.615 3.615 0 0 0 .698 1.82 3.53 3.53 0 0 0 1.827 1.282c.33.098.66.14.971.137.039 0 .078 0 .114-.002l.063-.003c.02 0 .041-.003.062-.003.034-.002.065-.007.099-.01.007 0 .018-.003.028-.003l.031-.005.06-.008a1.18 1.18 0 0 0 .112-.02c.036-.008.072-.013.109-.024a2.634 2.634 0 0 0 .914-.415c.028-.02.056-.041.085-.065a.248.248 0 0 0 .039-.35.244.244 0 0 0-.309-.06l-.078.042c-.09.044-.184.083-.283.116a2.476 2.476 0 0 1-.475.096c-.028.003-.054.006-.083.006l-.083.002c-.026 0-.054 0-.08-.002l-.102-.006h-.012l-.024.006c-.016-.003-.031-.003-.044-.006-.031-.002-.06-.007-.091-.01a2.59 2.59 0 0 1-.724-.213 2.557 2.557 0 0 1-.667-.438 2.52 2.52 0 0 1-.805-1.475 2.306 2.306 0 0 1-.029-.444l.006-.122v-.023l.002-.031c.003-.021.003-.04.005-.06a3.163 3.163 0 0 1 1.352-2.29 3.12 3.12 0 0 1 .937-.43 2.946 2.946 0 0 1 .776-.101h.06l.07.002.045.003h.026l.07.005a4.041 4.041 0 0 1 1.635.49 3.94 3.94 0 0 1 1.602 1.662 3.77 3.77 0 0 1 .397 1.414l.005.076.003.075c.002.026.002.05.002.075 0 .024.003.052 0 .07v.065l-.002.073-.008.174a6.195 6.195 0 0 1-.08.639 5.1 5.1 0 0 1-.267.927 5.31 5.31 0 0 1-.624 1.13 5.052 5.052 0 0 1-3.237 2.014 4.82 4.82 0 0 1-.649.066l-.039.003h-.287a6.607 6.607 0 0 1-1.716-.265 6.776 6.776 0 0 1-3.4-2.274 6.75 6.75 0 0 1-.746-1.15 6.616 6.616 0 0 1-.714-2.596l-.005-.083-.002-.02v-.056l-.003-.073v-.096l-.003-.104v-.07l.003-.163c.008-.22.026-.45.054-.678a8.707 8.707 0 0 1 .28-1.355c.128-.444.286-.872.473-1.277a7.04 7.04 0 0 1 1.456-2.1 5.925 5.925 0 0 1 .953-.763c.169-.111.343-.213.524-.306.089-.05.182-.091.273-.135.047-.02.093-.042.138-.062a7.177 7.177 0 0 1 .714-.267l.145-.045c.049-.015.098-.026.148-.041.098-.029.197-.052.296-.076.049-.013.1-.02.15-.033l.15-.032.151-.028.076-.013.075-.01.153-.024c.057-.01.114-.013.171-.023l.169-.021c.036-.003.073-.008.106-.01l.073-.008.036-.003.042-.002c.057-.003.114-.008.171-.01l.086-.006h.023l.037-.003.145-.007a7.999 7.999 0 0 1 1.708.125 7.917 7.917 0 0 1 2.048.68 8.253 8.253 0 0 1 1.672 1.09l.09.077.089.078c.06.052.114.107.171.159.057.052.112.106.166.16.052.055.107.107.159.164a8.671 8.671 0 0 1 1.41 1.978c.012.026.028.052.04.078l.04.078.075.156c.023.051.05.1.07.153l.065.15a8.848 8.848 0 0 1 .45 1.34.19.19 0 0 0 .201.142.186.186 0 0 0 .172-.184c.01-.246.002-.532-.024-.856z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/granola/app.toml b/connect/registry/apps/granola/app.toml
new file mode 100644
index 0000000000..eee608a765
--- /dev/null
+++ b/connect/registry/apps/granola/app.toml
@@ -0,0 +1,10 @@
+id = "granola"
+name = "Granola"
+description = "Search meeting notes and transcripts."
+access = ["mcp"]
+mcp_url = "https://mcp.granola.ai/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["granola"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/granola/icon.svg b/connect/registry/apps/granola/icon.svg
new file mode 100644
index 0000000000..e7d62b1455
--- /dev/null
+++ b/connect/registry/apps/granola/icon.svg
@@ -0,0 +1,11 @@
+<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2203_5737)">
+<rect y="-4.57764e-05" width="1024" height="1024" fill="#B2C248"/>
+<path d="M507.994 878.011C583.909 878.011 663.473 861.194 695.521 837.872C715.987 823.276 726.141 824.704 744.386 807.252C749.463 802.175 751.684 800.668 753.112 799.24C822.443 742.284 862.582 668.59 862.582 573.002C862.582 417.523 752.398 311.701 594.777 311.701C456.115 311.701 350.294 399.991 350.294 513.111C350.294 615.997 430.572 689.691 545.119 689.691C551.703 689.691 554.638 686.042 561.936 686.042C589.7 686.042 612.308 678.03 626.904 662.72C634.202 654.708 648.084 638.605 649.512 637.891C656.096 632.021 657.524 623.295 659.031 619.646C660.459 615.997 663.394 613.776 664.901 608.699C666.329 602.829 664.187 595.531 664.187 589.026C664.187 577.365 669.264 565.704 669.264 554.757C669.264 524.137 632.774 493.438 599.933 493.438C596.284 493.438 596.284 490.503 594.063 490.503C591.842 490.503 589.7 492.724 587.479 492.724C585.258 492.724 582.402 489.075 579.467 489.075C576.532 489.075 575.104 492.01 570.741 492.01C561.222 492.01 560.508 493.438 553.21 493.438C550.989 493.438 547.34 494.152 545.912 494.866C542.977 496.293 542.977 498.515 540.042 498.515C536.128 498.515 534.172 499.255 534.172 500.736C534.172 508.748 534.886 507.32 531.237 507.32C527.323 507.32 524.891 507.558 523.939 508.034C521.004 509.462 523.225 513.111 520.29 515.332C517.355 516.76 516.641 518.981 515.927 523.344C515.213 527.707 510.85 529.214 510.85 533.577C510.85 535.798 511.564 537.226 511.564 538.654C511.564 543.017 502.838 541.589 502.838 545.952C502.838 548.887 505.059 551.029 505.059 553.964C505.059 556.185 503.631 557.613 503.631 559.834C503.631 562.055 505.059 563.483 505.059 564.911C505.059 568.56 499.982 569.274 499.982 572.209C499.982 575.144 502.917 577.286 502.917 579.507C502.917 580.935 500.696 581.728 500.696 583.87C500.696 586.011 499.982 582.442 504.345 588.946C507.28 593.309 507.28 595.531 504.345 599.18C501.41 602.829 495.619 605.05 488.321 605.05C457.701 605.05 454.052 573.637 437.235 568.56C432.158 567.132 431.365 566.339 431.365 564.197C431.365 562.055 431.365 562.769 434.3 559.834C437.235 556.899 437.949 554.757 437.949 552.536C437.949 550.315 437.949 549.601 436.521 548.173C430.651 538.654 427.795 526.993 427.795 513.904C427.795 446.794 509.501 390.552 586.924 390.552C610.246 390.552 606.597 396.422 620.479 396.422C624.128 396.422 622.7 396.422 627.777 395.708C640.945 393.487 664.981 398.643 683.94 408.083C736.453 434.34 770.802 496.373 770.802 568.639C770.802 691.991 661.332 781.709 515.371 781.709C435.807 781.709 381.072 756.88 327.051 696.354C321.181 689.77 329.986 697.782 320.467 681.044C308.806 660.578 310.234 673.746 310.234 673.746C306.585 669.383 300.001 656.929 296.352 652.566C291.989 647.489 286.119 648.203 283.977 645.268C281.042 641.619 285.405 635.035 283.977 631.386C282.549 625.516 270.095 616.79 268.667 612.427C267.239 608.064 262.083 580.3 262.083 575.223C262.083 569.353 266.446 568.639 266.446 564.99C266.446 559.913 259.862 558.406 256.213 551.108C252.564 543.81 250.343 526.993 250.343 508.748C250.343 499.229 250.343 495.58 253.278 473.686C253.992 466.387 264.939 466.387 264.939 458.376C264.939 455.44 263.511 451.791 263.511 449.65C263.511 446.715 263.511 446.001 264.225 443.78C294.845 315.35 432.079 219.762 584.623 219.762C637.137 219.762 677.276 229.282 739.309 255.539C759.775 264.264 789.681 248.954 789.681 232.931C791.109 227.854 788.253 226.346 787.46 223.411C786.746 220.476 783.811 216.827 780.876 216.113C779.448 215.399 778.655 213.178 777.227 211.037C775.006 207.388 772.864 205.96 766.994 204.452C764.059 203.739 762.631 203.025 761.124 201.517C758.903 198.582 757.475 197.154 754.54 195.647C751.605 194.219 749.463 195.647 747.956 194.933C746.528 194.219 745.735 192.712 744.307 191.998C743.593 191.284 742.086 191.284 739.944 191.284C666.329 151.859 618.178 145.989 554.003 145.989C415.341 145.989 291.275 205.88 214.646 310.194C208.062 318.92 211.711 333.516 202.271 342.321C184.026 359.139 161.418 451.078 161.418 509.462C161.418 558.327 173.079 623.295 188.389 659.071C218.295 729.116 205.206 699.924 209.569 706.508C218.295 720.39 225.593 721.818 229.242 726.181C229.242 726.181 231.463 730.544 231.463 734.907C231.463 737.842 231.463 738.556 232.177 739.984C234.398 744.346 244.552 751.644 247.487 754.58C254.071 761.164 259.148 775.046 270.095 785.993C286.912 802.81 310.948 815.899 387.577 851.675C414.548 864.05 399.238 857.545 402.173 858.259C408.757 860.48 417.483 860.48 422.639 864.129C425.574 866.35 421.925 865.557 429.937 865.557C431.365 865.557 431.365 866.271 432.872 866.985C434.3 867.699 435.807 869.92 437.949 869.92C439.377 869.92 440.17 868.492 442.312 869.206C444.454 869.92 449.61 873.569 453.973 875.79C457.622 878.011 458.336 878.011 459.843 876.504C464.206 873.569 467.141 877.218 471.504 877.218C472.932 877.218 475.153 876.504 479.516 876.504C485.386 876.504 485.386 877.932 507.994 877.932" fill="#1E1E1E"/>
+</g>
+<defs>
+<clipPath id="clip0_2203_5737">
+<rect width="1024" height="1024" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/connect/registry/apps/intercom/app.toml b/connect/registry/apps/intercom/app.toml
new file mode 100644
index 0000000000..1df1e14f39
--- /dev/null
+++ b/connect/registry/apps/intercom/app.toml
@@ -0,0 +1,10 @@
+id = "intercom"
+name = "Intercom"
+description = "Search conversations, contacts, and help articles."
+access = ["mcp"]
+mcp_url = "https://mcp.intercom.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["intercom"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/intercom/icon.svg b/connect/registry/apps/intercom/icon.svg
new file mode 100644
index 0000000000..3a0ec690cf
--- /dev/null
+++ b/connect/registry/apps/intercom/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Intercom</title><path d="M21 0H3C1.343 0 0 1.343 0 3v18c0 1.658 1.343 3 3 3h18c1.658 0 3-1.342 3-3V3c0-1.657-1.342-3-3-3zm-5.801 4.399c0-.44.36-.8.802-.8.44 0 .8.36.8.8v10.688c0 .442-.36.801-.8.801-.443 0-.802-.359-.802-.801V4.399zM11.2 3.994c0-.44.357-.799.8-.799s.8.359.8.799v11.602c0 .44-.357.8-.8.8s-.8-.36-.8-.8V3.994zm-4 .405c0-.44.359-.8.799-.8.443 0 .802.36.802.8v10.688c0 .442-.36.801-.802.801-.44 0-.799-.359-.799-.801V4.399zM3.199 6c0-.442.36-.8.802-.8.44 0 .799.358.799.8v7.195c0 .441-.359.8-.799.8-.443 0-.802-.36-.802-.8V6zM20.52 18.202c-.123.105-3.086 2.593-8.52 2.593-5.433 0-8.397-2.486-8.521-2.593-.335-.288-.375-.792-.086-1.128.285-.334.79-.375 1.125-.09.047.041 2.693 2.211 7.481 2.211 4.848 0 7.456-2.186 7.479-2.207.334-.289.839-.25 1.128.086.289.336.25.84-.086 1.128zm.281-5.007c0 .441-.36.8-.801.8-.441 0-.801-.36-.801-.8V6c0-.442.361-.8.801-.8.441 0 .801.357.801.8v7.195z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/jira/app.toml b/connect/registry/apps/jira/app.toml
new file mode 100644
index 0000000000..7b48c342ec
--- /dev/null
+++ b/connect/registry/apps/jira/app.toml
@@ -0,0 +1,10 @@
+id = "jira"
+name = "Jira"
+description = "Search, create, and update Jira issues through Atlassian's server."
+access = ["mcp"]
+mcp_url = "https://mcp.atlassian.com/v1/mcp/authv2"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["jira"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/jira/icon.svg b/connect/registry/apps/jira/icon.svg
new file mode 100644
index 0000000000..417c09c562
--- /dev/null
+++ b/connect/registry/apps/jira/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Jira</title><path d="M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/klaviyo/app.toml b/connect/registry/apps/klaviyo/app.toml
new file mode 100644
index 0000000000..e35bd7e186
--- /dev/null
+++ b/connect/registry/apps/klaviyo/app.toml
@@ -0,0 +1,10 @@
+id = "klaviyo"
+name = "Klaviyo"
+description = "Read profiles, lists, campaigns, and performance."
+access = ["mcp"]
+mcp_url = "https://mcp.klaviyo.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["klaviyo"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/linear/app.toml b/connect/registry/apps/linear/app.toml
new file mode 100644
index 0000000000..84b65f5d86
--- /dev/null
+++ b/connect/registry/apps/linear/app.toml
@@ -0,0 +1,10 @@
+id = "linear"
+name = "Linear"
+description = "Find, create, and update issues, projects, and comments."
+access = ["mcp"]
+mcp_url = "https://mcp.linear.app/mcp"
+client_registration = "cimd"
+scopes = ["read", "write"]
+pipedream_app_slugs = ["linear"]
+status = "live"
+probed = 2026-10-30
diff --git a/connect/registry/apps/linear/icon.svg b/connect/registry/apps/linear/icon.svg
new file mode 100644
index 0000000000..f3770d654e
--- /dev/null
+++ b/connect/registry/apps/linear/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Linear</title><path d="M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/monday/app.toml b/connect/registry/apps/monday/app.toml
new file mode 100644
index 0000000000..83f867221e
--- /dev/null
+++ b/connect/registry/apps/monday/app.toml
@@ -0,0 +1,10 @@
+id = "monday"
+name = "monday.com"
+description = "Read and update boards, items, and updates."
+access = ["mcp"]
+mcp_url = "https://mcp.monday.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["monday"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/netlify/app.toml b/connect/registry/apps/netlify/app.toml
new file mode 100644
index 0000000000..21a055aeb7
--- /dev/null
+++ b/connect/registry/apps/netlify/app.toml
@@ -0,0 +1,10 @@
+id = "netlify"
+name = "Netlify"
+description = "Manage sites, deploys, and environment settings."
+access = ["mcp"]
+mcp_url = "https://netlify-mcp.netlify.app/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["netlify"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/netlify/icon.svg b/connect/registry/apps/netlify/icon.svg
new file mode 100644
index 0000000000..085838e3a8
--- /dev/null
+++ b/connect/registry/apps/netlify/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Netlify</title><path d="M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/notion/app.toml b/connect/registry/apps/notion/app.toml
new file mode 100644
index 0000000000..99d4260695
--- /dev/null
+++ b/connect/registry/apps/notion/app.toml
@@ -0,0 +1,10 @@
+id = "notion"
+name = "Notion"
+description = "Search, read, and edit pages and databases."
+access = ["mcp"]
+mcp_url = "https://mcp.notion.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["notion"]
+status = "live"
+probed = 2026-10-30
diff --git a/connect/registry/apps/notion/icon.svg b/connect/registry/apps/notion/icon.svg
new file mode 100644
index 0000000000..2917f42eeb
--- /dev/null
+++ b/connect/registry/apps/notion/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Notion</title><path d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/paypal/app.toml b/connect/registry/apps/paypal/app.toml
new file mode 100644
index 0000000000..cfa2e28524
--- /dev/null
+++ b/connect/registry/apps/paypal/app.toml
@@ -0,0 +1,10 @@
+id = "paypal"
+name = "PayPal"
+description = "Manage invoices, orders, and transactions."
+access = ["mcp"]
+mcp_url = "https://mcp.paypal.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["paypal"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/paypal/icon.svg b/connect/registry/apps/paypal/icon.svg
new file mode 100644
index 0000000000..53e784ed11
--- /dev/null
+++ b/connect/registry/apps/paypal/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>PayPal</title><path d="M15.607 4.653H8.941L6.645 19.251H1.82L4.862 0h7.995c3.754 0 6.375 2.294 6.473 5.513-.648-.478-2.105-.86-3.722-.86m6.57 5.546c0 3.41-3.01 6.853-6.958 6.853h-2.493L11.595 24H6.74l1.845-11.538h3.592c4.208 0 7.346-3.634 7.153-6.949a5.24 5.24 0 0 1 2.848 4.686M9.653 5.546h6.408c.907 0 1.942.222 2.363.541-.195 2.741-2.655 5.483-6.441 5.483H8.714Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/pipedrive/app.toml b/connect/registry/apps/pipedrive/app.toml
new file mode 100644
index 0000000000..e1dd02930f
--- /dev/null
+++ b/connect/registry/apps/pipedrive/app.toml
@@ -0,0 +1,10 @@
+id = "pipedrive"
+name = "Pipedrive"
+description = "Search and update deals, contacts, and activities."
+access = ["mcp"]
+mcp_url = "https://mcp.pipedrive.ai/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["pipedrive"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/posthog/app.toml b/connect/registry/apps/posthog/app.toml
new file mode 100644
index 0000000000..2bbbaa0037
--- /dev/null
+++ b/connect/registry/apps/posthog/app.toml
@@ -0,0 +1,10 @@
+id = "posthog"
+name = "PostHog"
+description = "Query product analytics, insights, feature flags, and errors."
+access = ["mcp"]
+mcp_url = "https://mcp.posthog.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["posthog"]
+status = "live"
+probed = 2026-10-30
diff --git a/connect/registry/apps/posthog/icon.svg b/connect/registry/apps/posthog/icon.svg
new file mode 100644
index 0000000000..70d8cb7782
--- /dev/null
+++ b/connect/registry/apps/posthog/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>PostHog</title><path d="M9.854 14.5 5 9.647.854 5.5A.5.5 0 0 0 0 5.854V8.44a.5.5 0 0 0 .146.353L5 13.647l.147.146L9.854 18.5l.146.147v-.049c.065.03.134.049.207.049h2.586a.5.5 0 0 0 .353-.854L9.854 14.5zm0-5-4-4a.487.487 0 0 0-.409-.144.515.515 0 0 0-.356.21.493.493 0 0 0-.089.288V8.44a.5.5 0 0 0 .147.353l9 9a.5.5 0 0 0 .853-.354v-2.585a.5.5 0 0 0-.146-.354l-5-5zm1-4a.5.5 0 0 0-.854.354V8.44a.5.5 0 0 0 .147.353l4 4a.5.5 0 0 0 .853-.354V9.854a.5.5 0 0 0-.146-.354l-4-4zm12.647 11.515a3.863 3.863 0 0 1-2.232-1.1l-4.708-4.707a.5.5 0 0 0-.854.354v6.585a.5.5 0 0 0 .5.5H23.5a.5.5 0 0 0 .5-.5v-.6c0-.276-.225-.497-.499-.532zm-5.394.032a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zM.854 15.5a.5.5 0 0 0-.854.354v2.293a.5.5 0 0 0 .5.5h2.293c.222 0 .39-.135.462-.309a.493.493 0 0 0-.109-.545L.854 15.501zM5 14.647.854 10.5a.5.5 0 0 0-.854.353v2.586a.5.5 0 0 0 .146.353L4.854 18.5l.146.147h2.793a.5.5 0 0 0 .353-.854L5 14.647z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/quo/app.toml b/connect/registry/apps/quo/app.toml
new file mode 100644
index 0000000000..2d24c5f847
--- /dev/null
+++ b/connect/registry/apps/quo/app.toml
@@ -0,0 +1,10 @@
+id = "quo"
+name = "Quo"
+description = "Read and send messages and calls from your business phone numbers."
+access = ["mcp"]
+mcp_url = "https://mcp.quo.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["openphone"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/quo/icon.svg b/connect/registry/apps/quo/icon.svg
new file mode 100644
index 0000000000..8586a23f01
--- /dev/null
+++ b/connect/registry/apps/quo/icon.svg
@@ -0,0 +1,6 @@
+<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="1024" height="1024" fill="#ECF748"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M243 338C309.166 338 362 390.968 362 458V566C362 608.719 340.54 645.724 307.849 666.949L308 667C325.954 673.119 346.609 678 378 678H384L364 742H356C294.308 742 271.642 716 209 716H201L211.716 681.901C160.937 668.258 124 622.045 124 566V458C124 390.968 176.838 338 243 338ZM243 403C212.538 403 189 426.574 189 457V567C189 597.426 212.538 621 243 621C273.467 621 297 597.426 297 567V457C297 426.574 273.467 403 243 403Z" fill="black"/>
+<path d="M458 567C458 597.39 481.533 621 512 621C542.462 621 566 597.39 566 567V346H631V566C631 632.954 578.162 686 512 686C445.834 686 393 632.954 393 566V346H458V567Z" fill="black"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M781 338C847.166 338 900 390.968 900 458V566C900 633.032 847.166 686 781 686C714.838 686 662 633.032 662 566V458C662 390.968 714.838 338 781 338ZM781 403C750.538 403 727 426.574 727 457V567C727 597.426 750.538 621 781 621C811.467 621 835 597.426 835 567V457C835 426.574 811.467 403 781 403Z" fill="black"/>
+</svg>
diff --git a/connect/registry/apps/sentry/app.toml b/connect/registry/apps/sentry/app.toml
new file mode 100644
index 0000000000..dd4ab75139
--- /dev/null
+++ b/connect/registry/apps/sentry/app.toml
@@ -0,0 +1,10 @@
+id = "sentry"
+name = "Sentry"
+description = "Investigate issues, errors, and releases."
+access = ["mcp"]
+mcp_url = "https://mcp.sentry.dev/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["sentry"]
+status = "live"
+probed = 2026-10-30
diff --git a/connect/registry/apps/sentry/icon.svg b/connect/registry/apps/sentry/icon.svg
new file mode 100644
index 0000000000..11bb3c8acb
--- /dev/null
+++ b/connect/registry/apps/sentry/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Sentry</title><path d="M13.91 2.505c-.873-1.448-2.972-1.448-3.844 0L6.904 7.92a15.478 15.478 0 0 1 8.53 12.811h-2.221A13.301 13.301 0 0 0 5.784 9.814l-2.926 5.06a7.65 7.65 0 0 1 4.435 5.848H2.194a.365.365 0 0 1-.298-.534l1.413-2.402a5.16 5.16 0 0 0-1.614-.913L.296 19.275a2.182 2.182 0 0 0 .812 2.999 2.24 2.24 0 0 0 1.086.288h6.983a9.322 9.322 0 0 0-3.845-8.318l1.11-1.922a11.47 11.47 0 0 1 4.95 10.24h5.915a17.242 17.242 0 0 0-7.885-15.28l2.244-3.845a.37.37 0 0 1 .504-.13c.255.14 9.75 16.708 9.928 16.9a.365.365 0 0 1-.327.543h-2.287c.029.612.029 1.223 0 1.831h2.297a2.206 2.206 0 0 0 1.922-3.31z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/shopify/app.toml b/connect/registry/apps/shopify/app.toml
new file mode 100644
index 0000000000..93d5166928
--- /dev/null
+++ b/connect/registry/apps/shopify/app.toml
@@ -0,0 +1,10 @@
+id = "shopify"
+name = "Shopify"
+description = "Manage products, orders, customers, and inventory."
+access = ["mcp"]
+mcp_url = "https://mcp.shopify.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["shopify", "shopify_developer_app"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/shopify/icon.svg b/connect/registry/apps/shopify/icon.svg
new file mode 100644
index 0000000000..9a7d377775
--- /dev/null
+++ b/connect/registry/apps/shopify/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Shopify</title><path d="M15.337 23.979l7.216-1.561s-2.604-17.613-2.625-17.73c-.018-.116-.114-.192-.211-.192s-1.929-.136-1.929-.136-1.275-1.274-1.439-1.411c-.045-.037-.075-.057-.121-.074l-.914 21.104h.023zM11.71 11.305s-.81-.424-1.774-.424c-1.447 0-1.504.906-1.504 1.141 0 1.232 3.24 1.715 3.24 4.629 0 2.295-1.44 3.76-3.406 3.76-2.354 0-3.54-1.465-3.54-1.465l.646-2.086s1.245 1.066 2.28 1.066c.675 0 .975-.545.975-.932 0-1.619-2.654-1.694-2.654-4.359-.034-2.237 1.571-4.416 4.827-4.416 1.257 0 1.875.361 1.875.361l-.945 2.715-.02.01zM11.17.83c.136 0 .271.038.405.135-.984.465-2.064 1.639-2.508 3.992-.656.213-1.293.405-1.889.578C7.697 3.75 8.951.84 11.17.84V.83zm1.235 2.949v.135c-.754.232-1.583.484-2.394.736.466-1.777 1.333-2.645 2.085-2.971.193.501.309 1.176.309 2.1zm.539-2.234c.694.074 1.141.867 1.429 1.755-.349.114-.735.231-1.158.366v-.252c0-.752-.096-1.371-.271-1.871v.002zm2.992 1.289c-.02 0-.06.021-.078.021s-.289.075-.714.21c-.423-1.233-1.176-2.37-2.508-2.37h-.115C12.135.209 11.669 0 11.265 0 8.159 0 6.675 3.877 6.21 5.846c-1.194.365-2.063.636-2.16.674-.675.213-.694.232-.772.87-.075.462-1.83 14.063-1.83 14.063L15.009 24l.927-21.166z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/slack/app.toml b/connect/registry/apps/slack/app.toml
new file mode 100644
index 0000000000..11c299f0e1
--- /dev/null
+++ b/connect/registry/apps/slack/app.toml
@@ -0,0 +1,10 @@
+id = "slack"
+name = "Slack"
+description = "Search conversations, read channels, and post messages."
+access = ["mcp"]
+mcp_url = "https://mcp.slack.com/mcp"
+client_registration = "own_app"
+scopes = ["canvases:read", "canvases:write", "channels:history", "channels:read", "channels:write", "chat:write", "emoji:read", "files:read", "groups:history", "groups:read", "groups:write", "mpim:history", "mpim:write", "mpim:read", "im:history", "im:write", "reactions:write", "search:read.files", "search:read.im", "search:read.mpim", "search:read.private", "search:read.public", "search:read.users", "users:read", "users:read.email"]
+pipedream_app_slugs = ["slack", "slack_v2"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/slack/icon.svg b/connect/registry/apps/slack/icon.svg
new file mode 100644
index 0000000000..245f446ae8
--- /dev/null
+++ b/connect/registry/apps/slack/icon.svg
@@ -0,0 +1,17 @@
+<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_4127_70105)">
+<path d="M11.379 33.9993C11.379 37.1358 8.84512 39.6507 5.7276 39.6507C2.61008 39.6507 0.0572205 37.1168 0.0572205 33.9993C0.0572205 30.8817 2.5911 28.3479 5.70862 28.3479H11.36V33.9993H11.379Z" fill="#E3066A"/>
+<path d="M14.1962 33.9997C14.1962 30.8632 16.7301 28.3483 19.8476 28.3483C22.9651 28.3483 25.499 30.8822 25.499 33.9997V48.1353C25.499 51.2718 22.9651 53.7867 19.8476 53.7867C16.7301 53.7867 14.1962 51.2718 14.1962 48.1353V33.9997Z" fill="#E3066A"/>
+<path d="M19.8662 11.2673C16.7296 11.2673 14.2148 8.73347 14.2148 5.61594C14.2148 2.49842 16.7486 -0.0354538 19.8662 -0.0354538C22.9837 -0.0354538 25.5175 2.49842 25.5175 5.61594V11.2673H19.8662Z" fill="#00B3FF"/>
+<path d="M19.8682 14.1334C23.0047 14.1334 25.5196 16.6673 25.5196 19.7848C25.5196 22.9023 22.9857 25.4362 19.8682 25.4362H5.67566C2.53916 25.4362 0.0242615 22.9023 0.0242615 19.7848C0.0242615 16.6673 2.55814 14.1334 5.67566 14.1334H19.8682Z" fill="#00B3FF"/>
+<path d="M42.5323 19.7853C42.5323 16.6488 45.0662 14.1339 48.1837 14.1339C51.3012 14.1339 53.8351 16.6678 53.8351 19.7853C53.8351 22.9028 51.3012 25.4367 48.1837 25.4367H42.5323V19.7853Z" fill="#41B658"/>
+<path d="M39.7126 19.7934C39.7126 22.9299 37.1787 25.4448 34.0612 25.4448C30.9436 25.4448 28.4098 22.911 28.4098 19.7934V5.61986C28.4098 2.48336 30.9436 -0.0315399 34.0612 -0.0315399C37.1787 -0.0315399 39.7126 2.48336 39.7126 5.61986V19.7934Z" fill="#41B658"/>
+<path d="M34.0376 42.482C37.1741 42.482 39.689 45.0158 39.689 48.1334C39.689 51.2509 37.1552 53.7848 34.0376 53.7848C30.9201 53.7848 28.3862 51.2509 28.3862 48.1334V42.482H34.0376Z" fill="#FCC003"/>
+<path d="M34.0381 39.6507C30.9016 39.6507 28.3867 37.1168 28.3867 33.9993C28.3867 30.8818 30.9206 28.3479 34.0381 28.3479H48.2306C51.3671 28.3479 53.882 30.8818 53.882 33.9993C53.882 37.1168 51.3482 39.6507 48.2306 39.6507H34.0381Z" fill="#FCC003"/>
+</g>
+<defs>
+<clipPath id="clip0_4127_70105">
+<rect width="54" height="54" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/connect/registry/apps/square/app.toml b/connect/registry/apps/square/app.toml
new file mode 100644
index 0000000000..e2cd2b563a
--- /dev/null
+++ b/connect/registry/apps/square/app.toml
@@ -0,0 +1,10 @@
+id = "square"
+name = "Square"
+description = "Look up payments, orders, customers, and catalog items."
+access = ["mcp"]
+mcp_url = "https://mcp.squareup.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["square"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/square/icon.svg b/connect/registry/apps/square/icon.svg
new file mode 100644
index 0000000000..f798f10ddf
--- /dev/null
+++ b/connect/registry/apps/square/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Square</title><path d="M4.01 0A4.01 4.01 0 000 4.01v15.98c0 2.21 1.8 4 4.01 4.01h15.98C22.2 24 24 22.2 24 19.99V4A4.01 4.01 0 0019.99 0H4zm1.62 4.36h12.74c.7 0 1.26.57 1.26 1.27v12.74c0 .7-.56 1.27-1.26 1.27H5.63c-.7 0-1.26-.57-1.26-1.27V5.63a1.27 1.27 0 011.26-1.27zm3.83 4.35a.73.73 0 00-.73.73v5.09c0 .4.32.72.72.72h5.1a.73.73 0 00.73-.72V9.44a.73.73 0 00-.73-.73h-5.1Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/stripe/app.toml b/connect/registry/apps/stripe/app.toml
new file mode 100644
index 0000000000..dfdecdc497
--- /dev/null
+++ b/connect/registry/apps/stripe/app.toml
@@ -0,0 +1,10 @@
+id = "stripe"
+name = "Stripe"
+description = "Look up customers, payments, and subscriptions, and search Stripe docs."
+access = ["mcp"]
+mcp_url = "https://mcp.stripe.com"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["stripe"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/stripe/icon.svg b/connect/registry/apps/stripe/icon.svg
new file mode 100644
index 0000000000..8ebadf74d3
--- /dev/null
+++ b/connect/registry/apps/stripe/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Stripe</title><path d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/supabase/app.toml b/connect/registry/apps/supabase/app.toml
new file mode 100644
index 0000000000..5f267ac859
--- /dev/null
+++ b/connect/registry/apps/supabase/app.toml
@@ -0,0 +1,10 @@
+id = "supabase"
+name = "Supabase"
+description = "Manage projects, query databases, and read logs."
+access = ["mcp"]
+mcp_url = "https://mcp.supabase.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["supabase"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/supabase/icon.svg b/connect/registry/apps/supabase/icon.svg
new file mode 100644
index 0000000000..b773557067
--- /dev/null
+++ b/connect/registry/apps/supabase/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Supabase</title><path d="M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/todoist/app.toml b/connect/registry/apps/todoist/app.toml
new file mode 100644
index 0000000000..a4d1e17fad
--- /dev/null
+++ b/connect/registry/apps/todoist/app.toml
@@ -0,0 +1,10 @@
+id = "todoist"
+name = "Todoist"
+description = "Read, add, and complete tasks and projects."
+access = ["mcp"]
+mcp_url = "https://ai.todoist.net/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["todoist"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/todoist/icon.svg b/connect/registry/apps/todoist/icon.svg
new file mode 100644
index 0000000000..8b53ff6cea
--- /dev/null
+++ b/connect/registry/apps/todoist/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Todoist</title><path d="M21 0H3C1.35 0 0 1.35 0 3v3.858s3.854 2.24 4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.608 8.136-4.675.279-.161.58-.107.748-.01.164.097.606.348.84.48.232.134.221.502.013.622l-9.712 5.59c-.346.2-.69.204-1.048.002C3.478 10.907.998 9.463 0 8.882v2.02l4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.609 8.136-4.676.279-.16.58-.106.748-.008.164.096.606.347.84.48.232.133.221.5.013.62-.208.121-9.288 5.346-9.712 5.59-.346.2-.69.205-1.048.002C3.478 14.951.998 13.506 0 12.926v2.02l4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.609 8.136-4.676.279-.16.58-.106.748-.009.164.097.606.348.84.48.232.133.221.502.013.622l-9.712 5.59c-.346.199-.69.204-1.048.001C3.478 18.994.998 17.55 0 16.97V21c0 1.65 1.35 3 3 3h18c1.65 0 3-1.35 3-3V3c0-1.65-1.35-3-3-3z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/trello/app.toml b/connect/registry/apps/trello/app.toml
new file mode 100644
index 0000000000..ab78e00918
--- /dev/null
+++ b/connect/registry/apps/trello/app.toml
@@ -0,0 +1,10 @@
+id = "trello"
+name = "Trello"
+description = "Read and update boards, lists, and cards."
+access = ["mcp"]
+mcp_url = "https://mcp.trello.com/v1"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["trello"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/trello/icon.svg b/connect/registry/apps/trello/icon.svg
new file mode 100644
index 0000000000..aa0121e345
--- /dev/null
+++ b/connect/registry/apps/trello/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Trello</title><path d="M21.147 0H2.853A2.86 2.86 0 000 2.853v18.294A2.86 2.86 0 002.853 24h18.294A2.86 2.86 0 0024 21.147V2.853A2.86 2.86 0 0021.147 0zM10.34 17.287a.953.953 0 01-.953.953h-4a.954.954 0 01-.954-.953V5.38a.953.953 0 01.954-.953h4a.954.954 0 01.953.953zm9.233-5.467a.944.944 0 01-.953.947h-4a.947.947 0 01-.953-.947V5.38a.953.953 0 01.953-.953h4a.954.954 0 01.953.953z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/typeform/app.toml b/connect/registry/apps/typeform/app.toml
new file mode 100644
index 0000000000..6ef6375fec
--- /dev/null
+++ b/connect/registry/apps/typeform/app.toml
@@ -0,0 +1,10 @@
+id = "typeform"
+name = "Typeform"
+description = "Create forms and read responses."
+access = ["mcp"]
+mcp_url = "https://api.typeform.com/mcp"
+client_registration = "cimd"
+scopes = []
+pipedream_app_slugs = ["typeform"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/typeform/icon.svg b/connect/registry/apps/typeform/icon.svg
new file mode 100644
index 0000000000..5f3f29bc48
--- /dev/null
+++ b/connect/registry/apps/typeform/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Typeform</title><path d="M15.502 13.035c-.5 0-.756-.411-.756-.917 0-.505.252-.894.756-.894.513 0 .756.407.756.894-.004.515-.261.917-.756.917Zm-4.888-1.81c.292 0 .414.17.414.317 0 .357-.365.514-1.126.536 0-.442.253-.854.712-.854Zm-3.241 1.81c-.473 0-.67-.384-.67-.917 0-.527.202-.894.67-.894.477 0 .702.38.702.894 0 .537-.234.917-.702.917Zm-3.997-2.334h-.738l1.224 2.808c-.234.519-.36.648-.522.648-.171 0-.333-.138-.45-.259l-.324.43c.22.232.522.366.832.366.387 0 .685-.224.856-.626l1.413-3.371h-.725l-.738 2.012-.828-2.008Zm19.553.523c.36 0 .432.246.432.823v1.516H24v-1.914c0-.689-.473-.988-.91-.988-.386 0-.742.241-.94.688a.901.901 0 0 0-.891-.688c-.365 0-.73.232-.927.666v-.626h-.64v2.857h.64v-1.22c0-.617.324-1.114.765-1.114.36 0 .427.246.427.823v1.516h.64l-.005-1.225c0-.617.329-1.114.77-1.114Zm-5.1-.523h-.324v2.857h.639v-1.095c0-.693.306-1.163.76-1.163.118 0 .217.005.325.05l.099-.676c-.081-.009-.153-.018-.225-.018-.45 0-.774.309-.964.707V10.7h-.31Zm-2.327-.045c-.846 0-1.418.644-1.418 1.458 0 .845.58 1.475 1.418 1.475.85 0 1.431-.648 1.431-1.475-.004-.818-.594-1.458-1.431-1.458Zm-4.852 2.38c-.333 0-.581-.17-.685-.515.847-.036 1.675-.242 1.675-.988 0-.43-.423-.872-1.03-.872-.82 0-1.374.666-1.374 1.457 0 .828.545 1.476 1.36 1.476.567 0 .927-.228 1.21-.559l-.31-.42c-.329.335-.531.42-.846.42Zm-3.151-2.38c-.324 0-.648.188-.774.483v-.438h-.64v3.98h.64v-1.422c.135.205.445.34.72.34.85 0 1.3-.631 1.3-1.48-.004-.841-.445-1.463-1.246-1.463Zm-4.483-1.1H0v.622h1.18v3.38h.67v-3.38h1.166v-.622Zm9.502 1.145h-.383v.572h.383v2.285h.639v-2.285h.621v-.572h-.621v-.447c0-.286.117-.385.382-.385.1 0 .19.027.311.068l.144-.537c-.117-.067-.351-.094-.504-.094-.612 0-.972.367-.972 1.002v.393Z"/></svg>
\ No newline at end of file
diff --git a/connect/registry/apps/webflow/app.toml b/connect/registry/apps/webflow/app.toml
new file mode 100644
index 0000000000..f3e2f0a918
--- /dev/null
+++ b/connect/registry/apps/webflow/app.toml
@@ -0,0 +1,10 @@
+id = "webflow"
+name = "Webflow"
+description = "Manage sites, pages, and CMS collections."
+access = ["mcp"]
+mcp_url = "https://mcp.webflow.com/mcp"
+client_registration = "dcr"
+scopes = []
+pipedream_app_slugs = ["webflow"]
+status = "pending"
+probed = 2026-10-30
diff --git a/connect/registry/apps/webflow/icon.svg b/connect/registry/apps/webflow/icon.svg
new file mode 100644
index 0000000000..c5c6fca68e
--- /dev/null
+++ b/connect/registry/apps/webflow/icon.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Webflow</title><path d="m24 4.515-7.658 14.97H9.149l3.205-6.204h-.144C9.566 16.713 5.621 18.973 0 19.485v-6.118s3.596-.213 5.71-2.435H0V4.515h6.417v5.278l.144-.001 2.622-5.277h4.854v5.244h.144l2.72-5.244H24Z"/></svg>
\ No newline at end of file
diff --git a/connect/services/connect_api/AGENTS.md b/connect/services/connect_api/AGENTS.md
new file mode 100644
index 0000000000..d238785e1a
--- /dev/null
+++ b/connect/services/connect_api/AGENTS.md
@@ -0,0 +1,70 @@
+# Connect API
+
+## What it is
+
+The Macro Connect HTTP service. It serves the public catalog, creates OAuth
+connect sessions, handles vendor callbacks, and stores and refreshes encrypted
+grants in Connect's own Postgres database.
+
+## Start here
+
+- `src/main.rs`: router, customer auth middleware, catalog response, OpenAPI, CLI, and startup. Customer-facing wire types come from `connect_client::wire`.
+- `src/mcp.rs`: customer-authenticated MCP gateway, streaming response, and retry handling.
+- `src/domain.rs` and `src/domain/oauth.rs`: connection and OAuth use cases,
+ redirect-origin policy, grant cipher, and repository ports.
+- `src/outbound.rs` and `src/outbound/oauth*.rs`: Connect Postgres repository,
+ vendor OAuth adapter, and KMS/local envelope encryption.
+- `src/outbound/mcp.rs`: shared vendor HTTP client and trace propagation for the gateway.
+- `migrations/`: Connect-only SQLx schema.
+- `Dockerfile`: multi-stage standalone container build from the repository root.
+- `../../crates/connect_registry/src/lib.rs`: embedded app model and validation.
+
+## Scope
+
+- Owns: HTTP routes, customer keys, connections, and encrypted grants for the Connect API.
+- Not here: registry authoring → `connect_registry`; platform setup → `connect_platform`.
+
+## Boundaries
+
+- Depends on: `connect_registry`, `connect_platform`, `connect_client::wire`, third-party crates, and generated `workspace-hack`.
+- Used by: public HTTP clients.
+
+## Recipes
+
+- Run locally: from the repo root, use `docker compose -f connect/docker-compose.yml up --build`, then request `http://localhost:8080/v1/catalog`. Set `CONNECT_PORT` when 8080 is in use. See `../../docs/runbooks/bootstrap.md` for the customer creation command.
+- Set `CONNECT_PUBLIC_URL` to the Connect host root. Only live `own_app` entries need `<ID>_CLIENT_ID` and
+ `<ID>_CLIENT_SECRET` at startup. Set `CONNECT_KMS_KEY_ID` for KMS grants, or
+ `CONNECT_LOCAL_WRAPPING_KEY` to a base64-encoded 32-byte key for local
+ development. Startup fails without these values.
+- `create-customer <name> --redirect-origin <origin>` accepts a repeatable
+ origin and prints the customer API key once.
+ `set-redirect-origins <customer_id> <origin>...` replaces the allowlist.
+ Origins are HTTPS except for HTTP localhost and 127.0.0.1.
+- Customer clients create sessions at `POST /v1/connect-sessions`. The browser
+ follows the returned URL through vendor consent and callback; token export
+ refreshes grants expiring within 60 seconds.
+- Customer agents call `POST`, `GET`, or `DELETE`
+ `/v1/users/{external_user_id}/mcp/{app_id}` with their customer key. The gateway
+ forwards MCP traffic to a connected live app, refreshes once on vendor 401
+ when the request body can be replayed, and returns `409 needs_reauth` after
+ a second 401.
+- Set `PORT` to change the listener port; set `OTEL_EXPORTER_OTLP_ENDPOINT` to export spans.
+- Config keys read at startup: `DATABASE_URL`, `CONNECT_PUBLIC_URL`, own-app
+ credentials, `CONNECT_KMS_KEY_ID` or `CONNECT_LOCAL_WRAPPING_KEY` (one
+ required), `PORT` (default 8080), and the optional `OTEL_*` and `RUST_LOG`
+ settings. `APP_SECRETS_JSON` is the sole source when present.
+- On startup, `connect_api` applies its own SQLx migrations. Local Compose
+ creates the dedicated `connect` database; deployed bootstrap is in
+ `../../docs/runbooks/bootstrap.md`.
+
+## Checks
+
+- `cargo nextest run --all-features -p connect_api`
+- `cargo clippy -p connect_api --all-features --all-targets -- -D warnings`
+- `cargo x deps --check` after `just hakari` when dependencies change.
+
+## Gotchas
+
+- Database tests create each database from `template0` because CI pre-migrates
+ `template1` with Macro's schema and migration history, which conflicts with
+ Connect's separate migrator.
diff --git a/connect/services/connect_api/CLAUDE.md b/connect/services/connect_api/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/services/connect_api/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/services/connect_api/Cargo.toml b/connect/services/connect_api/Cargo.toml
new file mode 100644
index 0000000000..268b768aeb
--- /dev/null
+++ b/connect/services/connect_api/Cargo.toml
@@ -0,0 +1,46 @@
+[package]
+name = "connect_api"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
+aes-gcm = { workspace = true }
+async-trait = { workspace = true }
+aws-sdk-kms = { workspace = true }
+axum = { workspace = true }
+async-stream = { workspace = true }
+base64 = { workspace = true }
+bytes = { workspace = true }
+chrono = { workspace = true }
+clap = { workspace = true }
+connect_client = { path = "../../crates/connect_client" }
+connect_platform = { path = "../../crates/connect_platform" }
+connect_registry = { path = "../../crates/connect_registry" }
+futures = { workspace = true }
+opentelemetry-http = { workspace = true }
+rand = { workspace = true }
+reqwest = { workspace = true }
+rmcp = { workspace = true, features = ["auth", "client", "transport-streamable-http-client-reqwest"] }
+rootcause = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+sha2 = { workspace = true }
+sqlx = { workspace = true }
+subtle = { workspace = true }
+strum = { workspace = true }
+thiserror = { workspace = true }
+tokio = { workspace = true, features = ["io-util", "net", "signal", "sync", "time"] }
+tracing = { workspace = true }
+tracing-opentelemetry = { workspace = true }
+opentelemetry = { workspace = true }
+utoipa = { workspace = true }
+uuid = { workspace = true }
+url = { workspace = true }
+workspace-hack = { version = "0.1", path = "../../../crates/workspace-hack" }
+zeroize = { workspace = true }
+
+[dev-dependencies]
+http-body-util = { workspace = true }
+tower = { workspace = true }
+wiremock = { workspace = true }
diff --git a/connect/services/connect_api/Dockerfile b/connect/services/connect_api/Dockerfile
new file mode 100644
index 0000000000..f9a73975f2
--- /dev/null
+++ b/connect/services/connect_api/Dockerfile
@@ -0,0 +1,18 @@
+# syntax=docker/dockerfile:1
+FROM rust:1.94-bookworm AS builder
+WORKDIR /app
+ENV SQLX_OFFLINE=true
+RUN apt-get update && apt-get install -y --no-install-recommends cmake clang libclang-dev && rm -rf /var/lib/apt/lists/*
+COPY . .
+RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=shared \
+ --mount=type=cache,target=/usr/local/cargo/git/db,sharing=shared \
+ cargo build --release --locked -p connect_api --bin connect_api && \
+ strip target/release/connect_api
+
+FROM debian:bookworm-slim
+RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* \
+ && useradd --system --uid 10001 connect
+COPY --from=builder /app/target/release/connect_api /usr/local/bin/connect_api
+USER connect
+EXPOSE 8080
+ENTRYPOINT ["connect_api"]
diff --git a/connect/services/connect_api/migrations/20261030180344_create_connect_store.sql b/connect/services/connect_api/migrations/20261030180344_create_connect_store.sql
new file mode 100644
index 0000000000..2b43cb2ac1
--- /dev/null
+++ b/connect/services/connect_api/migrations/20261030180344_create_connect_store.sql
@@ -0,0 +1,37 @@
+CREATE TABLE customers (
+ id uuid PRIMARY KEY,
+ name text NOT NULL,
+ created_at timestamptz NOT NULL DEFAULT now()
+);
+
+CREATE TABLE customer_api_keys (
+ id uuid PRIMARY KEY,
+ customer_id uuid NOT NULL REFERENCES customers(id) ON DELETE CASCADE,
+ key_hash bytea NOT NULL CHECK (octet_length(key_hash) = 32),
+ prefix text NOT NULL,
+ created_at timestamptz NOT NULL DEFAULT now(),
+ revoked_at timestamptz
+);
+
+CREATE TABLE connections (
+ id uuid PRIMARY KEY,
+ customer_id uuid NOT NULL REFERENCES customers(id) ON DELETE CASCADE,
+ external_user_id text NOT NULL,
+ app_id text NOT NULL,
+ status text NOT NULL CHECK (status IN ('active', 'needs_reauth')),
+ scopes text[] NOT NULL,
+ created_at timestamptz NOT NULL DEFAULT now(),
+ updated_at timestamptz NOT NULL DEFAULT now(),
+ UNIQUE (customer_id, external_user_id, app_id)
+);
+
+CREATE TABLE grants (
+ connection_id uuid PRIMARY KEY REFERENCES connections(id) ON DELETE CASCADE,
+ ciphertext bytea NOT NULL,
+ nonce bytea NOT NULL CHECK (octet_length(nonce) = 12),
+ encrypted_data_key bytea NOT NULL,
+ kms_key_id text NOT NULL,
+ encryption_version smallint NOT NULL,
+ access_token_expires_at timestamptz,
+ updated_at timestamptz NOT NULL DEFAULT now()
+);
diff --git a/connect/services/connect_api/migrations/20261030181717_oauth_flow.sql b/connect/services/connect_api/migrations/20261030181717_oauth_flow.sql
new file mode 100644
index 0000000000..54755b0d5f
--- /dev/null
+++ b/connect/services/connect_api/migrations/20261030181717_oauth_flow.sql
@@ -0,0 +1,56 @@
+ALTER TABLE customers
+ ADD COLUMN allowed_redirect_origins text[] NOT NULL DEFAULT '{}';
+
+ALTER TABLE connections
+ ADD COLUMN oauth_issuer text,
+ ADD COLUMN oauth_client_id text,
+ ADD COLUMN oauth_registration_kind text;
+
+CREATE TABLE connect_sessions (
+ token text PRIMARY KEY,
+ customer_id uuid NOT NULL REFERENCES customers(id) ON DELETE CASCADE,
+ external_user_id text NOT NULL,
+ app_id text NOT NULL,
+ redirect_url text NOT NULL,
+ expires_at timestamptz NOT NULL,
+ session_traceparent text
+);
+
+CREATE INDEX connect_sessions_expires_at_idx ON connect_sessions (expires_at);
+
+CREATE TABLE oauth_states (
+ state text PRIMARY KEY,
+ customer_id uuid NOT NULL REFERENCES customers(id) ON DELETE CASCADE,
+ external_user_id text NOT NULL,
+ app_id text NOT NULL,
+ redirect_url text NOT NULL,
+ client_id text NOT NULL,
+ issuer text NOT NULL,
+ registration_kind text NOT NULL,
+ verifier_ciphertext bytea NOT NULL,
+ verifier_nonce bytea NOT NULL CHECK (octet_length(verifier_nonce) = 12),
+ verifier_encrypted_data_key bytea NOT NULL,
+ verifier_kms_key_id text NOT NULL,
+ verifier_encryption_version smallint NOT NULL,
+ expires_at timestamptz NOT NULL,
+ consumed_at timestamptz,
+ authorize_traceparent text
+);
+
+CREATE INDEX oauth_states_expires_at_idx ON oauth_states (expires_at);
+
+CREATE TABLE oauth_clients (
+ issuer text NOT NULL,
+ redirect_uri text NOT NULL,
+ client_id text NOT NULL,
+ secret_ciphertext bytea,
+ secret_nonce bytea,
+ secret_encrypted_data_key bytea,
+ secret_kms_key_id text,
+ secret_encryption_version smallint,
+ CONSTRAINT oauth_clients_secret_complete CHECK (
+ (secret_ciphertext IS NULL AND secret_nonce IS NULL AND secret_encrypted_data_key IS NULL AND secret_kms_key_id IS NULL AND secret_encryption_version IS NULL)
+ OR (secret_ciphertext IS NOT NULL AND secret_nonce IS NOT NULL AND secret_encrypted_data_key IS NOT NULL AND secret_kms_key_id IS NOT NULL AND secret_encryption_version IS NOT NULL)
+ ),
+ PRIMARY KEY (issuer, redirect_uri)
+);
diff --git a/connect/services/connect_api/src/domain.rs b/connect/services/connect_api/src/domain.rs
new file mode 100644
index 0000000000..8d4dece7d3
--- /dev/null
+++ b/connect/services/connect_api/src/domain.rs
@@ -0,0 +1,241 @@
+use chrono::{DateTime, Utc};
+use serde::{Deserialize, Serialize};
+use uuid::Uuid;
+use zeroize::{Zeroize, Zeroizing};
+
+#[derive(Debug, thiserror::Error)]
+pub enum Error {
+ #[error("connection not found")]
+ NotFound,
+ #[error("connection needs reauthorization")]
+ NeedsReauth,
+ #[error("invalid customer key")]
+ InvalidKey,
+ #[error("storage failed: {0}")]
+ Storage(rootcause::Report),
+ #[error("grant encryption failed")]
+ Cipher,
+ #[error("invalid request: {0}")]
+ InvalidRequest(&'static str),
+ #[error("OAuth operation failed")]
+ OAuth,
+ #[error("authorization state not found")]
+ InvalidState,
+}
+
+pub struct CustomerApiKey(Zeroizing<String>);
+
+impl CustomerApiKey {
+ pub fn new(value: String) -> Result<Self, Error> {
+ let value = Zeroizing::new(value);
+ let (id, secret) = value
+ .strip_prefix("ck_")
+ .and_then(|rest| rest.split_once('_'))
+ .ok_or(Error::InvalidKey)?;
+ if Uuid::parse_str(id).is_err()
+ || secret.len() != 43
+ || !secret
+ .bytes()
+ .all(|byte| byte.is_ascii_alphanumeric() || byte == b'-' || byte == b'_')
+ {
+ return Err(Error::InvalidKey);
+ }
+ Ok(Self(value))
+ }
+
+ pub fn as_str(&self) -> &str {
+ self.0.as_str()
+ }
+}
+
+impl std::fmt::Debug for CustomerApiKey {
+ fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ formatter.write_str("CustomerApiKey([REDACTED])")
+ }
+}
+
+impl std::ops::Deref for CustomerApiKey {
+ type Target = str;
+ fn deref(&self) -> &Self::Target {
+ self.as_str()
+ }
+}
+
+#[derive(Clone, Debug)]
+pub struct Connection {
+ pub app_id: String,
+ pub status: ConnectionStatus,
+ pub scopes: Vec<String>,
+ pub created_at: DateTime<Utc>,
+}
+
+#[derive(Clone, Copy, Debug, strum::EnumString, strum::Display)]
+#[strum(serialize_all = "snake_case")]
+pub enum ConnectionStatus {
+ Active,
+ NeedsReauth,
+}
+
+pub struct Grant {
+ pub access_token: String,
+ pub refresh_token: Option<String>,
+ pub token_type: String,
+ pub expires_at: Option<DateTime<Utc>>,
+ pub scopes: Vec<String>,
+}
+
+impl std::fmt::Debug for Grant {
+ fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ formatter.write_str("Grant([REDACTED])")
+ }
+}
+
+impl Drop for Grant {
+ fn drop(&mut self) {
+ self.access_token.zeroize();
+ if let Some(refresh_token) = &mut self.refresh_token {
+ refresh_token.zeroize();
+ }
+ self.token_type.zeroize();
+ for scope in &mut self.scopes {
+ scope.zeroize();
+ }
+ }
+}
+
+#[derive(Serialize, Deserialize)]
+pub struct GrantData {
+ pub access_token: String,
+ pub refresh_token: Option<String>,
+ pub token_type: String,
+ pub expires_at: Option<DateTime<Utc>>,
+ pub scopes: Vec<String>,
+}
+
+impl From<GrantData> for Grant {
+ fn from(mut data: GrantData) -> Self {
+ Self {
+ access_token: std::mem::take(&mut data.access_token),
+ refresh_token: data.refresh_token.take(),
+ token_type: std::mem::take(&mut data.token_type),
+ expires_at: data.expires_at,
+ scopes: std::mem::take(&mut data.scopes),
+ }
+ }
+}
+
+impl From<&Grant> for GrantData {
+ fn from(grant: &Grant) -> Self {
+ Self {
+ access_token: grant.access_token.clone(),
+ refresh_token: grant.refresh_token.clone(),
+ token_type: grant.token_type.clone(),
+ expires_at: grant.expires_at,
+ scopes: grant.scopes.clone(),
+ }
+ }
+}
+
+impl Drop for GrantData {
+ fn drop(&mut self) {
+ self.access_token.zeroize();
+ if let Some(refresh_token) = &mut self.refresh_token {
+ refresh_token.zeroize();
+ }
+ self.token_type.zeroize();
+ for scope in &mut self.scopes {
+ scope.zeroize();
+ }
+ }
+}
+
+pub struct Envelope {
+ pub ciphertext: Vec<u8>,
+ pub nonce: Vec<u8>,
+ pub encrypted_data_key: Vec<u8>,
+ pub kms_key_id: String,
+ pub encryption_version: i16,
+ pub access_token_expires_at: Option<DateTime<Utc>>,
+}
+
+pub struct StoredGrant {
+ pub connection_id: Uuid,
+ pub envelope: Envelope,
+}
+
+#[async_trait::async_trait]
+pub trait GrantCipher: Send + Sync {
+ async fn seal(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ grant: &Grant,
+ ) -> Result<Envelope, Error>;
+ async fn open(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ envelope: &Envelope,
+ ) -> Result<Grant, Error>;
+}
+
+#[async_trait::async_trait]
+pub trait Repository: Send + Sync {
+ async fn authenticate(&self, key: &str) -> Result<Uuid, Error>;
+ async fn list(&self, customer_id: Uuid, user_id: &str) -> Result<Vec<Connection>, Error>;
+ async fn delete(&self, customer_id: Uuid, user_id: &str, app_id: &str) -> Result<bool, Error>;
+ #[cfg(test)]
+ async fn grant(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<Option<StoredGrant>, Error>;
+}
+
+pub struct Service {
+ repository: std::sync::Arc<dyn Repository>,
+}
+
+impl Service {
+ pub fn new(repository: std::sync::Arc<dyn Repository>) -> Self {
+ Self { repository }
+ }
+
+ pub async fn authenticate(&self, key: &str) -> Result<Uuid, Error> {
+ self.repository.authenticate(key).await
+ }
+
+ #[tracing::instrument(name = "connect.connections.list", skip_all, fields(customer_id = %customer_id, external_user_hash = %hash_user(user_id), outcome), err)]
+ pub async fn list(&self, customer_id: Uuid, user_id: &str) -> Result<Vec<Connection>, Error> {
+ let result = self.repository.list(customer_id, user_id).await;
+ tracing::Span::current().record("outcome", if result.is_ok() { "ok" } else { "error" });
+ result
+ }
+
+ #[tracing::instrument(name = "connect.connections.delete", skip_all, fields(customer_id = %customer_id, app_id = %app_id, external_user_hash = %hash_user(user_id), outcome), err)]
+ pub async fn delete(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<bool, Error> {
+ let result = self.repository.delete(customer_id, user_id, app_id).await;
+ tracing::Span::current().record(
+ "outcome",
+ match result {
+ Ok(true) => "deleted",
+ Ok(false) => "not_found",
+ Err(_) => "error",
+ },
+ );
+ result
+ }
+}
+
+pub mod oauth;
+
+fn hash_user(user_id: &str) -> String {
+ use sha2::Digest as _;
+ format!("{:x}", sha2::Sha256::digest(user_id.as_bytes()))
+}
diff --git a/connect/services/connect_api/src/domain/oauth.rs b/connect/services/connect_api/src/domain/oauth.rs
new file mode 100644
index 0000000000..904a9c8453
--- /dev/null
+++ b/connect/services/connect_api/src/domain/oauth.rs
@@ -0,0 +1,826 @@
+use std::{collections::HashMap, sync::Arc};
+
+use base64::{Engine as _, engine::general_purpose::URL_SAFE_NO_PAD};
+use chrono::{DateTime, Duration, Utc};
+use connect_registry::{App, ClientRegistration, Status};
+use rand::RngCore as _;
+use url::Url;
+use uuid::Uuid;
+use zeroize::Zeroizing;
+
+use super::{Envelope, Error, Grant, GrantCipher, StoredGrant};
+
+const SESSION_LIFETIME: Duration = Duration::minutes(10);
+const REFRESH_WINDOW: Duration = Duration::seconds(60);
+
+#[derive(Clone)]
+pub struct Client {
+ pub id: String,
+ pub secret: Option<Zeroizing<String>>,
+ pub kind: ClientRegistration,
+}
+
+pub struct Metadata {
+ pub issuer: String,
+ pub supports_cimd: bool,
+ pub supports_dcr: bool,
+}
+
+pub struct Authorization {
+ pub url: String,
+ pub state: String,
+ pub verifier: Zeroizing<String>,
+}
+
+pub struct Session {
+ pub token: String,
+ pub customer_id: Uuid,
+ pub user_id: String,
+ pub app_id: String,
+ pub redirect_url: String,
+ pub expires_at: DateTime<Utc>,
+ pub traceparent: Option<String>,
+}
+
+pub struct OAuthState {
+ pub state: String,
+ pub customer_id: Uuid,
+ pub user_id: String,
+ pub app_id: String,
+ pub redirect_url: String,
+ pub client_id: String,
+ pub issuer: String,
+ pub kind: ClientRegistration,
+ pub verifier: Envelope,
+ pub expires_at: DateTime<Utc>,
+ pub traceparent: Option<String>,
+}
+
+pub enum TakenState {
+ Valid(OAuthState),
+ Expired(OAuthState),
+ Reused(OAuthState),
+}
+
+pub struct OAuthClientRecord {
+ pub id: String,
+ pub secret: Option<Envelope>,
+}
+
+pub struct LockedGrantRecord {
+ pub stored: StoredGrant,
+ pub needs_reauth: bool,
+ pub issuer: Option<String>,
+ pub client_id: Option<String>,
+ pub kind: Option<ClientRegistration>,
+}
+
+#[async_trait::async_trait]
+pub trait LockedClient: Send {
+ async fn get(&mut self) -> Result<Option<OAuthClientRecord>, Error>;
+ async fn insert(&mut self, client: OAuthClientRecord) -> Result<(), Error>;
+ async fn commit(self: Box<Self>) -> Result<(), Error>;
+}
+
+#[async_trait::async_trait]
+pub trait LockedGrant: Send {
+ fn record(&self) -> &LockedGrantRecord;
+ async fn save(&mut self, envelope: &Envelope, scopes: &[String]) -> Result<(), Error>;
+ async fn needs_reauth(&mut self) -> Result<(), Error>;
+ async fn commit(self: Box<Self>) -> Result<(), Error>;
+}
+
+#[async_trait::async_trait]
+pub trait PendingConnection: Send {
+ fn id(&self) -> Uuid;
+ async fn save(
+ &mut self,
+ state: &OAuthState,
+ grant: &Grant,
+ envelope: &Envelope,
+ ) -> Result<(), Error>;
+ async fn commit(self: Box<Self>) -> Result<(), Error>;
+}
+
+#[async_trait::async_trait]
+pub trait OAuthRepository: Send + Sync {
+ async fn allowed_origins(&self, customer_id: Uuid) -> Result<Vec<String>, Error>;
+ async fn create_session(&self, session: &Session) -> Result<(), Error>;
+ async fn get_session(&self, token: &str) -> Result<Option<Session>, Error>;
+ async fn save_state(&self, state: &OAuthState) -> Result<(), Error>;
+ async fn take_state(&self, state: &str) -> Result<Option<TakenState>, Error>;
+ async fn lock_client(
+ &self,
+ issuer: &str,
+ redirect_uri: &str,
+ ) -> Result<Box<dyn LockedClient>, Error>;
+ async fn lock_connection(
+ &self,
+ state: &OAuthState,
+ ) -> Result<Box<dyn PendingConnection>, Error>;
+ async fn lock_grant(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<Option<Box<dyn LockedGrant>>, Error>;
+ async fn set_redirect_origins(
+ &self,
+ customer_id: Uuid,
+ origins: &[String],
+ ) -> Result<bool, Error>;
+}
+
+#[async_trait::async_trait]
+pub trait OAuthProvider: Send + Sync {
+ async fn discover(&self, server_url: &str) -> Result<Metadata, Error>;
+ async fn register(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ scopes: &[String],
+ ) -> Result<Client, Error>;
+ async fn authorize(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ client: &Client,
+ scopes: &[String],
+ ) -> Result<Authorization, Error>;
+ async fn exchange(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ client: &Client,
+ verifier: &str,
+ code: &str,
+ requested_scopes: &[String],
+ ) -> Result<Grant, Error>;
+ async fn refresh(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ client: &Client,
+ grant: &Grant,
+ ) -> Result<Grant, RefreshError>;
+}
+
+#[derive(Debug, thiserror::Error)]
+pub enum RefreshError {
+ #[error("refresh grant rejected")]
+ InvalidGrant,
+ #[error(transparent)]
+ Other(Error),
+}
+
+pub struct CreatedSession {
+ pub connect_url: String,
+ pub expires_at: DateTime<Utc>,
+}
+
+pub struct OAuthService {
+ repository: Arc<dyn OAuthRepository>,
+ cipher: Arc<dyn GrantCipher>,
+ provider: Arc<dyn OAuthProvider>,
+ apps: &'static [App],
+ public_url: Url,
+ own_apps: HashMap<String, Client>,
+}
+
+impl OAuthService {
+ pub fn new(
+ repository: Arc<dyn OAuthRepository>,
+ cipher: Arc<dyn GrantCipher>,
+ provider: Arc<dyn OAuthProvider>,
+ apps: &'static [App],
+ public_url: Url,
+ own_apps: HashMap<String, Client>,
+ ) -> Self {
+ Self {
+ repository,
+ cipher,
+ provider,
+ apps,
+ public_url,
+ own_apps,
+ }
+ }
+
+ fn app(&self, app_id: &str) -> Result<&App, Error> {
+ self.apps
+ .iter()
+ .find(|app| app.id.as_str() == app_id && app.status == Status::Live)
+ .ok_or(Error::InvalidRequest("app_not_live"))
+ }
+
+ fn route_url(&self, path: &str) -> String {
+ let mut url = self.public_url.clone();
+ url.set_path(&format!(
+ "{}{path}",
+ self.public_url.path().trim_end_matches('/')
+ ));
+ url.to_string()
+ }
+
+ fn callback_url(&self) -> String {
+ self.route_url("/v1/oauth/callback")
+ }
+
+ pub fn client_metadata_url(&self) -> String {
+ self.route_url("/v1/oauth/client-metadata.json")
+ }
+
+ pub fn public_path(&self) -> &str {
+ self.public_url.path().trim_end_matches('/')
+ }
+
+ #[tracing::instrument(name = "connect.session.create", skip_all, fields(customer_id = %customer_id, app_id = %app_id, registration_kind, outcome), err)]
+ pub async fn create_session(
+ &self,
+ customer_id: Uuid,
+ user_id: String,
+ app_id: String,
+ redirect_url: String,
+ ) -> Result<CreatedSession, Error> {
+ tracing::Span::current().record("outcome", "error");
+ let app = self.app(&app_id)?;
+ tracing::Span::current().record(
+ "registration_kind",
+ registration_name(app.client_registration),
+ );
+ if user_id.is_empty() || user_id.len() > 1024 {
+ return Err(Error::InvalidRequest("invalid_external_user_id"));
+ }
+ let redirect =
+ Url::parse(&redirect_url).map_err(|_| Error::InvalidRequest("invalid_redirect_url"))?;
+ if !redirect.username().is_empty()
+ || redirect.password().is_some()
+ || redirect
+ .query_pairs()
+ .any(|(name, _)| matches!(name.as_ref(), "status" | "app_id" | "reason"))
+ {
+ return Err(Error::InvalidRequest("invalid_redirect_url"));
+ }
+ let origin = redirect.origin().ascii_serialization();
+ let allowed = self.repository.allowed_origins(customer_id).await?;
+ if !allowed.iter().any(|entry| entry == &origin) {
+ tracing::Span::current().record("outcome", "redirect_denied");
+ return Err(Error::InvalidRequest("redirect_origin_not_allowed"));
+ }
+ let mut token_bytes = Zeroizing::new([0_u8; 32]);
+ rand::rng().fill_bytes(&mut *token_bytes);
+ let session = Session {
+ token: URL_SAFE_NO_PAD.encode(*token_bytes),
+ customer_id,
+ user_id,
+ app_id,
+ redirect_url,
+ expires_at: Utc::now() + SESSION_LIFETIME,
+ traceparent: current_traceparent(),
+ };
+ self.repository.create_session(&session).await?;
+ tracing::Span::current().record("outcome", "created");
+ Ok(CreatedSession {
+ connect_url: self.route_url(&format!("/v1/connect/{}", session.token)),
+ expires_at: session.expires_at,
+ })
+ }
+
+ #[tracing::instrument(
+ name = "connect.authorize",
+ skip_all,
+ fields(app_id, registration_kind, outcome),
+ err
+ )]
+ pub async fn authorize(&self, token: &str) -> Result<String, Error> {
+ tracing::Span::current().record("outcome", "error");
+ let traceparent = current_traceparent();
+ let session = self
+ .repository
+ .get_session(token)
+ .await?
+ .ok_or(Error::InvalidState)?;
+ if let Some(parent) = &session.traceparent {
+ connect_parent_span(parent);
+ }
+ tracing::Span::current().record("app_id", session.app_id.as_str());
+ let app = self.app(&session.app_id)?;
+ let metadata = self.provider.discover(&app.mcp_url).await?;
+ let redirect_uri = self.callback_url();
+ let client = if app.client_registration == ClientRegistration::OwnApp {
+ self.own_apps
+ .get(app.id.as_str())
+ .cloned()
+ .ok_or(Error::OAuth)?
+ } else if app.client_registration == ClientRegistration::Cimd && metadata.supports_cimd {
+ Client {
+ id: self.client_metadata_url(),
+ secret: None,
+ kind: ClientRegistration::Cimd,
+ }
+ } else if app.client_registration == ClientRegistration::Dcr && metadata.supports_dcr {
+ let mut locked = self
+ .repository
+ .lock_client(&metadata.issuer, &redirect_uri)
+ .await?;
+ let client = if let Some(record) = locked.get().await? {
+ Client {
+ id: record.id,
+ secret: match record.secret {
+ Some(envelope) => {
+ let mut secret = self
+ .cipher
+ .open(
+ Uuid::nil(),
+ client_context(&metadata.issuer, &redirect_uri),
+ &envelope,
+ )
+ .await?;
+ Some(Zeroizing::new(std::mem::take(&mut secret.access_token)))
+ }
+ None => None,
+ },
+ kind: ClientRegistration::Dcr,
+ }
+ } else {
+ let client = self
+ .provider
+ .register(&app.mcp_url, &redirect_uri, &app.scopes)
+ .await?;
+ let secret = if let Some(value) = &client.secret {
+ let grant = Grant {
+ access_token: value.to_string(),
+ refresh_token: None,
+ token_type: "client_secret".into(),
+ expires_at: None,
+ scopes: vec![],
+ };
+ Some(
+ self.cipher
+ .seal(
+ Uuid::nil(),
+ client_context(&metadata.issuer, &redirect_uri),
+ &grant,
+ )
+ .await?,
+ )
+ } else {
+ None
+ };
+ locked
+ .insert(OAuthClientRecord {
+ id: client.id.clone(),
+ secret,
+ })
+ .await?;
+ client
+ };
+ locked.commit().await?;
+ client
+ } else {
+ return Err(Error::OAuth);
+ };
+ tracing::Span::current().record("registration_kind", registration_name(client.kind));
+ let authorization = self
+ .provider
+ .authorize(&app.mcp_url, &redirect_uri, &client, &app.scopes)
+ .await?;
+ let verifier = Grant {
+ access_token: authorization.verifier.to_string(),
+ refresh_token: None,
+ token_type: "pkce".into(),
+ expires_at: None,
+ scopes: vec![],
+ };
+ let state = OAuthState {
+ state: authorization.state.clone(),
+ customer_id: session.customer_id,
+ user_id: session.user_id,
+ app_id: session.app_id,
+ redirect_url: session.redirect_url,
+ client_id: client.id,
+ issuer: metadata.issuer,
+ kind: client.kind,
+ verifier: self
+ .cipher
+ .seal(
+ session.customer_id,
+ state_context(&authorization.state),
+ &verifier,
+ )
+ .await?,
+ expires_at: Utc::now() + SESSION_LIFETIME,
+ traceparent,
+ };
+ self.repository.save_state(&state).await?;
+ tracing::Span::current().record("outcome", "redirected");
+ Ok(authorization.url)
+ }
+
+ #[tracing::instrument(
+ name = "connect.callback",
+ skip_all,
+ fields(app_id, registration_kind, outcome),
+ err
+ )]
+ pub async fn callback(
+ &self,
+ state: &str,
+ code: Option<&str>,
+ vendor_error: Option<&str>,
+ ) -> Result<(String, Option<String>), Error> {
+ tracing::Span::current().record("outcome", "error");
+ let taken = self
+ .repository
+ .take_state(state)
+ .await?
+ .ok_or(Error::InvalidState)?;
+ let (state, failure) = match taken {
+ TakenState::Valid(state) => (state, None),
+ TakenState::Expired(state) => (state, Some("expired_state")),
+ TakenState::Reused(state) => (state, Some("reused_state")),
+ };
+ if let Some(traceparent) = &state.traceparent {
+ connect_parent_span(traceparent);
+ link_authorize_span(traceparent);
+ }
+ tracing::Span::current().record("app_id", state.app_id.as_str());
+ tracing::Span::current().record("registration_kind", registration_name(state.kind));
+ let outcome = if let Some(reason) = failure.or(vendor_error) {
+ Err(reason.to_owned())
+ } else if let Some(code) = code {
+ match self.finish_callback(&state, code).await {
+ Ok(()) => Ok(()),
+ Err(error) => {
+ tracing::warn!(error = ?error, "OAuth callback failed");
+ Err("exchange_failed".to_owned())
+ }
+ }
+ } else {
+ Err("missing_code".to_owned())
+ };
+ let mut redirect = Url::parse(&state.redirect_url).map_err(|_| Error::InvalidState)?;
+ redirect
+ .query_pairs_mut()
+ .append_pair(
+ "status",
+ if outcome.is_ok() {
+ "connected"
+ } else {
+ "error"
+ },
+ )
+ .append_pair("app_id", &state.app_id);
+ if let Err(reason) = &outcome {
+ redirect.query_pairs_mut().append_pair("reason", reason);
+ }
+ tracing::Span::current().record(
+ "outcome",
+ if outcome.is_ok() {
+ "connected"
+ } else {
+ "error"
+ },
+ );
+ Ok((redirect.to_string(), state.traceparent))
+ }
+
+ async fn finish_callback(&self, state: &OAuthState, code: &str) -> Result<(), Error> {
+ let app = self.app(&state.app_id)?;
+ let client = self.client_for_state(state).await?;
+ let verifier = self
+ .cipher
+ .open(
+ state.customer_id,
+ state_context(&state.state),
+ &state.verifier,
+ )
+ .await?;
+ let grant = self
+ .provider
+ .exchange(
+ &app.mcp_url,
+ &self.callback_url(),
+ &client,
+ &verifier.access_token,
+ code,
+ &app.scopes,
+ )
+ .await?;
+ let mut pending = self.repository.lock_connection(state).await?;
+ let envelope = self
+ .cipher
+ .seal(state.customer_id, pending.id(), &grant)
+ .await?;
+ pending.save(state, &grant, &envelope).await?;
+ pending.commit().await
+ }
+
+ async fn client_for_state(&self, state: &OAuthState) -> Result<Client, Error> {
+ self.client_for(state.kind, &state.issuer, &state.app_id, &state.client_id)
+ .await
+ }
+
+ async fn client_for(
+ &self,
+ kind: ClientRegistration,
+ issuer: &str,
+ app_id: &str,
+ client_id: &str,
+ ) -> Result<Client, Error> {
+ let secret = match kind {
+ ClientRegistration::OwnApp => self
+ .own_apps
+ .get(app_id)
+ .and_then(|client| client.secret.clone()),
+ ClientRegistration::Dcr => {
+ let mut locked = self
+ .repository
+ .lock_client(issuer, &self.callback_url())
+ .await?;
+ let record = locked.get().await?.ok_or(Error::OAuth)?;
+ locked.commit().await?;
+ match record.secret {
+ Some(envelope) => {
+ let mut secret = self
+ .cipher
+ .open(
+ Uuid::nil(),
+ client_context(issuer, &self.callback_url()),
+ &envelope,
+ )
+ .await?;
+ Some(Zeroizing::new(std::mem::take(&mut secret.access_token)))
+ }
+ None => None,
+ }
+ }
+ _ => None,
+ };
+ Ok(Client {
+ id: client_id.to_owned(),
+ secret,
+ kind,
+ })
+ }
+
+ #[tracing::instrument(name = "connect.connections.export", skip_all, fields(customer_id = %customer_id, app_id = %app_id, outcome), err)]
+ pub async fn export(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<Grant, Error> {
+ self.load_grant(customer_id, user_id, app_id, None).await
+ }
+
+ pub fn mcp_url(&self, app_id: &str) -> Result<&str, Error> {
+ self.apps
+ .iter()
+ .find(|app| app.id.as_str() == app_id && app.status == Status::Live)
+ .map(|app| app.mcp_url.as_str())
+ .ok_or(Error::NotFound)
+ }
+
+ pub async fn recover_vendor_unauthorized(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ rejected_access_token: &str,
+ can_retry: bool,
+ already_retried: bool,
+ ) -> Result<Option<Grant>, Error> {
+ if already_retried {
+ self.mark_needs_reauth(customer_id, user_id, app_id).await?;
+ return Err(Error::NeedsReauth);
+ }
+ if can_retry {
+ return self
+ .load_grant(customer_id, user_id, app_id, Some(rejected_access_token))
+ .await
+ .map(Some);
+ }
+ Ok(None)
+ }
+
+ async fn mark_needs_reauth(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<(), Error> {
+ let mut locked = self
+ .repository
+ .lock_grant(customer_id, user_id, app_id)
+ .await?
+ .ok_or(Error::NotFound)?;
+ locked.needs_reauth().await?;
+ locked.commit().await
+ }
+
+ async fn load_grant(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ rejected_access_token: Option<&str>,
+ ) -> Result<Grant, Error> {
+ let mut locked = self
+ .repository
+ .lock_grant(customer_id, user_id, app_id)
+ .await?
+ .ok_or(Error::NotFound)?;
+ let record = locked.record();
+ if record.needs_reauth {
+ return Err(Error::NeedsReauth);
+ }
+ let mut grant = self
+ .cipher
+ .open(
+ customer_id,
+ record.stored.connection_id,
+ &record.stored.envelope,
+ )
+ .await?;
+ if rejected_access_token.is_some_and(|token| token == grant.access_token)
+ || grant
+ .expires_at
+ .is_some_and(|expiry| expiry <= Utc::now() + REFRESH_WINDOW)
+ {
+ grant = match self
+ .refresh_grant(&mut *locked, customer_id, app_id, &grant)
+ .await
+ {
+ Ok(refreshed) => refreshed,
+ Err(RefreshError::InvalidGrant) => {
+ locked.needs_reauth().await?;
+ locked.commit().await?;
+ return Err(Error::NeedsReauth);
+ }
+ Err(RefreshError::Other(error)) => return Err(error),
+ };
+ tracing::Span::current().record("outcome", "refreshed");
+ } else {
+ tracing::Span::current().record("outcome", "cached");
+ }
+ locked.commit().await?;
+ Ok(grant)
+ }
+
+ #[tracing::instrument(name = "connect.token.refresh", skip_all, fields(app_id = %app_id, registration_kind, outcome), err)]
+ async fn refresh_grant(
+ &self,
+ locked: &mut dyn LockedGrant,
+ customer_id: Uuid,
+ app_id: &str,
+ grant: &Grant,
+ ) -> Result<Grant, RefreshError> {
+ tracing::Span::current().record("outcome", "error");
+ let record = locked.record();
+ let issuer = record.issuer.clone().ok_or(RefreshError::InvalidGrant)?;
+ let client_id = record.client_id.clone().ok_or(RefreshError::InvalidGrant)?;
+ let kind = record.kind.ok_or(RefreshError::InvalidGrant)?;
+ tracing::Span::current().record("registration_kind", registration_name(kind));
+ let app = self.app(app_id).map_err(RefreshError::Other)?;
+ let client = self
+ .client_for(kind, &issuer, app_id, &client_id)
+ .await
+ .map_err(RefreshError::Other)?;
+ let refreshed = match self
+ .provider
+ .refresh(&app.mcp_url, &self.callback_url(), &client, grant)
+ .await
+ {
+ Ok(refreshed) => refreshed,
+ Err(RefreshError::InvalidGrant) => {
+ tracing::Span::current().record("outcome", "invalid_grant");
+ return Err(RefreshError::InvalidGrant);
+ }
+ Err(error) => return Err(error),
+ };
+ let envelope = self
+ .cipher
+ .seal(
+ customer_id,
+ locked.record().stored.connection_id,
+ &refreshed,
+ )
+ .await
+ .map_err(RefreshError::Other)?;
+ locked
+ .save(&envelope, &refreshed.scopes)
+ .await
+ .map_err(RefreshError::Other)?;
+ tracing::Span::current().record("outcome", "refreshed");
+ Ok(refreshed)
+ }
+}
+
+pub async fn set_redirect_origins(
+ repository: &dyn OAuthRepository,
+ customer_id: Uuid,
+ origins: &[String],
+) -> Result<bool, Error> {
+ if origins.is_empty() {
+ return Err(Error::InvalidRequest("redirect_origin_required"));
+ }
+ for origin in origins {
+ validate_origin(origin)?;
+ }
+ repository.set_redirect_origins(customer_id, origins).await
+}
+
+pub fn validate_origin(origin: &str) -> Result<(), Error> {
+ let url = Url::parse(origin).map_err(|_| Error::InvalidRequest("invalid_redirect_origin"))?;
+ let allowed_scheme = url.scheme() == "https"
+ || (url.scheme() == "http" && matches!(url.host_str(), Some("localhost" | "127.0.0.1")));
+ if !allowed_scheme
+ || url.origin().ascii_serialization() != origin
+ || !url.username().is_empty()
+ || url.password().is_some()
+ {
+ return Err(Error::InvalidRequest("invalid_redirect_origin"));
+ }
+ Ok(())
+}
+
+pub fn registration_name(kind: ClientRegistration) -> &'static str {
+ match kind {
+ ClientRegistration::Cimd => "cimd",
+ ClientRegistration::Dcr => "dcr",
+ ClientRegistration::OwnApp => "own_app",
+ ClientRegistration::ApiKey => "api_key",
+ }
+}
+
+fn state_context(state: &str) -> Uuid {
+ use sha2::Digest as _;
+ let digest = sha2::Sha256::digest(state.as_bytes());
+ Uuid::from_slice(&digest[..16]).expect("SHA-256 supplies 16 bytes")
+}
+
+fn client_context(issuer: &str, redirect_uri: &str) -> Uuid {
+ state_context(&format!("{issuer}\0{redirect_uri}"))
+}
+
+fn parse_traceparent(value: &str) -> Option<opentelemetry::trace::SpanContext> {
+ use opentelemetry::trace::{SpanContext, SpanId, TraceFlags, TraceId, TraceState};
+ let mut parts = value.split('-');
+ let (Some("00"), Some(trace), Some(span), Some(flags), None) = (
+ parts.next(),
+ parts.next(),
+ parts.next(),
+ parts.next(),
+ parts.next(),
+ ) else {
+ return None;
+ };
+ let (Ok(trace_id), Ok(span_id), Ok(flags)) = (
+ TraceId::from_hex(trace),
+ SpanId::from_hex(span),
+ u8::from_str_radix(flags, 16),
+ ) else {
+ return None;
+ };
+ let context = SpanContext::new(
+ trace_id,
+ span_id,
+ TraceFlags::new(flags),
+ true,
+ TraceState::default(),
+ );
+ context.is_valid().then_some(context)
+}
+
+fn connect_parent_span(value: &str) {
+ use opentelemetry::trace::TraceContextExt as _;
+ use tracing_opentelemetry::OpenTelemetrySpanExt as _;
+ if let Some(context) = parse_traceparent(value) {
+ let parent = opentelemetry::Context::new().with_remote_span_context(context);
+ let _ = tracing::Span::current().set_parent(parent);
+ }
+}
+
+fn link_authorize_span(value: &str) {
+ use tracing_opentelemetry::OpenTelemetrySpanExt as _;
+ if let Some(context) = parse_traceparent(value) {
+ tracing::Span::current().add_link(context);
+ }
+}
+
+fn current_traceparent() -> Option<String> {
+ use opentelemetry::trace::TraceContextExt as _;
+ use tracing_opentelemetry::OpenTelemetrySpanExt as _;
+ let context = tracing::Span::current().context();
+ let binding = context.span();
+ let span = binding.span_context();
+ span.is_valid().then(|| {
+ format!(
+ "00-{}-{}-{:02x}",
+ span.trace_id(),
+ span.span_id(),
+ span.trace_flags().to_u8()
+ )
+ })
+}
diff --git a/connect/services/connect_api/src/main.rs b/connect/services/connect_api/src/main.rs
new file mode 100644
index 0000000000..ed6fb96ca8
--- /dev/null
+++ b/connect/services/connect_api/src/main.rs
@@ -0,0 +1,581 @@
+//! HTTP API for the embedded Macro Connect registry and customer connections.
+
+mod domain;
+mod mcp;
+mod outbound;
+#[cfg(test)]
+mod test_support;
+
+use axum::{
+ Json, Router,
+ extract::{Path, Query, Request, State},
+ http::{StatusCode, header},
+ middleware::{self, Next},
+ response::{IntoResponse, Redirect, Response},
+ routing::{get, post},
+};
+use clap::{Parser, Subcommand};
+use connect_client::wire::{
+ CatalogEntry, ConnectSessionRequest, ConnectSessionResponse, Connection, ConnectionStatus,
+ DeleteResponse, ErrorResponse, McpErrorResponse, TokenResponse,
+};
+use connect_platform::{ConfigLoader, Telemetry, http_trace_layer, load_aws_config};
+use connect_registry::{Access, App, ClientRegistration, Status, all_apps};
+use domain::oauth::{
+ Client, OAuthService, set_redirect_origins as update_redirect_origins, validate_origin,
+};
+use domain::{ConnectionStatus as DomainConnectionStatus, Error, GrantCipher, Service};
+use outbound::{EnvelopeCipher, KmsKeyWrapper, LocalKeyWrapper, MIGRATOR, PostgresRepository};
+use outbound::{mcp::VendorMcp, oauth::VendorOAuth};
+use serde::Deserialize;
+use sqlx::postgres::PgPoolOptions;
+use std::{collections::HashMap, sync::Arc};
+use tokio::net::TcpListener;
+use utoipa::{
+ Modify, OpenApi,
+ openapi::security::{Http, HttpAuthScheme, SecurityScheme},
+};
+
+struct Config {
+ port: u16,
+ database_url: String,
+ kms_key_id: Option<String>,
+ local_wrapping_key: Option<zeroize::Zeroizing<String>>,
+ public_url: url::Url,
+ own_apps: HashMap<String, Client>,
+}
+
+impl Config {
+ fn load(source: &ConfigLoader, apps: &[App]) -> Result<Self, connect_platform::ConfigError> {
+ let public_url_text: String = source.required("CONNECT_PUBLIC_URL")?;
+ let public_url = parse_public_url(&public_url_text)?;
+ let own_apps = load_own_apps(apps, |key| source.optional(key).map(str::to_owned))?;
+ Ok(Self {
+ port: source.with_default("PORT", 8080_u16)?,
+ database_url: source.required("DATABASE_URL")?,
+ kms_key_id: source.optional("CONNECT_KMS_KEY_ID").map(str::to_owned),
+ local_wrapping_key: source
+ .optional("CONNECT_LOCAL_WRAPPING_KEY")
+ .map(|value| zeroize::Zeroizing::new(value.to_owned())),
+ public_url,
+ own_apps,
+ })
+ }
+}
+
+fn parse_public_url(text: &str) -> Result<url::Url, connect_platform::ConfigError> {
+ let invalid = || connect_platform::ConfigError::Invalid("CONNECT_PUBLIC_URL");
+ let url = url::Url::parse(text).map_err(|_| invalid())?;
+ if validate_origin(&url.origin().ascii_serialization()).is_err()
+ || !url.username().is_empty()
+ || url.password().is_some()
+ || url.path() != "/"
+ || url.query().is_some()
+ || url.fragment().is_some()
+ {
+ return Err(invalid());
+ }
+ Ok(url)
+}
+
+fn load_own_apps(
+ apps: &[App],
+ lookup: impl Fn(&str) -> Option<String>,
+) -> Result<HashMap<String, Client>, connect_platform::ConfigError> {
+ let mut clients = HashMap::new();
+ for app in apps.iter().filter(|app| {
+ app.status == Status::Live && app.client_registration == ClientRegistration::OwnApp
+ }) {
+ let prefix = app.id.as_str().to_ascii_uppercase();
+ let id = lookup(&format!("{prefix}_CLIENT_ID"));
+ let secret = lookup(&format!("{prefix}_CLIENT_SECRET"));
+ let (Some(id), Some(secret)) = (id, secret) else {
+ return Err(connect_platform::ConfigError::Invalid(
+ "own-app client credentials",
+ ));
+ };
+ if id.is_empty() || secret.is_empty() {
+ return Err(connect_platform::ConfigError::Invalid(
+ "own-app client credentials",
+ ));
+ }
+ clients.insert(
+ app.id.as_str().to_owned(),
+ Client {
+ id,
+ secret: Some(zeroize::Zeroizing::new(secret)),
+ kind: ClientRegistration::OwnApp,
+ },
+ );
+ }
+ Ok(clients)
+}
+
+#[derive(Deserialize)]
+struct CallbackQuery {
+ state: String,
+ code: Option<String>,
+ error: Option<String>,
+}
+
+#[derive(Parser)]
+struct Cli {
+ #[command(subcommand)]
+ command: Option<Command>,
+}
+
+#[derive(Subcommand)]
+enum Command {
+ CreateCustomer {
+ name: String,
+ #[arg(long = "redirect-origin", required = true)]
+ redirect_origin: Vec<String>,
+ },
+ SetRedirectOrigins {
+ customer_id: uuid::Uuid,
+ #[arg(required = true)]
+ origins: Vec<String>,
+ },
+}
+
+#[derive(Clone)]
+struct AppState {
+ apps: &'static [App],
+ service: Arc<Service>,
+ oauth: Arc<OAuthService>,
+ mcp_http: VendorMcp,
+}
+
+struct SecurityAddon;
+impl Modify for SecurityAddon {
+ fn modify(&self, openapi: &mut utoipa::openapi::OpenApi) {
+ if let Some(components) = openapi.components.as_mut() {
+ components.add_security_scheme(
+ "customer_key",
+ SecurityScheme::Http(Http::new(HttpAuthScheme::Bearer)),
+ );
+ }
+ }
+}
+
+#[derive(OpenApi)]
+#[openapi(
+ paths(
+ health,
+ catalog,
+ icon,
+ list_connections,
+ delete_connection,
+ export_token,
+ create_connect_session,
+ authorize_connect,
+ client_metadata,
+ oauth_callback,
+ mcp::proxy
+ ),
+ components(schemas(CatalogEntry, Connection, ConnectionStatus, TokenResponse, DeleteResponse, ErrorResponse, McpErrorResponse, ConnectSessionRequest, ConnectSessionResponse)),
+ modifiers(&SecurityAddon)
+)]
+struct ApiDoc;
+
+#[utoipa::path(get, path = "/health", responses((status = 200, description = "Service is ready")))]
+async fn health() -> StatusCode {
+ StatusCode::OK
+}
+
+#[utoipa::path(get, path = "/v1/catalog", responses((status = 200, body = [CatalogEntry])))]
+async fn catalog(State(state): State<AppState>) -> Json<Vec<CatalogEntry>> {
+ Json(
+ state
+ .apps
+ .iter()
+ .filter(|app| app.status == Status::Live)
+ .map(|app| CatalogEntry {
+ id: app.id.as_str().to_owned(),
+ name: app.name.clone(),
+ description: app.description.clone(),
+ access: app
+ .access
+ .iter()
+ .map(|access| match access {
+ Access::Mcp => "mcp".to_owned(),
+ Access::Api => "api".to_owned(),
+ })
+ .collect(),
+ mcp_url: app.mcp_url.clone(),
+ icon_url: app.icon_svg.map(|_| {
+ format!(
+ "{}/v1/catalog/{}/icon.svg",
+ state.oauth.public_path(),
+ app.id
+ )
+ }),
+ })
+ .collect(),
+ )
+}
+
+#[utoipa::path(
+ get,
+ path = "/v1/catalog/{id}/icon.svg",
+ params(("id" = String, Path, description = "Catalog app id")),
+ responses(
+ (status = 200, content_type = "image/svg+xml", body = String),
+ (status = 404, description = "Unknown app or missing icon")
+ )
+)]
+async fn icon(
+ State(state): State<AppState>,
+ Path(id): Path<String>,
+) -> Result<([(header::HeaderName, &'static str); 1], &'static str), StatusCode> {
+ let icon = state
+ .apps
+ .iter()
+ .find(|app| app.status == Status::Live && app.id.as_str() == id)
+ .and_then(|app| app.icon_svg)
+ .ok_or(StatusCode::NOT_FOUND)?;
+ Ok(([(header::CONTENT_TYPE, "image/svg+xml")], icon))
+}
+
+async fn openapi() -> Json<utoipa::openapi::OpenApi> {
+ Json(ApiDoc::openapi())
+}
+
+#[utoipa::path(post, path = "/v1/connect-sessions", request_body = ConnectSessionRequest, responses((status = 200, body = ConnectSessionResponse), (status = 400), (status = 401)), security(("customer_key" = [])))]
+async fn create_connect_session(
+ State(state): State<AppState>,
+ axum::extract::Extension(customer_id): axum::extract::Extension<uuid::Uuid>,
+ Json(request): Json<ConnectSessionRequest>,
+) -> Result<Json<ConnectSessionResponse>, (StatusCode, Json<ErrorResponse>)> {
+ state
+ .oauth
+ .create_session(
+ customer_id,
+ request.external_user_id,
+ request.app_id,
+ request.redirect_url,
+ )
+ .await
+ .map(|session| {
+ Json(ConnectSessionResponse {
+ connect_url: session.connect_url,
+ expires_at: session.expires_at,
+ })
+ })
+ .map_err(api_error)
+}
+
+#[utoipa::path(get, path = "/v1/connect/{token}", params(("token" = String, Path)), responses((status = 303, description = "Redirect to vendor authorization"), (status = 400)))]
+async fn authorize_connect(
+ State(state): State<AppState>,
+ Path(token): Path<String>,
+) -> Result<Redirect, (StatusCode, Json<ErrorResponse>)> {
+ state
+ .oauth
+ .authorize(&token)
+ .await
+ .map(|url| Redirect::to(&url))
+ .map_err(api_error)
+}
+
+#[utoipa::path(get, path = "/v1/oauth/client-metadata.json", responses((status = 200, description = "OAuth client metadata document")))]
+async fn client_metadata(State(state): State<AppState>) -> Json<serde_json::Value> {
+ let client_id = state.oauth.client_metadata_url();
+ Json(serde_json::json!({
+ "client_id": client_id,
+ "client_name": "Macro Connect",
+ "redirect_uris": [client_id.replace("/client-metadata.json", "/callback")],
+ "grant_types": ["authorization_code", "refresh_token"],
+ "response_types": ["code"],
+ "token_endpoint_auth_method": "none"
+ }))
+}
+
+#[utoipa::path(get, path = "/v1/oauth/callback", responses((status = 303, description = "Return to customer"), (status = 400)))]
+async fn oauth_callback(
+ State(state): State<AppState>,
+ Query(query): Query<CallbackQuery>,
+) -> Result<Redirect, (StatusCode, Json<ErrorResponse>)> {
+ state
+ .oauth
+ .callback(&query.state, query.code.as_deref(), query.error.as_deref())
+ .await
+ .map(|(url, _)| Redirect::to(&url))
+ .map_err(api_error)
+}
+
+async fn customer_auth(
+ State(state): State<AppState>,
+ mut request: Request,
+ next: Next,
+) -> Response {
+ let Some(key) = request
+ .headers()
+ .get(header::AUTHORIZATION)
+ .and_then(|value| value.to_str().ok())
+ .and_then(|value| value.strip_prefix("Bearer "))
+ else {
+ return StatusCode::UNAUTHORIZED.into_response();
+ };
+ match state.service.authenticate(key).await {
+ Ok(customer_id) => {
+ request.extensions_mut().insert(customer_id);
+ next.run(request).await
+ }
+ Err(Error::InvalidKey) => StatusCode::UNAUTHORIZED.into_response(),
+ Err(_) => StatusCode::INTERNAL_SERVER_ERROR.into_response(),
+ }
+}
+
+fn api_error(error: Error) -> (StatusCode, Json<ErrorResponse>) {
+ let (status, code) = match error {
+ Error::NotFound => (StatusCode::NOT_FOUND, "not_found"),
+ Error::NeedsReauth => (StatusCode::CONFLICT, "needs_reauth"),
+ Error::InvalidKey => (StatusCode::UNAUTHORIZED, "invalid_key"),
+ Error::InvalidRequest(reason) => (StatusCode::BAD_REQUEST, reason),
+ Error::InvalidState => (StatusCode::BAD_REQUEST, "invalid_state"),
+ Error::OAuth => (StatusCode::BAD_GATEWAY, "oauth_failed"),
+ Error::Storage(_) | Error::Cipher => (StatusCode::INTERNAL_SERVER_ERROR, "internal_error"),
+ };
+ (
+ status,
+ Json(ErrorResponse {
+ error: code.to_owned(),
+ }),
+ )
+}
+
+#[utoipa::path(get, path = "/v1/users/{external_user_id}/connections", params(("external_user_id" = String, Path)), responses((status = 200, body = [Connection]), (status = 401)), security(("customer_key" = [])))]
+async fn list_connections(
+ State(state): State<AppState>,
+ axum::extract::Extension(customer_id): axum::extract::Extension<uuid::Uuid>,
+ Path(user_id): Path<String>,
+) -> Result<Json<Vec<Connection>>, (StatusCode, Json<ErrorResponse>)> {
+ state
+ .service
+ .list(customer_id, &user_id)
+ .await
+ .map(|connections| {
+ Json(
+ connections
+ .into_iter()
+ .map(|connection| Connection {
+ app_id: connection.app_id,
+ status: match connection.status {
+ DomainConnectionStatus::Active => ConnectionStatus::Active,
+ DomainConnectionStatus::NeedsReauth => ConnectionStatus::NeedsReauth,
+ },
+ scopes: connection.scopes,
+ created_at: connection.created_at,
+ })
+ .collect(),
+ )
+ })
+ .map_err(api_error)
+}
+
+#[utoipa::path(delete, path = "/v1/users/{external_user_id}/connections/{app_id}", params(("external_user_id" = String, Path), ("app_id" = String, Path)), responses((status = 200, body = DeleteResponse, description = "Deleted locally; vendor grant is not revoked upstream"), (status = 401), (status = 404)), security(("customer_key" = [])))]
+async fn delete_connection(
+ State(state): State<AppState>,
+ axum::extract::Extension(customer_id): axum::extract::Extension<uuid::Uuid>,
+ Path((user_id, app_id)): Path<(String, String)>,
+) -> Result<Json<DeleteResponse>, (StatusCode, Json<ErrorResponse>)> {
+ if state
+ .service
+ .delete(customer_id, &user_id, &app_id)
+ .await
+ .map_err(api_error)?
+ {
+ Ok(Json(DeleteResponse {
+ vendor_grant_revoked: false,
+ }))
+ } else {
+ Err(api_error(Error::NotFound))
+ }
+}
+
+#[utoipa::path(get, path = "/v1/users/{external_user_id}/connections/{app_id}/token", params(("external_user_id" = String, Path), ("app_id" = String, Path)), responses((status = 200, body = TokenResponse), (status = 401), (status = 404), (status = 409, body = ErrorResponse, description = "Token expired; reauthorization required")), security(("customer_key" = [])))]
+async fn export_token(
+ State(state): State<AppState>,
+ axum::extract::Extension(customer_id): axum::extract::Extension<uuid::Uuid>,
+ Path((user_id, app_id)): Path<(String, String)>,
+) -> Result<Json<TokenResponse>, (StatusCode, Json<ErrorResponse>)> {
+ let mut grant = state
+ .oauth
+ .export(customer_id, &user_id, &app_id)
+ .await
+ .map_err(api_error)?;
+ Ok(Json(TokenResponse {
+ access_token: std::mem::take(&mut grant.access_token),
+ expires_at: grant.expires_at,
+ }))
+}
+
+fn router(state: AppState) -> Router {
+ let protected = Router::new()
+ .route("/v1/connect-sessions", post(create_connect_session))
+ .route(
+ "/v1/users/{external_user_id}/connections",
+ get(list_connections),
+ )
+ .route(
+ "/v1/users/{external_user_id}/connections/{app_id}",
+ axum::routing::delete(delete_connection),
+ )
+ .route(
+ "/v1/users/{external_user_id}/connections/{app_id}/token",
+ get(export_token),
+ )
+ .route(
+ "/v1/users/{external_user_id}/mcp/{app_id}",
+ post(mcp::proxy).get(mcp::proxy).delete(mcp::proxy),
+ )
+ .route_layer(middleware::from_fn_with_state(state.clone(), customer_auth));
+ let routes = Router::new()
+ .route("/health", get(health))
+ .route("/v1/catalog", get(catalog))
+ .route("/v1/catalog/{id}/icon.svg", get(icon))
+ .route("/v1/connect/{token}", get(authorize_connect))
+ .route("/v1/oauth/client-metadata.json", get(client_metadata))
+ .route("/v1/oauth/callback", get(oauth_callback))
+ .route("/openapi.json", get(openapi))
+ .merge(protected)
+ .with_state(state);
+ routes.layer(http_trace_layer())
+}
+
+#[tokio::main]
+async fn main() -> Result<(), rootcause::Report> {
+ let cli = Cli::parse();
+ let apps = all_apps().map_err(rootcause::Report::new)?;
+ let mut keys: Vec<String> = [
+ "DATABASE_URL",
+ "CONNECT_KMS_KEY_ID",
+ "CONNECT_LOCAL_WRAPPING_KEY",
+ "CONNECT_PUBLIC_URL",
+ "PORT",
+ "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT",
+ "OTEL_EXPORTER_OTLP_ENDPOINT",
+ "OTEL_SERVICE_NAME",
+ "RUST_LOG",
+ ]
+ .into_iter()
+ .map(str::to_owned)
+ .collect();
+ for app in apps.iter().filter(|app| {
+ app.status == Status::Live && app.client_registration == ClientRegistration::OwnApp
+ }) {
+ let prefix = app.id.as_str().to_ascii_uppercase();
+ keys.push(format!("{prefix}_CLIENT_ID"));
+ keys.push(format!("{prefix}_CLIENT_SECRET"));
+ }
+ let key_refs: Vec<&str> = keys.iter().map(String::as_str).collect();
+ let source = ConfigLoader::load(&key_refs)?;
+ let config = Config::load(&source, apps)?;
+ let telemetry = Telemetry::init("connect_api", &source)?;
+ drop(source);
+ let result = match cli.command {
+ Some(Command::CreateCustomer {
+ name,
+ redirect_origin,
+ }) => create_customer(&config, &name, &redirect_origin).await,
+ Some(Command::SetRedirectOrigins {
+ customer_id,
+ origins,
+ }) => set_redirect_origins(&config, customer_id, &origins).await,
+ None => run(&config, apps).await,
+ };
+ telemetry.shutdown()?;
+ result
+}
+
+async fn run(config: &Config, apps: &'static [App]) -> Result<(), rootcause::Report> {
+ let pool = PgPoolOptions::new().connect(&config.database_url).await?;
+ MIGRATOR.run(&pool).await?;
+ let wrapper: Arc<dyn outbound::KeyWrapper> = if let Some(key_id) = &config.kms_key_id {
+ let aws = load_aws_config().await;
+ Arc::new(KmsKeyWrapper::new(
+ aws_sdk_kms::Client::new(&aws),
+ key_id.clone(),
+ ))
+ } else if let Some(key) = &config.local_wrapping_key {
+ Arc::new(LocalKeyWrapper::from_base64(key).map_err(rootcause::Report::new)?)
+ } else {
+ return Err(
+ rootcause::Report::new(connect_platform::ConfigError::Missing(
+ "CONNECT_KMS_KEY_ID or CONNECT_LOCAL_WRAPPING_KEY",
+ ))
+ .into(),
+ );
+ };
+ let cipher: Arc<dyn GrantCipher> = Arc::new(EnvelopeCipher::new(wrapper));
+ let repository = Arc::new(PostgresRepository::new(pool));
+ let service = Arc::new(Service::new(repository.clone()));
+ let oauth = Arc::new(OAuthService::new(
+ repository,
+ cipher,
+ Arc::new(VendorOAuth::new().map_err(rootcause::Report::new)?),
+ apps,
+ config.public_url.clone(),
+ config.own_apps.clone(),
+ ));
+ let mcp_http = VendorMcp::new().map_err(rootcause::Report::new)?;
+ let listener = TcpListener::bind(("0.0.0.0", config.port)).await?;
+ tracing::info!(port = config.port, "connect_api listening");
+ axum::serve(
+ listener,
+ router(AppState {
+ apps,
+ service,
+ oauth,
+ mcp_http,
+ }),
+ )
+ .with_graceful_shutdown(async {
+ let _ = tokio::signal::ctrl_c().await;
+ })
+ .await?;
+ Ok(())
+}
+
+async fn create_customer(
+ config: &Config,
+ name: &str,
+ origins: &[String],
+) -> Result<(), rootcause::Report> {
+ for origin in origins {
+ validate_origin(origin).map_err(rootcause::Report::new)?;
+ }
+ let pool = PgPoolOptions::new().connect(&config.database_url).await?;
+ MIGRATOR.run(&pool).await?;
+ let key = PostgresRepository::new(pool)
+ .create_customer_with_origins(name, origins)
+ .await
+ .map_err(rootcause::Report::new)?;
+ println!("{}", key.as_str());
+ Ok(())
+}
+
+async fn set_redirect_origins(
+ config: &Config,
+ customer_id: uuid::Uuid,
+ origins: &[String],
+) -> Result<(), rootcause::Report> {
+ for origin in origins {
+ validate_origin(origin).map_err(rootcause::Report::new)?;
+ }
+ let pool = PgPoolOptions::new().connect(&config.database_url).await?;
+ MIGRATOR.run(&pool).await?;
+ let updated = update_redirect_origins(&PostgresRepository::new(pool), customer_id, origins)
+ .await
+ .map_err(rootcause::Report::new)?;
+ if !updated {
+ return Err(rootcause::Report::new(Error::NotFound).into());
+ }
+ Ok(())
+}
+
+#[cfg(test)]
+mod oauth_test;
+#[cfg(test)]
+mod test;
diff --git a/connect/services/connect_api/src/mcp.rs b/connect/services/connect_api/src/mcp.rs
new file mode 100644
index 0000000000..cb5f399ba3
--- /dev/null
+++ b/connect/services/connect_api/src/mcp.rs
@@ -0,0 +1,241 @@
+use std::time::Instant;
+
+use axum::{
+ Json,
+ body::Body,
+ extract::{Extension, Path, Request, State},
+ http::{HeaderMap, Method, StatusCode, header},
+ response::{IntoResponse, Response},
+};
+use bytes::Bytes;
+use connect_client::wire::McpErrorResponse;
+use futures::StreamExt as _;
+use uuid::Uuid;
+
+use crate::{AppState, domain::Error};
+
+const RETRY_BODY_LIMIT: usize = 1024 * 1024;
+
+fn error(status: StatusCode, code: &'static str, app_id: &str) -> Response {
+ (
+ status,
+ Json(McpErrorResponse {
+ error: code.to_owned(),
+ app_id: app_id.to_owned(),
+ }),
+ )
+ .into_response()
+}
+
+fn domain_error(error_value: Error, app_id: &str) -> Response {
+ match error_value {
+ Error::NotFound => error(StatusCode::NOT_FOUND, "not_found", app_id),
+ Error::NeedsReauth => error(StatusCode::CONFLICT, "needs_reauth", app_id),
+ _ => error(StatusCode::INTERNAL_SERVER_ERROR, "internal_error", app_id),
+ }
+}
+
+fn forward_headers(source: &HeaderMap, destination: &mut HeaderMap) {
+ for name in [
+ header::ACCEPT,
+ header::CONTENT_TYPE,
+ header::HeaderName::from_static("mcp-session-id"),
+ header::HeaderName::from_static("mcp-protocol-version"),
+ ] {
+ if let Some(value) = source.get(&name) {
+ destination.insert(name, value.clone());
+ }
+ }
+}
+
+async fn request_body(body: Body) -> Result<(reqwest::Body, Option<Bytes>), axum::Error> {
+ let mut stream = body.into_data_stream();
+ let mut prefix = Vec::new();
+ while let Some(chunk) = stream.next().await {
+ let chunk = chunk?;
+ if prefix.len() + chunk.len() > RETRY_BODY_LIMIT {
+ let body = async_stream::stream! {
+ yield Ok::<Bytes, axum::Error>(Bytes::from(prefix));
+ yield Ok(chunk);
+ while let Some(next) = stream.next().await {
+ yield next;
+ }
+ };
+ return Ok((reqwest::Body::wrap_stream(body), None));
+ }
+ prefix.extend_from_slice(&chunk);
+ }
+ let bytes = Bytes::from(prefix);
+ Ok((reqwest::Body::from(bytes.clone()), Some(bytes)))
+}
+
+#[utoipa::path(
+ method(post, get, delete),
+ path = "/v1/users/{external_user_id}/mcp/{app_id}",
+ params(("external_user_id" = String, Path), ("app_id" = String, Path)),
+ responses(
+ (status = 200, description = "Vendor MCP response; JSON or SSE"),
+ (status = 401, description = "Invalid customer key"),
+ (status = 404, body = McpErrorResponse),
+ (status = 409, body = McpErrorResponse, description = "Connection needs reauthorization")
+ ),
+ security(("customer_key" = []))
+)]
+#[tracing::instrument(
+ name = "connect.mcp.proxy",
+ skip_all,
+ fields(customer_id = %customer_id, app_id = %app_id, method, vendor_status, refresh_retry, bytes, time_to_first_byte_ms)
+)]
+pub async fn proxy(
+ State(state): State<AppState>,
+ Extension(customer_id): Extension<Uuid>,
+ Path((user_id, app_id)): Path<(String, String)>,
+ request: Request,
+) -> Response {
+ let mcp_url = match state.oauth.mcp_url(&app_id) {
+ Ok(url) => url,
+ Err(error_value) => return domain_error(error_value, &app_id),
+ };
+ let span = tracing::Span::current();
+ let (parts, body) = request.into_parts();
+ let (outbound_body, replay) = match request_body(body).await {
+ Ok(body) => body,
+ Err(_) => return error(StatusCode::BAD_REQUEST, "invalid_body", &app_id),
+ };
+ if parts.method == Method::POST
+ && let Some(bytes) = &replay
+ && let Ok(value) = serde_json::from_slice::<serde_json::Value>(bytes)
+ && let Some(method) = value.get("method").and_then(serde_json::Value::as_str)
+ {
+ span.record("method", method);
+ }
+ let grant = match state.oauth.export(customer_id, &user_id, &app_id).await {
+ Ok(grant) => grant,
+ Err(error_value) => return domain_error(error_value, &app_id),
+ };
+ let mut token = grant;
+ let mut retried = false;
+ let mut outbound_body = Some(outbound_body);
+ loop {
+ let mut headers = HeaderMap::new();
+ forward_headers(&parts.headers, &mut headers);
+ let Some(body) = outbound_body.take() else {
+ return error(StatusCode::INTERNAL_SERVER_ERROR, "internal_error", &app_id);
+ };
+ let started = Instant::now();
+ let response = state
+ .mcp_http
+ .send(
+ parts.method.clone(),
+ mcp_url,
+ headers,
+ &token.access_token,
+ body,
+ )
+ .await;
+ let response = match response {
+ Ok(response) => response,
+ Err(_) => {
+ span.record("refresh_retry", "vendor_error");
+ return error(StatusCode::BAD_GATEWAY, "vendor_error", &app_id);
+ }
+ };
+ span.record("vendor_status", response.status().as_u16());
+ if response.status() == StatusCode::UNAUTHORIZED {
+ match state
+ .oauth
+ .recover_vendor_unauthorized(
+ customer_id,
+ &user_id,
+ &app_id,
+ &token.access_token,
+ replay.is_some(),
+ retried,
+ )
+ .await
+ {
+ Ok(Some(grant)) => {
+ retried = true;
+ token = grant;
+ if let Some(bytes) = &replay {
+ outbound_body = Some(reqwest::Body::from(bytes.clone()));
+ }
+ continue;
+ }
+ Ok(None) => {}
+ Err(error_value) => {
+ span.record(
+ "refresh_retry",
+ if retried {
+ "second_401"
+ } else {
+ "refresh_failed"
+ },
+ );
+ return domain_error(error_value, &app_id);
+ }
+ }
+ }
+ span.record(
+ "refresh_retry",
+ if retried {
+ "success"
+ } else if response.status() == StatusCode::UNAUTHORIZED {
+ "body_too_large"
+ } else {
+ "none"
+ },
+ );
+ return stream_response(response, span, started, &app_id);
+ }
+}
+
+fn stream_response(
+ response: reqwest::Response,
+ span: tracing::Span,
+ started: Instant,
+ app_id: &str,
+) -> Response {
+ let mut builder = Response::builder().status(response.status());
+ for name in [
+ header::CONTENT_TYPE,
+ header::HeaderName::from_static("mcp-session-id"),
+ ] {
+ if let Some(value) = response.headers().get(&name) {
+ builder = builder.header(name, value);
+ }
+ }
+ let mut source = response.bytes_stream();
+ let response_body = async_stream::stream! {
+ let mut total = 0_u64;
+ let mut first = true;
+ while let Some(next) = source.next().await {
+ match next {
+ Ok(bytes) => {
+ if first {
+ span.record("time_to_first_byte_ms", started.elapsed().as_millis() as u64);
+ first = false;
+ }
+ total += bytes.len() as u64;
+ span.record("bytes", total);
+ yield Ok::<Bytes, reqwest::Error>(bytes);
+ }
+ Err(error_value) => {
+ tracing::warn!(parent: &span, error = ?error_value, "MCP response stream failed");
+ yield Err(error_value);
+ break;
+ }
+ }
+ }
+ if first {
+ span.record("time_to_first_byte_ms", started.elapsed().as_millis() as u64);
+ span.record("bytes", 0_u64);
+ }
+ };
+ builder
+ .body(Body::from_stream(response_body))
+ .unwrap_or_else(|_| error(StatusCode::BAD_GATEWAY, "vendor_error", app_id))
+}
+
+#[cfg(test)]
+mod test;
diff --git a/connect/services/connect_api/src/mcp/test.rs b/connect/services/connect_api/src/mcp/test.rs
new file mode 100644
index 0000000000..17090e6795
--- /dev/null
+++ b/connect/services/connect_api/src/mcp/test.rs
@@ -0,0 +1,290 @@
+use axum::{
+ body::Body,
+ http::{Method, Request, StatusCode, header},
+};
+use connect_registry::ClientRegistration;
+use http_body_util::BodyExt as _;
+use serde_json::{Value, json};
+use tokio::io::{AsyncReadExt as _, AsyncWriteExt as _};
+use tower::ServiceExt as _;
+use wiremock::{
+ Mock, MockServer, ResponseTemplate,
+ matchers::{body_bytes, body_string_contains, header as header_matcher, method, path},
+};
+
+use crate::{
+ oauth_test::{callback, fixture, start, vendor_server},
+ test_support::TestDatabase,
+};
+
+#[tokio::test]
+async fn sse_first_event_arrives_before_vendor_finishes() {
+ let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
+ let address = listener.local_addr().unwrap();
+ let (release, wait_for_release) = tokio::sync::oneshot::channel::<()>();
+ let server = tokio::spawn(async move {
+ let (mut socket, _) = listener.accept().await.unwrap();
+ let mut request = [0_u8; 1024];
+ socket.read_exact(&mut request[..1]).await.unwrap();
+ socket.write_all(b"HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\nTransfer-Encoding: chunked\r\n\r\n").await.unwrap();
+ let first = "data: first\n\n";
+ socket
+ .write_all(format!("{:x}\r\n{first}\r\n", first.len()).as_bytes())
+ .await
+ .unwrap();
+ wait_for_release.await.unwrap();
+ let second = "data: second\n\n";
+ socket
+ .write_all(format!("{:x}\r\n{second}\r\n0\r\n\r\n", second.len()).as_bytes())
+ .await
+ .unwrap();
+ });
+ let started = std::time::Instant::now();
+ let vendor = reqwest::Client::new()
+ .get(format!("http://{address}/mcp"))
+ .send()
+ .await
+ .unwrap();
+ let response = super::stream_response(vendor, tracing::Span::none(), started, "testapp");
+ let mut body = response.into_body();
+ let first = tokio::time::timeout(std::time::Duration::from_secs(5), body.frame())
+ .await
+ .unwrap()
+ .unwrap()
+ .unwrap()
+ .into_data()
+ .unwrap();
+ assert_eq!(first, "data: first\n\n");
+ release.send(()).unwrap();
+ assert_eq!(body.collect().await.unwrap().to_bytes(), "data: second\n\n");
+ server.await.unwrap();
+}
+
+async fn connected(pool: sqlx::PgPool, vendor: &MockServer) -> (axum::Router, String, String) {
+ let (app, repository, _) = fixture(
+ pool,
+ vendor,
+ ClientRegistration::OwnApp,
+ "https://connect.example",
+ );
+ let key = repository
+ .create_customer_with_origins("customer", &["https://customer.example".into()])
+ .await
+ .unwrap();
+ let (_, state) = start(&app, &key, "https://customer.example/done").await;
+ callback(&app, &state, "").await;
+ let other_key = repository.create_customer("other customer").await.unwrap();
+ (app, key.as_str().to_owned(), other_key.as_str().to_owned())
+}
+
+fn request(method: Method, key: &str, body: Body) -> Request<Body> {
+ Request::builder()
+ .method(method)
+ .uri("/v1/users/user-a/mcp/testapp")
+ .header(header::AUTHORIZATION, format!("Bearer {key}"))
+ .header(header::ACCEPT, "application/json, text/event-stream")
+ .header(header::CONTENT_TYPE, "application/json")
+ .header("mcp-protocol-version", "2025-06-18")
+ .header("mcp-session-id", "client-session")
+ .body(body)
+ .unwrap()
+}
+
+async fn json_response(response: axum::response::Response) -> Value {
+ serde_json::from_slice(&response.into_body().collect().await.unwrap().to_bytes()).unwrap()
+}
+
+#[tokio::test]
+async fn forwards_json_headers_and_isolates_customers() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 3600, false, 0).await;
+ Mock::given(method("POST"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer first-token"))
+ .and(header_matcher("mcp-session-id", "client-session"))
+ .and(header_matcher("mcp-protocol-version", "2025-06-18"))
+ .and(body_string_contains("tools/list"))
+ .respond_with(
+ ResponseTemplate::new(200)
+ .insert_header("mcp-session-id", "vendor-session")
+ .set_body_json(json!({"jsonrpc":"2.0","id":1,"result":{"tools":[]}})),
+ )
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ Mock::given(method("DELETE"))
+ .and(path("/mcp"))
+ .respond_with(ResponseTemplate::new(202))
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let (app, key, other_key) = connected(pool, &vendor).await;
+ let response = app
+ .clone()
+ .oneshot(request(
+ Method::POST,
+ &key,
+ Body::from(json!({"jsonrpc":"2.0","id":1,"method":"tools/list"}).to_string()),
+ ))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ assert_eq!(response.headers()["mcp-session-id"], "vendor-session");
+ assert_eq!(json_response(response).await["result"]["tools"], json!([]));
+ let response = app
+ .clone()
+ .oneshot(request(Method::DELETE, &key, Body::empty()))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::ACCEPTED);
+ let response = app
+ .clone()
+ .oneshot(request(Method::GET, &other_key, Body::empty()))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::NOT_FOUND);
+ assert_eq!(json_response(response).await["app_id"], "testapp");
+ let response = app
+ .clone()
+ .oneshot(
+ Request::builder()
+ .method(Method::GET)
+ .uri("/v1/users/user-a/mcp/unknown")
+ .header(header::AUTHORIZATION, format!("Bearer {key}"))
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::NOT_FOUND);
+ assert_eq!(json_response(response).await["app_id"], "unknown");
+}
+
+#[tokio::test]
+async fn streams_sse_and_preserves_content_type() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 3600, false, 0).await;
+ Mock::given(method("GET"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer first-token"))
+ .respond_with(
+ ResponseTemplate::new(200)
+ .set_body_raw("event: message\ndata: hello\n\n", "text/event-stream"),
+ )
+ .with_priority(1)
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let (app, key, _) = connected(pool, &vendor).await;
+ let response = app
+ .oneshot(request(Method::GET, &key, Body::empty()))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ assert_eq!(
+ response.headers()[header::CONTENT_TYPE],
+ "text/event-stream"
+ );
+ assert_eq!(
+ response.into_body().collect().await.unwrap().to_bytes(),
+ "event: message\ndata: hello\n\n"
+ );
+}
+
+#[tokio::test]
+async fn unauthorized_refreshes_and_retries_once() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 3600, false, 1).await;
+ Mock::given(method("POST"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer first-token"))
+ .respond_with(ResponseTemplate::new(401))
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ Mock::given(method("POST"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer refreshed-token"))
+ .respond_with(
+ ResponseTemplate::new(200).set_body_json(json!({"result":{"tools":[{"name":"read"}]}})),
+ )
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let (app, key, _) = connected(pool, &vendor).await;
+ let response = app
+ .oneshot(request(
+ Method::POST,
+ &key,
+ Body::from(json!({"method":"tools/list"}).to_string()),
+ ))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ assert_eq!(
+ json_response(response).await["result"]["tools"][0]["name"],
+ "read"
+ );
+}
+
+#[tokio::test]
+async fn second_unauthorized_marks_connection_needs_reauth() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 3600, false, 1).await;
+ Mock::given(method("POST"))
+ .and(path("/mcp"))
+ .respond_with(ResponseTemplate::new(401))
+ .expect(2)
+ .mount(&vendor)
+ .await;
+ let (app, key, _) = connected(pool, &vendor).await;
+ let response = app
+ .clone()
+ .oneshot(request(
+ Method::POST,
+ &key,
+ Body::from(json!({"method":"tools/list"}).to_string()),
+ ))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::CONFLICT);
+ assert_eq!(
+ json_response(response).await,
+ json!({"error":"needs_reauth","app_id":"testapp"})
+ );
+ let response = app
+ .oneshot(request(Method::GET, &key, Body::empty()))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::CONFLICT);
+ assert_eq!(json_response(response).await["error"], "needs_reauth");
+}
+
+#[tokio::test]
+async fn large_post_is_forwarded_without_retry() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 3600, false, 0).await;
+ Mock::given(method("POST"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer first-token"))
+ .and(body_bytes(vec![b'x'; super::RETRY_BODY_LIMIT + 1]))
+ .respond_with(ResponseTemplate::new(401))
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let (app, key, _) = connected(pool, &vendor).await;
+ let response = app
+ .oneshot(request(
+ Method::POST,
+ &key,
+ Body::from(vec![b'x'; super::RETRY_BODY_LIMIT + 1]),
+ ))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::UNAUTHORIZED);
+}
diff --git a/connect/services/connect_api/src/oauth_test.rs b/connect/services/connect_api/src/oauth_test.rs
new file mode 100644
index 0000000000..0bb42068d5
--- /dev/null
+++ b/connect/services/connect_api/src/oauth_test.rs
@@ -0,0 +1,508 @@
+use std::{collections::HashMap, sync::Arc};
+
+use axum::{
+ body::Body,
+ http::{Method, Request, StatusCode, header},
+};
+use base64::{Engine as _, engine::general_purpose::STANDARD};
+use chrono::NaiveDate;
+use connect_registry::{Access, App, AppId, ClientRegistration, Status};
+use http_body_util::BodyExt as _;
+use serde_json::{Value, json};
+use tower::ServiceExt as _;
+use url::Url;
+use wiremock::{
+ Mock, MockServer, ResponseTemplate,
+ matchers::{body_string_contains, header as header_matcher, method, path},
+};
+
+use crate::{
+ AppState,
+ domain::{
+ GrantCipher, Repository as _, Service,
+ oauth::{Client, OAuthService},
+ },
+ outbound::{EnvelopeCipher, LocalKeyWrapper, PostgresRepository, oauth::VendorOAuth},
+ router,
+ test_support::TestDatabase,
+};
+
+#[test]
+fn redirect_origins_accept_only_https_or_local_http_without_paths() {
+ use crate::domain::oauth::validate_origin;
+ for origin in [
+ "https://customer.example",
+ "https://customer.example:8443",
+ "http://localhost:8080",
+ "http://127.0.0.1:8080",
+ ] {
+ assert!(validate_origin(origin).is_ok(), "{origin}");
+ }
+ for origin in [
+ "http://customer.example",
+ "https://customer.example/path",
+ "https://customer.example/",
+ "https://customer.example?x=1",
+ "https://[email protected]",
+ "ftp://customer.example",
+ ] {
+ assert!(validate_origin(origin).is_err(), "{origin}");
+ }
+}
+
+pub(crate) async fn vendor_server(
+ kind: ClientRegistration,
+ access_expires_in: i64,
+ refresh_error: bool,
+ refresh_expected: u64,
+) -> MockServer {
+ let server = MockServer::start().await;
+ Mock::given(method("GET"))
+ .and(path("/mcp"))
+ .respond_with(ResponseTemplate::new(401))
+ .mount(&server)
+ .await;
+ Mock::given(method("GET")).and(path("/.well-known/oauth-authorization-server/mcp"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({
+ "issuer": server.uri(),
+ "authorization_endpoint": format!("{}/authorize", server.uri()),
+ "token_endpoint": format!("{}/token", server.uri()),
+ "registration_endpoint": if kind == ClientRegistration::Dcr { Some(format!("{}/register", server.uri())) } else { None },
+ "client_id_metadata_document_supported": kind == ClientRegistration::Cimd,
+ "response_types_supported": ["code"],
+ "code_challenge_methods_supported": ["S256"]
+ }))).mount(&server).await;
+ if kind == ClientRegistration::Dcr {
+ Mock::given(method("POST"))
+ .and(path("/register"))
+ .respond_with(ResponseTemplate::new(201).set_body_json(json!({
+ "client_id": "dynamic-client", "client_secret": "dynamic-secret",
+ "redirect_uris": ["https://connect.example/v1/oauth/callback"]
+ })))
+ .expect(1)
+ .mount(&server)
+ .await;
+ }
+ Mock::given(method("POST"))
+ .and(path("/token"))
+ .and(body_string_contains("grant_type=authorization_code"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({
+ "access_token": "first-token", "refresh_token": "refresh-secret",
+ "token_type": "Bearer", "expires_in": access_expires_in, "scope": "read"
+ })))
+ .mount(&server)
+ .await;
+ if refresh_error {
+ Mock::given(method("POST"))
+ .and(path("/token"))
+ .and(body_string_contains("grant_type=refresh_token"))
+ .respond_with(
+ ResponseTemplate::new(400).set_body_json(json!({"error": "invalid_grant"})),
+ )
+ .expect(1)
+ .mount(&server)
+ .await;
+ } else {
+ Mock::given(method("POST"))
+ .and(path("/token"))
+ .and(body_string_contains("grant_type=refresh_token"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({
+ "access_token": "refreshed-token", "refresh_token": "next-refresh",
+ "token_type": "Bearer", "expires_in": 3600, "scope": "read"
+ })))
+ .expect(refresh_expected)
+ .mount(&server)
+ .await;
+ }
+ server
+}
+
+pub(crate) fn fixture(
+ pool: sqlx::PgPool,
+ server: &MockServer,
+ kind: ClientRegistration,
+ public_url: &str,
+) -> (axum::Router, Arc<PostgresRepository>, &'static [App]) {
+ let app = App {
+ id: AppId::parse("testapp").unwrap(),
+ name: "Test".into(),
+ description: "Test MCP".into(),
+ access: vec![Access::Mcp],
+ mcp_url: format!("{}/mcp", server.uri()),
+ client_registration: kind,
+ scopes: vec!["read".into()],
+ pipedream_app_slugs: vec![],
+ status: Status::Live,
+ probed: NaiveDate::from_ymd_opt(2026, 10, 30).unwrap(),
+ icon_svg: None,
+ };
+ let apps: &'static [App] = Box::leak(vec![app].into_boxed_slice());
+ let repository = Arc::new(PostgresRepository::new(pool));
+ let cipher: Arc<dyn GrantCipher> = Arc::new(EnvelopeCipher::new(Arc::new(
+ LocalKeyWrapper::from_base64(&STANDARD.encode([4_u8; 32])).unwrap(),
+ )));
+ let own_apps = HashMap::from([(
+ "testapp".into(),
+ Client {
+ id: "own-client".into(),
+ secret: Some("own-secret".to_owned().into()),
+ kind: ClientRegistration::OwnApp,
+ },
+ )]);
+ let oauth = Arc::new(OAuthService::new(
+ repository.clone(),
+ cipher.clone(),
+ Arc::new(VendorOAuth::new().unwrap()),
+ apps,
+ Url::parse(public_url).unwrap(),
+ own_apps,
+ ));
+ let service = Arc::new(Service::new(repository.clone()));
+ (
+ router(AppState {
+ apps,
+ service,
+ oauth,
+ mcp_http: crate::outbound::mcp::VendorMcp::new().unwrap(),
+ }),
+ repository,
+ apps,
+ )
+}
+
+#[tokio::test]
+async fn root_host_is_preserved_in_oauth_urls() {
+ let vendor = vendor_server(ClientRegistration::Cimd, 3600, false, 0).await;
+ let pool = sqlx::postgres::PgPoolOptions::new()
+ .connect_lazy("postgres://localhost/connect_test")
+ .unwrap();
+ let (app, _, _) = fixture(
+ pool,
+ &vendor,
+ ClientRegistration::Cimd,
+ "https://connect.example",
+ );
+ let response = app
+ .oneshot(
+ Request::builder()
+ .uri("/v1/oauth/client-metadata.json")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body: Value =
+ serde_json::from_slice(&response.into_body().collect().await.unwrap().to_bytes()).unwrap();
+ assert_eq!(
+ body["client_id"],
+ "https://connect.example/v1/oauth/client-metadata.json"
+ );
+ assert_eq!(
+ body["redirect_uris"][0],
+ "https://connect.example/v1/oauth/callback"
+ );
+}
+
+pub(crate) async fn start(app: &axum::Router, key: &str, redirect_url: &str) -> (String, String) {
+ let response = app.clone().oneshot(Request::builder().method(Method::POST).uri("/v1/connect-sessions")
+ .header(header::AUTHORIZATION, format!("Bearer {key}"))
+ .header(header::CONTENT_TYPE, "application/json")
+ .body(Body::from(json!({"external_user_id":"user-a","app_id":"testapp","redirect_url":redirect_url}).to_string())).unwrap()).await.unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body: Value =
+ serde_json::from_slice(&response.into_body().collect().await.unwrap().to_bytes()).unwrap();
+ let connect_url = body["connect_url"].as_str().unwrap();
+ let path = Url::parse(connect_url).unwrap().path().to_owned();
+ let response = app
+ .clone()
+ .oneshot(Request::builder().uri(path).body(Body::empty()).unwrap())
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::SEE_OTHER);
+ let authorization_url = response.headers()[header::LOCATION]
+ .to_str()
+ .unwrap()
+ .to_owned();
+ let state = Url::parse(&authorization_url)
+ .unwrap()
+ .query_pairs()
+ .find(|(key, _)| key == "state")
+ .unwrap()
+ .1
+ .into_owned();
+ (authorization_url, state)
+}
+
+pub(crate) async fn callback(app: &axum::Router, state: &str, extra: &str) -> String {
+ let mut url = Url::parse("http://localhost/v1/oauth/callback").unwrap();
+ url.query_pairs_mut()
+ .append_pair("state", state)
+ .append_pair("code", "ok");
+ if !extra.is_empty() {
+ url.query_pairs_mut().append_pair("error", extra);
+ }
+ let response = app
+ .clone()
+ .oneshot(
+ Request::builder()
+ .uri(format!("{}?{}", url.path(), url.query().unwrap()))
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::SEE_OTHER);
+ response.headers()[header::LOCATION]
+ .to_str()
+ .unwrap()
+ .to_owned()
+}
+
+async fn export(app: &axum::Router, key: &str) -> (StatusCode, Value) {
+ let response = app
+ .clone()
+ .oneshot(
+ Request::builder()
+ .uri("/v1/users/user-a/connections/testapp/token")
+ .header(header::AUTHORIZATION, format!("Bearer {key}"))
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ let status = response.status();
+ let body =
+ serde_json::from_slice(&response.into_body().collect().await.unwrap().to_bytes()).unwrap();
+ (status, body)
+}
+
+#[tokio::test]
+#[expect(
+ clippy::disallowed_methods,
+ reason = "Connect tests use runtime-checked SQLx queries against their own test database"
+)]
+async fn cimd_flow_state_reuse_expiry_allowlist_and_vendor_error() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::Cimd, 3600, false, 0).await;
+ let (app, repository, _) = fixture(
+ pool.clone(),
+ &vendor,
+ ClientRegistration::Cimd,
+ "https://connect.example",
+ );
+ let metadata = app
+ .clone()
+ .oneshot(
+ Request::builder()
+ .uri("/v1/oauth/client-metadata.json")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(metadata.status(), StatusCode::OK);
+ let metadata: Value =
+ serde_json::from_slice(&metadata.into_body().collect().await.unwrap().to_bytes()).unwrap();
+ assert_eq!(
+ metadata["client_id"],
+ "https://connect.example/v1/oauth/client-metadata.json"
+ );
+ assert_eq!(
+ metadata["redirect_uris"][0],
+ "https://connect.example/v1/oauth/callback"
+ );
+ let key = repository
+ .create_customer_with_origins("Macro", &["https://customer.example".into()])
+ .await
+ .unwrap();
+ let denied = app.clone().oneshot(Request::builder().method(Method::POST).uri("/v1/connect-sessions")
+ .header(header::AUTHORIZATION, format!("Bearer {}", key.as_str()))
+ .header(header::CONTENT_TYPE, "application/json")
+ .body(Body::from(json!({"external_user_id":"user-a","app_id":"testapp","redirect_url":"https://wrong.example/done"}).to_string())).unwrap()).await.unwrap();
+ assert_eq!(denied.status(), StatusCode::BAD_REQUEST);
+ for redirect_url in [
+ "https://customer.example/done?status=connected",
+ "https://[email protected]/done",
+ ] {
+ let response = app.clone().oneshot(Request::builder().method(Method::POST).uri("/v1/connect-sessions")
+ .header(header::AUTHORIZATION, format!("Bearer {}", key.as_str()))
+ .header(header::CONTENT_TYPE, "application/json")
+ .body(Body::from(json!({"external_user_id":"user-a","app_id":"testapp","redirect_url":redirect_url}).to_string())).unwrap()).await.unwrap();
+ assert_eq!(response.status(), StatusCode::BAD_REQUEST);
+ }
+ let (authorization_url, state) = start(&app, &key, "https://customer.example/done").await;
+ assert!(
+ authorization_url.contains(
+ "client_id=https%3A%2F%2Fconnect.example%2Fv1%2Foauth%2Fclient-metadata.json"
+ )
+ );
+ assert!(
+ callback(&app, &state, "")
+ .await
+ .contains("status=connected")
+ );
+ assert!(
+ callback(&app, &state, "")
+ .await
+ .contains("reason=reused_state")
+ );
+ let (status, body) = export(&app, &key).await;
+ assert_eq!(status, StatusCode::OK);
+ assert_eq!(body["accessToken"], "first-token");
+ Mock::given(method("GET"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer first-token"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({"tools": []})))
+ .with_priority(1)
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let resource = reqwest::Client::new()
+ .get(format!("{}/mcp", vendor.uri()))
+ .bearer_auth(body["accessToken"].as_str().unwrap())
+ .send()
+ .await
+ .unwrap();
+ assert_eq!(resource.status(), reqwest::StatusCode::OK);
+ let (_, state) = start(&app, &key, "https://customer.example/done").await;
+ sqlx::query(
+ "UPDATE oauth_states SET expires_at = now() - interval '1 second' WHERE state = $1",
+ )
+ .bind(&state)
+ .execute(&pool)
+ .await
+ .unwrap();
+ assert!(
+ callback(&app, &state, "")
+ .await
+ .contains("reason=expired_state")
+ );
+ let (_, state) = start(&app, &key, "https://customer.example/done").await;
+ assert!(
+ callback(&app, &state, "access_denied")
+ .await
+ .contains("reason=access_denied")
+ );
+ vendor.verify().await;
+}
+
+#[tokio::test]
+async fn dcr_registers_once_and_reconnects() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::Dcr, 3600, false, 0).await;
+ let (app, repository, _) = fixture(
+ pool,
+ &vendor,
+ ClientRegistration::Dcr,
+ "https://connect.example",
+ );
+ let key = repository
+ .create_customer_with_origins("Macro", &["https://customer.example".into()])
+ .await
+ .unwrap();
+ for _ in 0..2 {
+ let (authorization_url, state) = start(&app, &key, "https://customer.example/done").await;
+ assert!(authorization_url.contains("client_id=dynamic-client"));
+ assert!(
+ callback(&app, &state, "")
+ .await
+ .contains("status=connected")
+ );
+ }
+ let (status, body) = export(&app, &key).await;
+ assert_eq!(status, StatusCode::OK);
+ Mock::given(method("GET"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer first-token"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({"tools": []})))
+ .with_priority(1)
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let resource = reqwest::Client::new()
+ .get(format!("{}/mcp", vendor.uri()))
+ .bearer_auth(body["accessToken"].as_str().unwrap())
+ .send()
+ .await
+ .unwrap();
+ assert_eq!(resource.status(), reqwest::StatusCode::OK);
+ vendor.verify().await;
+}
+
+#[tokio::test]
+async fn own_app_refreshes_concurrent_exports_once() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 30, false, 1).await;
+ let (app, repository, _) = fixture(
+ pool,
+ &vendor,
+ ClientRegistration::OwnApp,
+ "https://connect.example",
+ );
+ let key = repository
+ .create_customer_with_origins("Macro", &["https://customer.example".into()])
+ .await
+ .unwrap();
+ let (authorization_url, state) = start(&app, &key, "https://customer.example/done").await;
+ assert!(authorization_url.contains("client_id=own-client"));
+ assert!(
+ callback(&app, &state, "")
+ .await
+ .contains("status=connected")
+ );
+ let (first, second) = tokio::join!(export(&app, &key), export(&app, &key));
+ assert_eq!(first.0, StatusCode::OK);
+ assert_eq!(second.0, StatusCode::OK);
+ assert_eq!(first.1["accessToken"], "refreshed-token");
+ assert_eq!(second.1["accessToken"], "refreshed-token");
+ Mock::given(method("GET"))
+ .and(path("/mcp"))
+ .and(header_matcher("authorization", "Bearer refreshed-token"))
+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({"tools": []})))
+ .with_priority(1)
+ .expect(1)
+ .mount(&vendor)
+ .await;
+ let resource = reqwest::Client::new()
+ .get(format!("{}/mcp", vendor.uri()))
+ .bearer_auth(first.1["accessToken"].as_str().unwrap())
+ .send()
+ .await
+ .unwrap();
+ assert_eq!(resource.status(), reqwest::StatusCode::OK);
+ vendor.verify().await;
+}
+
+#[tokio::test]
+async fn invalid_grant_marks_connection_needs_reauth() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let vendor = vendor_server(ClientRegistration::OwnApp, 30, true, 1).await;
+ let (app, repository, _) = fixture(
+ pool,
+ &vendor,
+ ClientRegistration::OwnApp,
+ "https://connect.example",
+ );
+ let key = repository
+ .create_customer_with_origins("Macro", &["https://customer.example".into()])
+ .await
+ .unwrap();
+ let (_, state) = start(&app, &key, "https://customer.example/done").await;
+ assert!(
+ callback(&app, &state, "")
+ .await
+ .contains("status=connected")
+ );
+ let (status, body) = export(&app, &key).await;
+ assert_eq!(status, StatusCode::CONFLICT);
+ assert_eq!(body["error"], "needs_reauth");
+ let customer_id = repository.authenticate(&key).await.unwrap();
+ let connections = repository.list(customer_id, "user-a").await.unwrap();
+ assert_eq!(connections[0].status.to_string(), "needs_reauth");
+ vendor.verify().await;
+}
diff --git a/connect/services/connect_api/src/outbound.rs b/connect/services/connect_api/src/outbound.rs
new file mode 100644
index 0000000000..70e133ca7d
--- /dev/null
+++ b/connect/services/connect_api/src/outbound.rs
@@ -0,0 +1,434 @@
+use std::{collections::HashMap, sync::Arc};
+
+use aes_gcm::{
+ Aes256Gcm, Nonce,
+ aead::{Aead, AeadCore, KeyInit, OsRng, Payload},
+};
+use aws_sdk_kms::{primitives::Blob, types::DataKeySpec};
+use base64::{Engine as _, engine::general_purpose::STANDARD};
+use chrono::{DateTime, Utc};
+use rand::RngCore as _;
+use sha2::{Digest as _, Sha256};
+use sqlx::PgPool;
+use subtle::ConstantTimeEq as _;
+use uuid::Uuid;
+use zeroize::Zeroizing;
+
+#[cfg(test)]
+use crate::domain::StoredGrant;
+use crate::domain::{
+ Connection, ConnectionStatus, CustomerApiKey, Envelope, Error, Grant, GrantCipher, GrantData,
+ Repository,
+};
+
+pub mod mcp;
+pub mod oauth;
+pub mod oauth_store;
+
+pub static MIGRATOR: sqlx::migrate::Migrator = sqlx::migrate!("./migrations");
+
+fn storage(error: sqlx::Error) -> Error {
+ Error::Storage(rootcause::Report::new(error).into_dynamic())
+}
+
+pub struct PostgresRepository {
+ pool: PgPool,
+}
+
+impl PostgresRepository {
+ pub fn new(pool: PgPool) -> Self {
+ Self { pool }
+ }
+
+ #[cfg(test)]
+ pub async fn create_customer(&self, name: &str) -> Result<CustomerApiKey, Error> {
+ self.create_customer_with_origins(name, &[]).await
+ }
+
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+ )]
+ pub async fn create_customer_with_origins(
+ &self,
+ name: &str,
+ origins: &[String],
+ ) -> Result<CustomerApiKey, Error> {
+ let customer_id = Uuid::now_v7();
+ let key_id = Uuid::now_v7();
+ let mut secret_bytes = Zeroizing::new([0_u8; 32]);
+ rand::rng().fill_bytes(&mut *secret_bytes);
+ let secret =
+ Zeroizing::new(base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(*secret_bytes));
+ let key = CustomerApiKey::new(format!("ck_{key_id}_{}", secret.as_str()))?;
+ let hash = Sha256::digest(secret.as_bytes());
+ let mut transaction = self.pool.begin().await.map_err(storage)?;
+ sqlx::query(
+ "INSERT INTO customers (id, name, allowed_redirect_origins) VALUES ($1, $2, $3)",
+ )
+ .bind(customer_id)
+ .bind(name)
+ .bind(origins)
+ .execute(&mut *transaction)
+ .await
+ .map_err(storage)?;
+ sqlx::query("INSERT INTO customer_api_keys (id, customer_id, key_hash, prefix) VALUES ($1, $2, $3, $4)")
+ .bind(key_id).bind(customer_id).bind(&hash[..]).bind(&key.as_str()[..8])
+ .execute(&mut *transaction).await.map_err(storage)?;
+ transaction.commit().await.map_err(storage)?;
+ Ok(key)
+ }
+
+ #[cfg_attr(
+ not(test),
+ expect(dead_code, reason = "T006 stores OAuth grants through this method")
+ )]
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect has its own database and uses runtime-checked SQLx queries per connect/docs/decisions.md"
+ )]
+ pub async fn insert_connection(
+ &self,
+ id: Uuid,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ scopes: &[String],
+ envelope: &Envelope,
+ ) -> Result<(), Error> {
+ let mut transaction = self.pool.begin().await.map_err(storage)?;
+ sqlx::query("INSERT INTO connections (id, customer_id, external_user_id, app_id, status, scopes) VALUES ($1, $2, $3, $4, 'active', $5)")
+ .bind(id).bind(customer_id).bind(user_id).bind(app_id).bind(scopes)
+ .execute(&mut *transaction).await.map_err(storage)?;
+ sqlx::query("INSERT INTO grants (connection_id, ciphertext, nonce, encrypted_data_key, kms_key_id, encryption_version, access_token_expires_at) VALUES ($1, $2, $3, $4, $5, $6, $7)")
+ .bind(id).bind(&envelope.ciphertext).bind(&envelope.nonce).bind(&envelope.encrypted_data_key)
+ .bind(&envelope.kms_key_id).bind(envelope.encryption_version).bind(envelope.access_token_expires_at)
+ .execute(&mut *transaction).await.map_err(storage)?;
+ transaction.commit().await.map_err(storage)?;
+ Ok(())
+ }
+}
+
+#[derive(sqlx::FromRow)]
+struct KeyRow {
+ customer_id: Uuid,
+ key_hash: Vec<u8>,
+}
+
+#[derive(sqlx::FromRow)]
+struct ConnectionRow {
+ app_id: String,
+ status: String,
+ scopes: Vec<String>,
+ created_at: DateTime<Utc>,
+}
+
+#[cfg(test)]
+#[derive(sqlx::FromRow)]
+struct GrantRow {
+ connection_id: Uuid,
+ ciphertext: Vec<u8>,
+ nonce: Vec<u8>,
+ encrypted_data_key: Vec<u8>,
+ kms_key_id: String,
+ encryption_version: i16,
+ access_token_expires_at: Option<DateTime<Utc>>,
+}
+
+#[async_trait::async_trait]
+#[expect(
+ clippy::disallowed_methods,
+ reason = "Connect has its own database and uses runtime-checked SQLx queries per connect/docs/decisions.md"
+)]
+impl Repository for PostgresRepository {
+ async fn authenticate(&self, key: &str) -> Result<Uuid, Error> {
+ let (id, secret) = key
+ .strip_prefix("ck_")
+ .and_then(|value| value.split_once('_'))
+ .ok_or(Error::InvalidKey)?;
+ let id = Uuid::parse_str(id).map_err(|_| Error::InvalidKey)?;
+ let row = sqlx::query_as::<_, KeyRow>("SELECT customer_id, key_hash FROM customer_api_keys WHERE id = $1 AND revoked_at IS NULL")
+ .bind(id).fetch_optional(&self.pool).await.map_err(storage)?.ok_or(Error::InvalidKey)?;
+ let actual = Sha256::digest(secret.as_bytes());
+ if row.key_hash.len() != 32 || !bool::from(actual[..].ct_eq(&row.key_hash)) {
+ return Err(Error::InvalidKey);
+ }
+ Ok(row.customer_id)
+ }
+
+ async fn list(&self, customer_id: Uuid, user_id: &str) -> Result<Vec<Connection>, Error> {
+ let rows = sqlx::query_as::<_, ConnectionRow>("SELECT app_id, status, scopes, created_at FROM connections WHERE customer_id = $1 AND external_user_id = $2 ORDER BY app_id")
+ .bind(customer_id).bind(user_id).fetch_all(&self.pool).await.map_err(storage)?;
+ rows.into_iter()
+ .map(|row| {
+ Ok(Connection {
+ app_id: row.app_id,
+ status: row.status.parse::<ConnectionStatus>().map_err(|error| {
+ Error::Storage(rootcause::Report::new(error).into_dynamic())
+ })?,
+ scopes: row.scopes,
+ created_at: row.created_at,
+ })
+ })
+ .collect()
+ }
+
+ async fn delete(&self, customer_id: Uuid, user_id: &str, app_id: &str) -> Result<bool, Error> {
+ let result = sqlx::query("DELETE FROM connections WHERE customer_id = $1 AND external_user_id = $2 AND app_id = $3")
+ .bind(customer_id).bind(user_id).bind(app_id).execute(&self.pool).await.map_err(storage)?;
+ Ok(result.rows_affected() != 0)
+ }
+
+ #[cfg(test)]
+ async fn grant(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<Option<StoredGrant>, Error> {
+ let row = sqlx::query_as::<_, GrantRow>("SELECT g.connection_id, g.ciphertext, g.nonce, g.encrypted_data_key, g.kms_key_id, g.encryption_version, g.access_token_expires_at FROM connections c JOIN grants g ON g.connection_id = c.id WHERE c.customer_id = $1 AND c.external_user_id = $2 AND c.app_id = $3")
+ .bind(customer_id).bind(user_id).bind(app_id).fetch_optional(&self.pool).await.map_err(storage)?;
+ Ok(row.map(|row| StoredGrant {
+ connection_id: row.connection_id,
+ envelope: Envelope {
+ ciphertext: row.ciphertext,
+ nonce: row.nonce,
+ encrypted_data_key: row.encrypted_data_key,
+ kms_key_id: row.kms_key_id,
+ encryption_version: row.encryption_version,
+ access_token_expires_at: row.access_token_expires_at,
+ },
+ }))
+ }
+}
+
+pub struct DataKey {
+ plaintext: Zeroizing<Vec<u8>>,
+ encrypted: Vec<u8>,
+ key_id: String,
+}
+
+#[async_trait::async_trait]
+pub trait KeyWrapper: Send + Sync {
+ async fn generate(&self, customer_id: Uuid, connection_id: Uuid) -> Result<DataKey, Error>;
+ async fn unwrap(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ key_id: &str,
+ encrypted: &[u8],
+ ) -> Result<Zeroizing<Vec<u8>>, Error>;
+}
+
+fn context(customer_id: Uuid, connection_id: Uuid) -> HashMap<String, String> {
+ HashMap::from([
+ ("customer_id".into(), customer_id.to_string()),
+ ("connection_id".into(), connection_id.to_string()),
+ ])
+}
+
+fn aad(customer_id: Uuid, connection_id: Uuid) -> Vec<u8> {
+ format!("connect-grant-v1:{customer_id}:{connection_id}").into_bytes()
+}
+
+pub struct KmsKeyWrapper {
+ client: aws_sdk_kms::Client,
+ key_id: String,
+}
+impl KmsKeyWrapper {
+ pub fn new(client: aws_sdk_kms::Client, key_id: String) -> Self {
+ Self { client, key_id }
+ }
+}
+
+#[async_trait::async_trait]
+impl KeyWrapper for KmsKeyWrapper {
+ async fn generate(&self, customer_id: Uuid, connection_id: Uuid) -> Result<DataKey, Error> {
+ let output = self
+ .client
+ .generate_data_key()
+ .key_id(&self.key_id)
+ .key_spec(DataKeySpec::Aes256)
+ .set_encryption_context(Some(context(customer_id, connection_id)))
+ .send()
+ .await
+ .map_err(|_| Error::Cipher)?;
+ Ok(DataKey {
+ plaintext: Zeroizing::new(output.plaintext().ok_or(Error::Cipher)?.as_ref().to_vec()),
+ encrypted: output
+ .ciphertext_blob()
+ .ok_or(Error::Cipher)?
+ .as_ref()
+ .to_vec(),
+ key_id: output.key_id().ok_or(Error::Cipher)?.to_owned(),
+ })
+ }
+ async fn unwrap(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ key_id: &str,
+ encrypted: &[u8],
+ ) -> Result<Zeroizing<Vec<u8>>, Error> {
+ let output = self
+ .client
+ .decrypt()
+ .key_id(key_id)
+ .ciphertext_blob(Blob::new(encrypted))
+ .set_encryption_context(Some(context(customer_id, connection_id)))
+ .send()
+ .await
+ .map_err(|_| Error::Cipher)?;
+ Ok(Zeroizing::new(
+ output.plaintext().ok_or(Error::Cipher)?.as_ref().to_vec(),
+ ))
+ }
+}
+
+pub struct LocalKeyWrapper {
+ key: Zeroizing<[u8; 32]>,
+}
+impl LocalKeyWrapper {
+ pub fn from_base64(value: &str) -> Result<Self, Error> {
+ let bytes = Zeroizing::new(STANDARD.decode(value).map_err(|_| Error::Cipher)?);
+ let key: [u8; 32] = bytes.as_slice().try_into().map_err(|_| Error::Cipher)?;
+ Ok(Self {
+ key: Zeroizing::new(key),
+ })
+ }
+}
+
+#[async_trait::async_trait]
+impl KeyWrapper for LocalKeyWrapper {
+ async fn generate(&self, customer_id: Uuid, connection_id: Uuid) -> Result<DataKey, Error> {
+ let mut plaintext = Zeroizing::new(vec![0_u8; 32]);
+ rand::rng().fill_bytes(&mut plaintext);
+ let cipher = Aes256Gcm::new_from_slice(&*self.key).map_err(|_| Error::Cipher)?;
+ let nonce = Aes256Gcm::generate_nonce(&mut OsRng);
+ let ciphertext = cipher
+ .encrypt(
+ &nonce,
+ Payload {
+ msg: &plaintext,
+ aad: &aad(customer_id, connection_id),
+ },
+ )
+ .map_err(|_| Error::Cipher)?;
+ let mut encrypted = nonce.to_vec();
+ encrypted.extend(ciphertext);
+ Ok(DataKey {
+ plaintext,
+ encrypted,
+ key_id: "local".into(),
+ })
+ }
+ async fn unwrap(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ key_id: &str,
+ encrypted: &[u8],
+ ) -> Result<Zeroizing<Vec<u8>>, Error> {
+ if key_id != "local" || encrypted.len() < 28 {
+ return Err(Error::Cipher);
+ }
+ let nonce: [u8; 12] = encrypted[..12].try_into().map_err(|_| Error::Cipher)?;
+ let cipher = Aes256Gcm::new_from_slice(&*self.key).map_err(|_| Error::Cipher)?;
+ let plaintext = cipher
+ .decrypt(
+ &Nonce::from(nonce),
+ Payload {
+ msg: &encrypted[12..],
+ aad: &aad(customer_id, connection_id),
+ },
+ )
+ .map_err(|_| Error::Cipher)?;
+ Ok(Zeroizing::new(plaintext))
+ }
+}
+
+pub struct EnvelopeCipher {
+ wrapper: Arc<dyn KeyWrapper>,
+}
+impl EnvelopeCipher {
+ pub fn new(wrapper: Arc<dyn KeyWrapper>) -> Self {
+ Self { wrapper }
+ }
+}
+
+#[async_trait::async_trait]
+impl GrantCipher for EnvelopeCipher {
+ async fn seal(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ grant: &Grant,
+ ) -> Result<Envelope, Error> {
+ let key = self.wrapper.generate(customer_id, connection_id).await?;
+ let cipher = Aes256Gcm::new_from_slice(&key.plaintext).map_err(|_| Error::Cipher)?;
+ let nonce = Aes256Gcm::generate_nonce(&mut OsRng);
+ let plaintext =
+ Zeroizing::new(serde_json::to_vec(&GrantData::from(grant)).map_err(|_| Error::Cipher)?);
+ let ciphertext = cipher
+ .encrypt(
+ &nonce,
+ Payload {
+ msg: &plaintext,
+ aad: &aad(customer_id, connection_id),
+ },
+ )
+ .map_err(|_| Error::Cipher)?;
+ Ok(Envelope {
+ ciphertext,
+ nonce: nonce.to_vec(),
+ encrypted_data_key: key.encrypted,
+ kms_key_id: key.key_id,
+ encryption_version: 1,
+ access_token_expires_at: grant.expires_at,
+ })
+ }
+ async fn open(
+ &self,
+ customer_id: Uuid,
+ connection_id: Uuid,
+ envelope: &Envelope,
+ ) -> Result<Grant, Error> {
+ if envelope.encryption_version != 1
+ || envelope.nonce.len() != 12
+ || envelope.ciphertext.len() < 16
+ {
+ return Err(Error::Cipher);
+ }
+ let key = self
+ .wrapper
+ .unwrap(
+ customer_id,
+ connection_id,
+ &envelope.kms_key_id,
+ &envelope.encrypted_data_key,
+ )
+ .await?;
+ let cipher = Aes256Gcm::new_from_slice(&key).map_err(|_| Error::Cipher)?;
+ let nonce: [u8; 12] = envelope
+ .nonce
+ .as_slice()
+ .try_into()
+ .map_err(|_| Error::Cipher)?;
+ let plaintext = Zeroizing::new(
+ cipher
+ .decrypt(
+ &Nonce::from(nonce),
+ Payload {
+ msg: &envelope.ciphertext,
+ aad: &aad(customer_id, connection_id),
+ },
+ )
+ .map_err(|_| Error::Cipher)?,
+ );
+ let data: GrantData = serde_json::from_slice(&plaintext).map_err(|_| Error::Cipher)?;
+ Ok(data.into())
+ }
+}
+
+#[cfg(test)]
+mod test;
diff --git a/connect/services/connect_api/src/outbound/mcp.rs b/connect/services/connect_api/src/outbound/mcp.rs
new file mode 100644
index 0000000000..aba92a0216
--- /dev/null
+++ b/connect/services/connect_api/src/outbound/mcp.rs
@@ -0,0 +1,49 @@
+use std::time::Duration;
+
+use opentelemetry::global;
+use opentelemetry_http::HeaderInjector;
+use reqwest::{Method, header::HeaderMap};
+use tracing_opentelemetry::OpenTelemetrySpanExt as _;
+
+#[derive(Clone)]
+pub struct VendorMcp {
+ http: reqwest::Client,
+}
+
+impl VendorMcp {
+ pub fn new() -> Result<Self, reqwest::Error> {
+ let http = reqwest::Client::builder()
+ .connect_timeout(Duration::from_secs(10))
+ .read_timeout(Duration::from_secs(300))
+ .redirect(reqwest::redirect::Policy::none())
+ .build()?;
+ Ok(Self { http })
+ }
+
+ #[tracing::instrument(name = "connect.mcp.vendor_http", skip_all, fields(vendor_status), err)]
+ pub async fn send(
+ &self,
+ method: Method,
+ url: &str,
+ mut headers: HeaderMap,
+ access_token: &str,
+ body: reqwest::Body,
+ ) -> Result<reqwest::Response, reqwest::Error> {
+ global::get_text_map_propagator(|propagator| {
+ propagator.inject_context(
+ &tracing::Span::current().context(),
+ &mut HeaderInjector(&mut headers),
+ );
+ });
+ let response = self
+ .http
+ .request(method, url)
+ .headers(headers)
+ .bearer_auth(access_token)
+ .body(body)
+ .send()
+ .await?;
+ tracing::Span::current().record("vendor_status", response.status().as_u16());
+ Ok(response)
+ }
+}
diff --git a/connect/services/connect_api/src/outbound/oauth.rs b/connect/services/connect_api/src/outbound/oauth.rs
new file mode 100644
index 0000000000..090ba707d1
--- /dev/null
+++ b/connect/services/connect_api/src/outbound/oauth.rs
@@ -0,0 +1,302 @@
+use chrono::{Duration, Utc};
+use rmcp::transport::auth::{
+ AuthorizationManager, InMemoryStateStore, OAuthClientConfig, StateStore as _,
+};
+use url::Url;
+use zeroize::{Zeroize as _, Zeroizing};
+
+use crate::domain::{
+ Error, Grant,
+ oauth::{Authorization, Client, Metadata, OAuthProvider, RefreshError},
+};
+
+pub struct VendorOAuth {
+ http: reqwest::Client,
+}
+
+#[derive(serde::Deserialize)]
+struct TokenBody {
+ access_token: String,
+ refresh_token: Option<String>,
+ token_type: Option<String>,
+ expires_in: Option<i64>,
+ scope: Option<String>,
+}
+
+impl Drop for TokenBody {
+ fn drop(&mut self) {
+ self.access_token.zeroize();
+ if let Some(value) = &mut self.refresh_token {
+ value.zeroize();
+ }
+ }
+}
+
+impl TokenBody {
+ fn into_grant(
+ mut self,
+ fallback_refresh: Option<&str>,
+ fallback_scopes: &[String],
+ ) -> Result<Grant, Error> {
+ let token_type = self.token_type.take().unwrap_or_else(|| "Bearer".into());
+ if !token_type.eq_ignore_ascii_case("Bearer") {
+ return Err(Error::OAuth);
+ }
+ let expires_at = self
+ .expires_in
+ .map(|seconds| {
+ Utc::now()
+ .checked_add_signed(Duration::seconds(seconds))
+ .ok_or(Error::OAuth)
+ })
+ .transpose()?;
+ Ok(Grant {
+ access_token: std::mem::take(&mut self.access_token),
+ refresh_token: self
+ .refresh_token
+ .take()
+ .or_else(|| fallback_refresh.map(str::to_owned)),
+ token_type,
+ expires_at,
+ scopes: self
+ .scope
+ .take()
+ .map(|value| value.split_whitespace().map(str::to_owned).collect())
+ .unwrap_or_else(|| fallback_scopes.to_vec()),
+ })
+ }
+}
+
+#[derive(serde::Deserialize)]
+struct TokenError {
+ error: String,
+}
+
+impl VendorOAuth {
+ pub fn new() -> Result<Self, Error> {
+ let http = reqwest::Client::builder()
+ .timeout(std::time::Duration::from_secs(30))
+ .redirect(reqwest::redirect::Policy::none())
+ .build()
+ .map_err(|_| Error::OAuth)?;
+ Ok(Self { http })
+ }
+
+ async fn manager(
+ &self,
+ server_url: &str,
+ client: Option<&Client>,
+ redirect_uri: &str,
+ ) -> Result<AuthorizationManager, Error> {
+ let mut manager = AuthorizationManager::new(server_url)
+ .await
+ .map_err(|_| Error::OAuth)?;
+ let metadata = manager
+ .discover_metadata()
+ .await
+ .map_err(|_| Error::OAuth)?;
+ manager.set_metadata(metadata);
+ if let Some(client) = client {
+ let mut config = OAuthClientConfig::new(&client.id, redirect_uri);
+ if let Some(secret) = &client.secret {
+ config = config.with_client_secret(secret.to_string());
+ }
+ manager.configure_client(config).map_err(|_| Error::OAuth)?;
+ }
+ Ok(manager)
+ }
+}
+
+#[async_trait::async_trait]
+impl OAuthProvider for VendorOAuth {
+ #[tracing::instrument(name = "connect.oauth.discover", skip_all, err)]
+ async fn discover(&self, server_url: &str) -> Result<Metadata, Error> {
+ let manager = AuthorizationManager::new(server_url)
+ .await
+ .map_err(|_| Error::OAuth)?;
+ let metadata = manager
+ .discover_metadata()
+ .await
+ .map_err(|_| Error::OAuth)?;
+ let issuer = metadata.issuer.ok_or(Error::OAuth)?;
+ let supports_cimd = metadata
+ .additional_fields
+ .get("client_id_metadata_document_supported")
+ .and_then(serde_json::Value::as_bool)
+ .unwrap_or(false);
+ Ok(Metadata {
+ issuer,
+ supports_cimd,
+ supports_dcr: metadata.registration_endpoint.is_some(),
+ })
+ }
+
+ #[tracing::instrument(name = "connect.oauth.register", skip_all, err)]
+ async fn register(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ scopes: &[String],
+ ) -> Result<Client, Error> {
+ let mut manager = self.manager(server_url, None, redirect_uri).await?;
+ let scope_refs: Vec<&str> = scopes.iter().map(String::as_str).collect();
+ let config = manager
+ .register_client("Macro Connect", redirect_uri, &scope_refs)
+ .await
+ .map_err(|_| Error::OAuth)?;
+ Ok(Client {
+ id: config.client_id,
+ secret: config.client_secret.map(Zeroizing::new),
+ kind: connect_registry::ClientRegistration::Dcr,
+ })
+ }
+
+ #[tracing::instrument(name = "connect.oauth.authorization_url", skip_all, err)]
+ async fn authorize(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ client: &Client,
+ scopes: &[String],
+ ) -> Result<Authorization, Error> {
+ let mut manager = self.manager(server_url, Some(client), redirect_uri).await?;
+ let state_store = InMemoryStateStore::new();
+ manager.set_state_store(state_store.clone());
+ let refs: Vec<&str> = scopes.iter().map(String::as_str).collect();
+ let url = manager
+ .get_authorization_url(&refs)
+ .await
+ .map_err(|_| Error::OAuth)?;
+ let state = Url::parse(&url)
+ .map_err(|_| Error::OAuth)?
+ .query_pairs()
+ .find(|(key, _)| key == "state")
+ .map(|(_, value)| value.into_owned())
+ .ok_or(Error::OAuth)?;
+ let stored = state_store
+ .load(&state)
+ .await
+ .map_err(|_| Error::OAuth)?
+ .ok_or(Error::OAuth)?;
+ Ok(Authorization {
+ url,
+ state,
+ verifier: Zeroizing::new(stored.pkce_verifier),
+ })
+ }
+
+ #[tracing::instrument(name = "connect.oauth.exchange", skip_all, err)]
+ async fn exchange(
+ &self,
+ server_url: &str,
+ redirect_uri: &str,
+ client: &Client,
+ verifier: &str,
+ code: &str,
+ requested_scopes: &[String],
+ ) -> Result<Grant, Error> {
+ let manager = AuthorizationManager::new(server_url)
+ .await
+ .map_err(|_| Error::OAuth)?;
+ let metadata = manager
+ .discover_metadata()
+ .await
+ .map_err(|_| Error::OAuth)?;
+ let mut form = vec![
+ ("grant_type", "authorization_code"),
+ ("code", code),
+ ("redirect_uri", redirect_uri),
+ ("client_id", client.id.as_str()),
+ ("code_verifier", verifier),
+ ("resource", server_url),
+ ];
+ let mut request = self.http.post(&metadata.token_endpoint);
+ if let Some(secret) = &client.secret {
+ if secret_post(&metadata) {
+ form.push(("client_secret", secret.as_str()));
+ } else {
+ request = request.basic_auth(&client.id, Some(secret.as_str()));
+ }
+ }
+ let response = request.form(&form).send().await.map_err(|_| Error::OAuth)?;
+ if !response.status().is_success() {
+ return Err(Error::OAuth);
+ }
+ let body: TokenBody = response.json().await.map_err(|_| Error::OAuth)?;
+ body.into_grant(None, requested_scopes)
+ }
+
+ #[tracing::instrument(name = "connect.oauth.refresh_http", skip_all, fields(outcome), err)]
+ async fn refresh(
+ &self,
+ server_url: &str,
+ _redirect_uri: &str,
+ client: &Client,
+ grant: &Grant,
+ ) -> Result<Grant, RefreshError> {
+ let refresh_token = grant
+ .refresh_token
+ .as_deref()
+ .ok_or(RefreshError::InvalidGrant)?;
+ let manager = AuthorizationManager::new(server_url)
+ .await
+ .map_err(|_| RefreshError::Other(Error::OAuth))?;
+ let metadata = manager
+ .discover_metadata()
+ .await
+ .map_err(|_| RefreshError::Other(Error::OAuth))?;
+ let mut form = vec![
+ ("grant_type", "refresh_token"),
+ ("refresh_token", refresh_token),
+ ("client_id", client.id.as_str()),
+ ];
+ let mut request = self.http.post(&metadata.token_endpoint);
+ if let Some(secret) = &client.secret {
+ if secret_post(&metadata) {
+ form.push(("client_secret", secret.as_str()));
+ } else {
+ request = request.basic_auth(&client.id, Some(secret.as_str()));
+ }
+ }
+ let response = request
+ .form(&form)
+ .send()
+ .await
+ .map_err(|_| RefreshError::Other(Error::OAuth))?;
+ let status = response.status();
+ if !status.is_success() {
+ let body: TokenError = response
+ .json()
+ .await
+ .map_err(|_| RefreshError::Other(Error::OAuth))?;
+ if body.error == "invalid_grant" {
+ tracing::Span::current().record("outcome", "invalid_grant");
+ return Err(RefreshError::InvalidGrant);
+ }
+ tracing::Span::current().record("outcome", "error");
+ return Err(RefreshError::Other(Error::OAuth));
+ }
+ let body: TokenBody = response
+ .json()
+ .await
+ .map_err(|_| RefreshError::Other(Error::OAuth))?;
+ tracing::Span::current().record("outcome", "refreshed");
+ body.into_grant(grant.refresh_token.as_deref(), &grant.scopes)
+ .map_err(RefreshError::Other)
+ }
+}
+
+fn secret_post(metadata: &rmcp::transport::auth::AuthorizationMetadata) -> bool {
+ metadata
+ .additional_fields
+ .get("token_endpoint_auth_methods_supported")
+ .and_then(serde_json::Value::as_array)
+ .is_some_and(|methods| {
+ methods
+ .iter()
+ .any(|value| value.as_str() == Some("client_secret_post"))
+ && !methods
+ .iter()
+ .any(|value| value.as_str() == Some("client_secret_basic"))
+ })
+}
diff --git a/connect/services/connect_api/src/outbound/oauth_store.rs b/connect/services/connect_api/src/outbound/oauth_store.rs
new file mode 100644
index 0000000000..8813afbe75
--- /dev/null
+++ b/connect/services/connect_api/src/outbound/oauth_store.rs
@@ -0,0 +1,439 @@
+use chrono::{DateTime, Utc};
+use connect_registry::ClientRegistration;
+use sqlx::{Postgres, Transaction};
+use uuid::Uuid;
+
+use super::{PostgresRepository, storage};
+use crate::domain::{
+ Envelope, Error, Grant, StoredGrant,
+ oauth::{
+ LockedClient, LockedGrant, LockedGrantRecord, OAuthClientRecord, OAuthRepository,
+ OAuthState, PendingConnection, Session, TakenState, registration_name,
+ },
+};
+
+#[derive(sqlx::FromRow)]
+struct SessionRow {
+ token: String,
+ customer_id: Uuid,
+ external_user_id: String,
+ app_id: String,
+ redirect_url: String,
+ expires_at: DateTime<Utc>,
+ session_traceparent: Option<String>,
+}
+
+impl From<SessionRow> for Session {
+ fn from(row: SessionRow) -> Self {
+ Self {
+ token: row.token,
+ customer_id: row.customer_id,
+ user_id: row.external_user_id,
+ app_id: row.app_id,
+ redirect_url: row.redirect_url,
+ expires_at: row.expires_at,
+ traceparent: row.session_traceparent,
+ }
+ }
+}
+
+#[derive(sqlx::FromRow)]
+struct StateRow {
+ state: String,
+ customer_id: Uuid,
+ external_user_id: String,
+ app_id: String,
+ redirect_url: String,
+ client_id: String,
+ issuer: String,
+ registration_kind: String,
+ verifier_ciphertext: Vec<u8>,
+ verifier_nonce: Vec<u8>,
+ verifier_encrypted_data_key: Vec<u8>,
+ verifier_kms_key_id: String,
+ verifier_encryption_version: i16,
+ expires_at: DateTime<Utc>,
+ consumed_at: Option<DateTime<Utc>>,
+ authorize_traceparent: Option<String>,
+}
+
+fn parse_kind(value: &str) -> Result<ClientRegistration, Error> {
+ match value {
+ "cimd" => Ok(ClientRegistration::Cimd),
+ "dcr" => Ok(ClientRegistration::Dcr),
+ "own_app" => Ok(ClientRegistration::OwnApp),
+ _ => Err(Error::OAuth),
+ }
+}
+
+impl TryFrom<StateRow> for OAuthState {
+ type Error = Error;
+ fn try_from(row: StateRow) -> Result<Self, Error> {
+ Ok(Self {
+ state: row.state,
+ customer_id: row.customer_id,
+ user_id: row.external_user_id,
+ app_id: row.app_id,
+ redirect_url: row.redirect_url,
+ client_id: row.client_id,
+ issuer: row.issuer,
+ kind: parse_kind(&row.registration_kind)?,
+ verifier: Envelope {
+ ciphertext: row.verifier_ciphertext,
+ nonce: row.verifier_nonce,
+ encrypted_data_key: row.verifier_encrypted_data_key,
+ kms_key_id: row.verifier_kms_key_id,
+ encryption_version: row.verifier_encryption_version,
+ access_token_expires_at: None,
+ },
+ expires_at: row.expires_at,
+ traceparent: row.authorize_traceparent,
+ })
+ }
+}
+
+const STATE_COLUMNS: &str = "state, customer_id, external_user_id, app_id, redirect_url, client_id, issuer, registration_kind, verifier_ciphertext, verifier_nonce, verifier_encrypted_data_key, verifier_kms_key_id, verifier_encryption_version, expires_at, consumed_at, authorize_traceparent";
+
+#[derive(sqlx::FromRow)]
+struct ClientRow {
+ client_id: String,
+ secret_ciphertext: Option<Vec<u8>>,
+ secret_nonce: Option<Vec<u8>>,
+ secret_encrypted_data_key: Option<Vec<u8>>,
+ secret_kms_key_id: Option<String>,
+ secret_encryption_version: Option<i16>,
+}
+
+struct ClientLock {
+ transaction: Transaction<'static, Postgres>,
+ issuer: String,
+ redirect_uri: String,
+}
+
+#[async_trait::async_trait]
+impl LockedClient for ClientLock {
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+ )]
+ async fn get(&mut self) -> Result<Option<OAuthClientRecord>, Error> {
+ let row = sqlx::query_as::<_, ClientRow>("SELECT client_id, secret_ciphertext, secret_nonce, secret_encrypted_data_key, secret_kms_key_id, secret_encryption_version FROM oauth_clients WHERE issuer = $1 AND redirect_uri = $2")
+ .bind(&self.issuer).bind(&self.redirect_uri).fetch_optional(&mut *self.transaction).await.map_err(storage)?;
+ row.map(|row| {
+ let secret = match (
+ row.secret_ciphertext,
+ row.secret_nonce,
+ row.secret_encrypted_data_key,
+ row.secret_kms_key_id,
+ row.secret_encryption_version,
+ ) {
+ (
+ Some(ciphertext),
+ Some(nonce),
+ Some(encrypted_data_key),
+ Some(kms_key_id),
+ Some(encryption_version),
+ ) => Some(Envelope {
+ ciphertext,
+ nonce,
+ encrypted_data_key,
+ kms_key_id,
+ encryption_version,
+ access_token_expires_at: None,
+ }),
+ (None, None, None, None, None) => None,
+ _ => return Err(Error::Cipher),
+ };
+ Ok(OAuthClientRecord {
+ id: row.client_id,
+ secret,
+ })
+ })
+ .transpose()
+ }
+
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+ )]
+ async fn insert(&mut self, client: OAuthClientRecord) -> Result<(), Error> {
+ let secret = client.secret.as_ref();
+ sqlx::query("INSERT INTO oauth_clients (issuer, redirect_uri, client_id, secret_ciphertext, secret_nonce, secret_encrypted_data_key, secret_kms_key_id, secret_encryption_version) VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT (issuer, redirect_uri) DO NOTHING")
+ .bind(&self.issuer).bind(&self.redirect_uri).bind(&client.id)
+ .bind(secret.map(|value| &value.ciphertext)).bind(secret.map(|value| &value.nonce))
+ .bind(secret.map(|value| &value.encrypted_data_key)).bind(secret.map(|value| &value.kms_key_id))
+ .bind(secret.map(|value| value.encryption_version))
+ .execute(&mut *self.transaction).await.map_err(storage)?;
+ Ok(())
+ }
+
+ async fn commit(self: Box<Self>) -> Result<(), Error> {
+ self.transaction.commit().await.map_err(storage)
+ }
+}
+
+#[derive(sqlx::FromRow)]
+struct LockedGrantRow {
+ connection_id: Uuid,
+ ciphertext: Vec<u8>,
+ nonce: Vec<u8>,
+ encrypted_data_key: Vec<u8>,
+ kms_key_id: String,
+ encryption_version: i16,
+ access_token_expires_at: Option<DateTime<Utc>>,
+ oauth_issuer: Option<String>,
+ oauth_client_id: Option<String>,
+ oauth_registration_kind: Option<String>,
+ status: String,
+}
+
+struct GrantLock {
+ transaction: Transaction<'static, Postgres>,
+ record: LockedGrantRecord,
+}
+
+#[async_trait::async_trait]
+impl LockedGrant for GrantLock {
+ fn record(&self) -> &LockedGrantRecord {
+ &self.record
+ }
+
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+ )]
+ async fn save(&mut self, envelope: &Envelope, scopes: &[String]) -> Result<(), Error> {
+ sqlx::query("UPDATE grants SET ciphertext = $2, nonce = $3, encrypted_data_key = $4, kms_key_id = $5, encryption_version = $6, access_token_expires_at = $7, updated_at = now() WHERE connection_id = $1")
+ .bind(self.record.stored.connection_id).bind(&envelope.ciphertext).bind(&envelope.nonce).bind(&envelope.encrypted_data_key)
+ .bind(&envelope.kms_key_id).bind(envelope.encryption_version).bind(envelope.access_token_expires_at)
+ .execute(&mut *self.transaction).await.map_err(storage)?;
+ sqlx::query("UPDATE connections SET scopes = $2, updated_at = now() WHERE id = $1")
+ .bind(self.record.stored.connection_id)
+ .bind(scopes)
+ .execute(&mut *self.transaction)
+ .await
+ .map_err(storage)?;
+ Ok(())
+ }
+
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+ )]
+ async fn needs_reauth(&mut self) -> Result<(), Error> {
+ sqlx::query(
+ "UPDATE connections SET status = 'needs_reauth', updated_at = now() WHERE id = $1",
+ )
+ .bind(self.record.stored.connection_id)
+ .execute(&mut *self.transaction)
+ .await
+ .map_err(storage)?;
+ Ok(())
+ }
+
+ async fn commit(self: Box<Self>) -> Result<(), Error> {
+ self.transaction.commit().await.map_err(storage)
+ }
+}
+
+struct ConnectionLock {
+ transaction: Transaction<'static, Postgres>,
+ id: Uuid,
+}
+
+#[async_trait::async_trait]
+impl PendingConnection for ConnectionLock {
+ fn id(&self) -> Uuid {
+ self.id
+ }
+
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+ )]
+ async fn save(
+ &mut self,
+ state: &OAuthState,
+ grant: &Grant,
+ envelope: &Envelope,
+ ) -> Result<(), Error> {
+ sqlx::query("INSERT INTO connections (id, customer_id, external_user_id, app_id, status, scopes, oauth_issuer, oauth_client_id, oauth_registration_kind) VALUES ($1, $2, $3, $4, 'active', $5, $6, $7, $8) ON CONFLICT (customer_id, external_user_id, app_id) DO UPDATE SET status = 'active', scopes = EXCLUDED.scopes, oauth_issuer = EXCLUDED.oauth_issuer, oauth_client_id = EXCLUDED.oauth_client_id, oauth_registration_kind = EXCLUDED.oauth_registration_kind, updated_at = now()")
+ .bind(self.id).bind(state.customer_id).bind(&state.user_id).bind(&state.app_id).bind(&grant.scopes)
+ .bind(&state.issuer).bind(&state.client_id).bind(registration_name(state.kind))
+ .execute(&mut *self.transaction).await.map_err(storage)?;
+ sqlx::query("INSERT INTO grants (connection_id, ciphertext, nonce, encrypted_data_key, kms_key_id, encryption_version, access_token_expires_at) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (connection_id) DO UPDATE SET ciphertext = EXCLUDED.ciphertext, nonce = EXCLUDED.nonce, encrypted_data_key = EXCLUDED.encrypted_data_key, kms_key_id = EXCLUDED.kms_key_id, encryption_version = EXCLUDED.encryption_version, access_token_expires_at = EXCLUDED.access_token_expires_at, updated_at = now()")
+ .bind(self.id).bind(&envelope.ciphertext).bind(&envelope.nonce).bind(&envelope.encrypted_data_key).bind(&envelope.kms_key_id)
+ .bind(envelope.encryption_version).bind(envelope.access_token_expires_at)
+ .execute(&mut *self.transaction).await.map_err(storage)?;
+ Ok(())
+ }
+
+ async fn commit(self: Box<Self>) -> Result<(), Error> {
+ self.transaction.commit().await.map_err(storage)
+ }
+}
+
+#[async_trait::async_trait]
+#[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's own database uses runtime-checked queries per connect/docs/decisions.md"
+)]
+impl OAuthRepository for PostgresRepository {
+ async fn allowed_origins(&self, customer_id: Uuid) -> Result<Vec<String>, Error> {
+ sqlx::query_scalar("SELECT allowed_redirect_origins FROM customers WHERE id = $1")
+ .bind(customer_id)
+ .fetch_one(&self.pool)
+ .await
+ .map_err(storage)
+ }
+
+ async fn create_session(&self, session: &Session) -> Result<(), Error> {
+ sqlx::query("DELETE FROM connect_sessions WHERE token IN (SELECT token FROM connect_sessions WHERE expires_at < now() - interval '1 day' ORDER BY expires_at LIMIT 100)")
+ .execute(&self.pool).await.map_err(storage)?;
+ sqlx::query("DELETE FROM oauth_states WHERE state IN (SELECT state FROM oauth_states WHERE expires_at < now() - interval '1 day' ORDER BY expires_at LIMIT 100)")
+ .execute(&self.pool).await.map_err(storage)?;
+ sqlx::query("INSERT INTO connect_sessions (token, customer_id, external_user_id, app_id, redirect_url, expires_at, session_traceparent) VALUES ($1, $2, $3, $4, $5, $6, $7)")
+ .bind(&session.token).bind(session.customer_id).bind(&session.user_id).bind(&session.app_id).bind(&session.redirect_url).bind(session.expires_at).bind(&session.traceparent)
+ .execute(&self.pool).await.map_err(storage)?;
+ Ok(())
+ }
+
+ async fn get_session(&self, token: &str) -> Result<Option<Session>, Error> {
+ let row = sqlx::query_as::<_, SessionRow>("SELECT token, customer_id, external_user_id, app_id, redirect_url, expires_at, session_traceparent FROM connect_sessions WHERE token = $1 AND expires_at > now()")
+ .bind(token).fetch_optional(&self.pool).await.map_err(storage)?;
+ Ok(row.map(Into::into))
+ }
+
+ async fn save_state(&self, state: &OAuthState) -> Result<(), Error> {
+ sqlx::query("INSERT INTO oauth_states (state, customer_id, external_user_id, app_id, redirect_url, client_id, issuer, registration_kind, verifier_ciphertext, verifier_nonce, verifier_encrypted_data_key, verifier_kms_key_id, verifier_encryption_version, expires_at, authorize_traceparent) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)")
+ .bind(&state.state).bind(state.customer_id).bind(&state.user_id).bind(&state.app_id).bind(&state.redirect_url).bind(&state.client_id)
+ .bind(&state.issuer).bind(registration_name(state.kind)).bind(&state.verifier.ciphertext).bind(&state.verifier.nonce)
+ .bind(&state.verifier.encrypted_data_key).bind(&state.verifier.kms_key_id).bind(state.verifier.encryption_version).bind(state.expires_at).bind(&state.traceparent)
+ .execute(&self.pool).await.map_err(storage)?;
+ Ok(())
+ }
+
+ async fn take_state(&self, state: &str) -> Result<Option<TakenState>, Error> {
+ let update = format!(
+ "UPDATE oauth_states SET consumed_at = now() WHERE state = $1 AND consumed_at IS NULL AND expires_at > now() RETURNING {STATE_COLUMNS}"
+ );
+ if let Some(row) = sqlx::query_as::<_, StateRow>(&update)
+ .bind(state)
+ .fetch_optional(&self.pool)
+ .await
+ .map_err(storage)?
+ {
+ return Ok(Some(TakenState::Valid(row.try_into()?)));
+ }
+ let select = format!("SELECT {STATE_COLUMNS} FROM oauth_states WHERE state = $1");
+ let row = sqlx::query_as::<_, StateRow>(&select)
+ .bind(state)
+ .fetch_optional(&self.pool)
+ .await
+ .map_err(storage)?;
+ row.map(|row| {
+ let reused = row.consumed_at.is_some();
+ let state = row.try_into()?;
+ Ok(if reused {
+ TakenState::Reused(state)
+ } else {
+ TakenState::Expired(state)
+ })
+ })
+ .transpose()
+ }
+
+ async fn lock_client(
+ &self,
+ issuer: &str,
+ redirect_uri: &str,
+ ) -> Result<Box<dyn LockedClient>, Error> {
+ let mut transaction = self.pool.begin().await.map_err(storage)?;
+ sqlx::query("SELECT pg_advisory_xact_lock(hashtextextended($1, 0))")
+ .bind(format!("{}:{issuer}{redirect_uri}", issuer.len()))
+ .execute(&mut *transaction)
+ .await
+ .map_err(storage)?;
+ Ok(Box::new(ClientLock {
+ transaction,
+ issuer: issuer.into(),
+ redirect_uri: redirect_uri.into(),
+ }))
+ }
+
+ async fn lock_connection(
+ &self,
+ state: &OAuthState,
+ ) -> Result<Box<dyn PendingConnection>, Error> {
+ let mut transaction = self.pool.begin().await.map_err(storage)?;
+ sqlx::query("SELECT pg_advisory_xact_lock(hashtextextended($1, 0))")
+ .bind(format!(
+ "{}:{}:{}:{}{}",
+ state.customer_id,
+ state.user_id.len(),
+ state.user_id,
+ state.app_id.len(),
+ state.app_id
+ ))
+ .execute(&mut *transaction)
+ .await
+ .map_err(storage)?;
+ let id = sqlx::query_scalar::<_, Uuid>("SELECT id FROM connections WHERE customer_id = $1 AND external_user_id = $2 AND app_id = $3")
+ .bind(state.customer_id).bind(&state.user_id).bind(&state.app_id)
+ .fetch_optional(&mut *transaction).await.map_err(storage)?.unwrap_or_else(Uuid::now_v7);
+ Ok(Box::new(ConnectionLock { transaction, id }))
+ }
+
+ async fn lock_grant(
+ &self,
+ customer_id: Uuid,
+ user_id: &str,
+ app_id: &str,
+ ) -> Result<Option<Box<dyn LockedGrant>>, Error> {
+ let mut transaction = self.pool.begin().await.map_err(storage)?;
+ let row = sqlx::query_as::<_, LockedGrantRow>("SELECT g.connection_id, g.ciphertext, g.nonce, g.encrypted_data_key, g.kms_key_id, g.encryption_version, g.access_token_expires_at, c.oauth_issuer, c.oauth_client_id, c.oauth_registration_kind, c.status FROM connections c JOIN grants g ON g.connection_id = c.id WHERE c.customer_id = $1 AND c.external_user_id = $2 AND c.app_id = $3 FOR UPDATE OF c, g")
+ .bind(customer_id).bind(user_id).bind(app_id).fetch_optional(&mut *transaction).await.map_err(storage)?;
+ row.map(|row| {
+ Ok(Box::new(GrantLock {
+ transaction,
+ record: LockedGrantRecord {
+ stored: StoredGrant {
+ connection_id: row.connection_id,
+ envelope: Envelope {
+ ciphertext: row.ciphertext,
+ nonce: row.nonce,
+ encrypted_data_key: row.encrypted_data_key,
+ kms_key_id: row.kms_key_id,
+ encryption_version: row.encryption_version,
+ access_token_expires_at: row.access_token_expires_at,
+ },
+ },
+ needs_reauth: row.status == "needs_reauth",
+ issuer: row.oauth_issuer,
+ client_id: row.oauth_client_id,
+ kind: row
+ .oauth_registration_kind
+ .as_deref()
+ .map(parse_kind)
+ .transpose()?,
+ },
+ }) as Box<dyn LockedGrant>)
+ })
+ .transpose()
+ }
+
+ async fn set_redirect_origins(
+ &self,
+ customer_id: Uuid,
+ origins: &[String],
+ ) -> Result<bool, Error> {
+ let result =
+ sqlx::query("UPDATE customers SET allowed_redirect_origins = $2 WHERE id = $1")
+ .bind(customer_id)
+ .bind(origins)
+ .execute(&self.pool)
+ .await
+ .map_err(storage)?;
+ Ok(result.rows_affected() == 1)
+ }
+}
diff --git a/connect/services/connect_api/src/outbound/test.rs b/connect/services/connect_api/src/outbound/test.rs
new file mode 100644
index 0000000000..59f37137da
--- /dev/null
+++ b/connect/services/connect_api/src/outbound/test.rs
@@ -0,0 +1,96 @@
+use super::*;
+use crate::test_support::TestDatabase;
+
+fn cipher() -> EnvelopeCipher {
+ EnvelopeCipher::new(Arc::new(
+ LocalKeyWrapper::from_base64(&STANDARD.encode([9_u8; 32])).unwrap(),
+ ))
+}
+
+#[tokio::test]
+async fn grant_cipher_round_trips_and_rejects_tampering_or_wrong_owner() {
+ let cipher = cipher();
+ let customer = Uuid::now_v7();
+ let connection = Uuid::now_v7();
+ let grant = Grant {
+ access_token: "access-secret".into(),
+ refresh_token: Some("refresh-secret".into()),
+ token_type: "Bearer".into(),
+ expires_at: Some(Utc::now() + chrono::Duration::hours(1)),
+ scopes: vec!["read".into()],
+ };
+ assert!(!format!("{grant:?}").contains("access-secret"));
+ assert!(!format!("{grant:?}").contains("refresh-secret"));
+ let mut envelope = cipher.seal(customer, connection, &grant).await.unwrap();
+ let opened = cipher.open(customer, connection, &envelope).await.unwrap();
+ assert_eq!(opened.access_token, "access-secret");
+ assert_eq!(opened.refresh_token.as_deref(), Some("refresh-secret"));
+ assert!(
+ cipher
+ .open(Uuid::now_v7(), connection, &envelope)
+ .await
+ .is_err()
+ );
+ assert!(
+ cipher
+ .open(customer, Uuid::now_v7(), &envelope)
+ .await
+ .is_err()
+ );
+ envelope.ciphertext[0] ^= 1;
+ assert!(cipher.open(customer, connection, &envelope).await.is_err());
+}
+
+#[tokio::test]
+async fn repository_queries_are_customer_scoped() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ let repository = PostgresRepository::new(pool);
+ let owner_key = repository.create_customer("Owner").await.unwrap();
+ assert!(!format!("{owner_key:?}").contains(owner_key.as_str()));
+ let other_key = repository.create_customer("Other").await.unwrap();
+ let owner = repository.authenticate(&owner_key).await.unwrap();
+ let other = repository.authenticate(&other_key).await.unwrap();
+ assert!(matches!(
+ repository.authenticate("ck_bad_secret").await,
+ Err(Error::InvalidKey)
+ ));
+ let id = Uuid::now_v7();
+ let grant = Grant {
+ access_token: "access".into(),
+ refresh_token: None,
+ token_type: "Bearer".into(),
+ expires_at: None,
+ scopes: vec!["read".into()],
+ };
+ let envelope = cipher().seal(owner, id, &grant).await.unwrap();
+ repository
+ .insert_connection(id, owner, "user-a", "notion", &grant.scopes, &envelope)
+ .await
+ .unwrap();
+ assert_eq!(repository.list(owner, "user-a").await.unwrap().len(), 1);
+ assert!(repository.list(other, "user-a").await.unwrap().is_empty());
+ assert!(
+ repository
+ .grant(other, "user-a", "notion")
+ .await
+ .unwrap()
+ .is_none()
+ );
+ assert!(
+ repository
+ .grant(owner, "user-a", "notion")
+ .await
+ .unwrap()
+ .is_some()
+ );
+ assert!(!repository.delete(other, "user-a", "notion").await.unwrap());
+ assert!(repository.delete(owner, "user-a", "notion").await.unwrap());
+ assert!(
+ repository
+ .grant(owner, "user-a", "notion")
+ .await
+ .unwrap()
+ .is_none()
+ );
+}
diff --git a/connect/services/connect_api/src/test.rs b/connect/services/connect_api/src/test.rs
new file mode 100644
index 0000000000..d89f53e604
--- /dev/null
+++ b/connect/services/connect_api/src/test.rs
@@ -0,0 +1,497 @@
+use super::*;
+use crate::domain::Repository as _;
+use crate::test_support::TestDatabase;
+use axum::{body::Body, http::Request};
+use http_body_util::BodyExt as _;
+use tower::ServiceExt as _;
+
+fn test_router(apps: &'static [App]) -> Router {
+ test_router_with_url(apps, "http://localhost:8080")
+}
+
+fn test_router_with_url(apps: &'static [App], public_url: &str) -> Router {
+ use crate::outbound::{EnvelopeCipher, LocalKeyWrapper, PostgresRepository};
+ use base64::{Engine as _, engine::general_purpose::STANDARD};
+ let pool = PgPoolOptions::new()
+ .connect_lazy("postgres://localhost/connect_test")
+ .unwrap();
+ let wrapper = Arc::new(LocalKeyWrapper::from_base64(&STANDARD.encode([7_u8; 32])).unwrap());
+ let repository = Arc::new(PostgresRepository::new(pool));
+ let cipher = Arc::new(EnvelopeCipher::new(wrapper));
+ let service = Arc::new(Service::new(repository.clone()));
+ let oauth = Arc::new(domain::oauth::OAuthService::new(
+ repository,
+ cipher,
+ Arc::new(outbound::oauth::VendorOAuth::new().unwrap()),
+ apps,
+ url::Url::parse(public_url).unwrap(),
+ HashMap::new(),
+ ));
+ router(AppState {
+ apps,
+ service,
+ oauth,
+ mcp_http: crate::outbound::mcp::VendorMcp::new().unwrap(),
+ })
+}
+
+#[test]
+fn only_live_own_apps_require_credentials() {
+ let apps = all_apps().unwrap();
+ assert!(load_own_apps(apps, |_| None).unwrap().is_empty());
+
+ let mut github = apps
+ .iter()
+ .find(|app| app.id.as_str() == "github")
+ .unwrap()
+ .clone();
+ github.status = Status::Live;
+ let live = [github];
+ assert!(load_own_apps(&live, |_| None).is_err());
+ assert!(
+ load_own_apps(&live, |key| {
+ (key == "GITHUB_CLIENT_ID").then(|| "client".to_owned())
+ })
+ .is_err()
+ );
+ let clients = load_own_apps(&live, |key| match key {
+ "GITHUB_CLIENT_ID" => Some("client".to_owned()),
+ "GITHUB_CLIENT_SECRET" => Some("secret".to_owned()),
+ _ => None,
+ })
+ .unwrap();
+ assert_eq!(clients.len(), 1);
+ assert!(clients.contains_key("github"));
+}
+
+#[test]
+fn public_url_requires_host_root() {
+ assert!(parse_public_url("https://connect-dev.macro.com").is_ok());
+ assert!(parse_public_url("http://localhost:8080").is_ok());
+ assert!(parse_public_url("https://connect-dev.macro.com/connect").is_err());
+ assert!(parse_public_url("https://connect-dev.macro.com?bad=1").is_err());
+}
+
+#[tokio::test]
+async fn root_serves_health() {
+ let response = test_router(all_apps().unwrap())
+ .oneshot(
+ Request::builder()
+ .uri("/health")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+}
+
+#[tokio::test]
+async fn catalog_icon_url_uses_root() {
+ let response = test_router_with_url(all_apps().unwrap(), "http://localhost:8080")
+ .oneshot(
+ Request::builder()
+ .uri("/v1/catalog")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ let entries: Vec<serde_json::Value> = serde_json::from_slice(&body).unwrap();
+ let notion = entries
+ .iter()
+ .find(|entry| entry["id"] == "notion")
+ .unwrap();
+ assert_eq!(notion["icon_url"], "/v1/catalog/notion/icon.svg");
+}
+
+#[tokio::test]
+async fn catalog_only_exposes_live_apps_with_public_fields() {
+ let apps = all_apps().unwrap();
+ let response = test_router(apps)
+ .oneshot(
+ Request::builder()
+ .uri("/v1/catalog")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ let entries: Vec<serde_json::Value> = serde_json::from_slice(&body).unwrap();
+ let live_count = apps.iter().filter(|app| app.status == Status::Live).count();
+ assert_eq!(entries.len(), live_count);
+ for entry in &entries {
+ let id = entry["id"].as_str().unwrap();
+ let app = apps.iter().find(|app| app.id.as_str() == id).unwrap();
+ assert_eq!(app.status, Status::Live);
+ assert_eq!(entry["name"], app.name);
+ assert_eq!(entry["description"], app.description);
+ assert!(entry["access"].is_array());
+ assert_eq!(entry["mcp_url"], app.mcp_url);
+ if app.icon_svg.is_some() {
+ assert_eq!(entry["icon_url"], format!("/v1/catalog/{id}/icon.svg"));
+ } else {
+ assert!(entry["icon_url"].is_null());
+ }
+ assert_eq!(entry.as_object().unwrap().len(), 6);
+ }
+}
+
+#[tokio::test]
+async fn icon_route_returns_embedded_svg_and_404_for_unknown_id() {
+ let apps = all_apps().unwrap();
+ let response = test_router(apps)
+ .oneshot(
+ Request::builder()
+ .uri("/v1/catalog/notion/icon.svg")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ assert_eq!(response.headers()[header::CONTENT_TYPE], "image/svg+xml");
+ let bytes = response.into_body().collect().await.unwrap().to_bytes();
+ let notion = apps.iter().find(|app| app.id.as_str() == "notion").unwrap();
+ assert_eq!(bytes.as_ref(), notion.icon_svg.unwrap().as_bytes());
+
+ let response = test_router(apps)
+ .oneshot(
+ Request::builder()
+ .uri("/v1/catalog/unknown/icon.svg")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::NOT_FOUND);
+}
+
+#[tokio::test]
+async fn openapi_route_describes_catalog() {
+ let response = test_router(all_apps().unwrap())
+ .oneshot(
+ Request::builder()
+ .uri("/openapi.json")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ let schema: serde_json::Value = serde_json::from_slice(&body).unwrap();
+ assert!(schema["paths"]["/v1/catalog"]["get"].is_object());
+ assert!(schema["paths"]["/v1/users/{external_user_id}/connections"]["get"].is_object());
+ assert!(
+ schema["paths"]["/v1/users/{external_user_id}/connections/{app_id}"]["delete"].is_object()
+ );
+ assert!(
+ schema["paths"]["/v1/users/{external_user_id}/connections/{app_id}/token"]["get"]
+ .is_object()
+ );
+ for method in ["post", "get", "delete"] {
+ assert!(schema["paths"]["/v1/users/{external_user_id}/mcp/{app_id}"][method].is_object());
+ assert_eq!(
+ schema["paths"]["/v1/users/{external_user_id}/mcp/{app_id}"][method]["security"][0]["customer_key"],
+ serde_json::json!([])
+ );
+ }
+ let icon_schema = &schema["components"]["schemas"]["CatalogEntry"]["properties"]["icon_url"];
+ assert!(
+ icon_schema["type"]
+ .as_array()
+ .is_some_and(|types| types.contains(&serde_json::json!("null"))),
+ "{icon_schema}"
+ );
+ assert_eq!(
+ schema["components"]["securitySchemes"]["customer_key"]["scheme"],
+ "bearer"
+ );
+ assert_eq!(
+ schema["paths"]["/v1/users/{external_user_id}/connections"]["get"]["security"][0]["customer_key"],
+ serde_json::json!([])
+ );
+}
+
+#[tokio::test]
+#[expect(
+ clippy::disallowed_methods,
+ reason = "Connect's test database uses its own runtime migration per connect/docs/decisions.md"
+)]
+async fn routes_enforce_keys_and_customer_scope() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ use crate::{
+ domain::{Grant, GrantCipher},
+ outbound::{EnvelopeCipher, LocalKeyWrapper, PostgresRepository},
+ };
+ use base64::{Engine as _, engine::general_purpose::STANDARD};
+ let repository = Arc::new(PostgresRepository::new(pool.clone()));
+ let key = repository.create_customer("Macro").await.unwrap();
+ let other_key = repository.create_customer("Other").await.unwrap();
+ let customer_id = repository.authenticate(&key).await.unwrap();
+ let cipher = Arc::new(EnvelopeCipher::new(Arc::new(
+ LocalKeyWrapper::from_base64(&STANDARD.encode([8_u8; 32])).unwrap(),
+ )));
+ let connection_id = uuid::Uuid::now_v7();
+ let grant = Grant {
+ access_token: "private-access".into(),
+ refresh_token: Some("private-refresh".into()),
+ token_type: "Bearer".into(),
+ expires_at: Some(chrono::Utc::now() + chrono::Duration::hours(1)),
+ scopes: vec!["read".into()],
+ };
+ let envelope = cipher
+ .seal(customer_id, connection_id, &grant)
+ .await
+ .unwrap();
+ repository
+ .insert_connection(
+ connection_id,
+ customer_id,
+ "user-a",
+ "notion",
+ &grant.scopes,
+ &envelope,
+ )
+ .await
+ .unwrap();
+ let app = router(AppState {
+ apps: all_apps().unwrap(),
+ service: Arc::new(Service::new(repository.clone())),
+ oauth: Arc::new(domain::oauth::OAuthService::new(
+ repository.clone(),
+ cipher,
+ Arc::new(outbound::oauth::VendorOAuth::new().unwrap()),
+ all_apps().unwrap(),
+ url::Url::parse("http://localhost:8080").unwrap(),
+ HashMap::new(),
+ )),
+ mcp_http: crate::outbound::mcp::VendorMcp::new().unwrap(),
+ });
+ let list = "/v1/users/user-a/connections";
+ let request = |uri: &str, key: Option<&str>, method: axum::http::Method| {
+ let mut builder = Request::builder().uri(uri).method(method);
+ if let Some(key) = key {
+ builder = builder.header(header::AUTHORIZATION, format!("Bearer {key}"));
+ }
+ builder.body(Body::empty()).unwrap()
+ };
+ assert_eq!(
+ app.clone()
+ .oneshot(request(list, None, axum::http::Method::GET))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::UNAUTHORIZED
+ );
+ assert_eq!(
+ app.clone()
+ .oneshot(request(
+ list,
+ Some("ck_bad_secret"),
+ axum::http::Method::GET
+ ))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::UNAUTHORIZED
+ );
+ let revoked_id = uuid::Uuid::parse_str(key.split('_').nth(1).unwrap()).unwrap();
+ let wrong_secret = format!("ck_{revoked_id}_wrong-secret");
+ assert_eq!(
+ app.clone()
+ .oneshot(request(list, Some(&wrong_secret), axum::http::Method::GET))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::UNAUTHORIZED
+ );
+ sqlx::query("UPDATE customer_api_keys SET revoked_at = now() WHERE id = $1")
+ .bind(revoked_id)
+ .execute(&pool)
+ .await
+ .unwrap();
+ assert_eq!(
+ app.clone()
+ .oneshot(request(list, Some(&key), axum::http::Method::GET))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::UNAUTHORIZED
+ );
+ let response = app
+ .clone()
+ .oneshot(request(list, Some(&other_key), axum::http::Method::GET))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ assert_eq!(
+ serde_json::from_slice::<serde_json::Value>(&body)
+ .unwrap()
+ .as_array()
+ .unwrap()
+ .len(),
+ 0
+ );
+ // The first customer needs another key after revocation.
+ let new_key_id = uuid::Uuid::now_v7();
+ let secret = "another-key-secret";
+ use sha2::Digest as _;
+ let hash = sha2::Sha256::digest(secret.as_bytes());
+ sqlx::query(
+ "INSERT INTO customer_api_keys (id, customer_id, key_hash, prefix) VALUES ($1, $2, $3, $4)",
+ )
+ .bind(new_key_id)
+ .bind(customer_id)
+ .bind(&hash[..])
+ .bind(&secret[..8])
+ .execute(&pool)
+ .await
+ .unwrap();
+ let owner_key = format!("ck_{new_key_id}_{secret}");
+ let response = app
+ .clone()
+ .oneshot(request(list, Some(&owner_key), axum::http::Method::GET))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ assert_eq!(
+ serde_json::from_slice::<serde_json::Value>(&body).unwrap()[0]["appId"],
+ "notion"
+ );
+ let token_url = "/v1/users/user-a/connections/notion/token";
+ let response = app
+ .clone()
+ .oneshot(request(
+ token_url,
+ Some(&owner_key),
+ axum::http::Method::GET,
+ ))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ assert_eq!(
+ serde_json::from_slice::<serde_json::Value>(&body).unwrap()["accessToken"],
+ "private-access"
+ );
+ assert_eq!(
+ app.clone()
+ .oneshot(request(
+ token_url,
+ Some(&other_key),
+ axum::http::Method::GET
+ ))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::NOT_FOUND
+ );
+ let delete_url = "/v1/users/user-a/connections/notion";
+ assert_eq!(
+ app.clone()
+ .oneshot(request(
+ delete_url,
+ Some(&other_key),
+ axum::http::Method::DELETE
+ ))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::NOT_FOUND
+ );
+ let response = app
+ .clone()
+ .oneshot(request(
+ delete_url,
+ Some(&owner_key),
+ axum::http::Method::DELETE,
+ ))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ assert_eq!(
+ serde_json::from_slice::<serde_json::Value>(&body).unwrap()["vendorGrantRevoked"],
+ false
+ );
+ assert_eq!(
+ app.clone()
+ .oneshot(request(
+ token_url,
+ Some(&owner_key),
+ axum::http::Method::GET
+ ))
+ .await
+ .unwrap()
+ .status(),
+ StatusCode::NOT_FOUND
+ );
+}
+
+#[tokio::test]
+async fn expired_token_requires_reauthorization() {
+ let database = TestDatabase::new().await;
+ let pool = database.pool().clone();
+ use crate::{
+ domain::{Grant, GrantCipher},
+ outbound::{EnvelopeCipher, LocalKeyWrapper, PostgresRepository},
+ };
+ use base64::{Engine as _, engine::general_purpose::STANDARD};
+ let repository = Arc::new(PostgresRepository::new(pool));
+ let key = repository.create_customer("Macro").await.unwrap();
+ let customer_id = repository.authenticate(&key).await.unwrap();
+ let cipher = Arc::new(EnvelopeCipher::new(Arc::new(
+ LocalKeyWrapper::from_base64(&STANDARD.encode([8_u8; 32])).unwrap(),
+ )));
+ let id = uuid::Uuid::now_v7();
+ let grant = Grant {
+ access_token: "expired".into(),
+ refresh_token: None,
+ token_type: "Bearer".into(),
+ expires_at: Some(chrono::Utc::now() - chrono::Duration::hours(1)),
+ scopes: vec![],
+ };
+ let envelope = cipher.seal(customer_id, id, &grant).await.unwrap();
+ repository
+ .insert_connection(id, customer_id, "user-a", "notion", &[], &envelope)
+ .await
+ .unwrap();
+ let app = router(AppState {
+ apps: all_apps().unwrap(),
+ service: Arc::new(Service::new(repository.clone())),
+ oauth: Arc::new(domain::oauth::OAuthService::new(
+ repository,
+ cipher,
+ Arc::new(outbound::oauth::VendorOAuth::new().unwrap()),
+ all_apps().unwrap(),
+ url::Url::parse("http://localhost:8080").unwrap(),
+ HashMap::new(),
+ )),
+ mcp_http: crate::outbound::mcp::VendorMcp::new().unwrap(),
+ });
+ let response = app
+ .oneshot(
+ Request::builder()
+ .uri("/v1/users/user-a/connections/notion/token")
+ .header(header::AUTHORIZATION, format!("Bearer {}", key.as_str()))
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::CONFLICT);
+ let body = response.into_body().collect().await.unwrap().to_bytes();
+ assert_eq!(
+ serde_json::from_slice::<serde_json::Value>(&body).unwrap()["error"],
+ "needs_reauth"
+ );
+}
diff --git a/connect/services/connect_api/src/test_support.rs b/connect/services/connect_api/src/test_support.rs
new file mode 100644
index 0000000000..9e95d5c128
--- /dev/null
+++ b/connect/services/connect_api/src/test_support.rs
@@ -0,0 +1,74 @@
+use std::str::FromStr as _;
+
+use sqlx::{
+ Connection as _, Executor as _, PgConnection, PgPool,
+ postgres::{PgConnectOptions, PgPoolOptions},
+};
+
+use crate::outbound::MIGRATOR;
+
+pub struct TestDatabase {
+ name: String,
+ admin_options: PgConnectOptions,
+ pool: PgPool,
+}
+
+impl TestDatabase {
+ pub async fn new() -> Self {
+ #[expect(
+ clippy::disallowed_methods,
+ reason = "test databases must use the process DATABASE_URL supplied by the test runner"
+ )]
+ let url =
+ std::env::var("DATABASE_URL").expect("DATABASE_URL is required for database tests");
+ let options = PgConnectOptions::from_str(&url).unwrap();
+ let admin_options = options.clone().database("postgres");
+ let name = format!("connect_test_{}", uuid::Uuid::now_v7().simple());
+ let mut admin = PgConnection::connect_with(&admin_options).await.unwrap();
+ admin
+ .execute(format!("CREATE DATABASE {name} WITH TEMPLATE template0").as_str())
+ .await
+ .unwrap();
+
+ let pool = PgPoolOptions::new().connect_lazy_with(options.database(&name));
+ let database = Self {
+ name,
+ admin_options,
+ pool,
+ };
+ MIGRATOR.run(&database.pool).await.unwrap();
+ database
+ }
+
+ pub fn pool(&self) -> &PgPool {
+ &self.pool
+ }
+}
+
+impl Drop for TestDatabase {
+ fn drop(&mut self) {
+ let name = self.name.clone();
+ let options = self.admin_options.clone();
+ let result = std::thread::spawn(move || {
+ let runtime = tokio::runtime::Builder::new_current_thread()
+ .enable_all()
+ .build()
+ .unwrap();
+ runtime.block_on(async move {
+ let mut admin = PgConnection::connect_with(&options).await?;
+ admin
+ .execute(format!("DROP DATABASE {name} WITH (FORCE)").as_str())
+ .await?;
+ Ok::<(), sqlx::Error>(())
+ })
+ })
+ .join();
+ match result {
+ Ok(Ok(())) => {}
+ other if std::thread::panicking() => {
+ eprintln!("test database cleanup failed: {other:?}")
+ }
+ other => panic!("test database cleanup failed: {other:?}"),
+ }
+ }
+}
diff --git a/connect/submissions/answers.md b/connect/submissions/answers.md
new file mode 100644
index 0000000000..c388421e66
--- /dev/null
+++ b/connect/submissions/answers.md
@@ -0,0 +1,8 @@
+# Approved answers
+
+Wording the human has approved for vendor submissions. Reuse it verbatim;
+new wording goes here only after the human approves it, with the date.
+
+Empty until the first submissions are drafted. Expected entries: product
+description, data handling and retention, data deletion on disconnect,
+security contact, subprocessors, scope justifications by scope.
diff --git a/connect/submissions/asana.md b/connect/submissions/asana.md
new file mode 100644
index 0000000000..40476a32a4
--- /dev/null
+++ b/connect/submissions/asana.md
@@ -0,0 +1,22 @@
+---
+vendor: asana
+apps: [asana]
+state: not-started
+portal: https://app.asana.com/0/my-apps
+account:
+submitted:
+last_contact:
+next_action: Human confirms whether Macro already has an MCP app
+next_action_owner: human
+due:
+---
+
+## Requirements
+
+`mcp.asana.com/v2/mcp` has no DCR or CIMD. Self-serve app in the Asana developer console.
+
+## Scopes
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
diff --git a/connect/submissions/box.md b/connect/submissions/box.md
new file mode 100644
index 0000000000..04f83954fe
--- /dev/null
+++ b/connect/submissions/box.md
@@ -0,0 +1,123 @@
+---
+vendor: box
+apps: [box]
+state: drafting
+portal: https://developer.box.com/guides/box-mcp/remote/
+submitted:
+last_contact:
+next_action: Human approves emailing [email protected] from [email protected] to ask how an MCP client becomes a predefined Box MCP integration (draft below)
+next_action_owner: human
+due: 2026-11-02
+---
+
+## Requirements
+
+`mcp.box.com` has no DCR or CIMD (probed; authorization server
+`https://api.box.com`, PKCE S256, confidential client). Box documents two ways
+for a client to reach it, both enabled by each customer's Box admin:
+
+1. **Predefined Box MCP server:** the admin finds the client under Admin
+ Console > Integrations (category MCP) and enables it. One client for every
+ Box enterprise; requires Box to list Macro Connect.
+2. **Unlisted custom Box MCP server:** each enterprise's admin configures the
+ "Box MCP server" integration, adds integration credentials, enters the
+ client's redirect URI and scopes, and hands the client ID and secret to the
+ client. That is one OAuth client per customer enterprise: Macro Connect
+ would need bring-your-own-client per Box tenant. Not viable for v1's 3
+ connections across unknown enterprises.
+
+([Box remote MCP](https://developer.box.com/guides/box-mcp/remote/),
+[Managing Box MCP servers](https://support.box.com/hc/en-us/articles/43847256139923-Managing-Box-MCP-Servers))
+
+Route 1 checklist:
+
+- [ ] **Request channel:** no published self-serve form for predefined MCP
+ listings. Box staff on the community forum: build an OAuth 2.0 app in the
+ Developer Console, publish it in the Integrations center, approval by Box
+ Business Development and Partner Product Management, via a partner
+ representative or an integration request.
+ ([forum answer](https://community.box.com/ai-developers-23/clarification-on-box-mcp-integration-setup-35080));
+ Integrations review contact: `[email protected]`
+ ([Integrations guide](https://developer.box.com/guides/applications/integrations)).
+- [ ] **Account type:** Box developer account and a Platform app with
+ OAuth 2.0 (user authentication) in the Developer Console.
+ ([Integrations guide](https://developer.box.com/guides/applications/integrations))
+- [ ] **App fields (Integrations listing):** categories, short description, long
+ description, Add-button URL, screenshots, app icon, supplementary support
+ information, checklist confirmation.
+ ([Integrations guide](https://developer.box.com/guides/applications/integrations))
+- [ ] **Required pages:** the Add-button URL and support information; have
+ landing, privacy, and terms pages ready.
+- [ ] **Domain verification, demo video, security review:** none published.
+- [ ] **Reviewer SLA:** "as soon as possible"; none published.
+- [ ] **User cap before approval:** zero for other enterprises; each user's Box
+ admin must also enable the integration after listing.
+- [ ] **Costs:** none published. `docgen.readwrite` needs the customer's Box
+ Enterprise Advanced licence.
+ ([Box remote MCP](https://developer.box.com/guides/box-mcp/remote/))
+- [ ] **Open question:** whether a Developer Console OAuth app's tokens are
+ accepted by `mcp.box.com` at all, or only Admin Console MCP credentials. Ask
+ in the email below.
+
+## Scopes
+
+Live metadata advertises no scopes; Box's docs list three for MCP clients.
+
+- `root_readwrite`: read, search, and write files and folders the user can
+ already access (Box MCP tools include uploads and folder changes).
+- `ai.readwrite`: Box AI tools (ask, extract) over the user's files.
+- Not requested: `docgen.readwrite` (Doc Gen; needs Enterprise Advanced).
+
+If Macro is read-only for Box, ask whether the server accepts `root_readonly`
+instead of `root_readwrite`.
+
+## Draft
+
+**Email to `[email protected]`** (new wording, needs approval; sent from
+
+> Subject: Listing Macro Connect as a predefined Box MCP integration
+>
+> Hello Box Partner team,
+>
+> Macro Connect gives products first-party access to their users' tools: it
+> connects users to each vendor's own MCP server over the vendor's OAuth,
+> through OAuth apps Macro Connect owns and operates. Macro is its first
+> customer, and its users already connect Box today.
+>
+> We would like Macro Connect to appear as a predefined client under Admin
+> Console > Integrations > MCP, so a Box admin can enable it without creating
+> credentials by hand. Could you tell us:
+>
+> 1. the process to become a predefined Box MCP integration, and whether it
+> needs a Box partnership;
+> 2. whether a Platform app (OAuth 2.0) from the Developer Console is the right
+> starting point, and whether its tokens are accepted by `mcp.box.com`;
+> 3. which scopes to request (we plan `root_readwrite` and `ai.readwrite`).
+>
+> Thank you,
+> NEEDS-HUMAN: sender name and title
+
+**Integrations listing (for after Box confirms the path):**
+
+| Field | Value |
+| --- | --- |
+| App name | Macro Connect |
+| Categories | NEEDS-HUMAN: pick (suggest AI, Productivity) |
+| Short description | Connect your Box account to AI tools through Box's own MCP server. *(new wording, needs approval)* |
+| Long description | plan.md first paragraph, as in the email *(needs approval)* |
+| Add-button URL | NEEDS-HUMAN: Macro Connect landing or connect URL |
+| Redirect URI | NEEDS-HUMAN: `connect_api` production host and callback path |
+| Screenshots | NEEDS-HUMAN: capture once the connect flow is built |
+| App icon | NEEDS-HUMAN: Macro Connect icon |
+| Support information | NEEDS-HUMAN: support URL or address |
+| Scopes | `root_readwrite`, `ai.readwrite` |
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Requirements filled. An unlisted (custom) integration is not
+ enough for v1: it gives one client per customer enterprise, created by that
+ enterprise's admin. The path is a predefined listing through Box's partner
+ team; email to `[email protected]` drafted. Nothing sent.
diff --git a/connect/submissions/discord.md b/connect/submissions/discord.md
new file mode 100644
index 0000000000..12f41c04e2
--- /dev/null
+++ b/connect/submissions/discord.md
@@ -0,0 +1,97 @@
+---
+vendor: discord
+apps: [discord]
+state: blocked
+portal: https://discord.com/developers
+submitted:
+last_contact:
+next_action: Agent sends the draft question (below) to Discord developer support from [email protected], once browser sign-in is set up, asking whether mcp.discord.com is open to third-party clients and how to get the personal.* scopes
+next_action_owner: agent
+due: 2026-11-02
+---
+
+## Requirements
+
+`mcp.discord.com/mcp` answers with OAuth metadata (authorization server
+`https://discord.com`, PKCE S256, `none` token auth allowed) but has no DCR or
+CIMD, is not announced, and asks for `personal.*` scopes that Discord's public
+OAuth2 docs do not list. Discord's docs say some scopes "require approval from
+Discord", and requesting them without approval "may cause errors or
+undocumented behavior". Still unconfirmed; stays blocked.
+
+- [ ] **Confirm availability:** ask Discord whether the server is open to
+ third-party clients. Channel: Discord developer support,
+ <https://support-dev.discord.com/hc/en-us/requests/new> (Developer Help
+ Center; returns 403 to curl, open in a browser).
+- [ ] **Account type:** Discord account for `[email protected]` and an
+ application in the Developer Portal. ([portal](https://discord.com/developers))
+- [ ] **App fields:** application name, OAuth2 redirects; privacy policy and
+ terms URLs on the application's General Information page.
+ ([OAuth2 docs](https://github.com/discord/discord-api-docs/blob/main/developers/topics/oauth2.mdx))
+- [ ] **Scope approval:** `personal.*` scopes undocumented; approval process
+ unknown until Discord answers.
+- [ ] **Domain verification, demo video, security review, SLA, user caps,
+ costs:** unknown until Discord answers.
+
+## Scopes
+
+From the live `WWW-Authenticate` challenge and
+`https://mcp.discord.com/.well-known/oauth-protected-resource/mcp`
+(2026-10-30). The server asks for all of these together; which are strictly
+needed per tool is unknown.
+
+- `identify`: the user's Discord identity for the connection record.
+- `guilds`: list the user's servers.
+- `guilds.members.read`: the user's member info in a server.
+- `connections`: linked third-party accounts. Probably unneeded; ask whether
+ the server works without it.
+- `personal.guilds.channels.read`, `personal.guilds.channels.messages.read`,
+ `personal.guilds.messages.search`: read and search server channels.
+- `personal.dm_channels.read`, `personal.dm_channels.messages.read`,
+ `personal.dm_channels.messages.search`: read and search DMs.
+- `personal.mentions.read`: read mentions.
+- `personal.relationships.read`: read the friends list. Probably unneeded.
+
+## Draft
+
+**Question to Discord developer support** (new wording, needs approval; sent
+from `[email protected]` only):
+
+> Subject: Is mcp.discord.com open to third-party MCP clients?
+>
+> Hello,
+>
+> Macro Connect gives products first-party access to their users' tools: it
+> connects users to each vendor's own MCP server over the vendor's OAuth,
+> through OAuth apps Macro Connect owns and operates. Macro is its first
+> customer.
+>
+> We found Discord's MCP server at `https://mcp.discord.com/mcp`. Its OAuth
+> metadata asks for `personal.*` scopes that are not in the public OAuth2
+> docs. Could you tell us:
+>
+> 1. whether the server is available to third-party MCP clients today;
+> 2. how an application gets approved for the `personal.*` scopes, and what
+> review that involves;
+> 3. whether a client should register its own Discord application, or whether
+> Discord pre-registers MCP clients.
+>
+> Thank you,
+> NEEDS-HUMAN: sender name and title
+
+| Field (if Discord says yes) | Value |
+| --- | --- |
+| Application name | Macro Connect |
+| Description | plan.md first paragraph *(needs approval)* |
+| OAuth2 redirect | NEEDS-HUMAN: `connect_api` production host and callback path |
+| Privacy policy URL | NEEDS-HUMAN: Macro Connect privacy page |
+| Terms of service URL | NEEDS-HUMAN: Macro Connect terms page |
+| App icon | NEEDS-HUMAN: Macro Connect icon |
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Re-probed: still no DCR or CIMD, still undocumented `personal.*`
+ scopes, no public announcement found. Kept blocked; drafted the question to
+ Discord developer support. Nothing sent.
diff --git a/connect/submissions/figma.md b/connect/submissions/figma.md
new file mode 100644
index 0000000000..4cea034688
--- /dev/null
+++ b/connect/submissions/figma.md
@@ -0,0 +1,75 @@
+---
+vendor: figma
+apps: [figma]
+state: drafting
+portal: https://form.asana.com/?k=kBG-ejRQTdY8x_H6a4vM3Q&d=10497086658021
+submitted:
+last_contact:
+next_action: Human fills the NEEDS-HUMAN items (redirect URI, contact, company facts, logo); the agent then submits Figma's MCP client waitlist form
+next_action_owner: human
+due: 2026-11-02
+---
+
+## Requirements
+
+Figma advertises DCR (`https://api.figma.com/v1/oauth/mcp/register`) but
+rejects unknown clients by `client_name` (403); custom OAuth apps cannot
+request `mcp:connect`. Only clients in the Figma MCP catalog can connect.
+
+- [ ] **Request channel:** the "join the waitlist" form linked from Figma's
+ remote server docs:
+ <https://form.asana.com/?k=kBG-ejRQTdY8x_H6a4vM3Q&d=10497086658021>
+ (an Asana form; its fields render only in a browser, so they are not listed
+ here). ([Remote server installation](https://developers.figma.com/docs/figma-mcp-server/remote-server-installation))
+- [ ] **Second channel:** the catalog page says "apply to register your client
+ for remote access, please reach out to your account team". Ask Macro's Figma
+ account team, if Macro has one. ([MCP catalog](https://www.figma.com/mcp-catalog/))
+- [ ] **Account type:** none stated; a Figma account for `[email protected]`
+ is needed for conformance once approved.
+- [ ] **App fields:** unknown until the form is opened; prepare the Draft
+ below, which covers what Vercel's equivalent form asks.
+- [ ] **Required pages:** none stated; have landing, privacy, and terms pages
+ ready.
+- [ ] **Domain verification, demo video, security review:** none stated.
+- [ ] **Reviewer SLA:** none published; no public criteria.
+- [ ] **User cap before approval:** zero; no Macro Connect user can connect
+ until Figma approves.
+- [ ] **Costs:** none stated.
+- [ ] **Registration after approval:** unknown whether Figma allowlists a DCR
+ `client_name` or issues a pre-registered client; ask in the request.
+
+## Scopes
+
+From `https://mcp.figma.com/.well-known/oauth-protected-resource` and
+`https://api.figma.com/.well-known/oauth-authorization-server` (2026-10-30):
+both advertise only one scope.
+
+- `mcp:connect`: the only scope the Figma MCP server accepts; grants the
+ server's tools.
+
+## Draft
+
+| Field | Value |
+| --- | --- |
+| Contact name | NEEDS-HUMAN: contact person |
+| Contact email | [email protected] |
+| Company name | NEEDS-HUMAN: legal company name |
+| Company URL | NEEDS-HUMAN: Macro Connect or Macro URL |
+| Client name | Macro Connect |
+| Client description | Macro Connect gives products first-party access to their users' tools: it connects users to each vendor's own MCP server over the vendor's OAuth, through OAuth apps Macro Connect owns and operates. Macro is its first customer. *(from plan.md, needs approval)* |
+| Expected users | NEEDS-HUMAN: whether to state Macro's current Figma connection count (38) |
+| Transport | Streamable HTTP |
+| Auth | OAuth 2.1 with PKCE (S256); DCR `client_name` "Macro Connect", or a pre-registered client if Figma prefers |
+| Redirect URI(s) | NEEDS-HUMAN: `connect_api` production host and callback path |
+| Documentation link | NEEDS-HUMAN: public docs page, if any |
+| Logo | NEEDS-HUMAN: logo URL (SVG or high-resolution PNG) |
+| Test instructions | NEEDS-HUMAN: Macro test account; then: sign in, open Connections, connect Figma, ask the assistant to describe a frame from a shared file URL |
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Found the request channel (waitlist form linked from Figma's
+ remote server docs; catalog page also points to the account team), confirmed
+ `mcp:connect` as the only scope from live metadata, drafted offline. Nothing
+ submitted.
diff --git a/connect/submissions/github.md b/connect/submissions/github.md
new file mode 100644
index 0000000000..9d097ce53a
--- /dev/null
+++ b/connect/submissions/github.md
@@ -0,0 +1,23 @@
+---
+vendor: github
+apps: [github]
+state: deferred
+portal: https://github.com/organizations/macro-inc/settings/applications
+account:
+submitted:
+last_contact:
+next_action: None in v1; Macro's existing GitHub OAuth app serves Connect
+next_action_owner: human
+due:
+---
+
+## Requirements
+
+Copilot MCP (`api.githubcopilot.com/mcp`) has no DCR or CIMD. GitHub OAuth apps need no review. Macro's own app exists, but Connect needs its own (separate product, separate secrets).
+
+## Scopes
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Deferred by Eric: v1 reuses Macro's GitHub app; Connect registers its own later.
diff --git a/connect/submissions/google.md b/connect/submissions/google.md
new file mode 100644
index 0000000000..7d42a537ba
--- /dev/null
+++ b/connect/submissions/google.md
@@ -0,0 +1,23 @@
+---
+vendor: google
+apps: [google_drive, google_sheets, gmail, google_calendar, google_docs, google_slides, google_chat, google_analytics, google_search_console, google_tasks, google_meet, google_classroom, google_cloud]
+state: deferred
+portal: https://console.cloud.google.com
+account:
+submitted:
+last_contact:
+next_action: None until Eric reopens Google
+next_action_owner: human
+due:
+---
+
+## Requirements
+
+MCP servers (`*mcp.googleapis.com`) accept no DCR or CIMD: Macro Connect's own Google OAuth client, "Use this client for an AI-powered agent" ticked, MCP services enabled, Workspace MCP Developer Preview enrollment. Sensitive scopes (Calendar, Sheets, Docs, Slides via `drive.file`, Analytics, Search Console): verification. Restricted scopes (Gmail, full Drive, Chat): verification plus annual CASA assessment. File sensitive and restricted as separate requests. 100-user cap until verified. Gmail's 401 points `resource_metadata` at a per-tool path.
+
+## Scopes
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Punted by Eric; Google connections stay on Pipedream.
diff --git a/connect/submissions/hubspot.md b/connect/submissions/hubspot.md
new file mode 100644
index 0000000000..5f0cc9e99a
--- /dev/null
+++ b/connect/submissions/hubspot.md
@@ -0,0 +1,22 @@
+---
+vendor: hubspot
+apps: [hubspot]
+state: not-started
+portal: https://developers.hubspot.com
+account:
+submitted:
+last_contact:
+next_action: Human confirms whether Macro already has an MCP auth app
+next_action_owner: human
+due:
+---
+
+## Requirements
+
+`mcp.hubspot.com` has no DCR or CIMD. Self-serve MCP auth app on the HubSpot developer platform; unlisted apps may have install limits.
+
+## Scopes
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
diff --git a/connect/submissions/microsoft.md b/connect/submissions/microsoft.md
new file mode 100644
index 0000000000..2d95d07825
--- /dev/null
+++ b/connect/submissions/microsoft.md
@@ -0,0 +1,23 @@
+---
+vendor: microsoft
+apps: [microsoft_teams, microsoft_outlook, microsoft_outlook_calendar, microsoft_onedrive]
+state: excluded
+portal: https://entra.microsoft.com
+account:
+submitted:
+last_contact:
+next_action: None; excluded from v1
+next_action_owner: human
+due:
+---
+
+## Requirements
+
+Microsoft's MCP servers (Agent 365) need Agent 365 plus Microsoft 365 Copilot licences per user; the authorization server has no DCR or CIMD. Would need a multitenant Entra app and publisher verification (Microsoft AI Cloud Partner Program ID).
+
+## Scopes
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Excluded by Eric: MCP needs Agent 365 and Copilot licences.
diff --git a/connect/submissions/slack.md b/connect/submissions/slack.md
new file mode 100644
index 0000000000..28a1fdcc33
--- /dev/null
+++ b/connect/submissions/slack.md
@@ -0,0 +1,23 @@
+---
+vendor: slack
+apps: [slack, slack_v2]
+state: deferred
+portal: https://api.slack.com/apps
+account:
+submitted:
+last_contact:
+next_action: None in v1; Macro's existing Slack app serves Connect
+next_action_owner: human
+due:
+---
+
+## Requirements
+
+Slack MCP (`mcp.slack.com/mcp`) has no DCR; user tokens only. Unlisted distribution works without Marketplace review; workspace admins may require approval.
+
+## Scopes
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Deferred by Eric: v1 reuses Macro's Slack app; Connect registers its own later.
diff --git a/connect/submissions/vercel.md b/connect/submissions/vercel.md
new file mode 100644
index 0000000000..079b79d90d
--- /dev/null
+++ b/connect/submissions/vercel.md
@@ -0,0 +1,83 @@
+---
+vendor: vercel
+apps: [vercel_token_auth]
+state: drafting
+portal: https://forms.gle/FQ3nYPbovoHvbfmz9
+submitted:
+last_contact:
+next_action: Human fills the NEEDS-HUMAN items (redirect URI, contact, company facts, logo and wordmark URLs); the agent then submits Vercel's client review form
+next_action_owner: human
+due: 2026-11-02
+---
+
+## Requirements
+
+Vercel advertises CIMD and DCR (and `none` token auth), but "Vercel MCP only
+supports AI clients that have been reviewed and approved by Vercel"; the
+redirect URI must be allowlisted by Vercel's auth server.
+
+- [ ] **Request channel:** the client review form
+ <https://forms.gle/FQ3nYPbovoHvbfmz9> (Google Form "MCP Client Directory"),
+ linked from [Vercel MCP docs](https://vercel.com/docs/agent-resources/vercel-mcp).
+- [ ] **Listing is public:** approved clients appear on Vercel's Supported
+ Clients page with the submitted name, description, logo, and wordmark.
+ ([form](https://forms.gle/FQ3nYPbovoHvbfmz9))
+- [ ] **Account type:** none stated; a Vercel account for `[email protected]`
+ for conformance.
+- [ ] **App fields:** 12 required fields plus optional comments; all in the
+ Draft below.
+- [ ] **Protocol:** must support the 2025-06-18 MCP auth spec and Streamable
+ HTTP. ([form](https://forms.gle/FQ3nYPbovoHvbfmz9))
+- [ ] **Required pages:** company URL and client documentation links.
+- [ ] **Domain verification, demo video, security review:** none stated;
+ Vercel says it approves clients that "meet our standards for authorization,
+ data handling, and protocol adherence".
+ ([launch post](https://vercel.com/blog/introducing-vercel-mcp-connect-vercel-to-your-ai-tools))
+- [ ] **Reviewer SLA:** none published. A community thread shows Vercel Support
+ routing client requests to the forum
+ ([thread](https://community.vercel.com/t/request-approve-harness-development-for-vercel-mcp-oauth/49282)).
+- [ ] **User cap before approval:** zero over OAuth; the current fallback is a
+ pasted Vercel access token.
+- [ ] **Costs:** none; Vercel MCP is on all plans, under Vercel's AI Product
+ Terms. ([docs](https://vercel.com/docs/agent-resources/vercel-mcp))
+
+## Scopes
+
+From `https://mcp.vercel.com/.well-known/oauth-protected-resource` and
+`https://vercel.com/.well-known/oauth-authorization-server` (2026-10-30). The
+resource advertises only `openid`; access is governed by the user's Vercel team
+permissions, not scopes.
+
+- `openid`: the only scope the MCP resource lists.
+- `offline_access`: refresh tokens, so connections survive access-token expiry.
+- Not requested: `email`, `profile` (not needed), `ema_issuer:manage`
+ (unrelated to MCP).
+
+## Draft
+
+Fields of the form as fetched 2026-10-30, in order. Field types: text unless
+noted.
+
+| Field | Required | Value |
+| --- | --- | --- |
+| Primary Contact Name | yes | NEEDS-HUMAN: contact person |
+| Primary Contact Email | yes | [email protected] |
+| Company/Organization Name | yes | NEEDS-HUMAN: legal company name |
+| Company/Organization URL | yes | NEEDS-HUMAN: Macro Connect or Macro URL |
+| MCP Client Name | yes | Macro Connect |
+| MCP Client Description | yes | Macro Connect gives products first-party access to their users' tools: it connects users to each vendor's own MCP server over the vendor's OAuth, through OAuth apps Macro Connect owns and operates. Macro is its first customer. *(from plan.md, needs approval)* |
+| MCP Client Documentation Link(s) | yes | NEEDS-HUMAN: public docs page |
+| Transport Support (checkboxes: Streamable HTTP, SSE) | yes | Streamable HTTP |
+| MCP Client OAuth Redirect URI(s) | yes | NEEDS-HUMAN: `connect_api` production host and callback path |
+| Server Logo (link to SVG/PNG; consents to display) | yes | NEEDS-HUMAN: logo URL and consent to Vercel displaying it |
+| Wordmark (link to SVG/PNG; consents to display) | yes | NEEDS-HUMAN: wordmark URL and consent |
+| Client test setup instructions (paragraph) | yes | 1. Sign in to the provided Macro test account. 2. Open Connections, choose Vercel, sign in to Vercel and approve. 3. Ask the assistant to list your Vercel projects and the latest deployment of one. Macro Connect registers with a Client ID Metadata Document (or DCR if Vercel prefers) and uses PKCE. NEEDS-HUMAN: test account credentials. *(draft)* |
+| Additional comments (paragraph) | no | Ask which registration method approved clients should use (CIMD, DCR, or pre-registered) and whether the allowlist keys on redirect URI, `client_id` URL, or both. *(draft)* |
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Found the request channel (Google Form linked from Vercel MCP
+ docs), read its 13 fields without submitting, checked live metadata (CIMD
+ true, DCR, `none` auth), drafted offline. Nothing submitted.
diff --git a/connect/submissions/xero.md b/connect/submissions/xero.md
new file mode 100644
index 0000000000..6d5a231f69
--- /dev/null
+++ b/connect/submissions/xero.md
@@ -0,0 +1,115 @@
+---
+vendor: xero
+apps: [xero_accounting_api]
+state: drafting
+portal: https://developer.xero.com/app/manage
+submitted:
+last_contact:
+next_action: Human approves the Core plan (AUD$35/month, card on file) and supplies the redirect host; the agent then creates the PKCE app
+next_action_owner: human
+due: 2026-11-02
+---
+
+## Requirements
+
+No DCR or CIMD on either Xero endpoint (probed). Xero has no app review for
+this path: the gate is the paid Core plan.
+
+**Endpoint mismatch:** Xero's docs name `https://api.xero.com/mcp/v1` as the
+Remote MCP server for custom clients. The registry and research use
+`https://mcp.xero.com/mcp`, which serves a different, read-only scope set and
+appears to be the server behind Xero's own Claude connector. The registry
+entry should be re-probed and moved to `api.xero.com/mcp/v1`.
+
+- [ ] **Account:** Xero developer account as `[email protected]`.
+ ([Developer portal](https://developer.xero.com/app/manage))
+- [ ] **App type:** app with the **Auth Code with PKCE** grant (public client,
+ no client secret); Custom Connections apps are not eligible; single-page
+ apps unsupported.
+ ([Remote MCP overview](https://developer.xero.com/documentation/guides/remote-mcp/overview/),
+ [Remote MCP FAQ](https://developer.xero.com/faq/remote-mcp),
+ [PKCE flow](https://developer.xero.com/documentation/guides/oauth2/pkce-flow))
+- [ ] **App fields:** app name, integration type, company or application URL
+ (HTTPS), redirect URIs (HTTPS, no custom schemes, up to 50).
+ ([Remote MCP overview](https://developer.xero.com/documentation/guides/remote-mcp/overview/),
+ [auth flow](https://developer.xero.com/documentation/guides/oauth2/auth-flow/))
+- [ ] **Required pages:** none required for Core. A Xero App Store listing is
+ not applicable to Core.
+ ([Pricing](https://developer.xero.com/pricing))
+- [ ] **Domain verification:** none found.
+- [ ] **Demo video:** not required for Core.
+- [ ] **Certification and security assessment:** not required for Core; Plus
+ (1,000 connections) requires App Certification (eight checkpoints); Advanced
+ and Enterprise also require an annual security self-assessment.
+ ([Pricing](https://developer.xero.com/pricing),
+ [certification checkpoints](https://developer.xero.com/documentation/xero-app-store/app-partner-guides/certification-checkpoints))
+- [ ] **Reviewer SLA:** none for Core (no review).
+- [ ] **User cap before approval:** Starter (free, 5 connections) reaches Remote
+ MCP only with the Xero demo organisation; real customer organisations need
+ Core or above. Core caps at 50 connections (Macro has 15 today).
+ ([Remote MCP FAQ](https://developer.xero.com/faq/remote-mcp),
+ [Pricing](https://developer.xero.com/pricing))
+- [ ] **Costs:** Core AUD$35/month (tax excl.), 10 GB egress, AUD$2.40/GB over;
+ payment card required to move Starter to Core (human gate). Plus AUD$245/month.
+ ([Pricing](https://developer.xero.com/pricing))
+- [ ] **Developer terms:** accept Xero's developer terms when creating the app
+ (human gate).
+- [ ] **Rate limits:** 5,000 calls/day per organisation on Core.
+ ([Remote MCP FAQ](https://developer.xero.com/faq/remote-mcp))
+
+## Scopes
+
+From `https://api.xero.com/.well-known/oauth-protected-resource/mcp/v1`
+(2026-10-30); authorization server `https://identity.xero.com`. Xero maps each
+tool to one scope; the agent can only call tools whose scopes the grant holds.
+Xero does not review scopes, so the split below is about least privilege, not
+review speed.
+
+**Base:**
+
+- `offline_access`: refresh tokens, so connections survive the 30-minute
+ access token.
+- `openid`: identifies the Xero user for the connection record.
+ (`profile` and `email` are not requested; Macro Connect needs no personal data.)
+
+**Read (request now):**
+
+- `accounting.invoices.read`: list invoices, credit notes, items, quotes.
+- `accounting.contacts.read`: list contacts.
+- `accounting.payments.read`: list payments.
+- `accounting.banktransactions.read`: list bank transactions.
+- `accounting.manualjournals.read`: list manual journals.
+- `accounting.settings.read`: chart of accounts, tax rates, organisation details.
+- `accounting.reports.profitandloss.read`, `accounting.reports.balancesheet.read`,
+ `accounting.reports.trialbalance.read`, `accounting.reports.aged.read`: reports.
+
+**Write (only if Macro exposes write tools; Xero's server does not ask users
+to confirm writes):**
+
+- `accounting.invoices`, `accounting.contacts`, `accounting.payments`,
+ `accounting.banktransactions`, `accounting.manualjournals`,
+ `accounting.settings`: the matching create, update, and void tools.
+
+NEEDS-HUMAN: read-only or read-write for v1.
+
+## Draft
+
+| Field | Value |
+| --- | --- |
+| App name | Macro Connect |
+| Integration type / grant | Auth Code with PKCE |
+| Company or application URL | NEEDS-HUMAN: Macro Connect landing page URL |
+| Redirect URI | NEEDS-HUMAN: `connect_api` production host and callback path |
+| Plan | Core (AUD$35/month); NEEDS-HUMAN: approve the spend and add the card |
+| Scopes | Base + read list above; write list pending the decision above |
+| MCP URL for the registry | `https://api.xero.com/mcp/v1` |
+| Developer terms | NEEDS-HUMAN: accept Xero developer terms |
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Requirements, scopes, and draft filled from Xero's Remote MCP
+ overview, FAQ, and pricing pages, and live metadata of both endpoints. Found
+ that the documented endpoint is `api.xero.com/mcp/v1`, not `mcp.xero.com/mcp`.
+ Nothing submitted.
diff --git a/connect/submissions/zoom.md b/connect/submissions/zoom.md
new file mode 100644
index 0000000000..36acf42bdd
--- /dev/null
+++ b/connect/submissions/zoom.md
@@ -0,0 +1,168 @@
+---
+vendor: zoom
+apps: [zoom, zoom_admin]
+state: drafting
+portal: https://marketplace.zoom.us
+submitted:
+last_contact:
+next_action: Human fills the NEEDS-HUMAN items in the Draft (redirect host, company facts, legal and support URLs, security evidence); the agent then creates the General app
+next_action_owner: human
+due: 2026-11-02
+---
+
+## Requirements
+
+Zoom MCP has no DCR or CIMD (Zoom's docs say so; probe confirms); PKCE (S256)
+required; token endpoint auth is `client_secret_basic`.
+
+- [ ] **Account:** a Zoom account with developer or admin role, signed in to the
+ Marketplace as `[email protected]`.
+ ([MCP servers overview](https://developers.zoom.us/docs/mcp/servers.md))
+- [ ] **App type:** Marketplace **General app** (Develop > Build app > General
+ app); manual client registration only.
+ ([Connect to Zoom MCP servers](https://developers.zoom.us/docs/mcp/servers/connect-to-zoom-mcp-servers.md))
+- [ ] **App fields:** Basic information (app name, credentials), OAuth
+ Information (redirect URL, OAuth allow list), Scopes, listing (short and long
+ description, categories, branding).
+ ([Connect to Zoom MCP servers](https://developers.zoom.us/docs/mcp/servers/connect-to-zoom-mcp-servers.md),
+ [branding guidelines](https://developers.zoom.us/docs/distribute/app-review-guidelines/#intellectual-property))
+- [ ] **OAuth allow list rules:** HTTPS, fully-qualified domain, no localhost,
+ no ngrok or default Heroku domains.
+ ([Security requirements](https://developers.zoom.us/docs/distribute/security-requirements.md))
+- [ ] **Required pages:** Privacy Policy URL, Terms of Use URL, Home URL,
+ Support URL, self-serve documentation URL.
+ ([Submit for review](https://developers.zoom.us/docs/distribute/app-submission/submit-apps-review.md),
+ [listing links](https://developers.zoom.us/docs/build-flow/app-listing/links/))
+- [ ] **Domain verification:** every unique domain among the privacy, terms,
+ redirect, and home URLs, once each, by DNS TXT, HTML file, `<meta>` tag, or
+ manual approval from Zoom support.
+ ([Submit for review](https://developers.zoom.us/docs/distribute/app-submission/submit-apps-review.md))
+- [ ] **Technical Design section:** architecture, security controls, and how
+ data from each scope is used; "Yes" answers need supporting evidence
+ (screenshots, PDFs, diagrams).
+ ([Security requirements](https://developers.zoom.us/docs/distribute/security-requirements.md#technical-design))
+- [ ] **Security review:** Marketplace Security tests against the OWASP Top 10
+ (least privilege, web scanning, manual testing, vulnerable libraries).
+ ([App review process](https://developers.zoom.us/docs/distribute/app-review-process.md))
+- [ ] **Reviewer test plan and test credentials** for a test account (one per
+ role); first submission uses the Production Client ID.
+ ([Submit for review](https://developers.zoom.us/docs/distribute/app-submission/submit-apps-review.md))
+- [ ] **Demo video:** not listed as required in the current docs; re-check the
+ build flow's required-fields list when the app exists.
+- [ ] **Marketplace developer agreement:** accept (human gate).
+ ([Submit for review](https://developers.zoom.us/docs/distribute/app-submission/submit-apps-review.md))
+- [ ] **Reviewer SLA:** none published; two phases (Operations, then Security);
+ poorly described scopes or listings lengthen it.
+ ([App review process](https://developers.zoom.us/docs/distribute/app-review-process.md))
+- [ ] **User cap before approval:** unpublished (private) apps install only in
+ Macro Connect's own Zoom account; a beta authorization URL needs Zoom's
+ approval, is for testing, lasts 4 weeks (two 4-week extensions), "limited
+ number of users". Real users need a published app; publishing can still be
+ limited to specific users or domains.
+ ([Sharing private and beta apps](https://developers.zoom.us/docs/distribute/sharing-private-and-beta-apps.md),
+ [App distribution](https://developers.zoom.us/docs/distribute.md))
+- [ ] **Beta URL route (optional, not recommended):** an approved shareable
+ authorization URL needs SSDLC docs, SAST and DAST output, privacy policy, and
+ three of: pen-test summary, security policy, incident response policy,
+ vulnerability management, infra/dependency management.
+ ([Security requirements](https://developers.zoom.us/docs/distribute/security-requirements.md))
+- [ ] **Costs:** no Marketplace fee found. MCP rate limits are per Zoom account
+ and plan, shared with Zoom's APIs.
+ ([MCP servers overview](https://developers.zoom.us/docs/mcp/servers.md))
+- [ ] **Regional gateways:** `mcp.zoom.us` plus AU, CA, EU, IN, SA, SG, US
+ hosts; confirm one app serves all regions.
+ ([Zoom MCP](https://developers.zoom.us/docs/mcp.md))
+
+## Scopes
+
+From the live protected-resource metadata (2026-10-30):
+`https://zoom.us/.well-known/oauth-protected-resource/mcp/zoom/streamable` and
+`https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/admin/streamable`;
+authorization server `https://zoom.us`. Zoom's per-tool scope pages were not
+reachable; check the in-portal scope descriptions against the server's tool
+list at conformance.
+
+Zoom puts user-level and admin-level scopes in separate management types, so
+`zoom_admin` likely needs its own admin-managed app (unverified; check the
+portal when creating the app). Request 1 goes first; request 2 (`zoom_admin`)
+is filed separately so admin scopes don't slow request 1's review.
+
+**Request 1, `zoom` (user-managed app), read:**
+
+- `meeting:read:search`: search the user's meetings.
+- `meeting:read:assets`: read a meeting's summary, transcript, and assets.
+- `cloud_recording:read:list_user_recordings`: list the user's cloud recordings.
+- `cloud_recording:read:content`: read recording transcripts and content.
+- `my_notes:read:content`: read the user's Zoom notes.
+- `docs:read:export`: read Zoom Docs content.
+- `docs:read:list_file_collaborators`: list who a doc is shared with.
+- `hub:read:content`: read Zoom Hub content.
+- `agentic_search:read:search`: Zoom's cross-product search tool.
+- `agentic_search:read:ask`: Zoom's question-answering tool over the user's data.
+- `workflow:read:definition`, `workflow:read:list_definitions`: read workflows.
+
+**Request 1, `zoom`, write** (the server exposes these tools; drop any Macro
+does not use before filing):
+
+- `meeting:write:meeting`, `meeting:update:meeting`, `meeting:delete:meeting`:
+ schedule, edit, and cancel the user's meetings.
+- `meeting:update:in_meeting_controls`: in-meeting controls tool.
+- `docs:write:import`: create docs from imported content.
+- `docs:write:collaborator`, `docs:update:collaborator`,
+ `docs:delete:collaborator`: share and unshare docs.
+- `hub:write:content`: write Hub content.
+- `workflow:write:definition`: create or edit workflows.
+
+**Request 2, `zoom_admin` (admin-managed app):**
+
+- `user:read:user:admin`, `user:read:list_users:admin`: read account users.
+- `user:read:settings:admin`, `user:read:list_permissions:admin`: read user
+ settings and roles.
+- `group:read:list_groups:admin`, `group:read:list_members:admin`,
+ `group:read:settings:admin`: read groups.
+- `account:read:settings:admin`: read account settings.
+- Not requested: `account:read:settings:master`, `account:update:settings:master`,
+ `account:read:lock_settings:master` (master-account/sub-account scopes; Macro's
+ users are not Zoom master accounts).
+
+## Draft
+
+New wording below needs the human's approval before it goes into
+`answers.md`; `answers.md` is empty today.
+
+| Field | Value |
+| --- | --- |
+| App type | General app |
+| Management type | User-managed (`zoom`); admin-managed (`zoom_admin`, separate app) |
+| App name | Macro Connect |
+| Short description | Connect your Zoom account to AI tools through Zoom's own MCP server. *(new wording, needs approval)* |
+| Long description | Macro Connect gives products first-party access to their users' tools: it connects users to each vendor's own MCP server over the vendor's OAuth, through OAuth apps Macro Connect owns and operates. Macro is its first customer. *(from plan.md, needs approval)* |
+| Category | NEEDS-HUMAN: pick Marketplace category (suggest Productivity) |
+| Developer contact name | NEEDS-HUMAN: contact person |
+| Developer contact email | [email protected] |
+| Company name | NEEDS-HUMAN: legal company name |
+| Home URL | NEEDS-HUMAN: Macro Connect landing page URL |
+| OAuth redirect URL | NEEDS-HUMAN: `connect_api` production host and callback path |
+| OAuth allow list | NEEDS-HUMAN: same host as the redirect URL |
+| Privacy Policy URL | NEEDS-HUMAN: Macro Connect privacy page |
+| Terms of Use URL | NEEDS-HUMAN: Macro Connect terms page |
+| Support URL | NEEDS-HUMAN: support page or address |
+| Documentation URL | NEEDS-HUMAN: self-serve docs page for the Zoom connection |
+| Domain verification | NEEDS-HUMAN: DNS TXT access for the Connect domain |
+| Scopes | Request 1 list above |
+| Technical design: architecture | Users connect from a customer product (Macro) through Macro Connect's hosted connect flow. Macro Connect runs the OAuth authorization-code flow with PKCE against `zoom.us`, stores the grant encrypted with AWS KMS and bound to the connection, refreshes it, and proxies MCP requests to `mcp.zoom.us` with the user's token. It calls no Zoom REST APIs directly. *(new wording, needs approval)* |
+| Technical design: data use per scope | Zoom data passes through to the user's AI client in the MCP response; Macro Connect stores only the OAuth grant and connection metadata. NEEDS-HUMAN: confirm no MCP response content is stored or logged, and the retention period for connection records |
+| Technical design: data deletion on uninstall | NEEDS-HUMAN: deauthorization handling and deletion wording |
+| Technical design: security evidence | NEEDS-HUMAN: which of SSDLC, SAST, DAST, pen test, security policy, incident response policy exist |
+| Release notes for reviewer (test plan) | 1. Sign in to the test Macro account. 2. Open Connections, choose Zoom, sign in with the provided Zoom test user, approve the scopes. 3. Ask the assistant to list recent meetings and summarize one. 4. Disconnect Zoom in Macro, then confirm the app is gone from the Zoom account's Added Apps. *(draft; confirm against the built flow)* |
+| Test credentials | NEEDS-HUMAN: Macro test account and Zoom test user with sample meetings |
+| Activation | Activate after approval (Zoom activates) |
+| Developer agreement | NEEDS-HUMAN: accept the Marketplace developer agreement |
+
+## Log
+
+- 2026-10-30: Record created from [the research](../docs/research/vendor-auth.csv).
+- 2026-10-30: Requirements, scopes, and offline draft filled from Zoom's
+ current docs and live OAuth metadata (both servers: no
+ `registration_endpoint`, no CIMD, PKCE S256). Nothing submitted.
diff --git a/connect/tasks/T001-cargo-boundary.md b/connect/tasks/T001-cargo-boundary.md
new file mode 100644
index 0000000000..19acb637b4
--- /dev/null
+++ b/connect/tasks/T001-cargo-boundary.md
@@ -0,0 +1,81 @@
+# T001: Cargo dependency boundary check
+
+## Goal
+
+Make the Macro Connect boundary complete for Rust: a check that fails when a
+crate under `connect/` depends on a Macro workspace crate, or when a Macro
+crate depends on any Connect crate other than `connect_client`. The ast-grep
+rules (`rules/ast-grep/rust-connect-*.yml`) only catch common crate names;
+this check is the authoritative one.
+
+## Context
+
+- `connect/AGENTS.md` (Boundary).
+- `tooling/xtask/`: `cargo x <cmd>` subcommands; `xtask_graph` builds the
+ guppy `PackageGraph`; `xtask_deps` is the closest model (CI:
+ `.github/workflows/cargo_workspace_dependency_check.yml`).
+
+## Do
+
+1. Add the rule to the workspace dependency check run by `cargo x deps --check`
+ (new module in `xtask_deps`, or a new `xtask_*` crate wired the same way if
+ that is cleaner): for every workspace package and each of its workspace
+ dependencies (normal, dev, and build):
+ - a package whose manifest is under `connect/` may depend only on packages
+ under `connect/` (and `workspace-hack`, which hakari manages);
+ - a package outside `connect/` may depend on a package under `connect/`
+ only if that package is named `connect_client`;
+ - every package under `connect/` is named `connect_*`.
+2. Report every violation in one run: `<package> -> <dependency>: <reason>`.
+3. Put the rule logic in a pure function over (package name, manifest path,
+ dependencies) and unit-test it: allowed and forbidden edges both ways, the
+ `workspace-hack` exemption, the naming rule.
+4. Make sure CI runs it: if `cargo x deps --check` already runs on every Rust
+ change, extending it is enough; otherwise widen the workflow's path filters
+ to include `connect/**` and `**/Cargo.toml`.
+5. Update `connect/AGENTS.md` Checks (replace "Cargo dependency check ... added
+ with the first crate" with the real command) and the `tooling/xtask`
+ AGENTS.md if it lists subcommands.
+
+## Done when
+
+- `cargo x deps --check` passes on the current workspace (no `connect/` crates
+ exist yet, so zero violations).
+- The new unit tests pass: `cargo nextest run -p <crate>`.
+- `just check` passes.
+
+## Out of scope
+
+Creating any `connect_*` crate; changing ast-grep rules.
+
+## Result
+
+Implemented the Cargo boundary check in
+`tooling/xtask/crates/xtask_deps/src/boundary.rs` and its unit tests in
+`tooling/xtask/crates/xtask_deps/src/boundary/test.rs`; wired it through
+`tooling/xtask/crates/xtask_deps/src/main.rs`. Updated the workflow
+source in
+`tooling/xtask/crates/xtask_workflows/src/workflows/cargo_workspace_dependency_check.rs`
+and regenerated `.github/workflows/cargo_workspace_dependency_check.yml` so
+Connect changes and all Cargo manifests trigger the CI check. Updated
+`connect/AGENTS.md` Checks and the `.cargo/config.toml` command description.
+Updated `connect/STATUS.md` with the commit blocker.
+
+Checks (all Rust and repo tooling ran inside `nix develop` with
+`CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"`):
+
+| Check | Outcome |
+| --- | --- |
+| `cargo nextest run -p xtask_deps` | Passed: 5/5 tests. |
+| `cargo x deps --check` | Passed: no boundary violations or artifact drift. |
+| `just check` | Passed: `OK`. |
+| `cargo x workflows --check` | Passed: generated workflows up to date. |
+| `cargo fmt --all -- --check` | Passed. |
+| `git diff --check` | Passed. |
+| `cargo nextest run -p xtask_workflows` (audit) | 80 passed, 2 unrelated CloudKit fixture tests failed: their restricted PATH cannot find `bash` at `build_dmg_on_tag/test.rs:499` in Nix. |
+| `just clippy` (audit) | Workspace phase passed; interrupted in the `sync_service` phase after waiting over 90 seconds for a shared build lock. |
+
+Open product questions: none. Commit is blocked: the worktree's Git metadata
+is at `/home/eric/Code/macro/.git/worktrees/T001-cargo-boundary`, outside the
+writable sandbox. `git add` fails creating `index.lock` there. No commit was
+created; the user has been asked to make that metadata writable.
diff --git a/connect/tasks/T002-registry.md b/connect/tasks/T002-registry.md
new file mode 100644
index 0000000000..9927553a12
--- /dev/null
+++ b/connect/tasks/T002-registry.md
@@ -0,0 +1,94 @@
+# T002: Registry and `connect_registry` crate
+
+## Goal
+
+The Macro Connect catalog exists as data: one directory per day-1 app under
+`connect/registry/apps/<id>/` with `app.toml` and `icon.svg`, and a
+`connect_registry` crate that loads and validates them so services can serve
+the catalog.
+
+## Context
+
+- `connect/docs/catalog.md`: the `app.toml` format and field rules. Follow it
+ exactly.
+- `connect/docs/research/vendor-auth.csv`: probe results per Pipedream app.
+- Prior art with every day-1 entry (id, name, description, MCP URL, Pipedream
+ slugs, Linear's scopes):
+ `git show eric/macro-connect-registry:crates/mcp_client/src/domain/connect_apps.rs`.
+ Mine the data; do not copy its Rust design.
+- `connect/AGENTS.md` (Boundary: the crate depends on no Macro crate).
+
+## Do
+
+1. Create `app.toml` for each of the 36 apps in the prior art's `APPS`.
+ - `client_registration`: `own_app` for GitHub and Slack (v1 reuses Macro's
+ existing apps); otherwise `cimd` when the CSV's `mcp_auth` contains
+ `cimd`, else `dcr`.
+ - `status = "live"`, `access = ["mcp"]`, `probed = 2026-10-30`.
+ - `pipedream_app_slugs` and `scopes` from the prior art.
+2. Add `icon.svg` for each app from Simple Icons
+ (`https://cdn.jsdelivr.net/npm/simple-icons@<pinned version>/icons/<slug>.svg`),
+ unaltered. Where Simple Icons has no icon for the brand, add none and list
+ the app in the Result; never draw or invent one.
+3. Create crate `connect/crates/connect_registry` (add it to the workspace
+ members): types for an app per `catalog.md` (closed sets as enums, ids as a
+ validated newtype), and a function returning every app, embedded at compile
+ time so services need no registry files at runtime. Library crate rules:
+ `#![deny(missing_docs)]`, tests in sibling `test.rs`, `thiserror` errors.
+ Depend only on third-party crates from `[workspace.dependencies]`; run
+ `just hakari` after editing `Cargo.toml`.
+4. Tests that validate the real registry: every `app.toml` parses; ids unique
+ and equal to their directory names; each Pipedream slug in at most one app;
+ `mcp_url` is https with no trailing slash; `own_app` apps list no scopes
+ unless the spec says so; every `live` app has an icon or is in an explicit
+ allowlist of apps with no Simple Icons icon (from step 2).
+5. Write `connect/crates/connect_registry/AGENTS.md` from
+ `.agents/templates/AGENTS.md`, with the sibling `CLAUDE.md` symlink.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_registry` passes.
+- `cargo x deps --check` passes (run `just hakari` first if it reports drift).
+- `just check` passes, including the `connect-*` ast-grep rules.
+
+## Out of scope
+
+Any HTTP service or API, the Connect database, changes outside `connect/`
+other than the workspace member list and `crates/workspace-hack` from hakari.
+
+## Result
+
+- Added 36 `connect/registry/apps/<id>/app.toml` files from the prior art and
+ OAuth probe CSV, plus 27 unaltered `icon.svg` files from Simple Icons
+ 16.36.0. No Simple Icons icon exists in that release for Apollo, Attio,
+ Canva, Granola, Klaviyo, monday.com, Pipedrive, Quo, or Slack.
+- Added `connect/crates/connect_registry/{Cargo.toml,AGENTS.md,CLAUDE.md}` and
+ `src/{lib.rs,embedded.rs,test.rs}`. The crate embeds the catalog, exposes
+ typed app records, and validates ids, slugs, URLs, access, scopes, and icons.
+- Updated root `Cargo.toml`, `Cargo.lock`, `crates/workspace-hack/Cargo.toml`,
+ `.github/workspace-dep-closures.json`, `connect/AGENTS.md`, `connect/STATUS.md`,
+ `connect/docs/{catalog,plan}.md`, and
+ `connect/.agents/skills/connect-add-app/SKILL.md`.
+
+Checks:
+
+| Check | Outcome |
+| --- | --- |
+| `cargo nextest run --all-features -p connect_registry` | Passed: 7 tests. |
+| `cargo x deps --check` | Passed after `just hakari`. |
+| `CHECK_BASE=HEAD just check` | Passed (`OK`); scoped to this task's worktree changes. |
+| `just check` with its default base | Failed: bunx's ast-grep binary cannot launch on NixOS. A separate native Nix ast-grep scan of all new Rust files passed with the repository rules. |
+| `just rust-check` | Passed, full workspace. |
+| `just clippy` | Passed, full workspace. |
+| `just format` and `cargo fmt --all -- --check` | Passed. |
+| `just hakari` | Passed on final run; generated dependency artifacts are current. |
+| SVG byte comparison against Simple Icons 16.36.0 | Passed: all 27 icons matched. |
+| `git diff --check` | Passed. |
+| Commit | Blocked: Git metadata is under `/home/eric/Code/macro/.git`, which is read-only in this sandbox (`index.lock`: read-only file system). Changes remain uncommitted. |
+
+Open question: hakari requires a generated `workspace-hack` dependency in
+`connect_registry` and changes `Cargo.lock` and
+`.github/workspace-dep-closures.json`, while this spec permits only the root
+workspace member list and `crates/workspace-hack` outside `connect/`. Should
+these generated exceptions be accepted for T002, or should hakari be changed
+in a separate task to exclude Connect crates?
diff --git a/connect/tasks/T003-connect-api-skeleton.md b/connect/tasks/T003-connect-api-skeleton.md
new file mode 100644
index 0000000000..675421742b
--- /dev/null
+++ b/connect/tasks/T003-connect-api-skeleton.md
@@ -0,0 +1,116 @@
+# T003: `connect_api` skeleton and `connect_platform`
+
+Depends on T002 (`connect_registry`). Base this branch on the integration
+branch after T002 merges.
+
+## Goal
+
+A runnable `connect_api` HTTP service that serves the catalog, built on a
+small `connect_platform` crate that gives Connect its own config loading,
+tracing, and HTTP layers, so no Connect crate depends on Macro's platform
+crates.
+
+## Context
+
+- `connect/AGENTS.md` (Boundary): Connect copies what it needs from Macro.
+- Macro's platform crates to mine, keeping only what this task needs:
+ `crates/macro_config` (Doppler `APP_SECRETS_JSON` in ECS, env otherwise),
+ `crates/macro_env_var` (typed env structs), `crates/macro_entrypoint`
+ (tracing and OpenTelemetry setup), `crates/macro_tower_layers` (inbound
+ `traceparent`, request spans).
+- `.agents/rules/config-and-service-urls.md` and `.agents/rules/observability.md`
+ apply to Connect too, with Connect's own crates in place of Macro's.
+- `docs/guides/new-service.md` section 1 (the crate) only; deploy sections are
+ a later task.
+- `connect/docs/catalog.md` for the catalog fields.
+
+## Do
+
+1. `connect/crates/connect_platform`:
+ - Config: a typed struct loaded once at startup from the process
+ environment, or from `APP_SECRETS_JSON` when present (same precedence as
+ `macro_config`). Missing required values fail startup with the variable's
+ name. The one `std::env` read carries
+ `#[expect(clippy::disallowed_methods, reason = "...")]`.
+ - Telemetry: tracing subscriber plus OTLP export, configured by standard
+ `OTEL_*` variables; a no-op exporter when no endpoint is set.
+ - HTTP: a tower layer that adopts inbound W3C `traceparent` and opens a
+ request span.
+2. `connect/services/connect_api` (binary `connect_api`, workspace member):
+ - axum router: `GET /health` and `GET /v1/catalog` returning every `live`
+ app from `connect_registry` as JSON: `id`, `name`, `description`,
+ `access`, `mcp_url`, `icon_url` (`/v1/catalog/<id>/icon.svg`), plus
+ `GET /v1/catalog/{id}/icon.svg` serving the embedded icon.
+ - OpenAPI with `utoipa` at `GET /openapi.json`.
+ - Config: `PORT` (default 8080) via `connect_platform`.
+3. Tests: router tests with `tower::ServiceExt::oneshot` for the catalog
+ (only `live` apps, fields present), the icon route (content type, 404 for an
+ unknown id), and config loading (env, `APP_SECRETS_JSON` precedence,
+ missing value error).
+4. `AGENTS.md` (from `.agents/templates/AGENTS.md`) plus `CLAUDE.md` symlink
+ for both crates, including how to run `connect_api` locally.
+5. Run `just hakari` after `Cargo.toml` edits.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_platform -p connect_api` passes.
+- `cargo run -p connect_api` starts and `curl localhost:8080/v1/catalog`
+ returns the catalog (paste the first app in the Result).
+- `cargo clippy -p connect_platform -p connect_api --all-features --all-targets -- -D warnings` passes.
+- `cargo x deps --check` and `just check` pass.
+
+## Out of scope
+
+Database, OAuth connect flow, MCP gateway, Docker image, Pulumi, Doppler
+values, CI deploy workflows.
+
+## Result
+
+### Changed
+
+- `connect/crates/connect_platform/`: typed startup configuration loading with
+ `APP_SECRETS_JSON` precedence, optional OTLP tracing, inbound `traceparent`
+ request spans, tests, and `AGENTS.md` / `CLAUDE.md` guidance.
+- `connect/services/connect_api/`: `GET /health`, `GET /v1/catalog`, embedded SVG
+ icons, `GET /openapi.json`, router tests, and `AGENTS.md` / `CLAUDE.md` guidance.
+- `Cargo.toml`, `Cargo.lock`, `.github/workspace-dep-closures.json`: workspace
+ members and generated dependency artifacts.
+
+### Checks
+
+- `just hakari`: passed; generated the dependency closure entries.
+- `cargo nextest run --all-features -p connect_platform -p connect_api`: passed,
+ 7 tests, 0 failures.
+- `cargo clippy -p connect_platform -p connect_api --all-features --all-targets -- -D warnings`:
+ passed.
+- `cargo x deps --check`: passed.
+- `just check`: passed. Its file filters skip `connect/` Rust sources, so a
+ direct `cargo fmt --all -- --check` and direct ast-grep scan of both new
+ `src/` trees also passed.
+- `cargo run -p connect_api`: built, but default port 8080 could not bind
+ (`Address already in use`; another listener occupies it). `PORT=18080 cargo
+ run -p connect_api` started, and `curl http://localhost:18080/v1/catalog`
+ succeeded. Its first app was:
+
+ ```json
+ {
+ "id": "airtable",
+ "name": "Airtable",
+ "description": "Read and update bases, tables, and records.",
+ "access": ["mcp"],
+ "mcp_url": "https://mcp.airtable.com/mcp",
+ "icon_url": "/v1/catalog/airtable/icon.svg"
+ }
+ ```
+
+- Tempo trace verification: not run; no local collector was configured.
+- Commit: blocked. `git add` failed creating the worktree `index.lock` because
+ `/home/eric/Code/macro/.git/worktrees/T003-connect-api-skeleton` is mounted
+ read-only. The changes remain uncommitted in this worktree.
+
+### Open question
+
+Nine `live` registry apps have no embedded SVG. Should their required
+`icon_url` remain a URL that returns 404, or should a future registry task
+provide a placeholder or make the field optional? This implementation exposes
+the specified URL and serves only embedded icons.
diff --git a/connect/tasks/T004-press-kit-icons.md b/connect/tasks/T004-press-kit-icons.md
new file mode 100644
index 0000000000..f21e94c0a9
--- /dev/null
+++ b/connect/tasks/T004-press-kit-icons.md
@@ -0,0 +1,66 @@
+# T004: Press-kit icons for the apps Simple Icons lacks
+
+## Goal
+
+Every live app has an `icon.svg`. Nine have none because Simple Icons 16.36.0
+lacks their mark: Apollo, Attio, Canva, Granola, Klaviyo, monday.com,
+Pipedrive, Quo, Slack.
+
+## Context
+
+- `connect/docs/catalog.md` (`icon.svg`: square, single file, under 10 KB,
+ the vendor's mark unaltered; Simple Icons first, otherwise the vendor's press
+ kit).
+- `connect/crates/connect_registry/src/lib.rs` (`NO_SIMPLE_ICONS_ICON`) and
+ `src/embedded.rs`.
+
+## Do
+
+1. For each of the nine apps, find the vendor's official brand assets (press
+ kit, brand or media page on the vendor's own domain) and take its SVG mark
+ (the symbol, not the full wordmark, where the kit offers both).
+2. Save it unaltered as `connect/registry/apps/<id>/icon.svg` when it is a
+ single SVG file under 10 KB. A mark that isn't square: keep it unaltered and
+ note it in the Result. No SVG available, or only raster: add nothing and
+ say so in the Result. Never draw, trace, or convert a mark.
+3. Embed each new icon in `embedded.rs`, remove it from the allowlist, and
+ rename the allowlist so it no longer names Simple Icons (it now means "no
+ official SVG found").
+4. List each icon's source URL in the Result and in the commit body.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_registry` passes.
+- `just check` passes.
+
+## Out of scope
+
+Any other app, any other field, docs.
+
+## Result
+
+Added unaltered SVGs to `connect/registry/apps/{attio,canva,granola,quo,slack}/icon.svg`, embedded them in `connect/crates/connect_registry/src/embedded.rs`, and reduced and renamed the missing-icon allowlist in `src/lib.rs` and `src/test.rs`. Attio's official logomark is 37 × 30, so it is not square; its proportions were preserved.
+
+| App | SVG source |
+| --- | --- |
+| Attio | https://attio.com/brand/v1/attio-logomark.svg |
+| Canva | `Canva logos/svg/Canva Icon logo.svg` in https://www.canva.dev/assets/connect/Canva-logos.zip |
+| Granola | https://drive.google.com/uc?export=download&id=1OWPkmXSl0kpUCbLpJ3uIaTKIfFuvbK-L (current mark in [Granola's press kit](https://granola-labs.notion.site/Granola-Press-Kit-e8d9449f7768448dabddb473b320deba); [vendor brand announcement](https://jobs.granola.so/blog/a-new-look-for-granola)) |
+| Quo | https://api.air.inc/shorturl/btHP3lps1/download/e69f42db-1184-4b10-b9f1-32ef51ed831b (linked from https://www.quo.com/press) |
+| Slack | https://a.slack-edge.com/1f40066/marketing/img/nav/logo.svg (served on https://slack.com/media-kit) |
+
+No icon added for Apollo (no downloadable SVG in its newsroom), Klaviyo (newsroom mark is PNG), monday.com (official press-kit logo ZIP contains PNGs only), or Pipedrive (its press-kit logo files require an access request).
+
+| Check | Outcome |
+| --- | --- |
+| `cargo nextest run --all-features -p connect_registry` | Passed: 7 tests, 0 skipped, in `nix develop` with the Connect Cargo target and database variables exported. |
+| `just check` | Passed: `OK` (cargo fmt and ast-grep), in `nix develop`; required writable `/tmp` runtime directory and patching the temporary ast-grep binary's interpreter for NixOS. |
+| `cargo x deps --check` | Passed in audit. |
+| `cargo fmt --all -- --check` | Passed in audit. |
+| `just clippy` | Passed in audit. |
+| Fresh source comparison | Passed: all five saved SVGs matched their source bytes. |
+| `git diff --check` | Passed. |
+
+Implementation and Result commits are blocked: the shared Git directory `/home/eric/Code/macro/.git/worktrees/T004-press-kit-icons` is read-only, so `git add` cannot create `index.lock`. `PREK_ALLOW_NO_CONFIG=1 git commit -F /tmp/t004-implementation-commit.txt` failed for the same reason. No commits were created.
+
+Open question: how should the planner commit this work when the shared Git directory is read-only? `connect/crates/connect_registry/AGENTS.md` still describes the old Simple Icons allowlist because this task excludes docs.
diff --git a/connect/tasks/T005-connections-store.md b/connect/tasks/T005-connections-store.md
new file mode 100644
index 0000000000..fb77927736
--- /dev/null
+++ b/connect/tasks/T005-connections-store.md
@@ -0,0 +1,129 @@
+# T005: Connect database, customer keys, encrypted grants, connections API
+
+Depends on T003 (`connect_api`, `connect_platform`). Base on the integration
+branch after T003 merges.
+
+## Goal
+
+`connect_api` stores who is connected to what, with every OAuth grant
+encrypted, and lets an authenticated customer list, read, and delete its
+users' connections. The OAuth flow that creates connections is T006; this task
+builds what it writes into.
+
+## Context
+
+- `connect/docs/plan.md` (Architecture, Guarantees: customers own their users,
+ grants are exportable).
+- Envelope encryption prior art: `.agents/rules/rust/security.md` CS-72,
+ `crates/microsoft_oauth_grant_db_utils`, and the Microsoft grant code in
+ `services/authentication_service/src/outbound/microsoft/` (mine it; Connect
+ depends on no Macro crate).
+- Hexagonal layout: `.agents/skills/cloud-storage-hexagonal-architecture/SKILL.md`.
+- Connect has its own database, so it does not use Macro's workspace SQLx
+ cache: queries use runtime-checked `sqlx::query_as::<_, T>` with
+ `#[derive(sqlx::FromRow)]`, and every query is exercised by a
+ `#[sqlx::test(migrator = ...)]` test against Connect's own migrations
+ ([decision](../docs/decisions.md)).
+
+## Do
+
+1. **Database.** `connect/services/connect_api/migrations/` (SQLx), created
+ with `sqlx migrate add`. Tables:
+ - `customers` (`id` uuid v7, `name`, `created_at`).
+ - `customer_api_keys` (`id`, `customer_id`, `key_hash` (SHA-256 of the
+ secret), `prefix` (first 8 chars, for display), `created_at`,
+ `revoked_at`). Keys look like `ck_<id>_<secret>`; only the hash is stored.
+ - `connections` (`id`, `customer_id`, `external_user_id` text,
+ `app_id` text, `status` (`active` | `needs_reauth`), `scopes` text[],
+ `created_at`, `updated_at`), unique on (`customer_id`,
+ `external_user_id`, `app_id`).
+ - `grants` (`connection_id` pk/fk, `ciphertext`, `nonce`,
+ `encrypted_data_key`, `kms_key_id`, `encryption_version`,
+ `access_token_expires_at`, `updated_at`): the envelope, nothing in clear.
+2. **Encryption port.** `GrantCipher` port: seal and open an OAuth grant
+ (access token, refresh token, token type, expiry, scopes) with AES-256-GCM
+ under a per-grant data key, the data key wrapped by a `KeyWrapper` port.
+ Adapters: AWS KMS (`aws-sdk-kms`, encryption context
+ `{connection_id, customer_id}`) and a local adapter keyed by
+ `CONNECT_LOCAL_WRAPPING_KEY` (32 bytes, base64) for development and tests.
+ Config picks KMS when `CONNECT_KMS_KEY_ID` is set, local otherwise; startup
+ fails if neither is set. Plaintext grants live in a type that redacts
+ `Debug` and zeroizes on drop.
+3. **Customer auth.** Middleware on `/v1/*` except `/v1/catalog*` and
+ `/health`: `Authorization: Bearer ck_...`, looked up by id, compared by
+ hash in constant time; revoked keys rejected. A `connect_api` CLI
+ subcommand `create-customer <name>` prints a new key once.
+4. **Connections API** (customer-scoped; a customer never sees another's
+ rows):
+ - `GET /v1/users/{external_user_id}/connections`: `app_id`, `status`,
+ `scopes`, `created_at`.
+ - `DELETE /v1/users/{external_user_id}/connections/{app_id}`: deletes the
+ connection and grant. Response says the vendor grant is not revoked
+ upstream (CS-72).
+ - `GET /v1/users/{external_user_id}/connections/{app_id}/token`: the
+ decrypted access token and its expiry (token export). Refreshing an
+ expired token is T006; for now return `needs_reauth` (409) when expired.
+ - OpenAPI for all of it.
+5. **Catalog icons.** `icon_url` is `null` for an app with no embedded icon
+ (four apps have no official SVG yet); the OpenAPI schema marks it
+ nullable.
+6. **Observability.** Spans `connect.connections.list|delete|export` with
+ `customer_id`, `app_id`, outcome; never tokens or `external_user_id`
+ values that could be personal data (record a hash).
+7. **Tests.** `#[sqlx::test]` for every query; router tests for auth (missing,
+ wrong, revoked key), customer isolation, list, delete, export, and expiry;
+ cipher round-trip, tamper detection (modified ciphertext or wrong context
+ fails), and redacted `Debug`.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_api` passes with
+ `DATABASE_URL` pointing at a local Postgres server (tests create their own
+ databases).
+- `cargo clippy -p connect_api --all-features --all-targets -- -D warnings`,
+ `cargo x deps --check`, and `just check` pass.
+- Result shows a local run: `create-customer`, then `curl` list with and
+ without the key.
+
+## Out of scope
+
+OAuth authorize/callback, token refresh, the MCP gateway, Pulumi/KMS key
+creation, Doppler values.
+
+## Result
+
+### Changed
+
+- `connect/services/connect_api/migrations/20261030180344_create_connect_store.sql`: customers, hashed customer keys, customer-scoped connections, and encrypted grant envelopes with cascade cleanup.
+- `connect/services/connect_api/src/domain.rs`: customer key and grant types, repository/cipher ports, connection use cases, and safe outcome spans.
+- `connect/services/connect_api/src/outbound.rs` and `src/outbound/test.rs`: Connect Postgres queries, AWS KMS/local key wrappers, AES-256-GCM envelope cipher, and query/cipher tests.
+- `connect/services/connect_api/src/main.rs` and `src/test.rs`: customer auth middleware, CLI customer creation, list/delete/token export routes, OpenAPI, nullable catalog icons, and router tests.
+- `connect/services/connect_api/Cargo.toml` and `Cargo.lock`: required dependencies.
+- `connect/services/connect_api/AGENTS.md` and `connect/crates/connect_platform/AGENTS.md`: current routes, storage, configuration, and local run guidance.
+
+### Checks
+
+| Check | Outcome |
+| --- | --- |
+| `cargo nextest run --all-features -p connect_api` | Passed: 7 tests, 0 failed, 0 skipped, against fresh local Postgres test databases. |
+| `cargo clippy -p connect_api --all-features --all-targets -- -D warnings` | Passed. |
+| `cargo x deps --check` | Passed. |
+| `just check` | Passed (`OK`): rustfmt and ast-grep. Required a writable `XDG_RUNTIME_DIR` and the same ast-grep 0.44.1 binary with its ELF interpreter patched under `/tmp` because Bun's generic Linux binary does not launch directly on NixOS. |
+| `cargo fmt --all -- --check` | Passed in audit. |
+| `git diff --check` | Passed. |
+| Local CLI and curl | `create-customer` generated a key once (captured without printing); list without key returned HTTP 401; list with key returned HTTP 200 and `[]`. Used a fresh local Connect database. |
+| Tempo trace verification | Skipped: no connected Tempo trace was available for the local smoke run. |
+
+All Rust and repo commands ran inside `nix develop` with `CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"` and `DATABASE_URL="$CONNECT_DATABASE_URL"` (or a fresh local Connect database derived from it for the smoke run). Connect uses runtime-checked SQLx queries by the existing decision in `connect/docs/decisions.md`; its query tests used Connect's own migrator, and no Macro workspace SQLx cache was generated. Hexagonal boundary checked: customer scoping and export policy live in the domain service and repository port; HTTP handlers map transport, while Postgres and encryption live in the outbound adapter.
+
+### Open questions
+
+None.
+
+### Proposed commit
+
+`feat(connect): store encrypted customer connections`
+
+Why: Connect needs customer-owned connection state and exportable, encrypted OAuth grants before the OAuth flow can write them.
+
+What: Add the Connect schema, customer API keys, KMS/local grant encryption, scoped connection routes and OpenAPI, with database, router, and cipher coverage.
diff --git a/connect/tasks/T006-oauth-flow.md b/connect/tasks/T006-oauth-flow.md
new file mode 100644
index 0000000000..e45e6bb9cf
--- /dev/null
+++ b/connect/tasks/T006-oauth-flow.md
@@ -0,0 +1,129 @@
+# T006: OAuth connect flow and token refresh
+
+Depends on T005. Base on the integration branch after T005 merges.
+
+## Goal
+
+A customer's user can connect any `live` catalog app: the customer creates a
+connect session, the user's browser follows Connect's URL to the vendor's
+consent screen, and Connect stores the grant and sends the user back. Tokens
+refresh themselves when exported.
+
+## Context
+
+- `connect/docs/catalog.md` (`client_registration`: `cimd`, `dcr`, `own_app`).
+- Prior art that already does all three registrations against real vendors:
+ Macro's `crates/mcp_client/src/outbound/oauth.rs` (uses `rmcp`'s
+ `AuthorizationManager`; `rmcp` is third-party and allowed). Mine it,
+ including its notes on trailing slashes and Linear's scopes.
+- Slack's user scopes: `crates/mcp_client/src/domain/provider_registry/slack/manifest.json`.
+- T005's tables, `GrantCipher`, and customer auth.
+- `.agents/rules/observability.md`: one trace from session creation through
+ callback.
+
+## Do
+
+1. **Config.** `CONNECT_PUBLIC_URL` (Connect's own origin, e.g.
+ `http://localhost:8080` locally). Own-app credentials as
+ `<APP_ID>_CLIENT_ID` / `<APP_ID>_CLIENT_SECRET` for every `own_app` app,
+ required at startup.
+2. **Registry.** Allow `own_app` apps to list scopes (drop T002's rule);
+ copy Slack's user scopes from the manifest into `slack/app.toml`.
+3. **Migrations.** `customers.allowed_redirect_origins text[]`;
+ `oauth_states` (state, PKCE verifier sealed with `GrantCipher`, customer,
+ external user, app, redirect URL, client id, expires at 10 minutes,
+ single use); `oauth_clients` (authorization-server issuer + redirect URI →
+ DCR client id and sealed secret) so DCR registers once per server.
+4. **Endpoints.**
+ - `POST /v1/connect-sessions` (customer auth): `external_user_id`,
+ `app_id`, `redirect_url` (origin must be in the customer's allowlist) →
+ `connect_url`, `expires_at`.
+ - `GET /v1/connect/{token}` (no auth, user's browser): discover the
+ server's OAuth metadata, resolve the client (CIMD with client id
+ `<CONNECT_PUBLIC_URL>/v1/oauth/client-metadata.json`, else DCR via
+ `oauth_clients`, else own app), store the state, redirect to the vendor.
+ - `GET /v1/oauth/client-metadata.json`: Connect's CIMD document.
+ - `GET /v1/oauth/callback`: exchange the code, seal the grant, upsert the
+ connection as `active`, redirect to the customer's `redirect_url` with
+ `status=connected&app_id=...`, or `status=error&reason=...` (vendor
+ error, expired or reused state, exchange failure).
+5. **Refresh.** One refresh path used by token export (replace T005's 409):
+ refresh when expiring within 60 s; serialize per connection (row lock) so
+ concurrent exports refresh once; `invalid_grant` marks the connection
+ `needs_reauth`.
+6. **Observability.** Spans `connect.session.create`, `connect.authorize`,
+ `connect.callback`, `connect.token.refresh` with `app_id`, registration
+ kind, outcome; the callback span links to the authorize span through the
+ stored state.
+7. **Tests.** A `wiremock` authorization server and protected resource for
+ each registration kind (CIMD, DCR with client reuse, own app); state expiry
+ and reuse; redirect allowlist; vendor error passthrough; refresh success,
+ `invalid_grant`, and two concurrent exports refreshing once.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_api -p connect_registry`
+ passes.
+- clippy (`-D warnings`), `cargo x deps --check`, `just check` pass.
+- Result: a real local connection to Linear (CIMD) and Notion (DCR) through
+ `localhost`, if their servers accept a `localhost` redirect; otherwise say
+ which refused and why.
+
+## Out of scope
+
+The MCP gateway, Macro's adapter, the hosted connect UI beyond redirects,
+deploys.
+
+## Review (planner, 2026-10-30)
+
+Answer to the builder's question: operators provision redirect origins from
+the CLI; there is no HTTP endpoint for it in v1.
+
+- `create-customer <name> --redirect-origin <origin>` (repeatable, at least
+ one) stores them at creation.
+- `set-redirect-origins <customer_id> <origin>...` replaces the list.
+- Origins are validated as `scheme://host[:port]` with no path; `https` only,
+ except `http://localhost` and `http://127.0.0.1` with any port.
+- Session creation compares the redirect URL's origin exactly.
+
+Proceed with the rest of the spec unchanged.
+
+## Result
+
+### Changed
+
+- `connect/crates/connect_registry/src/{lib,test}.rs`, `connect/registry/apps/{slack,notion}/app.toml`, `connect/crates/connect_registry/AGENTS.md`, and `connect/docs/catalog.md`: allow own-app scopes, copy Slack's user scopes, and select DCR for Notion as the spec's conformance case.
+- `connect/services/connect_api/migrations/20261030181717_oauth_flow.sql`: customer redirect allowlists, short-lived sessions and single-use sealed PKCE states, reusable sealed DCR clients, and connection refresh metadata.
+- `connect/services/connect_api/src/{main,domain,outbound,oauth_test,test}.rs`, `src/domain/oauth.rs`, `src/outbound/{oauth,oauth_store}.rs`, `connect/services/connect_api/{Cargo.toml,AGENTS.md}`, and `Cargo.lock`: CLI redirect-origin provisioning, HTTP OAuth flow and client metadata, KMS-backed state/client/grant storage, row-locked token refresh, trace correlation, and wiremock integration tests.
+
+### Checks
+
+- `nix develop --command ... just hakari`: passed.
+- `nix develop --command ... cargo nextest run --all-features -p connect_api -p connect_registry`: passed, 18/18 tests, including exported-token protected-resource requests for CIMD, DCR, and own-app.
+- `nix develop --command ... cargo clippy -p connect_api -p connect_registry --all-features --all-targets -- -D warnings`: passed. Earlier runs found unused code and an unnecessary exchange argument; both were fixed.
+- `nix develop --command ... cargo x deps --check`: passed.
+- `nix develop --command ... just check`: passed after formatting (earlier run failed on formatting and was fixed).
+- `nix develop --command ... cargo fmt --all --check`: passed.
+- `git diff --check HEAD`: passed.
+- Local conformance: Linear's live authorize endpoint returned HTTP 400 `Invalid client_id` for `http://localhost:8080/v1/oauth/client-metadata.json`. Notion's live metadata advertises DCR, but no grant was completed; live DCR registration and user consent would touch the vendor's production service and require a signed-in test account. No live credentials or secrets were read.
+- Browser and Tempo trace verification: not run; no browser or local Tempo session is available in this builder environment.
+
+### Open questions
+
+- Which HTTPS public URL or tunnel should the planner use for local Linear CIMD conformance? The localhost HTTP client-metadata URL is rejected by Linear.
+- Where may a builder perform Notion DCR registration and user consent under the brief's prohibition on touching production? A vendor sandbox or explicit follow-up conformance run is needed to verify the real grant.
+- The planner must provision `CONNECT_PUBLIC_URL` and the GitHub/Slack own-app credentials in Connect's runtime configuration before deployment; this builder did not touch Doppler or production.
+
+### Proposed commits
+
+1. `feat(connect-registry): allow own-app scopes and select Notion DCR`
+
+ Why: Slack's existing OAuth app grants explicit user scopes, and T006 uses Notion as the DCR conformance case.
+
+ What: Remove the own-app scope ban, record Slack's manifest scopes, classify Notion as DCR, and update catalog guidance.
+
+2. `feat(connect-api): add OAuth connect flow and refresh`
+
+ Why: Customers need vendor consent, encrypted grants, and fresh tokens before Connect can replace Pipedream connections.
+
+ What: Add redirect allowlists, connect sessions, CIMD/DCR/own-app authorization, callbacks, sealed state and clients, serialized refresh, tracing, and integration tests.
diff --git a/connect/tasks/T007-ci-covers-connect.md b/connect/tasks/T007-ci-covers-connect.md
new file mode 100644
index 0000000000..24ce8cd71a
--- /dev/null
+++ b/connect/tasks/T007-ci-covers-connect.md
@@ -0,0 +1,84 @@
+# T007: CI runs on Macro Connect changes
+
+## Goal
+
+A change under `connect/` triggers the same CI as one under `crates/` or
+`services/`: Rust tests for affected packages, clippy, and the ast-grep rules
+(including the `connect-*` boundary rules).
+
+## Context
+
+- Generated workflows: `tooling/xtask/crates/xtask_workflows/src/workflows/`
+ (`code_check_conventions.rs`, `code_check_cloud_storage.rs` and its
+ directory). `.github/workflows/*.yml` are generated by `cargo x workflows`;
+ never edit them by hand.
+- `tooling/just/check.just` already includes `connect/` (planner change).
+
+## Do
+
+1. Find every generated workflow whose path filters list `crates/**` or
+ `services/**` for Rust checks or ast-grep, and add `connect/**` alongside.
+2. Make sure the affected-package selection used by the Rust test workflow
+ (look for how it maps changed paths to packages) treats `connect/` paths
+ as workspace packages.
+3. Regenerate with `cargo x workflows` and keep tests in `xtask_workflows`
+ passing; add or update a test if the generator has fixtures for filters.
+
+## Done when
+
+- `cargo x workflows --check` passes.
+- `cargo nextest run -p xtask_workflows` passes except the two known
+ `build_dmg_on_tag` fixture failures caused by Nix's PATH (state whether they
+ still fail).
+- `just check` passes.
+
+## Out of scope
+
+Workflows unrelated to Rust or ast-grep; new workflows.
+
+## Result
+
+### Changed
+
+- Added `connect/**` to the Rust CI and ast-grep path filters in
+ `tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs`
+ and `code_check_conventions.rs`.
+- Added `connect/**/Cargo.toml` to the cargo-deny trigger in
+ `tooling/xtask/crates/xtask_workflows/src/workflows/cargo_deny.rs`.
+- Regenerated `.github/workflows/code_check_cloud_storage.yml`,
+ `code_check_conventions.yml`, and `cargo_deny.yml`.
+- Added filter coverage in
+ `tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage/test.rs`
+ and verified that a Connect path selects its workspace package in
+ `tooling/xtask/crates/xtask_nextest_filter/src/test.rs`. The selector needed
+ no implementation change.
+
+### Checks
+
+All Rust and repo commands ran inside `nix develop --command` with
+`CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"` and
+`DATABASE_URL="$CONNECT_DATABASE_URL"` exported.
+
+- `cargo x workflows`: passed; regenerated the three affected workflows.
+- `cargo x workflows --check`: passed; all generated workflows are up to date.
+- `cargo nextest run -p xtask_nextest_filter`: passed, 19/19 tests.
+- `cargo nextest run -p xtask_workflows`: 81/83 passed; the two known
+ `build_dmg_on_tag` CloudKit fixture tests failed under Nix's PATH (exit 100).
+ The new Connect filter test passed.
+- `just check`: passed after fixing the new test's rustfmt layout; cargo fmt
+ and ast-grep rules both passed.
+- `cargo x deps --check`: passed.
+- `git diff --check`: passed.
+
+### Open questions
+
+None.
+
+### Proposed commit
+
+`fix(ci): run Rust and convention checks for Connect changes`
+
+Why: Connect changes skipped the Rust and ast-grep CI path gates.
+
+What: Include Connect paths in the relevant generated workflow filters, verify
+Connect package selection, and regenerate the workflow YAML.
diff --git a/connect/tasks/T008-mcp-gateway.md b/connect/tasks/T008-mcp-gateway.md
new file mode 100644
index 0000000000..068524a63d
--- /dev/null
+++ b/connect/tasks/T008-mcp-gateway.md
@@ -0,0 +1,107 @@
+# T008: MCP gateway
+
+Depends on T006 (refresh path). Base on the integration branch after T006
+merges.
+
+## Goal
+
+A customer's agent talks MCP to any connected app through Connect, which
+attaches the user's vendor token, so customers never handle vendor tokens to
+use tools (export stays available for those who want it).
+
+## Context
+
+- MCP Streamable HTTP transport: POST JSON-RPC, responses as JSON or SSE,
+ `GET` for a server stream, `DELETE` to end a session, `Mcp-Session-Id`
+ header.
+- T005/T006: customer auth, connections, refresh, `needs_reauth`.
+- `.agents/rules/observability.md`.
+
+## Do
+
+1. Route `/v1/users/{external_user_id}/mcp/{app_id}` (customer auth), all of
+ `POST`, `GET`, `DELETE`: a streaming reverse proxy to the app's `mcp_url`.
+ Forward the body, `Accept`, `Content-Type`, `Mcp-Session-Id`, and
+ `MCP-Protocol-Version`; set `Authorization: Bearer <vendor access token>`
+ from the refresh path; stream the response (JSON or SSE) back without
+ buffering; copy `Mcp-Session-Id` back. Do not parse or rewrite MCP
+ messages beyond reading the JSON-RPC `method` for the span.
+2. Vendor `401`: refresh once and retry the request if the body allows (POST
+ bodies are buffered up to 1 MiB for the retry; larger bodies are not
+ retried); a second `401` marks the connection `needs_reauth` and returns
+ `409` with `{"error":"needs_reauth","app_id":...}`.
+3. Unknown app, no connection, or `needs_reauth`: `404` / `409` with a JSON
+ error naming the app.
+4. One shared `reqwest::Client` with connect and read timeouts suited to
+ streams (no total timeout on SSE).
+5. Span `connect.mcp.proxy`: `customer_id`, `app_id`, JSON-RPC `method`
+ (POST only), vendor status, refresh-and-retry outcome, bytes, and
+ time-to-first-byte from the vendor. Never bodies or tokens.
+6. Tests with a `wiremock` MCP server: JSON response, SSE stream passes
+ through incrementally, session header round-trip, 401 → refresh → retry
+ success, 401 twice → `needs_reauth`, missing connection, customer
+ isolation.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_api` passes.
+- clippy (`-D warnings`), `cargo x deps --check`, `just check` pass.
+- Result: a real `tools/list` through the gateway against an app connected
+ locally in T006 (paste the tool count), or why it was not possible.
+
+## Out of scope
+
+Tool-name rewriting, caching, rate limiting, Macro's adapter.
+
+## Result
+
+Implemented the customer-authenticated MCP gateway in
+`connect/services/connect_api/src/mcp.rs` and wired it from `src/main.rs`.
+It forwards POST, GET, and DELETE with the MCP headers and vendor bearer token,
+streams vendor responses, and retries a vendor 401 after a forced grant refresh
+when the request body is at most 1 MiB. A second 401 marks the connection
+`needs_reauth`. The OAuth domain service's live-app and refresh policy is in
+`src/domain/oauth.rs`; `src/outbound.rs` and `src/outbound/mcp.rs` own the shared
+vendor HTTP client and outbound trace span. `src/main.rs` also publishes all
+three methods in OpenAPI. `src/mcp/test.rs`, `src/oauth_test.rs`, and
+`src/test.rs` cover the gateway and update test fixtures. `Cargo.toml` and
+`Cargo.lock` record the streaming dependencies;
+`connect/services/connect_api/AGENTS.md` documents the route and retry behavior.
+
+Checks (all Rust and repo commands ran inside `nix develop`, with
+`CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"` and
+`DATABASE_URL="$CONNECT_DATABASE_URL"`):
+
+- `cargo nextest run --all-features -p connect_api`: passed, 18 tests.
+ Wiremock covers JSON, SSE, session headers, 401 refresh and retry, a second
+ 401, oversized POST, missing app/connection, and customer isolation. A
+ controlled streaming server test verifies the first SSE event arrives before
+ the vendor finishes its response.
+- `cargo clippy -p connect_api --all-features --all-targets -- -D warnings`:
+ passed.
+- `cargo x deps --check`: passed.
+- `just check`: passed.
+- Rust validation: `just rust-check`, `just clippy`, `just format`, and
+ `just hakari` passed in that order; `cargo fmt --all -- --check` passed.
+- `git diff --check`: passed. The post-change audit passed the hexagonal
+ boundary, OpenAPI, trace propagation, and documentation review.
+- Real `tools/list` through a T006 local connection: unavailable, so no tool
+ count. The configured local Connect database has no `connections` table
+ (`psql "$DATABASE_URL" -tAc "SELECT count(*) FROM connections"` returned
+ `relation "connections" does not exist`), and T006 has not completed a live
+ vendor connection. A connected trace in Tempo was consequently not verified.
+
+Open questions: none.
+
+Proposed commit:
+
+```text
+feat(connect): proxy MCP requests with customer-scoped vendor grants
+
+Customers need an MCP endpoint that keeps vendor grants inside Connect and
+survives expired or rejected access tokens.
+
+Add the streaming gateway, bounded POST replay, one refresh retry, and
+reauthorization state on a second 401. Cover transport, retry, and customer
+isolation with gateway tests and document the route.
+```
diff --git a/connect/tasks/T009-connect-client.md b/connect/tasks/T009-connect-client.md
new file mode 100644
index 0000000000..3ec10d2361
--- /dev/null
+++ b/connect/tasks/T009-connect-client.md
@@ -0,0 +1,55 @@
+# T009: `connect_client`, the Rust client customers use
+
+Depends on T005; T006 and T008 routes are added to the client when they merge
+(re-dispatch with a Review section). Base on the integration branch.
+
+## Goal
+
+`connect_client` is the only Connect crate Macro may depend on: a typed async
+client for the Connect API, and the single home of its wire types.
+
+## Context
+
+- Routes: T005 (connections, token export), T006 (connect sessions), T008
+ (MCP gateway), T003 (catalog). Read their specs and the merged
+ `connect_api` code; the OpenAPI document at `GET /openapi.json` is the
+ contract.
+- `.agents/rules/rust/libraries.md` CS-62 (one `reqwest::Client` with
+ timeouts), CS-56 (`thiserror`), and `.agents/rules/observability.md`
+ (inject `traceparent` on every outbound call; copy the injection helper
+ into `connect_platform` if T003 didn't, since Connect can't use
+ `macro_tower_layers`).
+
+## Do
+
+1. Move the request and response types of every customer-facing route into
+ `connect/crates/connect_client/src/wire.rs` (serde + `utoipa::ToSchema`)
+ and make `connect_api` use them, so the two cannot drift.
+2. `ConnectClient::new(base_url, customer_key)` with methods:
+ `catalog()`, `create_connect_session(external_user_id, app_id,
+ redirect_url)`, `connections(external_user_id)`,
+ `delete_connection(external_user_id, app_id)`,
+ `access_token(external_user_id, app_id)`, and
+ `mcp_upstream(external_user_id, app_id) -> McpUpstream { url, bearer_token }`
+ (the gateway URL and the customer key, for an MCP client to dial; no
+ network call).
+3. Errors: one `thiserror` enum with caller-meaningful variants
+ (`NotConnected`, `NeedsReauth`, `Unauthorized`, `Unavailable`, `Api {
+ status, message }`, `Internal`).
+4. A span per call (`connect.client.<method>`) with `app_id` and outcome;
+ `traceparent` injected.
+5. Tests with `wiremock` for every method, including error mapping; customer
+ key never appears in `Debug` output.
+6. `AGENTS.md` + `CLAUDE.md` symlink; say it is the public surface and that
+ its API changes are breaking for customers.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_client -p connect_api` passes.
+- clippy (`-D warnings`), `cargo x deps --check`, `just check` pass.
+
+## Out of scope
+
+Macro code (T010), a TypeScript SDK.
+
+## Result
diff --git a/connect/tasks/T010-macro-adapter.md b/connect/tasks/T010-macro-adapter.md
new file mode 100644
index 0000000000..2ce8b80046
--- /dev/null
+++ b/connect/tasks/T010-macro-adapter.md
@@ -0,0 +1,82 @@
+# T010: Macro uses Connect behind `pipedream_mcp`'s ports
+
+Depends on T008 and T009. This is Macro-side work: it changes Macro crates and
+services, and depends on Connect only through `connect_client`.
+
+## Goal
+
+Macro connects users and runs their tools through Macro Connect for every app
+in Connect's catalog, falling back to Pipedream only for apps Connect lacks,
+behind a feature flag, without changing the shape of Macro's routes, tool
+selection, or agent egress.
+
+## Context
+
+Macro's Pipedream integration is `crates/pipedream_mcp`. Everything goes
+through its ports (`src/domain/ports.rs`): `ConnectionStore` and
+`AppConnections` (Postgres table `pipedream_mcp_connections`),
+`McpConnection` and `McpUpstream` (tool calls), `PipedreamConnect`
+(connect token, account lookup, delete), `ConnectorDirectory` (catalog),
+`ConnectorCapabilities` (tool list), `ApiProxy` (Granola sync only).
+Composition roots: `services/document_cognition_service/src/server.rs`
+(:576-680, :990-1009), `services/agent_harness_service/src/main.rs`
+(:447-477), `services/mcp_service/src/context.rs` (:502-591),
+`crates/ai_tools/src/mcp_app_catalog.rs:35`. Web: connect flow in
+`apps/web/src/lib/queries/pipedream-connectors.ts` (`connectPipedreamApp`)
+and `apps/web/src/lib/core/pipedream/`.
+
+Read `.agents/skills/cloud-storage-hexagonal-architecture/SKILL.md`, the
+`AGENTS.md` of every crate you touch, `.agents/rules/config-and-service-urls.md`
+(Connect's URL goes in `macro_service_urls` and its copies), and the
+`feature-flags` skill.
+
+## Do
+
+1. **Provider on each connection.** Migration adding `provider text not null
+ default 'pipedream'` (`pipedream` | `connect`) to
+ `pipedream_mcp_connections`; `PipedreamConnection` gains the enum. For
+ `connect`, `account_id` holds Connect's `app_id` and `app_slug` stays the
+ Pipedream slug the catalog maps to (so `mcp_select` and agent egress keep
+ working unchanged).
+2. **Connect adapter** in `pipedream_mcp/src/outbound/connect.rs`, over
+ `connect_client`, implementing for `provider = connect` records:
+ `McpConnection`/`McpUpstream` (dial `mcp_upstream`),
+ `ConnectorDirectory` (Connect catalog, mapped to Pipedream slugs via each
+ app's `pipedream_app_slugs`), `ConnectorCapabilities` (tool list through
+ the gateway). A dispatching adapter picks Connect or Pipedream per record
+ or per app: Connect when the app is in Connect's catalog and the flag is
+ on, Pipedream otherwise.
+3. **Connect flow.** `POST /pipedream/mcp/token` gains an `app_slug`; for a
+ Connect app it returns Connect's `connect_url` (from
+ `create_connect_session`, redirect back to a Macro route) instead of a
+ Pipedream token. The redirect route confirms the connection with
+ `connections()` and saves the record with `provider = connect`, then runs
+ the same completion hook. Disconnect calls `delete_connection`.
+4. **Web.** When the token response is a Connect URL, open it in a popup (web)
+ or browser tab (desktop, as `connect-native.tsx` does) instead of
+ Pipedream's iframe, and complete on the redirect. Keep the Pipedream path
+ for other apps.
+5. **Config.** `CONNECT_CUSTOMER_KEY` in Doppler for each service that needs
+ it (dev, prd, lcl_personal, `BootStubEnv` placeholder); Connect's base URL
+ via `macro_service_urls` (`local` `http://localhost:8080`). Feature flag
+ `macro-connect` (PostHog, per the `feature-flags` skill) gates step 2's
+ choice and step 3's flow.
+6. **Granola sync** stays on Pipedream (`ApiProxy`): Granola's REST API takes
+ API keys only.
+7. Tests: dispatch picks the right backend per app and flag; Connect-backed
+ upstream; connect-flow completion and disconnect against a fake
+ `connect_client` server (`wiremock`); the migration default.
+
+## Done when
+
+- `cargo nextest run --all-features` for every changed Macro package passes.
+- clippy (`-D warnings`), `cargo x deps --check`, `just check full` pass.
+- Result: a local end-to-end run (Macro stack + `connect_api`): connect Linear
+ from the web settings page with the flag on, then list its tools from chat.
+
+## Out of scope
+
+Deleting Pipedream code, migrating existing connections (reconnect prompts are
+T011), Connect's deploy.
+
+## Result
diff --git a/connect/tasks/T012-deploy-stack.md b/connect/tasks/T012-deploy-stack.md
new file mode 100644
index 0000000000..ce9c9a3516
--- /dev/null
+++ b/connect/tasks/T012-deploy-stack.md
@@ -0,0 +1,109 @@
+# T012: Deploy stack and local stack for `connect_api`
+
+Independent of T006-T010; base on the integration branch.
+
+## Goal
+
+`connect_api` can be deployed to dev and prod by Macro's existing pipeline,
+and runs in Macro's local stack so Macro services can call it, with nothing
+deployed by this task.
+
+## Context
+
+- `docs/guides/new-service.md`: follow sections 2 (deploy inventory),
+ 3 (infrastructure), 4 (config and secrets), 5 (service discovery), 6 (local
+ stack), and "Verify locally". Model: `services/calendar_service` +
+ `infra/stacks/calendar-service`.
+- `docs/development/infrastructure.md`.
+- Names: crate `connect_api` at `connect/services/connect_api`; everywhere
+ else `connect-api` (services-config, nix `serviceName`, Pulumi project,
+ Doppler project `connect-api`). Doppler project `connect` already exists and
+ holds operations secrets (the `[email protected]` account); runtime config
+ goes in `connect-api`.
+- Connect runs on Macro's platform for v1 (shared pipeline, gateway, RDS
+ instance); its code still depends on no Macro crate ([decision](../docs/decisions.md)).
+
+## Do
+
+1. **Deploy inventory** per section 2, with `"bootstrap_pending": "Doppler
+ project connect-api, database, and first deploy pending Eric's approval"`.
+ Add `connect/services/connect_api/**` and `connect/crates/**` to
+ `source_paths`.
+2. **Infrastructure** per section 3: `infra/stacks/connect-api/` copied from
+ `calendar-service`; gateway member with prefix `/connect` (check
+ priorities); a dedicated KMS key for grant envelopes whose policy lets only
+ the service's task role `Encrypt`/`Decrypt`/`GenerateDataKey`, with the key
+ id passed as `CONNECT_KMS_KEY_ID`; alarms as calendar's. The database is a
+ separate `connect` database on the existing RDS instance: write a short
+ runbook in `connect/docs/runbooks/database.md` for creating it and its
+ role (a human runs it), and pass its URL as `DATABASE_URL` through
+ Doppler. Add `connect-api` to `SERVICE_NAMES` in
+ `infra/stacks/doppler-projects/index.ts`.
+3. **Config** per section 4: list every key `connect_api` reads in
+ `connect/services/connect_api/AGENTS.md`; `BootStubEnv` placeholders in
+ `local_env.rs`; a `doppler_config` binary like `services/contacts_service`'s.
+ Create no Doppler values.
+4. **Service discovery** per section 5: `service_url!` entry `ConnectApi`
+ (`local` `http://localhost:<port>`, `dev`/`prod` the gateway `/connect`
+ URLs) and its copies (`infra/packages/shared/src/service_urls.ts`; not the
+ web app, which reaches Connect through Macro's backend and the browser
+ redirect).
+5. **Local stack** per section 6: compose block, `RustService` inventory
+ entry, `Port` variant at the end, a local Postgres database `connect` with
+ migrations applied at startup, and `CONNECT_LOCAL_WRAPPING_KEY` /
+ `CONNECT_PUBLIC_URL` local values.
+6. **Migrations at startup**: `connect_api` runs its SQLx migrations on boot
+ (Connect owns its database).
+
+## Done when
+
+- The "Verify locally" commands from the guide pass, including
+ `curl http://localhost:<port>/health` and through the local proxy at
+ `/connect/health`.
+- `cargo x deps --check`, `cargo x workflows --check`, `just check full` pass.
+- `cd infra && bun install && bunx tsc -p stacks/connect-api` (or the repo's
+ infra type check) passes.
+
+## Out of scope
+
+Deploying, `pulumi up`, creating Doppler values or the database, DNS for a
+custom domain.
+
+## Result
+
+Implemented, uncommitted, with no deploy or production change.
+
+### Changed files
+
+- Deploy inventory and build: `.github/services-config.json`, `.github/workflows/deploy-service-generic.yml`, `nix/cloud-storage.nix`.
+- Pulumi and Doppler project wiring: `infra/stacks/connect-api/` (including its `AGENTS.md` and `CLAUDE.md` symlink), `infra/stacks/doppler-projects/index.ts`, `infra/packages/shared/src/gateway_priorities.ts`, `infra/packages/shared/src/service_urls.ts`, `infra/bun.lock`.
+- Connect runtime and guidance: `connect/services/connect_api/Cargo.toml`, `connect/services/connect_api/src/doppler_config.rs`, `connect/services/connect_api/src/main.rs`, `connect/services/connect_api/src/test.rs`, `connect/services/connect_api/AGENTS.md`, `connect/docs/runbooks/database.md`, `connect/AGENTS.md`, `Cargo.lock`.
+- Service discovery and local stack: `crates/macro_service_urls/src/lib.rs`, `crates/macro_service_urls/AGENTS.md`, `docker/Dockerfile.dev`, `docker/docker-compose.yml`, `tooling/xtask/crates/xtask_local/src/local/{instance.rs,inventory.rs,inventory/test.rs,local_env.rs}`.
+
+The stack owns `/connect` on the shared gateway, with a dedicated rotation-enabled KMS key whose cryptographic actions are granted to the Connect task role. The Connect database is created separately on the existing local Postgres instance; `connect_api` applies its SQLx migrations on startup. The runbook describes human creation of the deployed database and role and the Doppler values; none were created here.
+
+### Checks
+
+- `cargo build -p connect_api`: passed.
+- `cargo test -p connect_api`: passed, 8 tests. `cargo nextest run --all-features -p connect_api`: passed, 8 tests.
+- `cargo test -p macro_service_urls`: passed, 47 unit tests and 1 doc test. `cargo test -p xtask_local`: passed, 124 tests.
+- `cargo x deps --check`: passed. `cargo x workflows --check`: passed; generated workflows are current.
+- `just rust-check`: passed. `just clippy`: passed. `cargo clippy -p connect_api --all-features --all-targets -- -D warnings`: passed. `cargo fmt --all -- --check`: passed.
+- `just check full`: passed. `just check`: passed. Both required a writable temporary `XDG_RUNTIME_DIR` and a temporary ELF interpreter fix for the downloaded ast-grep binary on NixOS; no repository file was changed for that workaround.
+- `cd infra && bun install && bunx tsc -p stacks/connect-api`: passed. Infra `bun run check` and Biome on the changed TypeScript files: passed.
+- `nix-instantiate --parse nix/cloud-storage.nix`, `docker compose --project-directory . -f docker/docker-compose.yml config --quiet`, and `git diff --check`: passed.
+- `just stack up --instance t012deploy --no-frontend --no-doppler --traces off --json`: passed; isolated local stack ready and `connect_api` healthy. `curl http://localhost:24533/health`: HTTP 200. `curl --cacert infra/local/certs/ca.pem https://localhost:24509/connect/health`: HTTP 200.
+
+Rust and repository tooling ran inside `nix develop --command` with the required `CARGO_TARGET_DIR` and `DATABASE_URL` exports. The initial stack attempt could not write Docker Buildx activity under the read-only home directory; the successful run used a writable temporary `DOCKER_CONFIG`.
+
+### Open questions and follow-up
+
+No product decision is open. After approval, a human must deploy the `doppler-projects` stack to create the dev and prod `connect-api` configurations, populate their values, create the deployed `connect` database and role, set `CONNECT_KMS_KEY_ID` from the Pulumi output, and remove `bootstrap_pending` before the first dev deployment. Creating the key and supplying its id requires a staged first deployment; production follows the normal release process. No part of that deployment was performed here.
+
+### Proposed commit
+
+`feat(connect): wire API deploy and local stacks`
+
+Why: Connect needs its own deploy inventory, runtime configuration, service discovery, database, and local stack integration before Macro can call it.
+
+What: Add the gateway backed Pulumi stack and KMS key, register the service in build and local tooling, create the local database and runtime config validation, and document the human database setup.
diff --git a/connect/tasks/T013-dev-slice-infra.md b/connect/tasks/T013-dev-slice-infra.md
new file mode 100644
index 0000000000..05e05187b7
--- /dev/null
+++ b/connect/tasks/T013-dev-slice-infra.md
@@ -0,0 +1,156 @@
+# T013: Pulumi owns all of Connect's infra; first-slice apps
+
+Base on the integration branch (T006 and T012 merged).
+
+## Goal
+
+Deploying the `connect-api` stack to dev produces a working Connect with no
+manual steps beyond running the deploys: its own database, its KMS key, and
+its runtime config all come from Pulumi. Only the first-slice apps are live.
+
+## Context
+
+- `infra/stacks/connect-api/` and `connect/docs/runbooks/database.md` (T012).
+- `docs/development/infrastructure.md`; `.agents/rules/config-and-service-urls.md`:
+ in ECS the service reads only `APP_SECRETS_JSON`, so a value from infra must
+ be written into Doppler. `infra/stacks/preview-gateway` writes Doppler
+ values from Pulumi; follow it.
+- `connect/docs/decisions.md`: Connect gets its own small RDS instance.
+- `connect_api`'s config and `src/doppler_config.rs`; `connect_registry`.
+
+## Do
+
+1. **RDS.** In the `connect-api` stack: a PostgreSQL instance for Connect
+ (dev `db.t4g.micro`, prod `db.t4g.small`; current major version; private
+ subnets of the coparse VPC; encrypted; automated backups; `protect` and
+ deletion protection in prod), a security group admitting only the service's
+ task security group on 5432, and RDS-managed or Pulumi-generated
+ credentials (never in code or logs).
+2. **Doppler from Pulumi.** The stack writes `DATABASE_URL`,
+ `CONNECT_KMS_KEY_ID`, and `CONNECT_PUBLIC_URL` (the gateway `/connect` URL;
+ confirm the gateway strips `/connect` before forwarding, or make the
+ service serve under it, and say which) into Doppler `connect-api/<env>` the
+ way `preview-gateway` does.
+3. **Bootstrap order.** Make the first deploy work in one pass, or document
+ the exact order (for example: `doppler-projects`, then `connect-api`
+ infra, then the service) in a rewritten `connect/docs/runbooks/database.md`
+ renamed to `bootstrap.md`, with no manual database or Doppler steps. Keep
+ `bootstrap_pending` set; removing it is the planner's change after the
+ human runs the deploys.
+4. **Own-app credentials only for live apps.** `connect_api` requires
+ `<ID>_CLIENT_ID`/`_SECRET` only for `own_app` apps whose `status` is
+ `live`; `doppler_config.rs` validates `CONNECT_PUBLIC_URL`, `DATABASE_URL`,
+ `CONNECT_KMS_KEY_ID`, and the live own-app keys.
+5. **First slice.** In `connect/registry/apps/`, set `status = "pending"` on
+ every app except `linear`, `notion`, `posthog`, `sentry`.
+6. Tests: config requires own-app keys only for live apps; the registry has
+ exactly the four live apps; `doppler_config` key list.
+
+## Done when
+
+- `cargo nextest run --all-features -p connect_api -p connect_registry`
+ passes; clippy (`-D warnings`), `cargo x deps --check`, `just check full`
+ pass.
+- `cd infra && bunx tsc -p stacks/connect-api` and infra Biome pass.
+- The local stack still comes up and `/connect/health` answers through the
+ local proxy (`--no-doppler` is fine).
+- The Result lists the exact deploy commands/workflow dispatches, in order,
+ for dev.
+
+## Out of scope
+
+Running any deploy or `pulumi` command against AWS; creating Doppler values by
+hand; prod.
+
+## Review (planner, 2026-10-30)
+
+Use PostgreSQL 17 on `db.t4g.micro` (dev) and `db.t4g.small` (prod): AWS
+documents both classes for 17, and Connect's queries need nothing from 18.
+Finish the task and re-run every check; the Result must show final-revision
+outcomes. Note that the `doppler-projects` deploy targets the global (prod)
+stack: say so plainly in the deploy order, since the human approves each
+deploy.
+
+## Review 2 (planner, 2026-10-30)
+
+Do not export the global Doppler token from `doppler-projects`: any stack
+that references it could read a workplace-wide credential. Revert the
+`doppler-projects` change. Follow `infra/stacks/preview-gateway`: the
+`connect-api` stack's Doppler provider takes its own encrypted stack config
+`doppler:dopplerToken` (in `Pulumi.dev.yaml` and `Pulumi.prod.yaml`, set by a
+human with `pulumi config set --secret`), scoped to the `connect-api` project.
+Add that one human step to `bootstrap.md`: create a Doppler service token with
+write access to `connect-api` `dev` (and `prd` later) and set it as the
+stack's secret config. Keep everything else. Re-run the infra checks.
+
+## Result
+
+### Changed
+
+- infra/stacks/connect-api/index.ts uses this stack's encrypted doppler:dopplerToken config for its provider. infra/stacks/connect-api/service.ts creates private PostgreSQL 17 RDS (db.t4g.micro in dev, db.t4g.small in prod), a service-only database security group, managed credentials, and Pulumi-owned DATABASE_URL, CONNECT_KMS_KEY_ID, and CONNECT_PUBLIC_URL Doppler values. Prod RDS has deletion protection and Pulumi protect. Pulumi.dev.yaml and Pulumi.prod.yaml document where the human sets their scoped encrypted token; AGENTS.md describes the boundary. infra/stacks/doppler-projects/index.ts is unchanged and exports no token.
+- The 32 changed connect/registry/apps/*/app.toml entries are pending; only Linear, Notion, PostHog, and Sentry remain live. connect/crates/connect_registry/src/test.rs asserts that exact set.
+- connect/services/connect_api/src/{main.rs,domain/oauth.rs,doppler_config.rs,doppler_config_test.rs,test.rs,oauth_test.rs} and connect/crates/connect_platform/src/config.rs require credentials only for live own-app entries, validate the corresponding Doppler keys, and preserve the gateway /connect prefix in public OAuth and catalog URLs.
+- connect/docs/runbooks/bootstrap.md replaces database.md with the deploy and encrypted token setup order. connect/docs/{catalog.md,decisions.md}, connect/services/connect_api/AGENTS.md, and this Result describe the first slice and bootstrap.
+
+### Checks on final revision
+
+| Check | Exact outcome |
+| --- | --- |
+| bunx tsc -p stacks/connect-api and bunx tsc -p stacks/doppler-projects from infra/ | Passed. |
+| bunx biome check stacks/connect-api stacks/doppler-projects from infra/ | Passed; 5 files checked. |
+| bun run lint from infra/ | Passed; Biome checked 228 files. |
+| bun run check from infra/ | Passed; tsc --noEmit. |
+| cargo nextest run --all-features -p connect_api -p connect_registry -p connect_platform | Passed; 29 tests, 0 skipped. |
+| cargo clippy -p connect_api -p connect_registry -p connect_platform --all-features --all-targets -- -D warnings | Passed. |
+| cargo x deps --check | Passed. |
+| just check full | Passed; format, ast-grep, workspace clippy, full checks; OK. |
+| just check | Passed separately; OK. |
+| just doctor-local --instance t013 | Passed; Docker, tooling, and all 34 ports. |
+| Isolated stack and /connect/health through local proxy | Passed. just stack up --instance t013 --no-doppler --no-frontend --binaries-dir "$CONNECT_CARGO_TARGET_DIR/x86_64-unknown-linux-gnu/debug" reported ready. curl --fail --insecure https://localhost:21709/connect/health returned HTTP 200. just stop_local --instance t013 completed. |
+| git diff --check HEAD | Passed. |
+| Audit skill | Passed after this Result update; token boundary, runbook order, and diff hygiene verified. |
+
+Cargo, Just, Bun, and curl checks ran inside nix develop --command with CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR" and DATABASE_URL="$CONNECT_DATABASE_URL" exported. SQLX_OFFLINE was unset for tests. No deploy, AWS change, or manual Doppler write was run.
+
+### Dev deploy order
+
+1. Dispatch the global Doppler project stack and wait for success. Its prod Pulumi stack owns global Doppler projects; this is not a Connect production deploy.
+
+ gh workflow run deploy-pulumi-stack.yml --ref <reviewed-ref> -f environment=prod -f pulumi-service-name=doppler-projects
+
+2. The human creates a Doppler service token with write access limited to connect-api/dev. From infra/stacks/connect-api, the human writes it into this stack's encrypted dev config, then adds the encrypted Pulumi.dev.yaml update to the reviewed deploy ref. The plaintext token is never printed or committed. The production equivalent later uses a separate token scoped to connect-api/prd and Pulumi.prod.yaml.
+
+ pulumi config set --stack dev --secret doppler:dopplerToken
+
+3. Dispatch Connect infrastructure in dev from the ref containing the encrypted config, then wait for success.
+
+ gh workflow run deploy-pulumi-stack.yml --ref <reviewed-ref-with-encrypted-config> -f environment=dev -f pulumi-service-name=connect-api
+
+4. The planner removes bootstrap_pending in a reviewed change. Dispatch the Connect service workflow from that ref and wait for success.
+
+ gh workflow run deploy-service-generic.yml --ref <reviewed-ref-with-gate-removed> -f environment=dev -f service=connect-api
+
+5. Request https://dev-gateway.macro.com/connect/health and expect HTTP 200.
+
+The live Doppler-to-Secrets-Manager sync and ECS health remain unverified until the approved dev deploy.
+
+### Open questions
+
+None.
+
+### Proposed commits
+
+- feat(connect): provision isolated Connect infrastructure
+
+ Why: Connect needs its own database and reproducible runtime values for dev bootstrap.
+ What: Create RDS and scoped Doppler resources, document encrypted stack token setup and deploy order.
+
+- feat(connect): limit the live catalog to the first slice
+
+ Why: Only four apps are ready for first-slice conformance.
+ What: Mark other registry entries pending and assert the live set.
+
+- fix(connect): load live app credentials and preserve gateway paths
+
+ Why: Pending own-app credentials and /connect URL handling would block startup and OAuth.
+ What: Derive required keys from live apps, validate Doppler config, and preserve the gateway prefix in public URLs.
diff --git a/connect/tasks/T014-deny-wrappers.md b/connect/tasks/T014-deny-wrappers.md
new file mode 100644
index 0000000000..033e7b870f
--- /dev/null
+++ b/connect/tasks/T014-deny-wrappers.md
@@ -0,0 +1,73 @@
+# T014: Pass cargo-deny: Connect's platform crate wraps AWS config and tracing
+
+Base: `eric/macro-connect` (PR #9231). CI's `cargo-deny` fails.
+
+## Goal
+
+`cargo deny check bans` passes. `deny.toml` bans direct use of `aws-config`
+and `tracing-subscriber` outside named wrapper crates (Macro's are
+`macro_aws_config` and `macro_entrypoint`). Connect can't use Macro's, so
+`connect_platform` is Connect's wrapper for both.
+
+## Do
+
+1. Move AWS SDK config loading out of `connect_api` into `connect_platform`
+ (a small function like `macro_aws_config`'s, behind no new feature unless
+ needed), and have `connect_api` build its KMS client from it. Only
+ `connect_platform` depends on `aws-config`.
+2. Add `connect_platform` to the `wrappers` lists for `aws-config` and
+ `tracing-subscriber` in `deny.toml`, with a comment: Connect's platform
+ crate (Connect may not depend on Macro's wrappers).
+3. `just hakari` if `Cargo.toml` changes.
+
+## Done when
+
+- `cargo deny check bans` passes locally (install with `cargo install
+ cargo-deny --locked` inside `nix develop` if missing, or use the version the
+ workflow pins).
+- `cargo nextest run --all-features -p connect_api -p connect_platform`,
+ clippy (`-D warnings`), `cargo x deps --check`, `just check` pass.
+
+## Out of scope
+
+Anything else.
+
+## Result
+
+Changed:
+
+- `connect/crates/connect_platform/src/lib.rs` loads the default AWS SDK config;
+ `connect/services/connect_api/src/main.rs` uses it to construct the KMS client.
+- The two crate `Cargo.toml` files and `Cargo.lock` move the direct `aws-config`
+ dependency from `connect_api` to `connect_platform`.
+- `deny.toml` allows `connect_platform` as the AWS config and tracing subscriber
+ wrapper. `connect/crates/connect_platform/AGENTS.md` documents its AWS role.
+
+Checks:
+
+- `just hakari` — passed; refreshed `Cargo.lock`.
+- `cargo deny check bans` — passed (`bans ok`; existing workspace warnings).
+- `cargo nextest run --all-features -p connect_api -p connect_platform` — passed:
+ 28 tests, 0 skipped.
+- `cargo clippy -p connect_api -p connect_platform --all-features --all-targets -- -D warnings`
+ — passed.
+- `cargo x deps --check` — passed.
+- `just check` — passed (format, ast-grep rules, PII scan, and 12 scanner tests).
+- `cargo fmt --all -- --check` and `git diff --check` — passed in the audit.
+- Audit — passed; no remaining findings.
+
+Open questions: None.
+
+Proposed commit:
+
+```text
+fix(connect): load AWS config through platform wrapper
+
+Why:
+Direct AWS configuration in the API violates the dependency wrapper ban.
+
+What:
+Move AWS SDK configuration loading into connect_platform and use it for
+the API's KMS client. Register Connect's platform wrapper in cargo-deny
+and update the dependency artifacts and crate guide.
+```
diff --git a/connect/tasks/T015-test-databases.md b/connect/tasks/T015-test-databases.md
new file mode 100644
index 0000000000..1974a6bbcf
--- /dev/null
+++ b/connect/tasks/T015-test-databases.md
@@ -0,0 +1,90 @@
+# T015: Connect's database tests don't inherit Macro's template
+
+Base: `eric/macro-connect` (PR #9231). CI's `test` job fails three
+`connect_api` tests with `failed to apply migrations: VersionMissing(1)`.
+
+## Cause
+
+CI runs `just setup_test_template`, which applies Macro's migrations to
+Postgres `template1` so every `#[sqlx::test]` database starts pre-migrated
+(`tooling/just/rust.just`, `code_check_cloud_storage.rs` `prepare_tests`).
+Connect's tests use `#[sqlx::test(migrator = ...)]`, so their databases start
+with Macro's schema and `_sqlx_migrations`, and Connect's migrator rejects
+them. Locally `template1` is clean, so they pass.
+
+## Do
+
+1. Replace `#[sqlx::test(migrator = ...)]` in `connect_api` with a test
+ helper (in a `test_support` module compiled only for tests) that creates a
+ uniquely named database `WITH TEMPLATE template0` on the server in
+ `DATABASE_URL`, runs Connect's migrator, hands the pool to the test, and
+ drops the database afterwards (also when the test panics, e.g. a guard
+ whose `Drop` schedules the drop, or drop stale `connect_test_%` databases
+ at helper start). Tests stay `#[tokio::test]` and read naturally.
+2. Keep every existing assertion; only the database setup changes.
+3. Note in `connect/services/connect_api/AGENTS.md` (Gotchas) why Connect's
+ tests create databases from `template0`.
+
+## Done when
+
+- Locally, with `template1` pre-migrated the way CI does it: create a scratch
+ Postgres database server state by running `just setup_test_template`
+ against a throwaway local server or a database URL whose `template1` you
+ may modify (do not touch the shared `macrodb`), then
+ `cargo nextest run --all-features -p connect_api` passes. If you can't
+ reproduce CI's template locally, say so and explain why the helper is
+ immune to it.
+- Without the pre-migrated template, the same tests pass.
+- clippy (`-D warnings`), `cargo x deps --check`, `just check` pass.
+
+## Out of scope
+
+CI workflow changes; other crates.
+
+## Result
+
+### Changed
+
+- `connect/services/connect_api/src/test_support.rs` creates a unique database
+ from `template0` using `DATABASE_URL`, applies Connect migrations, and
+ force-drops it when the test ends or unwinds.
+- `connect/services/connect_api/src/main.rs`, `src/test.rs`,
+ `src/oauth_test.rs`, `src/mcp/test.rs`, and `src/outbound/test.rs` use the
+ test-only helper in all 12 database tests without changing their assertions.
+- `connect/services/connect_api/AGENTS.md` explains the `template0` requirement;
+ `connect/docs/decisions.md` describes the current test setup.
+
+### Checks
+
+- `just setup_test_template`: passed on a disposable `pgvector/pgvector:pg14`
+ server; `template1` contained 625 Macro migration records. An initial
+ disposable PostgreSQL 18 server lacked the `vector` extension, so that
+ attempt stopped at migration 20260511131821 before the pgvector rerun.
+- `cargo nextest run --all-features -p connect_api`: passed 24/24 with the
+ pre-migrated `template1`; passed 24/24 with a clean `template1`. Both
+ disposable servers had zero remaining `connect_test_%` databases.
+- `cargo clippy -p connect_api --all-features --all-targets -- -D warnings`:
+ passed.
+- `cargo x deps --check`: passed.
+- `just check`: passed, including format, ast-grep, PII scan, and 12 PII
+ scanner tests. The first invocation could not launch the pinned ast-grep
+ binary on NixOS; the successful run used that same 0.44.1 binary with a
+ loader fix in `/tmp`.
+- `git diff --check`: passed. Repository audit: passed.
+
+### Open questions
+
+None.
+
+### Proposed commit
+
+`fix(connect): isolate API test databases from template1`
+
+Why:
+CI preloads `template1` with a separate migration history, causing
+Connect's migrator to reject new test databases.
+
+What:
+Create isolated databases from `template0`, apply Connect migrations, and
+force-drop them when tests finish or unwind. Use the helper in every database
+test and document the setup.
diff --git a/connect/tasks/T016-independent-hosting.md b/connect/tasks/T016-independent-hosting.md
new file mode 100644
index 0000000000..a6ec7edad8
--- /dev/null
+++ b/connect/tasks/T016-independent-hosting.md
@@ -0,0 +1,141 @@
+# T016: Host Connect as an independent backend
+
+Base: `eric/macro-connect` (PR #9231).
+
+## Goal
+
+Connect deploys and runs on its own, touching none of Macro's deployed
+services: its own Pulumi project under `connect/infra`, its own ECS cluster,
+load balancer, database, KMS key, and secrets, reachable at
+`https://connect-dev.macro.com`. It also runs locally with one command, so
+integration tests can target either.
+
+## Context
+
+- Eric's direction (2026-10-30): the first pass is an entirely independent
+ backend for integration tests, not wired to Macro. The PR already reverted
+ everything that touched Macro's gateway, shared infra, deploy pipeline,
+ service URLs, Doppler projects stack, and local stack.
+- Prior art to mine (do not depend on it): the removed
+ `infra/stacks/connect-api` (`git show 316f1e839f -- infra/stacks/connect-api`),
+ `infra/stacks/preview-gateway` (builds its own image in Pulumi), Macro's
+ `infra/packages/*` helpers. Copy what you need into `connect/infra`.
+- `connect/docs/runbooks/bootstrap.md` (rewrite it), `connect/AGENTS.md`
+ Boundary.
+- Existing AWS (read-only lookups are fine): VPC used by Macro's services
+ (look it up by id or tag from Pulumi config; put no resources into shared
+ security groups), Route 53 zone `macro.com` (`Z0766278GIHB3CVV9CIL`).
+
+## Do
+
+1. **`connect/infra/`**: a standalone Pulumi TypeScript project
+ (`macro-connect`, stacks `dev`, `prod`) with its own `package.json`,
+ `tsconfig.json`, Biome config, and lockfile; no imports from Macro's
+ `infra/` (the TS self-contained ast-grep rule: add `infra/` to its banned
+ relative paths). Resources, all tagged `project: macro-connect`:
+ - ECR repository and the `connect_api` image built in Pulumi from
+ `connect/services/connect_api/Dockerfile` (multi-stage, repo root as
+ context, small runtime image).
+ - Its own ECS cluster, Fargate task and service (1 task in dev), CloudWatch
+ log group, task role with only what Connect needs.
+ - Its own internet-facing ALB, ACM certificate (DNS-validated), and an
+ A/alias record `connect-dev.macro.com` (dev) in the `macro.com` zone;
+ HTTPS only (HTTP redirects). Health check `/health`.
+ - RDS PostgreSQL 17 `db.t4g.micro` (dev), private subnets, encrypted,
+ backups, reachable only from the task's security group; prod settings
+ as T013 had them (`db.t4g.small`, deletion protection, `protect`).
+ - KMS key for grants (rotation on; only the task role may use it).
+ - An AWS Secrets Manager secret holding the service's `APP_SECRETS_JSON`
+ (`DATABASE_URL`, `CONNECT_KMS_KEY_ID`, `CONNECT_PUBLIC_URL`, and own-app
+ credentials from encrypted Pulumi config when an `own_app` app is live),
+ injected into the task. Connect's runtime uses no Doppler.
+2. **Service paths.** At its own host Connect serves at the root; keep the
+ `/connect` alias only if removing it costs more than it saves, and say
+ which.
+3. **Remove Doppler from the runtime:** delete the `connect_api_doppler_config`
+ binary and Doppler mentions in `connect_api` code and docs. Doppler project
+ `connect` keeps only operations secrets (the `[email protected]` account).
+4. **Local run:** `connect/docker-compose.yml` with PostgreSQL 17 and
+ `connect_api` (local wrapping key, `CONNECT_PUBLIC_URL=http://localhost:<port>`),
+ and a documented one-liner to start it and create a customer.
+5. **Docs:** rewrite `connect/docs/runbooks/bootstrap.md` (prerequisites:
+ `PULUMI_ACCESS_TOKEN` and AWS credentials; `pulumi preview` then
+ `pulumi up` from `connect/infra` on stack `dev`, each approved by the
+ human; post-deploy check `curl https://connect-dev.macro.com/health`);
+ `connect/infra/AGENTS.md` (+ `CLAUDE.md` symlink); update `connect/AGENTS.md`
+ map, `connect/docs/catalog.md` (own-app credentials now live in Pulumi
+ encrypted config), and `connect_api`'s `AGENTS.md`.
+
+## Done when
+
+- `cd connect/infra && bun install && bunx tsc --noEmit` and Biome pass.
+- `docker compose -f connect/docker-compose.yml up` serves `/health` and
+ `/v1/catalog` locally (paste the catalog's app ids).
+- The Dockerfile builds (`docker build -f connect/services/connect_api/Dockerfile .`).
+- `cargo nextest run --all-features -p connect_api -p connect_platform -p connect_registry`,
+ clippy (`-D warnings`), `cargo x deps --check`, `just check` pass.
+- `git diff origin/main --stat -- . ':!connect'` shows nothing beyond the PR's
+ existing CI/tooling changes and the ast-grep rule edit.
+
+## Out of scope
+
+Running `pulumi` against AWS; any change to Macro's infra, gateway, deploy
+workflows, or services; integration tests (T017).
+
+## Result
+
+### Changed
+
+- `connect/infra/{Pulumi.yaml,Pulumi.dev.yaml,Pulumi.prod.yaml,index.ts,package.json,bun.lock,tsconfig.json,biome.json,AGENTS.md,CLAUDE.md}`: standalone `macro-connect` Pulumi project with its own ECR image, ECS cluster and service, IAM roles, log group, public ALB, DNS-validated certificate, alias record, private PostgreSQL 17 RDS, grant KMS key, and Secrets Manager runtime JSON. It reads the existing VPC id and subnet ids from stack config but creates its own security groups. Secret version changes create a new task definition and service rollout. Prod RDS has the T013 instance class, backups, deletion protection, and Pulumi protection. The TS boundary rule now bans relative imports from Macro's `infra/`.
+- `connect/services/connect_api/{Dockerfile,Cargo.toml,src/main.rs,src/test.rs,src/oauth_test.rs,AGENTS.md}`: multi-stage container build, host-root routes and public URL, and updated route tests. Deleted `src/doppler_config.rs` and `src/doppler_config_test.rs`; removed that binary and its dependency. The `/connect` alias was removed because it required only a small router change. `Cargo.lock` was regenerated for the removed dependency.
+- `connect/docker-compose.yml`: PostgreSQL 17 and the API with a local wrapping key, configurable host port, and localhost public URL.
+- `connect/AGENTS.md` and `connect/docs/{runbooks/bootstrap.md,catalog.md,decisions.md,plan.md,submissions.md}`: standalone deploy and local bootstrap instructions, updated runtime credential source, and the superseding hosting decision. `connect/STATUS.md` was not changed.
+- `rules/ast-grep/{ts-connect-self-contained.yml,tsx-connect-self-contained.yml}`: reject relative imports from Macro's `infra/`.
+
+### Checks
+
+All Rust, Bun, Docker, and repository tooling below ran inside `nix develop --command` with `CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"` and `DATABASE_URL="$CONNECT_DATABASE_URL"` exported. `SQLX_OFFLINE` was unset for tests. No AWS Pulumi preview, deploy, production access, or secret read was run.
+
+| Check | Exact outcome |
+| --- | --- |
+| `cd connect/infra && bun install --frozen-lockfile` | Passed; 262 installs checked across 252 packages, no changes. |
+| `cd connect/infra && bunx tsc --noEmit` | Passed, exit 0. |
+| `cd connect/infra && bunx biome check .` | Passed; 4 files checked, no fixes. |
+| `docker build -t connect-api-t016 -f connect/services/connect_api/Dockerfile .` | Passed; release image built, exit 0. |
+| `docker compose -f connect/docker-compose.yml up -d --build` | Initial run built the image but could not bind host port 8080 because it was in use. After making the host port configurable, `CONNECT_PORT=18080 docker compose -f connect/docker-compose.yml up -d` passed. `docker compose ... down` passed without removing the database volume. |
+| Local HTTP and customer CLI | `/health` returned HTTP 200; `/v1/catalog` returned HTTP 200 with app ids `linear`, `notion`, `posthog`, `sentry`. `create-customer local --redirect-origin http://localhost:3000` exited 0 with its key output discarded. |
+| `docker compose -f connect/docker-compose.yml config -q` | Passed with `CONNECT_PORT=18080`, exit 0. |
+| `cargo nextest run --all-features -p connect_api -p connect_platform -p connect_registry` | Passed; 34 tests, 0 skipped. |
+| `cargo clippy -p connect_api -p connect_platform -p connect_registry --all-features --all-targets -- -D warnings` | Passed, exit 0. |
+| `cargo x deps --check` | Passed, exit 0. |
+| `cargo fmt --all -- --check` | Passed, exit 0. |
+| `just check` | Passed; format, ast-grep, PII scan, and scanner tests (`OK`). |
+| `git diff --check` | Passed, exit 0. |
+| `git diff origin/main --stat -- . ':!connect'` | Ran. It shows 182 files changed because this branch already differs broadly from current `origin/main`; this task adds only `Cargo.lock`'s required `doppler-config` removal and the two ast-grep rule edits outside `connect/` (verified with `git diff --name-only HEAD -- . ':!connect'`). The literal clean-stat criterion cannot be met without changing the pre-existing branch history. |
+| Audit skill | Passed static review of resource isolation, secret rollout, host-root routing, symlink, and scoped changes. |
+
+The hexagonal boundary was checked: the router change is transport composition; customer authorization and business policy remain in the existing domain service, and database/KMS work remains in outbound adapters.
+
+### Open question
+
+- Which public hostname should the production stack use? `Pulumi.prod.yaml` leaves `publicHost` unset, and production preview fails until that product decision is supplied.
+
+### Proposed commits
+
+1. `feat(connect-infra): provision an independent backend`
+
+ Why: Integration tests need a separately deployable backend without shared application infrastructure.
+
+ What: Add standalone Pulumi resources, encrypted runtime config, and the TypeScript boundary rule update.
+
+2. `feat(connect-api): serve root routes and run locally with Compose`
+
+ Why: The independent host and local stack need the same API paths and runtime configuration.
+
+ What: Remove the gateway alias and Doppler validator, add the Dockerfile and Compose stack, and update route tests and Cargo artifacts.
+
+3. `docs(connect): document standalone bootstrap`
+
+ Why: The previous runbook described a shared deployment path that is no longer used.
+
+ What: Replace bootstrap steps and update the catalog, decision, plan, submission, and agent guides.
diff --git a/connect/tasks/T017-integration-tests.md b/connect/tasks/T017-integration-tests.md
new file mode 100644
index 0000000000..81b55c0ef9
--- /dev/null
+++ b/connect/tasks/T017-integration-tests.md
@@ -0,0 +1,128 @@
+# T017: `connect_client` on this branch, and integration tests
+
+Base: `eric/macro-connect` (PR #9231).
+
+## Goal
+
+One command runs Connect's integration tests against any running Connect, the
+local Compose stack or `https://connect-dev.macro.com`, through the public
+client, and fails loudly on any broken behavior. It proves each live app's
+real OAuth handshake up to the vendor's consent page without a test account.
+
+## Context
+
+- `connect_client` was built on an older base: branch
+ `connect/T009-connect-client`, commit `9f1d2070fe` (and its spec
+ `connect/tasks/T009-connect-client.md` there). This branch has since moved
+ routes to the host root, removed Doppler, isolated test databases, and made
+ `connect_platform` the AWS wrapper. Port it; don't merge the old branch.
+- `connect/docker-compose.yml`, `connect/docs/runbooks/bootstrap.md`,
+ `connect_api` (`create-customer`, routes, OpenAPI).
+
+## Do
+
+1. **Port `connect_client`** onto this branch (crate, shared wire types used
+ by `connect_api`, `traceparent` injection in `connect_platform`), adapting
+ to the current API. Keep T009's tests passing. Its spec's Done-when checks
+ apply.
+2. **Runner**: crate `connect/tests/connect_integration` (package
+ `connect_integration`, a binary, not `#[test]`s, so the workspace test run
+ never needs a live Connect), using `connect_client` and `clap`:
+ `connect_integration --base-url <url> --customer-key <key>
+ --redirect-origin <origin> [--follow-vendor]`. Each scenario prints
+ `PASS`/`FAIL name: reason`; exit non-zero on any failure. Scenarios:
+ - `health`; `catalog`: exactly the registry's live apps, every
+ `icon_url` either null or serving an SVG.
+ - `auth`: no key and a wrong key get 401.
+ - `connections_empty`: a fresh random `external_user_id` has none;
+ deleting a missing connection behaves as the API documents.
+ - `client_metadata`: `/v1/oauth/client-metadata.json` is valid and its
+ `client_id` and `redirect_uris` use `--base-url`.
+ - `session_rules`: a redirect outside the customer's origins and an
+ unknown app are rejected with the documented errors.
+ - per live app, `authorize_<id>`: create a session, GET the `connect_url`
+ without following, and assert a redirect to the vendor's authorization
+ endpoint carrying `response_type=code`, PKCE S256 `code_challenge`,
+ `state`, `redirect_uri=<base>/v1/oauth/callback`, and the expected
+ `client_id` for the app's registration. With `--follow-vendor`, GET the
+ vendor URL and assert it does not answer with an OAuth error (status
+ and error parameters), which proves the vendor accepted Connect's client
+ (needs a public HTTPS `--base-url`).
+ - `gateway_unconnected`: the MCP gateway returns the documented
+ not-connected error for a live app.
+3. **Scripts**: `connect/tooling/integration.sh local` starts Compose, creates
+ a customer with redirect origin `http://localhost:3000`, runs the runner,
+ and stops Compose; `integration.sh dev` runs against
+ `https://connect-dev.macro.com` with `--follow-vendor`, reading the
+ customer key from `CONNECT_IT_CUSTOMER_KEY` (never printed).
+4. **Docs**: `connect/tests/connect_integration/AGENTS.md` (+ symlink), and a
+ "Verify" section in `bootstrap.md` pointing at `integration.sh dev`.
+
+## Done when
+
+- `connect/tooling/integration.sh local` passes (paste the PASS lines).
+- `cargo nextest run --all-features -p connect_client -p connect_api -p connect_platform -p connect_registry`,
+ clippy (`-D warnings`) for those plus `connect_integration`,
+ `cargo x deps --check`, `just check` pass.
+
+## Out of scope
+
+Completing a real consent (needs test accounts and the browser; next task);
+deploying; anything outside `connect/` except workspace membership and
+generated Cargo artifacts.
+
+## Result
+
+### Changed
+
+- `connect/crates/connect_client/`: ported the public client, shared wire types, tests, and agent guide from T009. Its methods use host-root API routes and inject W3C trace context.
+- `connect/crates/connect_platform/src/http.rs`, `src/http/test.rs`, `src/lib.rs`, and `AGENTS.md`: exported and verified outbound trace header injection.
+- `connect/services/connect_api/Cargo.toml`, `src/main.rs`, `src/mcp.rs`, `src/domain.rs`, `src/domain/oauth.rs`, and `AGENTS.md`: use the shared customer-facing wire types at the HTTP boundary; domain models and policy remain in the service.
+- `connect/tests/connect_integration/`: added the opt-in binary, its package manifest, agent guide, and `CLAUDE.md` symlink. `connect/tooling/integration.sh` runs local Compose or dev; `connect/docs/runbooks/bootstrap.md` documents verification.
+- `Cargo.toml`, `Cargo.lock`, and `.github/workspace-dep-closures.json`: registered the crates and regenerated dependency artifacts.
+
+### Checks
+
+- `CONNECT_PORT=18080 connect/tooling/integration.sh local` inside `nix develop`: **passed**, exit 0. Port 8080 was occupied; the script used the documented port override. Output:
+
+ ```text
+ PASS health: ok
+ PASS catalog: ok
+ PASS auth: ok
+ PASS connections_empty: ok
+ PASS client_metadata: ok
+ PASS session_rules: ok
+ PASS authorize_linear: ok
+ PASS authorize_notion: ok
+ PASS authorize_posthog: ok
+ PASS authorize_sentry: ok
+ PASS gateway_unconnected: ok
+ ```
+
+- `cargo nextest run --all-features -p connect_client -p connect_api -p connect_platform -p connect_registry`: **passed**, 37/37 tests. This includes T009's client and API test requirement.
+- `cargo clippy -p connect_client -p connect_api -p connect_platform -p connect_registry -p connect_integration --all-features --all-targets -- -D warnings`: **passed**, exit 0.
+- `cargo x deps --check`: **passed**, exit 0 after artifact regeneration.
+- `just check`: **passed**, exit 0; its PII scanner tests passed 12/12.
+- `cargo test -p connect_integration`: **passed**, exit 0 with zero tests, confirming the live runner is opt-in.
+- Audit: `cargo fmt --all -- --check`, `bash -n connect/tooling/integration.sh`, and `git diff --check` **passed**. The hexagonal boundary was checked: authorization and OAuth policy remain in the domain service; HTTP handlers map domain results into shared wire types.
+- Dev `--follow-vendor` run and Tempo trace inspection were **not run**: no dev customer key or Tempo trace was available. The local run verified all four vendor redirect URLs without following them.
+
+All Rust and repository checks ran inside `nix develop` with `CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"` and `DATABASE_URL="$CONNECT_DATABASE_URL"` exported. Nix warned that it could not install a pre-commit hook in the read-only `.git`; the checks still ran and passed.
+
+### Open questions
+
+None.
+
+### Proposed commits
+
+1. `feat(connect-client): expose typed customer API`
+
+ Why: Customer calls need one typed client and a shared HTTP contract.
+
+ What: Port the client and wire types, map API handlers to them, and propagate trace context.
+
+2. `test(connect): verify live OAuth handshakes`
+
+ Why: Live Connect behavior needs a repeatable check without completing vendor consent.
+
+ What: Add the integration binary, local and dev scripts, verification guide, and this result.
diff --git a/connect/tests/connect_integration/AGENTS.md b/connect/tests/connect_integration/AGENTS.md
new file mode 100644
index 0000000000..353b7fff9e
--- /dev/null
+++ b/connect/tests/connect_integration/AGENTS.md
@@ -0,0 +1,20 @@
+# Connect integration runner
+
+## What it is
+
+An opt-in binary that checks a running Connect service through the public Rust client and HTTP endpoints. Workspace tests do not launch it.
+
+## Start here
+
+- `src/main.rs`: scenarios and PASS/FAIL reporting.
+- `../../tooling/integration.sh`: local Compose and dev entry points.
+
+## Scope
+
+- Owns: live-service integration scenarios.
+- Not here: API behavior or registry definitions.
+
+## Checks
+
+- `connect/tooling/integration.sh local`
+- `cargo clippy -p connect_integration --all-features --all-targets -- -D warnings`
diff --git a/connect/tests/connect_integration/CLAUDE.md b/connect/tests/connect_integration/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/connect/tests/connect_integration/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/connect/tests/connect_integration/Cargo.toml b/connect/tests/connect_integration/Cargo.toml
new file mode 100644
index 0000000000..9c1ce0b26f
--- /dev/null
+++ b/connect/tests/connect_integration/Cargo.toml
@@ -0,0 +1,18 @@
+[package]
+name = "connect_integration"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
+clap = { workspace = true }
+connect_client = { path = "../../crates/connect_client" }
+connect_registry = { path = "../../crates/connect_registry" }
+reqwest = { workspace = true }
+rmcp = { workspace = true, features = ["auth"] }
+serde_json = { workspace = true }
+tokio = { workspace = true }
+url = { workspace = true }
+uuid = { workspace = true }
+workspace-hack = { version = "0.1", path = "../../../crates/workspace-hack" }
+zeroize = { workspace = true }
diff --git a/connect/tests/connect_integration/src/main.rs b/connect/tests/connect_integration/src/main.rs
new file mode 100644
index 0000000000..05c4db2ca7
--- /dev/null
+++ b/connect/tests/connect_integration/src/main.rs
@@ -0,0 +1,431 @@
+//! Run opt-in checks against a live Connect API.
+
+use std::{collections::BTreeSet, process::ExitCode, time::Duration};
+
+use clap::Parser;
+use connect_client::{
+ ConnectClient,
+ wire::{ConnectSessionRequest, ErrorResponse, McpErrorResponse},
+};
+use connect_registry::{ClientRegistration, Status, all_apps};
+use reqwest::{Client, StatusCode, header};
+use rmcp::transport::auth::AuthorizationManager;
+use url::Url;
+use uuid::Uuid;
+use zeroize::Zeroizing;
+
+#[derive(Parser)]
+struct Args {
+ #[arg(long)]
+ base_url: Url,
+ #[arg(long)]
+ customer_key: String,
+ #[arg(long)]
+ redirect_origin: Url,
+ #[arg(long)]
+ follow_vendor: bool,
+}
+
+type Check = Result<(), String>;
+
+fn record(failures: &mut usize, name: &str, result: Check) {
+ match result {
+ Ok(()) => println!("PASS {name}: ok"),
+ Err(reason) => {
+ println!("FAIL {name}: {reason}");
+ *failures += 1;
+ }
+ }
+}
+
+fn route(base: &Url, path: &str) -> Url {
+ base.join(path).expect("fixed route is a valid URL")
+}
+
+fn query_value<'a>(url: &'a Url, name: &str) -> Option<std::borrow::Cow<'a, str>> {
+ url.query_pairs()
+ .find_map(|(key, value)| (key == name).then_some(value))
+}
+
+#[tokio::main]
+async fn main() -> ExitCode {
+ let args = Args::parse();
+ let customer_key = Zeroizing::new(args.customer_key);
+ let base = args.base_url;
+ let redirect_origin = args.redirect_origin;
+ if !matches!(base.scheme(), "http" | "https")
+ || base.path() != "/"
+ || base.query().is_some()
+ || base.fragment().is_some()
+ || !matches!(redirect_origin.scheme(), "http" | "https")
+ || redirect_origin.path() != "/"
+ || redirect_origin.query().is_some()
+ || redirect_origin.fragment().is_some()
+ {
+ eprintln!("base URL and redirect origin must be HTTP(S) origins");
+ return ExitCode::FAILURE;
+ }
+ if args.follow_vendor && base.scheme() != "https" {
+ eprintln!("--follow-vendor requires a public HTTPS base URL");
+ return ExitCode::FAILURE;
+ }
+ let http = match Client::builder()
+ .timeout(Duration::from_secs(30))
+ .redirect(reqwest::redirect::Policy::none())
+ .build()
+ {
+ Ok(http) => http,
+ Err(error) => {
+ eprintln!("HTTP client setup failed: {error}");
+ return ExitCode::FAILURE;
+ }
+ };
+ let client = match ConnectClient::new(base.as_str(), customer_key.as_str()) {
+ Ok(client) => client,
+ Err(error) => {
+ eprintln!("Connect client setup failed: {error}");
+ return ExitCode::FAILURE;
+ }
+ };
+ let user_id = Uuid::now_v7().to_string();
+ let redirect_url = route(&redirect_origin, "connect-integration/callback").to_string();
+ let mut failures = 0;
+
+ record(
+ &mut failures,
+ "health",
+ async {
+ let response = http
+ .get(route(&base, "health"))
+ .send()
+ .await
+ .map_err(|e| e.to_string())?;
+ (response.status() == StatusCode::OK)
+ .then_some(())
+ .ok_or_else(|| format!("expected 200, got {}", response.status()))
+ }
+ .await,
+ );
+
+ let apps = match all_apps() {
+ Ok(apps) => apps,
+ Err(error) => {
+ record(&mut failures, "catalog", Err(error.to_string()));
+ return ExitCode::FAILURE;
+ }
+ };
+ let live: Vec<_> = apps
+ .iter()
+ .filter(|app| app.status == Status::Live)
+ .collect();
+ record(
+ &mut failures,
+ "catalog",
+ async {
+ let entries = client.catalog().await.map_err(|e| e.to_string())?;
+ let expected: BTreeSet<_> = live.iter().map(|app| app.id.as_str()).collect();
+ let actual: BTreeSet<_> = entries.iter().map(|entry| entry.id.as_str()).collect();
+ if actual != expected || entries.len() != expected.len() {
+ return Err(format!(
+ "live app IDs differ: expected {expected:?}, got {actual:?}"
+ ));
+ }
+ for entry in entries {
+ if let Some(icon_url) = entry.icon_url {
+ let url = base
+ .join(&icon_url)
+ .map_err(|e| format!("{} icon URL: {e}", entry.id))?;
+ let response = http.get(url).send().await.map_err(|e| e.to_string())?;
+ if response.status() != StatusCode::OK
+ || !response
+ .headers()
+ .get(header::CONTENT_TYPE)
+ .is_some_and(|value| {
+ value
+ .to_str()
+ .is_ok_and(|value| value.starts_with("image/svg+xml"))
+ })
+ {
+ return Err(format!(
+ "{} icon is not served as SVG: {}",
+ entry.id,
+ response.status()
+ ));
+ }
+ let body = response.text().await.map_err(|e| e.to_string())?;
+ if !body.contains("<svg") {
+ return Err(format!("{} icon response has no SVG element", entry.id));
+ }
+ }
+ }
+ Ok(())
+ }
+ .await,
+ );
+
+ record(
+ &mut failures,
+ "auth",
+ async {
+ let path = format!("v1/users/{user_id}/connections");
+ for authorization in [None, Some("Bearer ck_invalid")] {
+ let mut request = http.get(route(&base, &path));
+ if let Some(value) = authorization {
+ request = request.header(header::AUTHORIZATION, value);
+ }
+ let response = request.send().await.map_err(|e| e.to_string())?;
+ if response.status() != StatusCode::UNAUTHORIZED {
+ return Err(format!(
+ "missing or wrong key got {} instead of 401",
+ response.status()
+ ));
+ }
+ }
+ Ok(())
+ }
+ .await,
+ );
+
+ record(
+ &mut failures,
+ "connections_empty",
+ async {
+ let connections = client
+ .connections(&user_id)
+ .await
+ .map_err(|e| e.to_string())?;
+ if !connections.is_empty() {
+ return Err(format!("fresh user has {} connections", connections.len()));
+ }
+ match client.delete_connection(&user_id, "missing-app").await {
+ Err(connect_client::Error::NotConnected) => Ok(()),
+ Ok(_) => {
+ Err("deleting missing connection succeeded; expected 404 not_found".into())
+ }
+ Err(error) => Err(format!("deleting missing connection: {error}")),
+ }
+ }
+ .await,
+ );
+
+ record(
+ &mut failures,
+ "client_metadata",
+ async {
+ let response = http
+ .get(route(&base, "v1/oauth/client-metadata.json"))
+ .send()
+ .await
+ .map_err(|e| e.to_string())?;
+ if response.status() != StatusCode::OK {
+ return Err(format!("expected 200, got {}", response.status()));
+ }
+ let metadata: serde_json::Value = response.json().await.map_err(|e| e.to_string())?;
+ let client_id = route(&base, "v1/oauth/client-metadata.json").to_string();
+ let callback = route(&base, "v1/oauth/callback").to_string();
+ if metadata["client_id"] != client_id
+ || metadata["redirect_uris"] != serde_json::json!([callback])
+ {
+ return Err("client_id or redirect_uris do not use base URL".into());
+ }
+ if metadata["response_types"] != serde_json::json!(["code"])
+ || metadata["token_endpoint_auth_method"] != "none"
+ {
+ return Err("OAuth client metadata is incomplete".into());
+ }
+ Ok(())
+ }
+ .await,
+ );
+
+ record(
+ &mut failures,
+ "session_rules",
+ async {
+ for (app_id, redirect_url, status, code) in [
+ (
+ live.first().ok_or("registry has no live apps")?.id.as_str(),
+ "https://outside.example/callback",
+ StatusCode::BAD_REQUEST,
+ "redirect_origin_not_allowed",
+ ),
+ (
+ "unknown-app",
+ redirect_url.as_str(),
+ StatusCode::BAD_REQUEST,
+ "app_not_live",
+ ),
+ ] {
+ let response = http
+ .post(route(&base, "v1/connect-sessions"))
+ .bearer_auth(customer_key.as_str())
+ .json(&ConnectSessionRequest {
+ external_user_id: user_id.clone(),
+ app_id: app_id.to_owned(),
+ redirect_url: redirect_url.to_owned(),
+ })
+ .send()
+ .await
+ .map_err(|e| e.to_string())?;
+ let actual_status = response.status();
+ let body: ErrorResponse = response.json().await.map_err(|e| e.to_string())?;
+ if actual_status != status || body.error != code {
+ return Err(format!(
+ "{app_id}: expected {status} {code}, got {actual_status} {}",
+ body.error
+ ));
+ }
+ }
+ Ok(())
+ }
+ .await,
+ );
+
+ for app in &live {
+ let name = format!("authorize_{}", app.id);
+ record(
+ &mut failures,
+ &name,
+ async {
+ let session = client
+ .create_connect_session(&user_id, app.id.as_str(), &redirect_url)
+ .await
+ .map_err(|e| e.to_string())?;
+ let connect_url = Url::parse(&session.connect_url).map_err(|e| e.to_string())?;
+ if connect_url.origin() != base.origin()
+ || !connect_url.path().starts_with("/v1/connect/")
+ {
+ return Err("connect_url does not point to this Connect host".into());
+ }
+ let response = http
+ .get(connect_url)
+ .send()
+ .await
+ .map_err(|e| e.to_string())?;
+ if response.status() != StatusCode::SEE_OTHER {
+ return Err(format!("expected 303, got {}", response.status()));
+ }
+ let location = response
+ .headers()
+ .get(header::LOCATION)
+ .ok_or("missing Location")?
+ .to_str()
+ .map_err(|e| e.to_string())?;
+ let authorization = Url::parse(location).map_err(|e| e.to_string())?;
+ let manager = AuthorizationManager::new(&app.mcp_url)
+ .await
+ .map_err(|e| e.to_string())?;
+ let metadata = manager
+ .discover_metadata()
+ .await
+ .map_err(|e| e.to_string())?;
+ let expected_endpoint =
+ Url::parse(&metadata.authorization_endpoint).map_err(|e| e.to_string())?;
+ if authorization.origin() != expected_endpoint.origin()
+ || authorization.path() != expected_endpoint.path()
+ {
+ return Err("redirect does not target vendor authorization endpoint".into());
+ }
+ let callback = route(&base, "v1/oauth/callback");
+ for (key, expected) in [
+ ("response_type", "code"),
+ ("code_challenge_method", "S256"),
+ ("redirect_uri", callback.as_str()),
+ ] {
+ if query_value(&authorization, key).as_deref() != Some(expected) {
+ return Err(format!("missing or incorrect {key}"));
+ }
+ }
+ let challenge = query_value(&authorization, "code_challenge")
+ .ok_or("missing code_challenge")?;
+ if challenge.len() != 43
+ || !challenge
+ .bytes()
+ .all(|byte| byte.is_ascii_alphanumeric() || byte == b'-' || byte == b'_')
+ {
+ return Err("invalid PKCE S256 challenge".into());
+ }
+ if query_value(&authorization, "state").is_none_or(|value| value.is_empty()) {
+ return Err("missing state".into());
+ }
+ let client_id =
+ query_value(&authorization, "client_id").ok_or("missing client_id")?;
+ match app.client_registration {
+ ClientRegistration::Cimd => {
+ if client_id != route(&base, "v1/oauth/client-metadata.json").as_str() {
+ return Err("CIMD client_id does not match Connect metadata URL".into());
+ }
+ }
+ _ => {
+ return Err(
+ "client_id assertion requires an expected ID for this registration"
+ .into(),
+ );
+ }
+ }
+ if args.follow_vendor {
+ let vendor_response = http
+ .get(authorization)
+ .send()
+ .await
+ .map_err(|e| e.to_string())?;
+ if !vendor_response.status().is_success()
+ && !vendor_response.status().is_redirection()
+ {
+ return Err(format!(
+ "vendor returned OAuth error status {}",
+ vendor_response.status()
+ ));
+ }
+ if let Some(location) = vendor_response.headers().get(header::LOCATION) {
+ let location = location.to_str().map_err(|e| e.to_string())?;
+ let url = vendor_response
+ .url()
+ .join(location)
+ .map_err(|e| e.to_string())?;
+ if query_value(&url, "error").is_some() {
+ return Err("vendor redirect contains OAuth error".into());
+ }
+ }
+ if query_value(vendor_response.url(), "error").is_some() {
+ return Err("vendor response contains OAuth error".into());
+ }
+ }
+ Ok(())
+ }
+ .await,
+ );
+ }
+
+ record(
+ &mut failures,
+ "gateway_unconnected",
+ async {
+ let app_id = live.first().ok_or("registry has no live apps")?.id.as_str();
+ let upstream = client.mcp_upstream(&user_id, app_id);
+ let response = http
+ .get(upstream.url.clone())
+ .bearer_auth(&upstream.bearer_token)
+ .send()
+ .await
+ .map_err(|e| e.to_string())?;
+ let status = response.status();
+ let body: McpErrorResponse = response.json().await.map_err(|e| e.to_string())?;
+ if status != StatusCode::NOT_FOUND || body.error != "not_found" || body.app_id != app_id
+ {
+ return Err(format!(
+ "expected 404 not_found for {app_id}, got {status} {}",
+ body.error
+ ));
+ }
+ Ok(())
+ }
+ .await,
+ );
+
+ if failures == 0 {
+ ExitCode::SUCCESS
+ } else {
+ ExitCode::FAILURE
+ }
+}
diff --git a/connect/tooling/browser/entrypoint.sh b/connect/tooling/browser/entrypoint.sh
new file mode 100755
index 0000000000..5b5a04630a
--- /dev/null
+++ b/connect/tooling/browser/entrypoint.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# Macro Connect's own browser: the shared agent browser's entrypoint
+# (docker/headless-chrome/entrypoint.sh) on separate ports, with a profile
+# that only ever holds the [email protected] sessions.
+# Chromium on a virtual display, watchable over noVNC, driveable over CDP.
+# Runs with host networking (see docker-compose.yml); everything binds
+# loopback deliberately — CDP controls a browser that may hold logged-in
+# sessions and noVNC has no password, so nothing listens beyond the host.
+# :98 Xvfb virtual display
+# 5901 x11vnc (loopback)
+# 6081 noVNC web client (http://localhost:6081/vnc.html)
+# 9333 CDP (Chrome binds loopback; host networking makes that the host's)
+set -euo pipefail
+
+WIDTH="${SCREEN_WIDTH:-1600}"
+HEIGHT="${SCREEN_HEIGHT:-1000}"
+export DISPLAY=:98
+
+# A container *restart* keeps /tmp; a stale lock makes Xvfb refuse to start.
+rm -f /tmp/.X98-lock /tmp/.X11-unix/X98
+
+Xvfb :98 -screen 0 "${WIDTH}x${HEIGHT}x24" -nolisten tcp &
+for _ in $(seq 1 50); do
+ [ -e /tmp/.X11-unix/X98 ] && break
+ sleep 0.1
+done
+[ -e /tmp/.X11-unix/X98 ] || {
+ echo "Xvfb failed to start" >&2
+ exit 1
+}
+
+x11vnc -display :98 -listen 127.0.0.1 -rfbport 5901 -nopw -forever -shared -quiet -bg
+websockify --web /usr/share/novnc 127.0.0.1:6081 127.0.0.1:5901 &
+
+# Chromium is the foreground process: if it dies, the container exits and the
+# restart policy brings the whole display stack back. (A backgrounded browser
+# would leave the container "healthy" with nothing behind the CDP port.)
+# Not --headless: rendering to the Xvfb display is what makes the session
+# watchable. Agent-opened tabs all land in this one window.
+exec chromium \
+ --disable-dev-shm-usage \
+ --no-first-run \
+ --disable-session-crashed-bubble \
+ --window-size="${WIDTH},${HEIGHT}" \
+ --window-position=0,0 \
+ --remote-debugging-port=9333 \
+ --remote-allow-origins='*' \
+ --user-data-dir=/data/chrome-profile \
+ about:blank
diff --git a/connect/tooling/browser/run.sh b/connect/tooling/browser/run.sh
new file mode 100755
index 0000000000..5283ac7fda
--- /dev/null
+++ b/connect/tooling/browser/run.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+# Start (or restart) Macro Connect's browser: Chromium signed in only as
+# [email protected]. Same image as the shared agent browser, different ports
+# and a dedicated profile volume. Loopback only; watch over SSH:
+# ssh -L 6081:localhost:6081 <host> then open http://localhost:6081/vnc.html
+# Agents drive it over CDP at http://localhost:9333.
+set -euo pipefail
+here="$(cd "$(dirname "$0")" && pwd)"
+docker rm -f macro-connect-browser >/dev/null 2>&1 || true
+docker run -d --name macro-connect-browser --restart unless-stopped --init \
+ --network host --cap-add SYS_ADMIN \
+ -v macro-connect-browser-profile:/data \
+ -v "$here/entrypoint.sh:/entrypoint.sh:ro" \
+ macro-local-headless-chrome:dev
diff --git a/connect/tooling/builder-brief.md b/connect/tooling/builder-brief.md
new file mode 100644
index 0000000000..99651abd71
--- /dev/null
+++ b/connect/tooling/builder-brief.md
@@ -0,0 +1,24 @@
+You are a builder for Macro Connect, working in a git worktree of Macro's
+monorepo on your own branch. Your task spec is named at the end of this brief.
+
+1. Read `AGENTS.md` at the repository root, `connect/AGENTS.md`,
+ `CODING.md`, and your task spec. Read the `AGENTS.md` of every directory you
+ change and the rules in `.agents/rules/` that match the files you touch.
+2. Do exactly what the spec's "Do" section says. When the spec leaves a product
+ decision open, stop and write the question in the spec's Result instead of
+ choosing.
+3. Run Rust and repo tooling inside `nix develop --command ...`. Inside that
+ shell, export `CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"` and, for crates
+ with SQLx queries, `DATABASE_URL="$CONNECT_DATABASE_URL"` (the shell
+ overrides both otherwise).
+4. Leave your changes uncommitted: the sandbox keeps `.git` read-only, and the
+ planner commits after review. Never push, deploy, use `git stash`, read or
+ print secrets, or touch production.
+5. Run every check in the spec's "Done when" and `just check`. Fix failures at
+ their cause.
+6. Fill the spec's Result: what changed (files), each check with its exact
+ outcome, and open questions. Propose commit messages (Conventional Commit
+ title, Why / What body) for each logical piece. `connect/STATUS.md` belongs
+ to the planner; report through the Result only.
+
+Task spec:
diff --git a/connect/tooling/dispatch.sh b/connect/tooling/dispatch.sh
new file mode 100755
index 0000000000..41cd5dbea1
--- /dev/null
+++ b/connect/tooling/dispatch.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+# Dispatch a Macro Connect task spec to a builder (GPT-6-Sol, Fast tier, via
+# Codex) in its own worktree and branch. See connect/docs/building.md.
+#
+# Usage: connect/tooling/dispatch.sh connect/tasks/T001-slug.md [base-ref]
+# Run again on the same spec to resume in the existing worktree after adding a
+# "Review (planner)" section to the spec there.
+#
+# Environment:
+# CONNECT_WORKTREES where worktrees go (default: <repo>/../connect-worktrees)
+# CONNECT_CARGO_TARGET_DIR shared cargo target dir the builder may write
+# CONNECT_DATABASE_URL migrated local Postgres for SQLx macros
+set -euo pipefail
+
+root="$(git rev-parse --show-toplevel)"
+spec="$(realpath --relative-to="$root" "$1")"
+base="${2:-HEAD}"
+id="$(basename "$spec" .md)"
+worktrees="${CONNECT_WORKTREES:-$root/../connect-worktrees}"
+dir="$worktrees/$id"
+
+[[ -d "$dir" ]] || git -C "$root" cat-file -e "$base:$spec" || {
+ echo "$spec is not committed at $base; commit the spec before dispatching" >&2
+ exit 1
+}
+prompt_tail=""
+if [[ -d "$dir" ]]; then
+ # Resume: the builder continues in its existing worktree after the planner
+ # added a "Review (planner)" section to the spec there.
+ prompt_tail=" You already worked on this task in this worktree (the uncommitted changes are yours). Apply the spec's \"Review (planner)\" section, finish, and replace the Result with final outcomes."
+else
+ mkdir -p "$worktrees"
+ git -C "$root" worktree add -b "connect/$id" "$dir" "$base"
+fi
+
+writable=()
+if [[ -n "${CONNECT_CARGO_TARGET_DIR:-}" ]]; then
+ writable=(-c "sandbox_workspace_write.writable_roots=[\"$CONNECT_CARGO_TARGET_DIR\"]")
+fi
+
+CONNECT_CARGO_TARGET_DIR="${CONNECT_CARGO_TARGET_DIR:-$dir/target}" \
+CONNECT_DATABASE_URL="${CONNECT_DATABASE_URL:-}" \
+codex exec \
+ -m gpt-6-sol -c 'service_tier="priority"' \
+ -s workspace-write -c sandbox_workspace_write.network_access=true \
+ "${writable[@]}" \
+ -C "$dir" --json \
+ "$(cat "$root/connect/tooling/builder-brief.md") $spec$prompt_tail" \
+ >>"$dir.log" 2>&1
+
+echo "builder finished: branch connect/$id, log $dir.log"
diff --git a/connect/tooling/integration.sh b/connect/tooling/integration.sh
new file mode 100755
index 0000000000..7e02c4959b
--- /dev/null
+++ b/connect/tooling/integration.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+set -euo pipefail
+if [[ -n "${CONNECT_CARGO_TARGET_DIR:-}" ]]; then
+ export CARGO_TARGET_DIR="$CONNECT_CARGO_TARGET_DIR"
+fi
+
+if [[ $# -ne 1 ]]; then
+ echo "usage: $0 local|dev" >&2
+ exit 2
+fi
+
+case "$1" in
+ local)
+ compose=(docker compose -p connect-integration -f connect/docker-compose.yml)
+ cleanup() { "${compose[@]}" down; }
+ trap cleanup EXIT
+ "${compose[@]}" up -d --build
+ customer_output=$("${compose[@]}" run --rm api create-customer integration --redirect-origin http://localhost:3000)
+ if ! customer_key=$(printf '%s\n' "$customer_output" | rg -m 1 '^ck_[0-9a-f-]{36}_[A-Za-z0-9_-]{43}$'); then
+ echo "create-customer did not return a customer key" >&2
+ exit 1
+ fi
+ unset customer_output
+ cargo run --quiet -p connect_integration -- \
+ --base-url "http://localhost:${CONNECT_PORT:-8080}" \
+ --customer-key "$customer_key" \
+ --redirect-origin http://localhost:3000
+ ;;
+ dev)
+ if [[ -z "${CONNECT_IT_CUSTOMER_KEY:-}" ]]; then
+ echo "CONNECT_IT_CUSTOMER_KEY is required" >&2
+ exit 2
+ fi
+ cargo run --quiet -p connect_integration -- \
+ --base-url https://connect-dev.macro.com \
+ --customer-key "$CONNECT_IT_CUSTOMER_KEY" \
+ --redirect-origin http://localhost:3000 \
+ --follow-vendor
+ ;;
+ *)
+ echo "usage: $0 local|dev" >&2
+ exit 2
+ ;;
+esac
diff --git a/crates/workspace-hack/Cargo.toml b/crates/workspace-hack/Cargo.toml
index 0b9d7dfc99..57369bc881 100644
--- a/crates/workspace-hack/Cargo.toml
+++ b/crates/workspace-hack/Cargo.toml
@@ -157,6 +157,7 @@ tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "net",
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12"] }
tokio-stream = { version = "0.1", features = ["fs"] }
tokio-util = { version = "0.7", features = ["codec", "compat", "io", "rt"] }
+toml_edit = { version = "0.22", features = ["serde"] }
tower = { version = "0.5", default-features = false, features = ["balance", "buffer", "limit", "load-shed", "log"] }
tower-http = { version = "0.6", features = ["compression-gzip", "cors", "fs", "limit", "request-id", "timeout", "trace", "util"] }
tracing = { version = "0.1", features = ["log"] }
@@ -326,6 +327,7 @@ tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "net",
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12"] }
tokio-stream = { version = "0.1", features = ["fs"] }
tokio-util = { version = "0.7", features = ["codec", "compat", "io", "rt"] }
+toml_edit = { version = "0.22", features = ["serde"] }
tower = { version = "0.5", default-features = false, features = ["balance", "buffer", "limit", "load-shed", "log"] }
tower-http = { version = "0.6", features = ["compression-gzip", "cors", "fs", "limit", "request-id", "timeout", "trace", "util"] }
tracing = { version = "0.1", features = ["log"] }
diff --git a/deny.toml b/deny.toml
index f782db290a..acc1c7d569 100644
--- a/deny.toml
+++ b/deny.toml
@@ -212,6 +212,7 @@ deny = [
{ crate = "webpki-roots:>0.26.11, <1.0.10", reason = "Contains distrusted emSign roots (RUSTSEC-2026-0381)" },
{ crate = "aws-config", wrappers = [
"aws-msk-iam-sasl-signer", # External crate, requires aws-config directly
+ "connect_platform", # Connect's platform crate; Connect may not depend on Macro's wrappers
"macro_aws_config",
"workspace-hack", # cargo-hakari generated crate
], reason = "Use macro_aws_config for AWS configuration in workspace crates" },
@@ -223,6 +224,7 @@ deny = [
"ai_billing", # Background usage span propagation tests only
"ai_toolset", # GenAI span tests
"channels", # Dev logging only
+ "connect_platform", # Connect's platform crate; Connect may not depend on Macro's wrappers
"coding_agent_worker", # Standalone daemon logging setup
"cursor_cloud_agents", # Standalone ACP binary logging; stdout is the protocol, so macro_entrypoint cannot own it
"dictation", # Metadata tracing and content-redaction tests only
diff --git a/rules/ast-grep/rust-connect-public-client.yml b/rules/ast-grep/rust-connect-public-client.yml
new file mode 100644
index 0000000000..53c30ef0a3
--- /dev/null
+++ b/rules/ast-grep/rust-connect-public-client.yml
@@ -0,0 +1,17 @@
+id: rust-connect-public-client
+language: rust
+severity: error
+message: Macro reaches Macro Connect only through `connect_client`, as any customer would.
+note: |-
+ Macro Connect (connect/) is a separate product built as if it lived in its
+ own repository. Call its public client crate `connect_client`; if it lacks
+ what you need, add it there. See connect/AGENTS.md#boundary.
+files:
+ - crates/**
+ - services/**
+ - tooling/**
+rule:
+ kind: use_declaration
+ regex: ^(pub(\([^)]*\))? )?use (::)?connect_
+ not:
+ regex: ^(pub(\([^)]*\))? )?use (::)?connect_client\b
diff --git a/rules/ast-grep/rust-connect-self-contained.yml b/rules/ast-grep/rust-connect-self-contained.yml
new file mode 100644
index 0000000000..d0146d8987
--- /dev/null
+++ b/rules/ast-grep/rust-connect-self-contained.yml
@@ -0,0 +1,14 @@
+id: rust-connect-self-contained
+language: rust
+severity: error
+message: Macro Connect code does not use Macro crates; copy what you need into a connect_* crate.
+note: |-
+ Macro Connect (connect/) is a separate product built as if it lived in its
+ own repository. It depends on connect_* crates and third-party libraries
+ only. This rule catches the common Macro crates; the Cargo dependency check
+ is the complete one. See connect/AGENTS.md#boundary.
+files:
+ - connect/**
+rule:
+ kind: use_declaration
+ regex: ^(pub(\([^)]*\))? )?use (::)?(macro_[a-z0-9_]+|mcp_client|mcp_select|pipedream_mcp|model_error_response|workspace_hack)\b
diff --git a/rules/ast-grep/ts-connect-public-sdk.yml b/rules/ast-grep/ts-connect-public-sdk.yml
new file mode 100644
index 0000000000..c2e388932b
--- /dev/null
+++ b/rules/ast-grep/ts-connect-public-sdk.yml
@@ -0,0 +1,27 @@
+id: ts-connect-public-sdk
+language: typescript
+severity: error
+message: Macro reaches Macro Connect only through `@macro-connect/sdk`, as any customer would.
+note: |-
+ Macro Connect (connect/) is a separate product built as if it lived in its
+ own repository. Import its public SDK; if it lacks what you need, add it
+ there. See connect/AGENTS.md#boundary.
+files:
+ - apps/**
+ - packages/**
+rule:
+ kind: string
+ all:
+ - any:
+ - all:
+ - regex: ^['"]@macro-connect/
+ - not:
+ regex: ^['"]@macro-connect/sdk(['"/])
+ - regex: ^['"](\.\./)+connect/
+ - any:
+ - inside:
+ kind: import_statement
+ field: source
+ - inside:
+ kind: export_statement
+ field: source
diff --git a/rules/ast-grep/ts-connect-self-contained.yml b/rules/ast-grep/ts-connect-self-contained.yml
new file mode 100644
index 0000000000..65233343d4
--- /dev/null
+++ b/rules/ast-grep/ts-connect-self-contained.yml
@@ -0,0 +1,24 @@
+id: ts-connect-self-contained
+language: typescript
+severity: error
+message: Macro Connect code does not import Macro packages or the Macro web app; copy what you need into connect/.
+note: |-
+ Macro Connect (connect/) is a separate product built as if it lived in its
+ own repository. It imports @macro-connect/* packages, its own files, and
+ third-party libraries only. See connect/AGENTS.md#boundary.
+files:
+ - connect/**
+rule:
+ kind: string
+ all:
+ - any:
+ - regex: ^['"]@macro-inc/
+ - regex: ^['"]@(app|core|ui|design|theme|icon|queries|entity|property|filesystem|notifications|channel|animate|graphql-cache|phosphor|phosphor-fill|ai-ops|components|block-[a-z]+|service-[a-z-]+)(/|['"])
+ - regex: ^['"](\.\./)+(apps|packages|crates|services|infra)/
+ - any:
+ - inside:
+ kind: import_statement
+ field: source
+ - inside:
+ kind: export_statement
+ field: source
diff --git a/rules/ast-grep/tsx-connect-public-sdk.yml b/rules/ast-grep/tsx-connect-public-sdk.yml
new file mode 100644
index 0000000000..71b09859ad
--- /dev/null
+++ b/rules/ast-grep/tsx-connect-public-sdk.yml
@@ -0,0 +1,27 @@
+id: tsx-connect-public-sdk
+language: tsx
+severity: error
+message: Macro reaches Macro Connect only through `@macro-connect/sdk`, as any customer would.
+note: |-
+ Macro Connect (connect/) is a separate product built as if it lived in its
+ own repository. Import its public SDK; if it lacks what you need, add it
+ there. See connect/AGENTS.md#boundary.
+files:
+ - apps/**
+ - packages/**
+rule:
+ kind: string
+ all:
+ - any:
+ - all:
+ - regex: ^['"]@macro-connect/
+ - not:
+ regex: ^['"]@macro-connect/sdk(['"/])
+ - regex: ^['"](\.\./)+connect/
+ - any:
+ - inside:
+ kind: import_statement
+ field: source
+ - inside:
+ kind: export_statement
+ field: source
diff --git a/rules/ast-grep/tsx-connect-self-contained.yml b/rules/ast-grep/tsx-connect-self-contained.yml
new file mode 100644
index 0000000000..f8efab3401
--- /dev/null
+++ b/rules/ast-grep/tsx-connect-self-contained.yml
@@ -0,0 +1,24 @@
+id: tsx-connect-self-contained
+language: tsx
+severity: error
+message: Macro Connect code does not import Macro packages or the Macro web app; copy what you need into connect/.
+note: |-
+ Macro Connect (connect/) is a separate product built as if it lived in its
+ own repository. It imports @macro-connect/* packages, its own files, and
+ third-party libraries only. See connect/AGENTS.md#boundary.
+files:
+ - connect/**
+rule:
+ kind: string
+ all:
+ - any:
+ - regex: ^['"]@macro-inc/
+ - regex: ^['"]@(app|core|ui|design|theme|icon|queries|entity|property|filesystem|notifications|channel|animate|graphql-cache|phosphor|phosphor-fill|ai-ops|components|block-[a-z]+|service-[a-z-]+)(/|['"])
+ - regex: ^['"](\.\./)+(apps|packages|crates|services|infra)/
+ - any:
+ - inside:
+ kind: import_statement
+ field: source
+ - inside:
+ kind: export_statement
+ field: source
diff --git a/tooling/just/check.just b/tooling/just/check.just
index 8d6603744a..4452bc7a93 100644
--- a/tooling/just/check.just
+++ b/tooling/just/check.just
@@ -28,10 +28,10 @@ check *ARGS:
| while IFS= read -r f; do [ -f "$f" ] && printf '%s\n' "$f"; done)
if [ -z "$changed" ]; then echo "no changed files — nothing to check"; exit 0; fi
- rs=$(grep -E '^(crates|services|tooling)/.*\.rs$' <<<"$changed" || true)
+ rs=$(grep -E '^(connect|crates|services|tooling)/.*\.rs$' <<<"$changed" || true)
# Match the SDK and collaboration Biome configs: preserve generator output verbatim.
js=$(grep -E '^(apps/(web|marketing)|packages|services/(analytics-proxy|ai-editing-worker|lexical-service|websocket-service))/.*\.(ts|tsx)$' <<<"$changed" | grep -Ev '^packages/(sdk/generated|collaboration/src/sync-service/generated)/' || true)
- sg=$(grep -E '^(apps|crates|packages|services|tooling)/.*\.(rs|ts|tsx|plist)$' <<<"$changed" || true)
+ sg=$(grep -E '^(apps|connect|crates|packages|services|tooling)/.*\.(rs|ts|tsx|plist)$' <<<"$changed" || true)
fail=0
if [ -n "$rs" ]; then
diff --git a/tooling/pii/exceptions b/tooling/pii/exceptions
index 76fa186c4a..9fbe716a85 100644
--- a/tooling/pii/exceptions
+++ b/tooling/pii/exceptions
@@ -8,3 +8,5 @@
# @example-corp.com any email at that domain
#
# Prefer placeholders ([email protected]) over exceptions.
+# Box partner team, the published contact for MCP listings (connect/submissions/box.md).
diff --git a/tooling/xtask/crates/xtask_deps/src/boundary.rs b/tooling/xtask/crates/xtask_deps/src/boundary.rs
new file mode 100644
index 0000000000..f045a34d6f
--- /dev/null
+++ b/tooling/xtask/crates/xtask_deps/src/boundary.rs
@@ -0,0 +1,89 @@
+//! Checks the Cargo dependency boundary around Macro Connect.
+
+use std::path::Path;
+
+use anyhow::{Context, Result, bail};
+use guppy::graph::PackageGraph;
+
+fn under_connect(path: &Path) -> bool {
+ path.starts_with("connect")
+}
+
+/// Returns every boundary violation for a workspace package and its direct
+/// workspace dependencies. Manifest paths are relative to the workspace root.
+fn violations<'a>(
+ name: &str,
+ manifest_path: &Path,
+ dependencies: impl IntoIterator<Item = (&'a str, &'a Path)>,
+) -> Vec<String> {
+ let in_connect = under_connect(manifest_path);
+ let mut violations = Vec::new();
+
+ if in_connect && !name.starts_with("connect_") {
+ violations.push(format!(
+ "{name} -> {name}: package under connect/ must be named connect_*"
+ ));
+ }
+
+ for (dependency, dependency_path) in dependencies {
+ if in_connect && !under_connect(dependency_path) && dependency != "workspace-hack" {
+ violations.push(format!(
+ "{name} -> {dependency}: connect/ package depends on a Macro workspace package"
+ ));
+ } else if !in_connect && under_connect(dependency_path) && dependency != "connect_client" {
+ violations.push(format!(
+ "{name} -> {dependency}: Macro package depends on a non-client connect/ package"
+ ));
+ }
+ }
+
+ violations
+}
+
+pub fn check(graph: &PackageGraph) -> Result<()> {
+ let root = graph.workspace().root();
+ let mut all_violations = Vec::new();
+
+ for package in graph.workspace().iter() {
+ let manifest_path = package
+ .manifest_path()
+ .strip_prefix(root)
+ .with_context(|| {
+ format!("{} is outside the workspace root", package.manifest_path())
+ })?;
+ let dependencies = package
+ .direct_links()
+ .filter(|link| link.to().in_workspace())
+ .map(|link| {
+ let dependency = link.to();
+ let path = dependency
+ .manifest_path()
+ .strip_prefix(root)
+ .with_context(|| {
+ format!(
+ "{} is outside the workspace root",
+ dependency.manifest_path()
+ )
+ })?;
+ Ok((dependency.name(), path.as_std_path()))
+ })
+ .collect::<Result<Vec<_>>>()?;
+
+ all_violations.extend(violations(
+ package.name(),
+ manifest_path.as_std_path(),
+ dependencies,
+ ));
+ }
+
+ if !all_violations.is_empty() {
+ bail!(
+ "Macro Connect Cargo boundary violations:\n{}",
+ all_violations.join("\n")
+ );
+ }
+ Ok(())
+}
+
+#[cfg(test)]
+mod test;
diff --git a/tooling/xtask/crates/xtask_deps/src/boundary/test.rs b/tooling/xtask/crates/xtask_deps/src/boundary/test.rs
new file mode 100644
index 0000000000..7e60df6f05
--- /dev/null
+++ b/tooling/xtask/crates/xtask_deps/src/boundary/test.rs
@@ -0,0 +1,85 @@
+use std::path::Path;
+
+use super::violations;
+
+#[test]
+fn allows_connect_dependencies_and_the_hakari_exemption() {
+ assert!(
+ violations(
+ "connect_api",
+ Path::new("connect/services/connect_api/Cargo.toml"),
+ [
+ (
+ "connect_registry",
+ Path::new("connect/crates/connect_registry/Cargo.toml")
+ ),
+ (
+ "workspace-hack",
+ Path::new("crates/workspace-hack/Cargo.toml")
+ ),
+ ],
+ )
+ .is_empty()
+ );
+}
+
+#[test]
+fn rejects_connect_dependency_on_macro_crate() {
+ assert_eq!(
+ violations(
+ "connect_api",
+ Path::new("connect/services/connect_api/Cargo.toml"),
+ [("macro_auth", Path::new("crates/macro_auth/Cargo.toml"))],
+ ),
+ ["connect_api -> macro_auth: connect/ package depends on a Macro workspace package"]
+ );
+}
+
+#[test]
+fn allows_macro_dependency_on_connect_client() {
+ assert!(
+ violations(
+ "macro_api",
+ Path::new("services/macro_api/Cargo.toml"),
+ [(
+ "connect_client",
+ Path::new("connect/crates/connect_client/Cargo.toml")
+ )],
+ )
+ .is_empty()
+ );
+}
+
+#[test]
+fn rejects_macro_dependency_on_connect_internals() {
+ assert_eq!(
+ violations(
+ "macro_api",
+ Path::new("services/macro_api/Cargo.toml"),
+ [(
+ "connect_registry",
+ Path::new("connect/crates/connect_registry/Cargo.toml")
+ )],
+ ),
+ ["macro_api -> connect_registry: Macro package depends on a non-client connect/ package"]
+ );
+}
+
+#[test]
+fn reports_naming_and_every_forbidden_dependency() {
+ assert_eq!(
+ violations(
+ "registry",
+ Path::new("connect/crates/registry/Cargo.toml"),
+ [
+ ("macro_auth", Path::new("crates/macro_auth/Cargo.toml")),
+ ("macro_db", Path::new("crates/macro_db/Cargo.toml")),
+ ],
+ ),
+ [
+ "registry -> registry: package under connect/ must be named connect_*",
+ "registry -> macro_auth: connect/ package depends on a Macro workspace package",
+ "registry -> macro_db: connect/ package depends on a Macro workspace package",
+ ]
+ );
+}
diff --git a/tooling/xtask/crates/xtask_deps/src/main.rs b/tooling/xtask/crates/xtask_deps/src/main.rs
index 5321209de5..032ae36bce 100644
--- a/tooling/xtask/crates/xtask_deps/src/main.rs
+++ b/tooling/xtask/crates/xtask_deps/src/main.rs
@@ -1,5 +1,5 @@
-//! `cargo x deps [--check]` regenerates (or, with `--check`, verifies) the two
-//! generated dependency artifacts:
+//! `cargo x deps [--check]` checks the Macro Connect crate boundary and
+//! regenerates (or, with `--check`, verifies) two generated dependency artifacts:
//!
//! - `workspace-hack/Cargo.toml` (via the hakari engine): pins every
//! third-party dep to its union feature set so a solo `cargo build -p X`
@@ -13,6 +13,7 @@
//! runs and CI cannot disagree about generator versions. `just hakari` wraps
//! the regenerate mode; CI runs `--check` and fails on drift.
+mod boundary;
mod closures;
mod hakari_ops;
@@ -31,6 +32,7 @@ fn main() -> Result<()> {
fn run_deps(check: bool) -> Result<()> {
let graph = build_graph(check)?;
+ boundary::check(&graph)?;
let mut drift: Vec<String> = Vec::new();
let hakari_changed = hakari_ops::run(&graph, check, &mut drift)?;
diff --git a/tooling/xtask/crates/xtask_nextest_filter/src/test.rs b/tooling/xtask/crates/xtask_nextest_filter/src/test.rs
index 18ffb641be..b35bc0c6c1 100644
--- a/tooling/xtask/crates/xtask_nextest_filter/src/test.rs
+++ b/tooling/xtask/crates/xtask_nextest_filter/src/test.rs
@@ -50,6 +50,17 @@ fn crate_change_maps_to_rdeps_of_that_crate() {
);
}
+#[test]
+fn connect_change_maps_to_workspace_package() {
+ let graph = build_graph(false).expect("cargo metadata");
+ let selection = select_in_repo(&graph, &["connect/crates/connect_registry/src/lib.rs"]);
+ assert_ne!(selection, PackageSelection::All);
+ assert!(
+ selected_packages(&selection).contains("connect_registry"),
+ "changed Connect crate must be selected: {selection:?}"
+ );
+}
+
/// Top-level files that belong to no package — a JSON at the repo root, a
/// README, a deleted misc file — must not select the full suite.
#[test]
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_deny.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_deny.rs
index 2bfbc63fcb..772e361d90 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_deny.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_deny.rs
@@ -21,6 +21,7 @@ pub fn cargo_deny() -> Workflow {
.add_path(xtask_paths::repo_glob!("Cargo.toml"))
.add_path(xtask_paths::repo_glob!("crates/**/Cargo.toml"))
.add_path(xtask_paths::repo_glob!("services/**/Cargo.toml"))
+ .add_path(xtask_paths::repo_glob!("connect/**/Cargo.toml"))
.add_path(xtask_paths::repo_glob!("tooling/xtask/**/Cargo.toml"))
.add_path(xtask_paths::repo_glob!("Cargo.lock"))
.add_path(xtask_paths::repo_glob!("deny.toml"))
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_workspace_dependency_check.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_workspace_dependency_check.rs
index 674d11438b..48db06938c 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_workspace_dependency_check.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/cargo_workspace_dependency_check.rs
@@ -1,6 +1,7 @@
//! `cargo workspace dependency check` — polices duplicate third-party deps in
-//! human-written crates, and rejects drift in the generated workspace-hack +
-//! dep-closure map. Generated into `cargo_workspace_dependency_check.yml`
+//! human-written crates, checks the Macro Connect Cargo boundary, and rejects
+//! drift in the generated workspace-hack + dep-closure map. Generated into
+//! `cargo_workspace_dependency_check.yml`
//! (replaces the hand-written `cargo-workspace-dependency-check.yml`).
//!
//! Both jobs build Rust, so they run on the rust-ci profile with the Nix/Cargo
@@ -26,6 +27,8 @@ pub fn cargo_workspace_dependency_check() -> Workflow {
.add_type(PullRequestType::Reopened)
.add_type(PullRequestType::ReadyForReview)
.add_path(xtask_paths::repo_glob!("Cargo.toml"))
+ .add_path(xtask_paths::repo_glob!("**/Cargo.toml"))
+ .add_path(xtask_paths::repo_glob!("connect/**"))
.add_path(xtask_paths::repo_glob!("crates/**/Cargo.toml"))
.add_path(xtask_paths::repo_glob!("services/**/Cargo.toml"))
.add_path(xtask_paths::repo_glob!("tooling/xtask/**/Cargo.toml"))
@@ -114,7 +117,7 @@ fn run_checker() -> Step<Run> {
}
fn deps_check() -> Step<Run> {
- Step::new("generated dependency artifacts are up to date").run(indoc::indoc! {r#"
+ Step::new("check Connect boundary and dependency artifacts").run(indoc::indoc! {r#"
cargo run -p xtask --locked -- deps --check
"#})
}
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
index 52b91e9252..77d512a233 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
@@ -272,6 +272,7 @@ fn paths_filter() -> Step<gh_workflow::Use> {
- '.sqlx/**'
- 'crates/**'
- 'services/**'
+ - 'connect/**'
- 'tooling/xtask/**'
- 'static_assets/**'
- 'nix/**'
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage/test.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage/test.rs
index 5517319f72..ba117f76b5 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage/test.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage/test.rs
@@ -1,5 +1,21 @@
use super::*;
+#[test]
+fn connect_changes_trigger_rust_and_convention_checks() {
+ let rust_filters = serde_json::to_string(&paths_filter().value.with).unwrap();
+ assert!(rust_filters.contains("'connect/**'"), "{rust_filters}");
+
+ let conventions = crate::workflows::code_check_conventions::code_check_conventions()
+ .to_string()
+ .expect("conventions workflow yaml");
+ assert!(conventions.contains("'connect/**'"), "{conventions}");
+
+ let cargo_deny = crate::workflows::cargo_deny::cargo_deny()
+ .to_string()
+ .expect("cargo deny workflow yaml");
+ assert!(cargo_deny.contains("connect/**/Cargo.toml"), "{cargo_deny}");
+}
+
#[test]
fn inventory_only_changes_run_live_config_validation() {
let with = serde_json::to_value(&paths_filter().value.with).unwrap();
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_conventions.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_conventions.rs
index 465069ec2a..886e359081 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_conventions.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_conventions.rs
@@ -90,6 +90,7 @@ fn paths_filter() -> Step<Use> {
should_run:
- 'crates/**'
- 'services/**'
+ - 'connect/**'
- 'tooling/xtask/**'
- 'apps/web/**'
- 'packages/**'