Files
PaperClipAI/scripts/app-definition-overrides
DottaandClaude Opus 5.5 73369c5d46 feat(connections): AWS connector out of experimental; role ARN comes back from the agent (#22994)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - The AWS connector lets agents work in an AWS account through AWS's
hosted MCP server, with a per-connection role and short-lived
credentials (#22083, #22195, #22233, #22626)
> - It has been behind the `enableAwsConnector` experimental setting. It
is now proven on paperclip.staging: a connection was set up end to end,
and the daily QA routine's agent uses it to read private test evidence
from S3
> - On the role step, the person still had to paste the role ARN back,
even when their own agent created the role and reported the ARN in its
live checklist
> - This pull request takes the connector out of experimental and has
the page pick up the role ARN from the agent, keeping the field for
people who set the role up by hand
> - The benefit is AWS available to everyone, with a setup that is
"paste a prompt, press Test connection"

## Linked Issues or Issue Description

Refs #22233 (role setup), #22626 (live agent checklist).

**Subsystem affected**
Connections (AWS app definition, role setup UI), instance experimental
settings.

**Problem or motivation**
- The AWS connector works, but is hidden unless an operator turns on an
experimental flag.
- The setup page always showed a Role ARN field, and the person had to
copy the ARN from the agent's summary into it.

**Proposed solution**
- Remove `experimentalFeatureKey` from the AWS app definition.
`enableAwsConnector` becomes a compatibility key: stored and
Cloud-managed values are ignored, and old clients' writes are accepted
(same pattern as `enableMcpAggregators` and `enablePublicMcp`).
- Move the Role ARN field into "Or do it by hand". When the agent
finishes, take the ARN from its finish summary, accepting only an IAM
role ARN for this connection's own role name
(`paperclip-<connectionId>`), so a summary cannot point the connection
at another role. "Test connection" then works with nothing to paste. The
by-hand section opens on its own when a test fails or the agent finished
without a usable ARN.

**Alternatives considered**
- Letting the agent save the ARN through the checklist API: more surface
on a token-only route. Reading it from the finish summary needs no new
API, and the test still proves the role trusts only this connection.
- Removing the field entirely: people who use CloudFormation or IAM by
hand still need it.

## What Changed

- `packages/shared/src/app-definitions/aws.json`,
`scripts/app-definition-overrides/aws.json`: no
`experimentalFeatureKey`.
- `packages/shared/src/feature-catalog.ts`, `validators/instance.ts`:
`enableAwsConnector` is "(compatibility)", default on.
- `server/src/services/instance-settings.ts`: always on; Cloud-managed
values skipped; old clients' writes accepted.
- `ui/src/pages/InstanceExperimentalSettings.tsx`: the AWS toggle is
removed.
- `ui/src/features/connections/aws-role-arn.ts` (new): the role ARN rule
and `roleArnFromAgentSummary`.
- `ui/src/features/connections/AwsRoleSetup.tsx`: Role ARN under "Or do
it by hand", auto-filled from the agent's summary, with copy updated
("hands back the role when it finishes", "the Role ARN field below").
- `doc/connections/AWS.md`: no longer described as experimental.

## Verification

- Server: `aws-mcp-connector.test.ts` (connects even with a stored
`enableAwsConnector: false`),
`instance-settings-managed-overlay.test.ts` (stays on with stored and
Cloud-managed false; an old client's false write is accepted),
`instance-settings-service.test.ts`: 68 passed. The 4 new flag tests
fail against master's source (red/green).
- Shared: `app-definitions.test.ts` 43 passed;
`scripts/app-definition-overrides.test.mjs` 3 passed.
- UI: `aws-role-arn.test.ts` 3 passed (this connection's ARN from a
summary, including role paths and a trailing period; another role, a
longer name, a short account and no ARN are rejected). UI typecheck
clean.
- Storybook (headless Playwright, current branch): the default view has
no Role ARN field; "agent done" shows "Your agent's role is ready. Test
the connection to finish." with Test connection enabled; "test failed"
opens "Or do it by hand" with the field at its end. No page errors.
- Live: the connector was set up end to end on paperclip.staging (Test
connection passed) and is in daily use by the QA routine. To re-check
after deploy without the flag.

## Risks

- Every instance now shows the AWS connector. It was already proven on
staging; access is per connection and read-only connections are capped
by AWS's `ReadOnlyAccess`.
- The ARN auto-fill trusts only an ARN naming this connection's own
role, and Test connection still verifies AWS accepts it, so a wrong or
foreign ARN cannot be saved silently.

## Model Used

- Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use
(shell, file edits, Storybook with headless Playwright, the live staging
instance).

## 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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:44:59 -06:00
..
…
…