mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 20:09:33 +01:00
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:
1 parent
ce2e6ccc00
commit
07af22c57f
18 files changed
+88
-32
No files matched your search
@@ -1519,7 +1519,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
// effective environment provider. The form reads the adapter login capability,
|
||||
// not the adapter name: every adapter login gates on this provider capability.
|
||||
const providerSupportsLoginPty = environmentSupportsLoginPty(effectiveLoginEnvironment, environmentCapabilities, isRunnerHarness ? harnessType : adapterType);
|
||||
const loginRequiresAgent = environmentLoginRequiresAgent(effectiveLoginEnvironment);
|
||||
const loginRequiresAgent = environmentLoginRequiresAgent(effectiveLoginEnvironment, environmentCapabilities);
|
||||
const showAdapterLogin =
|
||||
(isCreate || !currentAiConnection) &&
|
||||
adapterSupportsSandboxLogin &&
|
||||
|
||||
@@ -1165,7 +1165,7 @@ function OnboardingWizardInner({
|
||||
createdCompanyId &&
|
||||
loginProviderSupportsPty,
|
||||
);
|
||||
const loginRequiresAgent = canShowAdapterLogin && environmentLoginRequiresAgent(resolvedLoginEnvironment);
|
||||
const loginRequiresAgent = canShowAdapterLogin && environmentLoginRequiresAgent(resolvedLoginEnvironment, loginEnvironmentCapabilities);
|
||||
const agentSettledOnChoice = (agent: Pick<Agent, "adapterType" | "adapterConfig">) =>
|
||||
agentHarnessType(agent.adapterType, agent.adapterConfig) === adapterType
|
||||
&& (!model.trim() || agent.adapterConfig?.model === model.trim());
|
||||
|
||||
@@ -113,7 +113,7 @@ function SubscriptionConnectionStep({ defaultAccountDialog, onOtherModels, advan
|
||||
adapterType={provider === "google" ? "antigravity_runtime" : provider === "anthropic" ? "claude_local" : provider === "xai" ? "grok_local" : "codex_local"}
|
||||
environmentId={environmentId}
|
||||
canLogin={!loading && canLogin}
|
||||
requiresAgent={environmentLoginRequiresAgent(environment)}
|
||||
requiresAgent={environmentLoginRequiresAgent(environment, caps.data)}
|
||||
agentId={environmentId === (suppliedEnvironmentId ?? settings.data?.defaultEnvironmentId) ? loginAgentId : undefined}
|
||||
localEnvironment={!loading && environment?.driver === "local"}
|
||||
onBack={onCancel}
|
||||
|
||||
@@ -371,7 +371,7 @@ function Setup({
|
||||
&& transition.environmentId === environmentId && transition.runner === defaultRunner) return;
|
||||
resetTest();
|
||||
}, [companyId, environmentId, runner === "auto" ? defaultRunner : undefined]);
|
||||
const loginOnComputer = environmentLoginRequiresAgent(environment);
|
||||
const loginOnComputer = environmentLoginRequiresAgent(environment, caps.data);
|
||||
const canLogin = environmentSupportsLoginPty(environment, caps.data, connectionAdapter ?? adapterType);
|
||||
const loginComputer = useAgentComputerLogin({
|
||||
required: loginOnComputer,
|
||||
|
||||
Reference in new issue
Block a user