refactor: Remove dead code and stale references (#1976)

* refactor: remove dead offerGithubAuth exports from cloud agents.ts files

The per-cloud offerGithubAuth re-exports in each cloud's agents.ts were
never called from outside their own module. The actual GitHub auth
orchestration is handled by shared/orchestrate.ts which calls
offerGithubAuth from shared/agent-setup.ts directly.

Also update stale comment in sh/test/fixtures/_shared_agent_assertions.sh
that referenced mock.sh, a test harness file that no longer exists in
the repository.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: collapse multi-line imports to single-line per biome format

After removing offerGithubAuth exports, the remaining 2-import blocks
should be single-line. Also collapse fly/agents.ts 4-import block and
remove trailing blank line.

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
This commit is contained in:
A 2026-02-26 19:04:33 -08:00 committed by GitHub
parent 2e8f30c863
commit f1c2b4d4e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 9 additions and 75 deletions

View file

@ -1,11 +1,7 @@
// aws/agents.ts — AWS Lightsail agent configs (thin wrapper over shared)
import { runServer, uploadFile } from "./aws";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,11 +1,7 @@
// daytona/agents.ts — Daytona agent configs (thin wrapper over shared)
import { runServer, uploadFile } from "./daytona";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,11 +1,7 @@
// digitalocean/agents.ts — DigitalOcean agent configs (thin wrapper over shared)
import { runServer, uploadFile } from "./digitalocean";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,13 +1,7 @@
// fly/agents.ts — Fly.io agent configs (thin wrapper over shared)
import { runServer, uploadFile } from "./fly";
import {
createAgents,
installAgent,
setupOpenclawBatched,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, installAgent, setupOpenclawBatched, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { CloudRunner } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -67,7 +61,3 @@ export function resolveAgent(name: string): FlyAgentConfig {
}
return agent;
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,11 +1,7 @@
// gcp/agents.ts — GCP Compute Engine agent configs (thin wrapper over shared)
import { runServer, uploadFile } from "./gcp";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,11 +1,7 @@
// hetzner/agents.ts — Hetzner Cloud agent configs (thin wrapper over shared)
import { runServer, uploadFile } from "./hetzner";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,11 +1,7 @@
// local/agents.ts — Local machine agent configs (thin wrapper over shared)
import { runLocal, uploadFile } from "./local";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -1,11 +1,7 @@
// sprite/agents.ts — Sprite agent configs (thin wrapper over shared)
import { runSprite, uploadFileSprite } from "./sprite";
import {
createAgents,
resolveAgent as _resolveAgent,
offerGithubAuth as _offerGithubAuth,
} from "../shared/agent-setup";
import { createAgents, resolveAgent as _resolveAgent } from "../shared/agent-setup";
import type { AgentConfig } from "../shared/agents";
import { generateEnvConfig } from "../shared/agents";
@ -22,7 +18,3 @@ export const agents = createAgents(runner);
export function resolveAgent(name: string): AgentConfig {
return _resolveAgent(agents, name);
}
export function offerGithubAuth(): Promise<void> {
return _offerGithubAuth(runner);
}

View file

@ -2,7 +2,7 @@
# Shared per-agent install assertions
# Verifies each agent script uses the correct install method
#
# Sourced by mock.sh _run_agent_assertions(). Expects:
# Source this file and call assert_agent_install CLOUD AGENT. Expects:
# MOCK_LOG — path to the mock call log
# PASSED / FAILED — counters (updated in-place)
# GREEN / RED / NC — color codes