paperclip/ui/public/brands/apps
Dotta 47ded8bf97
feat: manage AI runtime credentials through Connections (#13247)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Agent runs need credentials for a specific provider and sign-in
method.
> - Connections already owns accounts, grants, and access permissions.
> - AI authentication should use those same boundaries.
> - This pull request adds the storage, API, adoption, and runtime
foundation.
> - Legacy agents keep their authentication until they explicitly adopt
a managed connection.

## Linked Issues or Issue Description

**Problem or motivation**
AI credentials are configured separately from Connections. Agents cannot
consistently reuse a responsible user's account or a permitted shared
account.

**Proposed solution**
Manage AI accounts with the existing Connections grants and permissions.
Keep model and harness selection independent from credential selection.
Preserve legacy authentication until validated adoption.

**Alternatives considered**
A separate credential registry would duplicate ownership and access
policy. Automatic fallback would risk using the wrong account.

**Roadmap alignment**
This extends the shipped Apps, multi-user, secrets, and agent-runtime
capabilities. The maintainer requested the feature and reviewed the UI.
Related groundwork: #11899 (connection permissions), #10910 (connection
wizard), #11692 (Claude subscription profiles), and #11854 (Codex
account rotation).

## What Changed

- Add AI-purpose/runtime-auth contracts and an additive, idempotent
migration.
- Add Claude, OpenAI, OpenRouter, and Grok provider capabilities and
catalog entries.
- Store credentials on grants. Resolve responsible-user defaults or
explicit permitted grants.
- Isolate managed credentials and provider sessions across accounts.
Block missing credentials without ambient fallback.
- Keep imported legacy secrets unchanged during reconnect. Use
independent local Codex/Grok sign-in attempts for rotating credentials.
- Add authorization, migration, concurrent refresh, retry, cancellation,
and legacy-compatibility tests.

This is part 1 of a two-PR stack. The app UI follows in #13248. Merge
the foundation first.

## Verification

- Updated against master `04e364236`, preserving upstream provider login
and connector workflows.
- Full workspace typecheck, production build, Storybook build, and token
gates passed on the integrated branch. Final local-login changes passed
59 focused tests; new-agent and inbox regression suites passed 63 tests.
- Browser checks verified automatic local Claude account detection,
resumable Codex login commands, retry, focus restoration, and
desktop/phone layouts. Commands create their isolated directory before
invoking the CLI.
- All current-head CI checks passed on `2a996560a`, including all
server/workspace tests, browser shards, runner verification, typecheck,
build, and canary dry run. Greptile reviewed that commit at 5/5 with no
unresolved threads. Earlier local full-suite attempts hit the Mac
PostgreSQL shared-memory limit; the complete suites passed in CI.
- Renumbered the additive AI migration to `0276` after upstream
migrations and regenerated its snapshot. Existing legacy agents retain
their configuration.
- Added local login status checks, owner-scoped retry, managed OpenCode
remote homes, credential-aware model discovery, and task
connection-repair delivery.

## Risks

- Managed credential failures intentionally block execution. They do not
restore legacy fallback.
- Preview-era copied Codex/Grok subscriptions require independent
reconnect.
- The integrated branch has live provider acceptance coverage. This
update verifies local Claude detection and Codex API-key task repair; it
does not add a new subscription authorization/refresh or Daytona stress
pass.
- Runtime-auth connections must stay excluded from tool and channel
handling.

## Model Used

OpenAI GPT-6 through Codex, with reasoning, repository tools, code
execution, and browser testing. The exact runtime model identifier and
context-window size are not exposed in this session.

## 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
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-12 16:30:10 -05:00
..
LOBE-LICENSE feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
agentmail-dark.svg feat(connections): add AgentMail inboxes and email tasks (#13256) 2026-09-11 16:56:38 -05:00
agentmail.svg feat(connections): add AgentMail inboxes and email tasks (#13256) 2026-09-11 16:56:38 -05:00
airtable.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
anthropic-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
anthropic.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
api-key-generic.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
asana.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
beehiiv.png feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
bitly.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
box.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
brex-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
brex.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
candid.png feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
clickhouse.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
cloudflare.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
cloudinary-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
cloudinary.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
coda.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
composio-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
composio.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
context7-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
context7.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
discord.svg feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
egnyte.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
embat.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
github-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
github.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
gmail.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-calendar.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-chat.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-docs.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-drive.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-people.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-sheets.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-slides.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
google-workspace-search.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
hugging-face.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
imessage-photon.png feat(channels): add experimental iMessage Photon (#13299) 2026-09-12 15:23:50 -05:00
jira-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
jira.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
kernel.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
linear.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
local-falcon.png feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
make-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
make.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
manifest.json feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
manufact.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
mem0.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
microsoft-teams.svg feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
miro-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
miro.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
mixpanel.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
netlify.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
notion-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
notion.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
oauth-generic.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
openai-dark.svg feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
openai.svg feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
openrouter-dark.svg feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
openrouter.svg feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
oreilly.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
pagerduty.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
planetscale-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
planetscale.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
posthog-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
posthog.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
postman.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
razorpay-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
razorpay.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
resend-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
resend.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
sanity-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
sanity.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
sentry-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
sentry.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
shopify.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
similarweb-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
similarweb.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
slack.png feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
stripe.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
supabase.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
telegram.svg feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
ticket-tailor-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
ticket-tailor.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
ticktick.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
todoist.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
vercel-dark.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
vercel.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
webflow.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
wix.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
xai-dark.svg feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
xai.svg feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
xero.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00
zapier.svg feat(apps): add local connection brand assets (#12343) 2026-08-29 12:08:33 -05:00