Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. πŸ”₯

Update agent-signup.ts

Nicolas4c71516d042a
diff --git a/apps/api/src/controllers/v2/agent-signup.ts b/apps/api/src/controllers/v2/agent-signup.ts
index 17cf4bed0..e320c173e 100644
--- a/apps/api/src/controllers/v2/agent-signup.ts
+++ b/apps/api/src/controllers/v2/agent-signup.ts
@@ -40,10 +40,7 @@ const GMAIL_DOMAINS = new Set(["gmail.com", "googlemail.com"]);
* (dots in Gmail, +suffix in most providers) all map to the same bucket.
* Only used for rate-limit keys β€” the original email is stored in the DB.
*/
-function normalizeEmailForRateLimit(
- email: string,
- domain: string,
-): string {
+function normalizeEmailForRateLimit(email: string, domain: string): string {
let [local] = email.split("@");
// Strip +suffix (supported by Gmail, Outlook, Proton, Fastmail, etc.)
@@ -61,7 +58,7 @@ function normalizeEmailForRateLimit(
}
// Rate limit values β€” used by limiters and error copy so they stay in sync
-const AGENT_SIGNUP_IP_LIMIT = 3;
+const AGENT_SIGNUP_IP_LIMIT = 1;
const AGENT_SIGNUP_DOMAIN_LIMIT = 20;
const AGENT_SIGNUP_IP_LIMIT_SIDEGUIDE = 9; // 3x default
const AGENT_SIGNUP_DOMAIN_LIMIT_SIDEGUIDE = 60; // 3x default
@@ -104,7 +101,7 @@ const agentSignupSchema = z.object({
.string()
.email()
.refine(
- (e) =>
+ e =>
!e.includes("+") ||
(e.endsWith("@sideguide.dev") && e.includes("+test")),
{
diff --git a/apps/api/src/routes/v2.ts b/apps/api/src/routes/v2.ts
index 5456453c0..6e6ca9bd9 100644
--- a/apps/api/src/routes/v2.ts
+++ b/apps/api/src/routes/v2.ts
@@ -409,7 +409,7 @@ v2Router.post(
);
// Agent signup routes (public, no auth required β€” rate limiting is handled inside the controller)
-v2Router.post("/agent-signup", wrap(agentSignupController));
+// v2Router.post("/agent-signup", wrap(agentSignupController));
v2Router.post("/agent-signup/confirm", wrap(agentSignupConfirmController));
v2Router.post("/agent-signup/block", wrap(agentSignupBlockController));