Rotation on every surface: desktop rotator, Rotation page + run queue, MCP tools (CLI 0.15.0) (#269)

- method "desktop": dashboard-only keys (OpenAI, ElevenLabs, Brave Search,
  Civitai, Cloudflare Global API Key roll, Anthropic/Claude OAuth report-only)
  rotated by an agent on a W3BS Agentic Desktop Layer host (--desktop /
  LOGICSRC_DESKTOP_HOST). Agent browser only, old key by its last 4 chars,
  DOM-to-file capture (wl-paste fallback), two-phase revoke after health,
  rollback deletes the new key, remote file shredded. needs-login and busy
  are waits, not failures. Roll needs --allow-roll plus a capture self-test.
- app.logicsrc.com: /teams/:slug/rotation plan page + rotation run queue
  (migration 010), API routes; runner: rotate-keys --from-queue.
- MCP: rotation_plan, rotation_set, rotate_keys (dry run default), rotation_runs.
- docs/rotation.md: desktop rotators and every surface.

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sh1pt-actions-fleet[bot] 2026-10-29 04:30:18 +00:00 • committed by GitHub
parent aec3e5f5fa
commit 87bbc50423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 2191 additions and 35 deletions

View file

@ -150,6 +150,34 @@ export class TeamApiError extends Error {
}
}
export interface RemoteRotationPlanItem {
key: string;
method: string;
provider?: string;
recipe?: string;
automatic: boolean;
owner: string | null;
url: string | null;
steps: string[];
vaults: string[];
vaultCount: number;
lastRotated: string;
hasEntry: boolean;
[k: string]: unknown;
}
export interface RemoteRotationRun {
id: string;
keys: string[];
project: string | null;
env: string | null;
approve: boolean;
options: { desktop?: string; propagate?: boolean; allowRoll?: boolean };
status: string;
createdAt: number;
summary: string | null;
}
export class TeamClient {
private readonly apiUrl: string;
private token?: string;
@ -272,6 +300,24 @@ export class TeamClient {
putGrant(vaultId: string, email: string, wrappedDek: string) {
return this.request<{ ok: boolean }>("POST", `/vaults/${encodeURIComponent(vaultId)}/grants`, { email, wrappedDek });
}
// ---- key rotation: plan + run queue (never values) ----
rotationPlan(slug: string, query: { project?: string; env?: string; key?: string } = {}) {
const qs = new URLSearchParams(Object.entries(query).filter((e): e is [string, string] => Boolean(e[1]))).toString();
return this.request<{ team: string; plan: RemoteRotationPlanItem[] }>("GET", `/teams/${encodeURIComponent(slug)}/rotation${qs ? `?${qs}` : ""}`);
}
listRotationRuns(slug: string, status?: string) {
return this.request<{ runs: RemoteRotationRun[] }>("GET", `/teams/${encodeURIComponent(slug)}/rotation/runs${status ? `?status=${encodeURIComponent(status)}` : ""}`);
}
queueRotationRun(slug: string, body: { keys: string[]; project?: string; env?: string; approve?: boolean; desktop?: string; propagate?: boolean; allowRoll?: boolean }) {
return this.request<{ run: RemoteRotationRun }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/runs`, body);
}
claimRotationRun(slug: string, id: string) {
return this.request<{ run: RemoteRotationRun }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/runs/${encodeURIComponent(id)}/claim`);
}
reportRotationRun(slug: string, id: string, body: { status?: "failed"; error?: string; results: unknown[] }) {
return this.request<{ run: RemoteRotationRun }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/runs/${encodeURIComponent(id)}/result`, body);
}
listSecrets(vaultId: string) {
return this.request<{ vaultId: string; keyVersion?: number; secrets: RemoteSecret[] }>("GET", `/vaults/${encodeURIComponent(vaultId)}/secrets`);
}

View file

@ -84,7 +84,9 @@ export {
type RemoteApiKey,
type RemoteKeyGrant,
type RemoteAuditRow,
type CreateApiKeyInput
type CreateApiKeyInput,
type RemoteRotationPlanItem,
type RemoteRotationRun
} from "./client.js";
export {
ensureApiKeyIdentity,