feat(plugins): support agentless harness sign-in (#23392)

## Thinking Path

> - Paperclip manages agents and the AI accounts they use.
> - A company can connect an account before creating its first agent.
> - Some plugin drivers can run sign-in in a dedicated sandbox.
> - Core currently selects a saved agent for every plugin login.
> - This change lets each driver declare that it can sign in without an
agent.

## Linked Issues or Issue Description

**Subsystem affected**

Environment drivers, managed AI connections, and the agent setup UI.

**Current behavior**

A company with zero agents cannot start a provider login on a plugin
environment, even when that driver can provision a temporary
environment.

**Proposed behavior**

A driver can declare `supportsAgentlessLogin`. Core uses this capability
when it selects a login target and acquires the lease. Drivers that omit
it retain the existing agent selection.

**Reason and benefit**

Operators can finish connecting the account before they configure its
first agent.

**Additional context**

The driver capability follows the per-driver adapter declaration in
#22827. The onboarding flow keeps the agent readiness check from #23383.

## What Changed

- Added the optional capability to the manifest, capabilities response,
and login UI.
- Kept company and driver validation at sign-in and lease acquisition.
- Applied the plugin device-login deadline to sessions with no agent.
Ordinary task provisioning keeps its existing contract.

## Verification

- 122 tests passed across shared capabilities, environment target
resolution, lease construction, device-login HTTP routes, and session
lifecycle.
- The server typecheck passed.
- The SDK input registry matches the source revision. `pnpm verify`
requests broader CI coverage for that registry.
- After merging the current base, 82 focused tests passed, including the
onboarding tests. The UI typecheck passed. All required GitHub checks
passed.

## Risks

Drivers must advertise this capability only when they can run and clean
up a login without an agent. Existing manifests retain their previous
behavior. No database migration is required.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

OpenAI Codex, GPT-6, with local code inspection and test execution.

## 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>
This commit is contained in:
Nicky LeachandPaperclip authored and GitHub committed 2026-12-01 10:22:32 -08:00
1 parent ce2e6ccc00
commit 07af22c57f
18 files changed
+88 -32

No files matched your search

@@ -253,8 +253,8 @@
"packages/shared/src/env-file.ts": "ee15f8dfa6610d3fd1eea3ca0846cc2c583f9070",
"packages/shared/src/environment-custom-images.test.ts": "80d00f3581f13a782480700296b1295d8159ddae",
"packages/shared/src/environment-custom-images.ts": "a81814b7f99e5c8871f50ffcf9dd93dc435dee27",
"packages/shared/src/environment-support.test.ts": "91a7aacce30fb6fcf6782045a5a5e1281448cdf4",
"packages/shared/src/environment-support.ts": "261c02dccfb7d8396687739ccc1b03bb59067a6b",
"packages/shared/src/environment-support.test.ts": "eed931ef7535cd4aae1dc12d640149976634b057",
"packages/shared/src/environment-support.ts": "6bef8200e293fa734e7779456bde5774bab4bdf0",
"packages/shared/src/execution-workspace-guards.ts": "5428546ab16ef5cb4d23edd914d0a15a83a94668",
"packages/shared/src/external-agent-guidance.ts": "d815fc60b170717f0fdcff61bc30c8a1289f7fcc",
"packages/shared/src/external-objects-server.ts": "f323ba3e5e0b1a2ad415bdb5e0ca99bf9d449821",
@@ -465,7 +465,7 @@
"packages/shared/src/types/issue.ts": "1a01870cfda97510486c20425fabe7ac553460ac",
"packages/shared/src/types/live.ts": "b90e55e4de8600c6fc17d7fa8d89079d4ae655ec",
"packages/shared/src/types/native-finalization.ts": "c026a73003ae232fea4f7624d561493b383df358",
"packages/shared/src/types/plugin.ts": "99567f30af5165880d67519c1d9e71855600d4f9",
"packages/shared/src/types/plugin.ts": "ec78e2ec76b61eca20f7250237042c9ac70d5376",
"packages/shared/src/types/project.ts": "50b9d9c51cb38d5862e287c1a47726716603f21c",
"packages/shared/src/types/quota.ts": "a0686a9afb3111a4de093f66200dc0c9152e883e",
"packages/shared/src/types/resource-memberships.ts": "9eab6fad50facf3e489f8c40e5bedd92e1d1faf8",
@@ -552,7 +552,7 @@
"packages/shared/src/validators/onboarding-seed.ts": "de302a8400d4199053f379d9ed853522a3ac6d32",
"packages/shared/src/validators/partial.ts": "fa60ec7481fc14175365e9e500c814b159f1ab53",
"packages/shared/src/validators/plugin.test.ts": "0a028e978f6706b3b23039e30ea04d7d8bccb1e2",
"packages/shared/src/validators/plugin.ts": "072f0e6e3b7618b1d3a7c85dc1cc5074c86bd2b0",
"packages/shared/src/validators/plugin.ts": "424177f7a174e00622acfc0abe1726a7a0768bbb",
"packages/shared/src/validators/project.ts": "6ea168f5faf3161e6004ea47274f60634c77b219",
"packages/shared/src/validators/provider-trace.ts": "b38b6200a2e51513f5dca0f8b008f2fe68175e82",
"packages/shared/src/validators/resource-memberships.ts": "b124ac8a8f24b4dbb03ae82bcc87541f6b4ecdfd",