Files
PaperClipAI/packages/shared
DottaandPaperclip 14f23fef03 fix(plugins): offer direct Buffer setup when Composio has no sign-in link (#23782)
## Thinking Path

> - Paperclip helps people manage AI agents for work.
> - Plugins lets people connect tools to their agents.
> - Some tool connections use the Composio gateway.
> - Buffer requires a custom OAuth app in the Composio project that
serves the session.
> - When that gateway returns no sign-in link, Plugins can help the user
open Buffer's own MCP setup.
> - This pull request opens the existing connection form with the Buffer
name and endpoint filled in.

## Linked Issues or Issue Description

**What happened?**
Plugins showed a generic error when Composio returned no Buffer sign-in
link.

**Expected behavior**
The user can open the direct Buffer setup from the error. For other
apps, the user can open Composio's app settings.

**Steps to reproduce**
In Plugins, select Buffer and choose a saved Composio gateway without a
configured Buffer OAuth app. Select Continue.

**Additional context**
[Buffer's MCP
setup](https://developers.buffer.com/guides/integrations/other-ai-tools.html)
accepts a Buffer API key. [Composio's Buffer
setup](https://composio.dev/toolkits/buffer) requires a custom OAuth
app. [Composio auth configs belong to one
project](https://docs.composio.dev/kb/guide/dashboard-auth-configs-navigation).
Related prior work: Refs #19408.

## What Changed

- Return a machine-readable code when Composio returns no sign-in link.
- Offer the direct Buffer MCP form with its official address. Offer a
link to Composio app settings for other toolkits.
- Clear the old sign-in link when the user requests a new one. Keep the
link if the completion check fails.
- Document the setup options. Refresh the shared SDK test input pins.

## Verification

- Reproduced the missing-link API response with an embedded database and
a Composio response fixture. The new test failed on the old server.
- Passed 13 focused tests across the Composio route, Plugins setup
dialog, and the MCP URL prefill flow. The replacement-link test
reproduced the stale link before the fix. A second test checks that the
sign-in link stays available after a failed completion check.
- Sent an unauthenticated MCP initialize request to Buffer's documented
endpoint and confirmed that it requires authentication. A real Buffer
consent or API-key test needs a Buffer account with access.

## Risks

- Low risk. The new action opens the existing MCP setup page. The user
chooses the credentials and access before Paperclip creates the
connection.
- A valid Composio sign-in link still takes the user through Composio.

## Model Used

- OpenAI GPT-6 (Codex), with repository, test, and GitHub tools.

## 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 described the issue in-PR following the relevant issue
template
- [x] I have not referenced internal/instance-local Paperclip issues or
links
- [x] My branch name describes the change
- [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
- [ ] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-12-04 17:26:31 -06:00
..
2026-03-12 13:09:22 -05:00