Skip to content

Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.

fix(account-rotation): restore state key migrations and lease bucket default

Cursor Agentf14265124a7c
diff --git a/claude-ops/scripts/account-rotation/account-leases.mjs b/claude-ops/scripts/account-rotation/account-leases.mjs
index 0c22f185..5637a88b 100644
--- a/claude-ops/scripts/account-rotation/account-leases.mjs
+++ b/claude-ops/scripts/account-rotation/account-leases.mjs
@@ -6,7 +6,7 @@
// must NEVER be ACTIVE on both machines concurrently.
//
// Coordination store: a small private S3 object per account.
-// bucket: claude-account-leases (us-east-1, all public access
+// bucket: claude-account-leases-<AWS_ACCOUNT_ID> (us-east-1, all public access
// blocked, SSE-AES256). Override via CLAUDE_LEASE_BUCKET.
// key: leases/<accountKey>.json (one object per account → no
// read-modify-write races between machines)
@@ -35,7 +35,7 @@
import { spawnSync } from 'child_process';
import { hostname } from 'os';
-const LEASE_BUCKET = process.env.CLAUDE_LEASE_BUCKET || 'claude-account-leases';
+const LEASE_BUCKET = process.env.CLAUDE_LEASE_BUCKET || 'claude-account-leases-<AWS_ACCOUNT_ID>';
const LEASE_PREFIX = 'leases/';
const LEASE_REGION = process.env.CLAUDE_LEASE_REGION || 'us-east-1';
// Daemon heartbeats every loop (seconds–minutes); 2h TTL tolerates pauses,
diff --git a/claude-ops/scripts/account-rotation/daemon.mjs b/claude-ops/scripts/account-rotation/daemon.mjs
index b8cfeb4d..0bb568d9 100644
--- a/claude-ops/scripts/account-rotation/daemon.mjs
+++ b/claude-ops/scripts/account-rotation/daemon.mjs
@@ -135,7 +135,7 @@ function notify(title, msg) {
// Legacy account-key renames: old label → new canonical key.
// Applied once per readState() call to keep state.json consistent as labels evolve.
const STATE_KEY_MIGRATIONS = {
- 'old-label': 'new-label', // placeholder: replace with real migration mappings as needed
+ 'account-personal': 'account-main', // label changed: personal org is now just "account-main"
};
function migrateStateKey(key) {
diff --git a/claude-ops/scripts/account-rotation/rotate.mjs b/claude-ops/scripts/account-rotation/rotate.mjs
index 6841c8c9..65e9b579 100644
--- a/claude-ops/scripts/account-rotation/rotate.mjs
+++ b/claude-ops/scripts/account-rotation/rotate.mjs
@@ -194,7 +194,7 @@ function magicLinkInbox() {
// Legacy account-key renames: old label → new canonical key.
// Keep in sync with daemon.mjs STATE_KEY_MIGRATIONS.
const STATE_KEY_MIGRATIONS = {
- 'old-label': 'new-label',
+ 'account-personal': 'account-main',
};
function readState() {