mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-26 01:39:51 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Pull request CI verifies every change before merge across typecheck, build, server/DB/UI unit tests, and Playwright E2E shards. > - Today PR CI takes 15–30+ minutes wall-clock on ordinary feature and fix PRs (such as #22626) because every PR runs release/packaging/runner-support bloat, boots 800+ separate embedded Postgres clusters, runs Vitest serialized shards and E2E shards at 1 worker, builds the UI 8 separate times for E2E, emits 52 MB of React `act(...)` stderr spam in UI tests, and runs 61 real-clock soak suites plus hundreds of historical one-time SQL migration and mocked component wiring tests. > - Slow PR CI delays developer feedback, wastes runner capacity, and encourages batching changes instead of shipping small, safe PRs. > - This pull request cuts PR CI across all 6 bottlenecks (pipeline routing/Build bloat, PR-scoped parallel typecheck, shared embedded Postgres + batched/parallel Vitest runner, parallel E2E shards + prebuilt UI cache, historical/soak DB+server pruning with a checked-in nightly manifest, and UI stderr cleanup + low-value test pruning) while preserving all core control-plane invariants and full post-merge/release coverage. > - The benefit is projected PR CI wall-clock drops from 15–30+ minutes to ~3.8–4.4 minutes on ordinary PRs while keeping `master`, `release-verify`, `cloud-readiness`, local `pnpm test:run`, and `full-ci` runs at full coverage. ## Linked Issues or Issue Description Refs #22626. **What existing behavior does this improve?** Trusted pull-request CI wall-clock duration and runner efficiency across `.github/workflows/pr-trusted.yml`, `turbo.json`, `scripts/ci-typecheck-lane.mjs`, `scripts/run-vitest-stable.mjs`, `tests/e2e/`, `packages/db`, `server`, and `ui` test suites. **Subsystem affected** Cross-cutting (multiple of the above) **Current behavior** Ordinary PRs take 15–30+ minutes wall-clock in PR CI: - `Build` (~7.5–8.0m) runs a 231s clean public npm Grok install verifier and a 57s embedded-Postgres boot smoke on every PR. - `Canary Dry Run` (6.2m), `Runner support suite` (7.9m), `Docker context integrity`, `General tests (chat 1–3/3)`, and `Verify Paperclip Runner (vitest package 1–3/3)` fan out on ordinary app PRs due to broad `turbo.json` inputs. - `Typecheck + Release Registry` (7.1m) runs `test:release-registry` (193s), all standalone sandbox provider installs/checks, all untouched `tests/*` projects, and `--singleThreaded` `tsc` on every PR. - `General tests` and `Verify serialized server suites` boot 800+ separate embedded Postgres clusters instead of using `packages/db/src/test-postgres-command.ts`, run 17 serial Vitest invocations in `workspaces-b`, and run `verify_serialized_server` with `--no-file-parallelism --maxWorkers=1`. - `e2e_shards` (8.6m slowest shard) rebuilds the UI 8 separate times and forces `workers: 1` across all 56 specs because 7 specs mutate instance-level flags. - `workspaces-a` (8.3m × 2 shards) emits ~52 MB of React `act(...)` / `IS_REACT_ACT_ENVIRONMENT` stderr spam and executes 992 UI test files (including hundreds of brittle mocked wiring / `renderToStaticMarkup` suites). - `packages/db` and `server` run 43 historical one-time SQL migration replay tests, 12 static prose-grep tests, and 61 real-clock soak/crash/lease-expiry suites (~108.5 CPU-min) on every PR. **Proposed behavior** Ordinary PRs complete in under 5 minutes wall-clock while preserving full control-plane invariant coverage and full `master`/`release-verify`/`cloud-readiness`/`full-ci` verification: - PR `Build` removes the 231s Grok clean-npm verifier (already covered in `release-smoke.yml` and `docker-runner-check.yml`) and gates the 53s boot smoke on `PAPERCLIP_CI_FULL=1` (keeping fast `build:runtime` on every PR). - `turbo.json` and `.github/ci-task-matrix.json` path-gate `Canary Dry Run`, `Runner support suite`, `Docker context integrity`, `general-chat`, `ci:runner-package`, `ci:workspaces-a`, and `ci:db`, and narrow `tests/**` out of `globalDependencies`. - `Typecheck + Release Registry` uses fail-closed PR-mode scoping (`CI_PLAN`, `PAPERCLIP_CI_BASE_SHA`, `PAPERCLIP_CI_FULL`), parallel `typecheck-test-programs.mjs`, and `--checkers` / `GOMAXPROCS=2` within the 15.7 GiB RAM budget. - `run-vitest-stable.mjs` automatically wraps Postgres-backed lanes with one shared embedded Postgres template server (`test-postgres-command.ts`), batches `workspaces-b` and `workspaces-a` into single multi-project Vitest invocations, parallelizes isolated `serialized` shards, and filters `scripts/ci/nightly-only-suites.json` in PR mode (respecting `PAPERCLIP_CI_FULL=1`). - `e2e_shards` restores a read-only exact-key `server/ui-dist` cache written on canonical `master` pushes (`PAPERCLIP_E2E_SKIP_UI_BUILD=1`, inline fallback on UI PRs), isolates the 7 flag-mutating specs onto 2 serial shards while running the other 6 shards at `workers: 3` + `fullyParallel: true`, prunes 5 legacy/screenshot specs, and replaces fixed 20s/30s sleeps with deterministic waits. - `ui/vitest.setup.ts` eliminates >99.9% of stderr spam (`IS_REACT_ACT_ENVIRONMENT = true`, clean localStorage/DOM stubs, targeted `act(...)`/`No queryFn` suppression) and prunes 445 low-value mocked/presentational/screenshot UI tests + slims 2 giant mocked suites (keeping all `ui/src/lib`, `api`, `hooks`, `context`, `adapters`, `features`, `plugins`, and privacy/authz tests). - `packages/db` and `server` prune 43 historical one-time SQL migration tests, 12 static prose-grep tests, and 28 redundant `it.each` cases in `chat-channels.integration.test.ts`, and classify 61 real-clock soak/restart/lease-expiry/workspace-recovery suites (6,510.2s / 108.5 CPU-min) into `scripts/ci/nightly-only-suites.json`. **Reason and benefit** Cuts ordinary PR CI wall-clock from 15–30+ minutes to a projected ~3.8–4.4 minutes and removes ~156,353 LOC of redundant/brittle test code without dropping any core Paperclip invariant (company isolation, authz, atomic checkout, single-assignee, approval gates, budget hard-stop, activity logging). **Breaking changes** None for product runtime behavior. In PR CI, 61 real-clock soak suites listed in `scripts/ci/nightly-only-suites.json` run on `master`, `release-verify`, `cloud-readiness`, local `pnpm test:run`, and PRs with the `full-ci` label (`PAPERCLIP_CI_FULL=1`) instead of every ordinary PR. ## What Changed - **Pipeline & routing (`ci-fast/pipeline`):** - `.github/workflows/pr-trusted.yml`, `.github/workflows/release-verify.yml`, `.github/ci-task-matrix.json`, `turbo.json`: removed Grok clean-npm verifier from PR `Build`, gated `server-boot-smoke.sh` on `PAPERCLIP_CI_FULL=1`, path-gated `canary_dry_run`, `verify_runner_e2e_support`, `docker_context_integrity`, `general-chat`, `ci:runner-package`, `ci:workspaces-a`, and `ci:db`, forwarded `CI_PLAN` / `PAPERCLIP_CI_BASE_SHA` / `PAPERCLIP_CI_FULL` (keeping `profile-ci` in PR mode), and added exact-key read-only `server/ui-dist` cache restore in `e2e_shards` with a master-only writer in `release-verify.yml`. - Updated `.github/scripts/tests/ci-plan.test.mjs`, `scripts/__tests__/public-install-closure.test.mjs`, and `scripts/__tests__/runner-release-crate-cache.test.mjs`. - **Typecheck lane (`ci-fast/typecheck`):** - `scripts/ci-typecheck-lane.mjs`, `scripts/typecheck-test-programs.mjs`, `scripts/typecheck-test-projects.mjs`, `server/scripts/typecheck-layers.mjs`: added fail-closed PR-mode diff scoping (skipping `test:release-registry`, standalone sandbox providers, demo plugins, and untouched test projects/workspaces on unrelated PRs), concurrent `typecheckTestProgramsAsync`, and `--checkers` / `GOMAXPROCS=2` parallelism within 15.7 GiB RAM. - Updated `scripts/__tests__/ci-typecheck-lane.test.mjs`, `scripts/typecheck-test-programs.test.mjs`, and `server/scripts/typecheck-layers.test.mjs`. - **Vitest runner (`ci-fast/vitest-runner`):** - `scripts/run-vitest-stable.mjs`, `packages/db/src/test-postgres-command.ts`, `scripts/__tests__/run-vitest-stable-shard.test.mjs`: wired automatic shared embedded Postgres template DB (`test-postgres-command.ts` with `fsync=off`), batched `workspaces-b` and `workspaces-a` into single multi-project Vitest runs, parallelized isolated `serialized` shards (`maxWorkers=3`), and added PR-mode filtering for `scripts/ci/nightly-only-suites.json` (honoring `PAPERCLIP_CI_FULL=1`). - **Playwright E2E (`ci-fast/e2e`):** - `tests/e2e/playwright.config.ts`, `scripts/e2e-shard.mjs`, `scripts/e2e-shard-durations.json`, `scripts/__tests__/e2e-shard.test.mjs`, `maps/feature-map/recovery.md`: added `PAPERCLIP_E2E_SKIP_UI_BUILD=1`, isolated the 7 instance-mutating `SERIAL_SPECS` onto dedicated serial shards while running the remaining 44 specs across 6 shards at `workers: 3` + `fullyParallel: true`, pruned 5 legacy/screenshot specs (`-743 LOC`), and replaced fixed 20s/30s sleeps in `disconnect-resilience.spec.ts` and `composer-stop.spec.ts`. - **Server & DB test pruning + nightly soak manifest (`ci-fast/server-prune`):** - Deleted 41 historical one-time SQL migration tests + 5 obsolete fixture SQLs in `packages/db/src`, 2 historical server SQL migration tests, and 12 brittle static prose-guidance tests; trimmed `packages/db/src/client.test.ts` (2,328 → 219 LOC), `packages/db/src/better-auth-account-issuer-migration.test.ts` (167 → 19 LOC), and 2 redundant `it.each` matrices in `server/src/__tests__/chat-channels.integration.test.ts`. - Added `scripts/ci/nightly-only-suites.json` classifying 61 real-clock soak/restart/lease-expiry/workspace-recovery suites (6,510.2s / 108.5 CPU-min). - **UI test log spam fix & pruning (`ci-fast/ui-prune`):** - `ui/vitest.setup.ts`, `ui/vitest.config.ts`: eliminated >99.9% stderr spam (22–52 MB → 3.6 KB) by enabling `IS_REACT_ACT_ENVIRONMENT = true`, adding clean DOM/localStorage stubs, and filtering React `act(...)` / TanStack Query `No queryFn` noise. - Pruned 445 low-value mocked/presentational/screenshot UI test files, slimmed `AgentConfigForm.render.test.tsx` and `Browse.test.tsx` to their privacy/access checks, updated 34 `maps/` files to remove dead test links, and removed the stale `ui/src/pages/NewAgent.test-support.tsx` allowlist entry in `scripts/check-query-error-rendering.mjs`. ## Verification - Combined CI contract & shard test suite (`node --test .github/scripts/tests/ci-plan.test.mjs scripts/__tests__/run-vitest-stable-shard.test.mjs scripts/__tests__/ci-typecheck-lane.test.mjs scripts/typecheck-test-programs.test.mjs scripts/__tests__/e2e-shard.test.mjs scripts/__tests__/public-install-closure.test.mjs scripts/__tests__/runner-release-crate-cache.test.mjs scripts/__tests__/merge-queue-checks-workflow.test.mjs`): **136/136 PASS** (23.13s). - Full `.github/scripts/tests/*.test.mjs` suite on `ci-fast/pipeline`: **850/850 PASS** + Turbo cached-lane check **1/1 PASS**. - `node scripts/check-query-error-rendering.mjs --enforce --summary` and `node --test scripts/check-query-error-rendering.test.mjs`: **0 findings, 7/7 PASS**. - `node scripts/check-maps.mjs`: **PASS** (`35 areas, 192 capability IDs`). - `pnpm --filter @paperclipai/db typecheck`: **PASS** (`check:migrations` + `tsc --noEmit`). - `pnpm --filter @paperclipai/ui typecheck`: **PASS** (`369 files, 3454 stories` + `run-tsc.mjs -b`). - Component-level benchmarks verified on individual branches prior to merge (`ci-typecheck-lane.mjs` 63.4s simulated PR run; real Playwright 3-worker parallel specs passing; UI suite full run reduced to 3.6 KB stderr). - Live GitHub PR CI run triggered on this draft PR to verify real runner execution and measure before/after timings. ## Risks - **Two-phase CI effect:** Because `.github/workflows/pr.yml` invokes `pr-trusted.yml@master`, the workflow-level changes (removing Grok clean-npm install from PR `Build`, path-gating `Canary Dry Run`/`Runner support suite`/`general-chat`/`ci:runner-package`, passing `CI_PLAN`/`PAPERCLIP_CI_BASE_SHA`/`PAPERCLIP_CI_FULL`, and restoring `e2e-ui-dist`) take full effect only after merging to `master` (and `e2e-ui-dist` warms on the first `master` push; until then `e2e_shards` cleanly falls back to inline UI build). Furthermore, this PR modifies global CI inputs (`turbo.json`, `scripts/**`, `.github/**`), so its own PR CI runs the full matrix. - **Nightly soak demotion:** The 61 real-clock soak suites in `scripts/ci/nightly-only-suites.json` still run on every `master` push (`release-verify.yml`), `cloud-readiness.yml`, local `pnpm test:run`, and `full-ci`-labeled PRs, so regressions are caught post-merge rather than blocking ordinary PRs. - **Duration manifest rebalance:** Post-merge, the weekly `ci-test-durations.yml` refresh will recalibrate shard weights to reflect shared-Postgres timings for optimal LPT balance. - **No product runtime or DB schema changes:** All changes are confined to CI workflows, build/test orchestration scripts, test setup, test suites, and feature-map references. ## Model Used - Google Gemini 4 Neon (`Gemini 4 Neon (High)`), Google DeepMind, with repository tools, code execution, and multi-agent swarm coordination. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge
297 lines
17 KiB
Markdown
297 lines
17 KiB
Markdown
---
|
|
navigation: {"section":"Apps, channels, and extensions","sectionOrder":50,"order":10}
|
|
---
|
|
|
|
# Connection setup
|
|
|
|
People connect an app or account, choose who may use it, and recover incomplete
|
|
setup from either Apps or a task that needs access. A saved draft, a completed
|
|
provider login, a usable connection, and a resumed task are separate checkpoints.
|
|
Chat channels additionally require an endpoint and linked sender identity.
|
|
|
|
Google runtime setup offers a Gemini API key or a separate local Antigravity
|
|
browser sign-in. The browser redirect requires no pasted code; setup displays
|
|
the verified Google email before Connect. Connection setup does not qualify the
|
|
pending Antigravity execution profile. See [AI connections](../../doc/connections/AI-CONNECTIONS.md#local-subscription-sign-in).
|
|
|
|
Feature ID: `connection-setup`.
|
|
|
|
Agent access: [companion](../agent-access-map/connection-setup.md).
|
|
|
|
Prompt Injection Prevention reuses shared OpenRouter API-key setup directly from
|
|
Settings → Connections. It adds no Apps provider or transport. Credential ownership
|
|
and audience rules are the existing connection rules; saving a connection alone
|
|
does not activate the service. See [service configuration](../../doc/prompt-injection-prevention.md).
|
|
|
|
1Password is available from Apps with a service-account token and an official
|
|
service-account creation link. Its vault access is chosen in 1Password; action
|
|
policies use the ordinary Permissions screen. See [connector notes](../../doc/connections/1PASSWORD.md).
|
|
|
|
## Sub-features
|
|
|
|
- `catalog`: `connection-setup/catalog` — find a provider, inspect its available methods, and open setup;
|
|
unavailable methods explain their prerequisite rather than silently switching.
|
|
- `identity-and-access`: `connection-setup/identity-and-access` — select personal/shared identity and eligible agents;
|
|
an empty explicit selection and company-wide access must not be confused.
|
|
- `credentials`: `connection-setup/credentials` — provider sign-in, key, or generic MCP URL follows its supported
|
|
setup method; credentials are not retained in browser draft storage.
|
|
- `handoff`: `connection-setup/handoff` — provider sign-in opens in a separate tab/window; its callback returns to the correct setup
|
|
host with the original task intent and identity choice intact.
|
|
- `draft-recovery`: `connection-setup/draft-recovery` — cancel, Back, Save & exit, reload, Finish setup, and reconnect
|
|
preserve the exact draft rather than creating duplicate connections.
|
|
- `task-request`: `connection-setup/task-request` — only the addressed person resolves the requested connection;
|
|
usable access releases the pending task request through normal continuation.
|
|
- `channel-setup`: `connection-setup/channel-setup` — provider endpoint, represented agent, linked sender, and
|
|
communication instructions are configured before an external message is used.
|
|
- `failure`: `connection-setup/failure` — denied login, unreachable/private URL, expired credentials, and
|
|
permission errors leave an actionable state rather than a false success.
|
|
|
|
## How to get to it (user POV)
|
|
|
|
### `apps-catalog`
|
|
|
|
Open Apps (`/apps`), choose an app, and connect from its landing page. Select an
|
|
available method and access, then complete setup. Existing connections open
|
|
their details; unfinished ones offer a way to finish setup.
|
|
|
|
### `mcp-link`
|
|
|
|
Use **Connect with a link** or `/apps/byo` for a generic MCP server. Paste its
|
|
URL, select access, and follow the probe's sign-in/key guidance. Provider-specific
|
|
catalog setup and a generic endpoint may use different flows.
|
|
|
|
### `task-request`
|
|
|
|
Open the task's pending connection request and its setup action as the named
|
|
user. Setup can open in a task dialog; provider sign-in always uses a separate window/tab. Follow the
|
|
request's original link if setup falls back to a standalone page.
|
|
|
|
### `resume-connection`
|
|
|
|
From Apps or connection details, use Finish setup, reconnect, or the offered
|
|
authentication recovery action. Reload or return from the provider before
|
|
checking whether the same saved connection became usable.
|
|
|
|
### `chat-channel`
|
|
|
|
With chat connectors enabled, select a supported chat/email provider in Apps
|
|
or open `/apps/chat/connect`. Complete that provider's endpoint setup, then
|
|
open its settings (`/apps/chat/:endpointId/settings`). Follow identity linking
|
|
as the intended sender before messaging the agent externally.
|
|
|
|
### `delegated-configuration`
|
|
|
|
Ask a standard agent to configure a disposable app or account from its assigned
|
|
task. The agent uses REST or admitted native `search_api` / `call_api`, reuses
|
|
saved accounts and drafts, and returns the exact saved setup link when human
|
|
authentication, consent, credential entry or identity confirmation is required.
|
|
Open that link as the addressed person. Personal ownership stays with that
|
|
person; audit attribution stays with the acting agent. Existing agents retain
|
|
their explicit grants and restrictions. See the [access companion](../agent-access-map/connection-setup.md)
|
|
and [native admission contract](../agent-access-map/README.md#native-rest-transport).
|
|
|
|
## Driving it with Playwright and the Paperclip CLI
|
|
|
|
Preconditions: follow the [baseline](./README.md#before-driving-a-journey).
|
|
Choose a disposable provider account/resource and record its auth method,
|
|
deployment mode, account ownership, and access selection. For live setup, use
|
|
the provider's documented prerequisites in the
|
|
[connector playbook](../../doc/connections/CONNECTOR-PLAYBOOK.md). Automated fixtures
|
|
do not establish OAuth registration, public callbacks, or production provider access.
|
|
|
|
### `apps-catalog`
|
|
|
|
Automated: [Browse](../../ui/src/pages/apps/Browse.test.tsx) covers catalog entry
|
|
with mocked APIs (mocked `AppNotConnected` and `AppsConnect` component tests were
|
|
removed; coverage for access selection, method choices, and setup failures now relies
|
|
on browser/manual checks). [Connection intents](../../tests/e2e/connection-intents.spec.ts)
|
|
drives store and task setup against one fake provider through a useful continuation:
|
|
|
|
```sh
|
|
pnpm exec vitest run ui/src/pages/apps/Browse.test.tsx
|
|
pnpm exec playwright test -c tests/e2e/playwright.config.ts tests/e2e/connection-intents.spec.ts
|
|
```
|
|
|
|
Manual: connect from an unconnected provider landing. Select the intended
|
|
identity and agent access, complete authentication, reload, and inspect the
|
|
saved connection. Run a permitted read-only action with an eligible agent and
|
|
verify its useful result. Try an ineligible agent and confirm denial. Repeat
|
|
with a user who cannot install company-wide; the UI must not imply broad access.
|
|
|
|
Notebook is internally gated by `enablePaperclipNotebook` (default off, no settings toggle). Disabled instances hide setup/discovery and deny curated Notebook dispatch and publishing; local removal and grant revocation remain available.
|
|
|
|
Availability is catalog metadata evaluated by shared connector checks. Notebook
|
|
publication and file uploads stay in the Notebook service.
|
|
|
|
Paperclip Notebook uses the existing personal-account MCP OAuth setup at
|
|
`https://notebook.paperclip.app/mcp`. Sign in through Cloud, assign agents, and
|
|
verify tool discovery. The connection keeps its default catalog name.
|
|
Reconnect must preserve agent assignments and Allowed / Ask first / Off choices.
|
|
Removal disables local use and clears saved credentials. Remote authorization
|
|
can be revoked separately in Notebook's Connected apps screen; automatic remote
|
|
cleanup and custom keyed refresh recovery are deferred. A lost rotating-token
|
|
response may require reconnecting. Notebook tools use the selected connection's
|
|
ordinary action gateway. See [Notebook](../../doc/connections/PAPERCLIP-NOTEBOOK.md)
|
|
for the Notebook-owned uploader and fixture coverage. Live Notebook qualification
|
|
still requires the deployed service and both hosted and self-hosted clients.
|
|
|
|
Daytona follows this same key/access wizard. Its native method exposes the
|
|
published platform and Toolbox HTTP actions using provider sandbox IDs, without
|
|
a Paperclip task or lease requirement. [Daytona browser setup](../../tests/e2e/daytona-connector.spec.ts)
|
|
checks the catalog, password field, access controls, and optional organization
|
|
pin. It does not submit a key or qualify a real provider account. See
|
|
[Daytona](../../doc/connections/DAYTONA.md) for API-key authority and OAuth limits.
|
|
|
|
For Braintrust, verify US OAuth (default), US API key, EU OAuth, and EU API key
|
|
from both Apps and `/apps/connect?source=braintrust`. Inspect the exact regional
|
|
endpoint and method after Save & exit, cancellation/resume, and reconnect;
|
|
these operations must retain the saved connection and its access choices.
|
|
Verify the key stays out of browser draft storage and public responses, then
|
|
perform a bounded read and disposable write through an actual eligible run.
|
|
The [Braintrust qualification matrix](../../doc/connections/BRAINTRUST.md#qualification-record)
|
|
records completed US OAuth connect/discovery, bounded read, synthetic write
|
|
through actual process-agent gateway calls, catalog refresh, reconnect, local
|
|
removal, and structural redaction. US API-key and both EU methods still need
|
|
account-bound proof. Live token expiry/refresh, remote OAuth revocation, and
|
|
native CLI automatic capability delivery remain unqualified; public metadata
|
|
and fixtures do not establish those results.
|
|
|
|
Unikraft follows the same key/access wizard. Setup asks only for the API token;
|
|
the default metro is an optional select under Advanced, and each action can name
|
|
another published metro. [Unikraft browser setup](../../tests/e2e/unikraft-connector.spec.ts)
|
|
checks the catalog, password field, access controls and the advanced metro. It
|
|
does not submit a token or qualify a real provider account. See
|
|
[Unikraft](../../doc/connections/UNIKRAFT.md) for token authority and metros.
|
|
|
|
### `mcp-link`
|
|
|
|
Automated: AppsConnect's generic MCP cases cover probe-driven auth, private or
|
|
unreachable endpoints, preregistered clients, secret-backed headers, and unsafe
|
|
authorization URLs. These are component/API mocks, not remote provider proof.
|
|
|
|
[Catalog publication](../../server/src/__tests__/tool-catalog-publication.test.ts)
|
|
uses PostgreSQL and a controlled MCP response to check bounded writes, repeated
|
|
page entries, preserved action choices, rollback, and concurrent publication.
|
|
It does not verify a live provider's discovery contract.
|
|
|
|
Manual: connect a known test MCP URL through the link flow, verify its saved
|
|
endpoint and a read-only action, then repeat with a bad URL and wrong credential.
|
|
The error should explain the next action and preserve non-secret setup context.
|
|
Test no-auth and authenticated endpoints separately; never infer one from the other.
|
|
|
|
### `task-request`
|
|
|
|
Automated: [interaction card](../../ui/src/components/IssueThreadInteractionCard.test.tsx)
|
|
checks addressed-user controls. AppsConnect tests cover page/dialog parity,
|
|
task-bound OAuth, popup handoff, and verifying a saved connection before closing.
|
|
Withdrawn requests render a terminal acknowledgement with no setup action; the
|
|
interaction-body test and narrow Storybook journey cover this recovery state.
|
|
The connection-intents browser suite above exercises fixture-backed continuation.
|
|
|
|
Manual: ask an agent to use an unavailable app, open its request as the named
|
|
user, and complete setup in the dialog. Verify the card settles, the exact task
|
|
resumes, and the agent returns a useful provider result. Repeat the page-host
|
|
fallback and denied OAuth path. As another user, confirm that merely seeing the
|
|
task does not grant the right to resolve the request.
|
|
|
|
### `resume-connection`
|
|
|
|
Automated: none for mocked UI flows (`AppsConnect` and `AppDetail` component tests
|
|
covering draft resume, declined OAuth, reconnect retry, archived connection revival,
|
|
saved account reuse, and the connection host were removed; rely on
|
|
[Connection intents](../../tests/e2e/connection-intents.spec.ts) and manual checks
|
|
below). None of these checks complete a real provider login.
|
|
|
|
Manual: leave setup through its footer, reload Apps, choose Finish setup, and
|
|
confirm the same connection is resumed. Decline provider login and recover from
|
|
that checkpoint. Reconnect an expired disposable account and verify a permitted
|
|
action afterwards. Count connections before/after to catch accidental duplicates.
|
|
|
|
### `chat-channel`
|
|
|
|
Automated:
|
|
[saved setup state](../../ui/src/pages/apps/chat/ChatEndpointSetup.state.test.ts)
|
|
covers saved setup-state logic with fixtures (mocked UI tests for setup routing,
|
|
email setup, and identity confirmation were removed; verify those UI flows via
|
|
[chat adapters E2E](../../tests/e2e/chat-adapters-ui-providers.spec.ts) and manual
|
|
checks). Provider-specific live setup is not implied.
|
|
|
|
[Channel integration](../../server/src/__tests__/chat-channels.integration.test.ts)
|
|
also covers bounded Telegram subscription recovery at startup and after committed
|
|
configuration changes, saved retry deadlines, rollback, and parking pending
|
|
repair while an endpoint or connection is inactive. The provider responses are
|
|
fixtures. Settled maintenance leaves no discovery timer or database scans.
|
|
|
|
GitHub Cloud setup also covers an older empty-queue backoff, concurrent setup and
|
|
background leases, and retry after a Cloud error in the
|
|
[event poller regression](../../server/src/services/github-connection-events.test.ts).
|
|
Channel integration checks that active setup drains its signed ping through the
|
|
normal webhook handler; a forged ping still cannot verify the endpoint. These
|
|
fixtures do not establish live Cloud delivery. For live proof, start a disposable
|
|
App after an idle personal GitHub connection, complete installation, and confirm
|
|
that the same draft advances after authenticating the queued ping.
|
|
|
|
Manual: complete setup for one named provider, reload endpoint settings, link
|
|
the intended sender, and send a disposable message. Verify one task and a useful
|
|
reply in the originating conversation. Inspect an unlinked sender's denial and
|
|
the endpoint's pause behavior. Repeat independently for each provider at issue;
|
|
Slack setup does not qualify Discord, Telegram, GitHub, email, or iMessage.
|
|
|
|
### `delegated-configuration`
|
|
|
|
Automated: [agent-authenticated integration](../../server/src/__tests__/connection-management.integration.test.ts)
|
|
uses production agent creation, persistent keys, run JWTs, native tool bindings,
|
|
human sessions, PostgreSQL and deterministic provider fixtures. It covers saved
|
|
setup, ownership, attribution, scope, trust, work modes and revocation. The
|
|
[Google service picker tests](../../ui/src/features/connections/GoogleWorkspaceServices.test.tsx)
|
|
cover pending choices, consent precedence and failed grant loading with API mocks.
|
|
These are separate from live provider setup and model success.
|
|
|
|
Manual: Have the agent perform authorized setup, then open its saved handoff as
|
|
the addressed person. Reload before completing the required human step; verify
|
|
the same resource, saved access choices, human ownership and acting-agent audit
|
|
remain. Complete the step, verify the exact task continues, and confirm that
|
|
revoked authority or cancelled work prevents continuation. An ordinary bot-token
|
|
repair or an unchanged credential must not complete a signing-key request.
|
|
|
|
## Gotchas
|
|
|
|
- For connecting an assistant to Paperclip itself, use [Assistant connections (MCP)](./assistant-connections.md). This recipe's MCP-link journey connects Paperclip to an external app server.
|
|
- Private endpoint rejection depends on deployment: owned loopback MCP servers
|
|
are supported in local-trusted/private instances. Public authenticated
|
|
deployments apply the private-network restriction.
|
|
|
|
- A successful OAuth callback is not proof of saved connection access or task
|
|
continuation. Verify all three checkpoints.
|
|
- Personal identity, shared account access, and per-agent access are distinct.
|
|
Connecting an account does not waive an Off action or Ask first review.
|
|
- A tool app connection is not a chat endpoint. The same provider can offer both.
|
|
- Old Apps/Connections URLs can redirect to Apps. Use the current navigation and
|
|
record the actual destination rather than documenting an obsolete screen.
|
|
- Full provider matrix, AI-account selection, gateway/profile administration,
|
|
and account revocation lifecycles remain outside this seed recipe.
|
|
- For governed actions after setup, use [questions and approvals](./questions-and-approvals.md).
|
|
|
|
### Documentation scope: App catalog and connection setup
|
|
|
|
Provider-specific authentication/revocation, credential-only accounts, and aggregator administrative variants still need their own detailed matrices.
|
|
|
|
Supabase and Vercel deployment connections (2026-10-22): Apps offers Supabase
|
|
browser sign-in, hosted MCP personal access token, and project-scoped Management
|
|
API methods, plus Vercel's team-scoped access token method. Supabase's optional
|
|
MCP project pin leaves project creation available when unset; the native method
|
|
requires a project and offers Edge Function deployment and selected configuration.
|
|
Vercel supports preview/production deployment, build settings, environment
|
|
variables and existing domain attachment. Personal/shared credential ownership,
|
|
action permissions, reconnect and removal use the regular setup flow. See
|
|
[Supabase](../../doc/connections/SUPABASE.md) and
|
|
[Vercel](../../doc/connections/vercel.md) for method boundaries and qualification.
|
|
|
|
For these native methods, continue past a successful connection test into an
|
|
actual native agent task: readiness, assigned-tool delivery, and task-card reuse
|
|
must all work. The 2026-10-23 walkthrough exposed and repaired omitted REST
|
|
admission at those boundaries. Verify a served deployment and provider settings,
|
|
not only the catalog action count. Vercel preview requires an existing deployment;
|
|
its provider makes the first deployment production, so an empty-project preview
|
|
must fail before submission and explain the explicit production prerequisite.
|