Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

4.2 KB
Raw Blame
name = "codync-cloud"
main = "src/index.ts"
compatibility_date = "2026-09-01"
compatibility_flags = ["nodejs_compat"]

# main: production at api.codync.dev (Clerk production instance); mcp.codync.dev is the cloud assistant's
# MCP connector (src/routes/assistant.ts), served by the same Worker.
routes = [{ pattern = "api.codync.dev", custom_domain = true }, { pattern = "mcp.codync.dev", custom_domain = true }]

[[migrations]]
tag = "v1"
new_sqlite_classes = ["ComputerRelay"]

[[r2_buckets]]
binding = "ICONS"
bucket_name = "codync-icons"

[[ratelimits]]
name = "ICON_LIMITER"
namespace_id = "1041"
simple = { limit = 30, period = 60 }

[vars]
CLERK_ISSUER = "https://clerk.codync.dev"

[[d1_databases]]
binding = "DB"
database_name = "codync"
database_id = "858f4ad9-d3b5-4f3b-860f-464803a00017"
migrations_dir = "migrations"

[[durable_objects.bindings]]
name = "RELAY"
class_name = "ComputerRelay"

# New computers per IP (POST /v1/host/register).
[[ratelimits]]
name = "REGISTER_LIMITER"
namespace_id = "1001"
simple = { limit = 10, period = 60 }

# Credential issuance per account; separate from registration limits.
[[ratelimits]]
name = "TURN_LIMITER"
namespace_id = "1011"
simple = { limit = 12, period = 60 }

# Public routine webhook deliveries per sender IP and hook (POST /v1/hooks/...).
[[ratelimits]]
name = "HOOK_LIMITER"
namespace_id = "1021"
simple = { limit = 60, period = 60 }

# Cloud assistant (MCP connector) requests per account (POST /mcp).
[[ratelimits]]
name = "ASSISTANT_LIMITER"
namespace_id = "1031"
simple = { limit = 120, period = 60 }

# Short pairing codes typed per account and per IP (GET /v1/pairing-codes/...); a miss counts twice.
[[ratelimits]]
name = "PAIRING_CODE_LIMITER"
namespace_id = "1051"
simple = { limit = 10, period = 60 }

# Sweep expired requests and nonces; wake the release gate (src/release-gate.ts).
# src/index.ts routes on these exact strings (SWEEP_CRON, RELEASE_GATE_CRON): change both together.
[triggers]
crons = ["*/15 * * * *", "*/5 * * * *"]

# dev: the deployed test environment at dev-api.codync.dev and dev-mcp.codync.dev (Clerk development instance).
[env.dev]
name = "codync-cloud-dev"
r2_buckets = [{ binding = "ICONS", bucket_name = "codync-icons-dev" }]
routes = [{ pattern = "dev-api.codync.dev", custom_domain = true }, { pattern = "dev-mcp.codync.dev", custom_domain = true }]
vars = { CLERK_ISSUER = "https://sunny-mollusk-8651.clerk.accounts.dev", RELAY_NEEDS_ACCOUNT = "1" }
d1_databases = [{ binding = "DB", database_name = "codync-dev", database_id = "0c03c398-3cec-4f06-a76e-998176ca19ae", migrations_dir = "migrations" }]
durable_objects.bindings = [{ name = "RELAY", class_name = "ComputerRelay" }]
ratelimits = [{ name = "ICON_LIMITER", namespace_id = "1042", simple = { limit = 30, period = 60 } }, { name = "REGISTER_LIMITER", namespace_id = "1002", simple = { limit = 10, period = 60 } }, { name = "TURN_LIMITER", namespace_id = "1012", simple = { limit = 12, period = 60 } }, { name = "HOOK_LIMITER", namespace_id = "1022", simple = { limit = 60, period = 60 } }, { name = "ASSISTANT_LIMITER", namespace_id = "1032", simple = { limit = 120, period = 60 } }, { name = "PAIRING_CODE_LIMITER", namespace_id = "1052", simple = { limit = 10, period = 60 } }]
triggers = { crons = ["*/15 * * * *"] }

# local: wrangler dev / e2e with a local D1; CLERK_JWT_KEY is injected by the test (--var).
[env.local]
name = "codync-cloud-local"
r2_buckets = [{ binding = "ICONS", bucket_name = "codync-icons-local" }]
routes = []
vars = { CLERK_ISSUER = "https://clerk.test.local" }
d1_databases = [{ binding = "DB", database_name = "codync-local", database_id = "local", migrations_dir = "migrations" }]
durable_objects.bindings = [{ name = "RELAY", class_name = "ComputerRelay" }]
ratelimits = [{ name = "ICON_LIMITER", namespace_id = "1043", simple = { limit = 30, period = 60 } }, { name = "REGISTER_LIMITER", namespace_id = "1003", simple = { limit = 10, period = 60 } }, { name = "TURN_LIMITER", namespace_id = "1013", simple = { limit = 12, period = 60 } }, { name = "HOOK_LIMITER", namespace_id = "1023", simple = { limit = 60, period = 60 } }, { name = "ASSISTANT_LIMITER", namespace_id = "1033", simple = { limit = 120, period = 60 } }, { name = "PAIRING_CODE_LIMITER", namespace_id = "1053", simple = { limit = 10, period = 60 } }]