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

@ -0,0 +1,25 @@
-- Key rotation runs queued from the Rotation page (or the API / MCP) and
-- executed by a CLI or agent with `logicsrc teams rotate-keys --from-queue`.
--
-- The server never sees a secret value (E2E rule): a run records WHICH keys to
-- rotate and how (dry run or approved, desktop host, propagate), and later the
-- runner's per-key outcome (statuses, vault and site names, errors), never a
-- value. Additive only.
CREATE TABLE IF NOT EXISTS credshare_rotation_runs (
id TEXT PRIMARY KEY,
team_id TEXT NOT NULL REFERENCES credshare_teams(id) ON DELETE CASCADE,
requested_by TEXT NOT NULL REFERENCES users(id),
keys TEXT NOT NULL, -- JSON array of key names
project TEXT,
env TEXT,
approve INTEGER NOT NULL DEFAULT 0, -- 0 = dry run
options TEXT, -- JSON: { desktop?, propagate?, allowRoll? }
status TEXT NOT NULL DEFAULT 'queued', -- queued | running | done | failed | cancelled
claimed_by TEXT, -- api key id or user id of the runner
claimed_at INTEGER,
finished_at INTEGER,
summary TEXT,
results TEXT, -- JSON array of per-key results (never values)
created_at INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_rotation_runs_team ON credshare_rotation_runs(team_id, status, created_at);