Skip to content

feat(utilities): block reserved usernames for agentic protocols and AI integrations#632

Merged
mtrunkat merged 7 commits into
masterfrom
claude/block-reserved-usernames-JFNq3
May 11, 2026
Merged

feat(utilities): block reserved usernames for agentic protocols and AI integrations#632
mtrunkat merged 7 commits into
masterfrom
claude/block-reserved-usernames-JFNq3

Conversation

@mtrunkat
Copy link
Copy Markdown
Member

@mtrunkat mtrunkat commented May 8, 2026

Adds keywords for emerging AI/agent payment protocols, major AI agent frameworks and IDE integrations partnered with Apify (crewai, langchain, cursor, claude-code, zapier, etc.), Apify routes/features (contact-sales, creator-plan, standby, pay-per-event, ultimate-scraper, agent-skills)...

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg

claude added 2 commits May 8, 2026 14:19
…I integrations

Adds keywords for emerging AI/agent payment protocols (x402, mpp, ap2,
acp, ucp, l402, a2a, kyapay, skyfire, etc.), major AI agent frameworks
and IDE integrations partnered with Apify (crewai, langchain, cursor,
claude-code, zapier, etc.), Apify routes/features (contact-sales,
creator-plan, standby, pay-per-event, ultimate-scraper, agent-skills),
and all current Apify blog topic slugs to prevent collision with
apify.com/[username] URLs.

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg
…list

Remove brand/company names (zapier, n8n, vercel-ai, langchain, crewai,
cursor, pinecone, etc.) and blog topic slugs so those companies and
topic owners can later create or claim their usernames. Keep open
agentic protocols (x402, mpp, ap2, acp, ucp, l402, a2a, kyapay, ...),
generic terms (ai, agent, agentic), and Apify-specific routes/features.

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg
@github-actions github-actions Bot added t-management Issues with this label belong to the CTO or engineering managers. tested Temporary label used only programatically for some analytics. labels May 8, 2026
claude and others added 4 commits May 8, 2026 15:02
…arketing slugs

Adds focused groups based on business risk: trust/verification handles
(official, verified, apify-official, apify-hq, staff, ...), Apify
subdomain/service names that may grow into routes (console, sdk, cli,
studio, gateway, mcp-server, ...), region codes (asia, latam, emea,
apac, i18n, ...), currency/payment generics (usd, usdc, btc, crypto,
stablecoin, payments, ...), compliance/certifications (soc2, iso-27001,
hipaa, pci-dss, kyc, ...), open-source/community roles (contributor,
maintainer, oss, ...), anti-abuse/scam-bait names (spam, phishing,
giveaway, airdrop, ...), and marketing/campaign slugs (launch, webinar,
meetup, summit, ...). 1- and 2-char names are already blocked by
USERNAME.MIN_LENGTH=3 so 2-char codes (us, eu, etc.) are not added.

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg
Remove redundant entries that are blocked elsewhere:
- `ai` is blocked by USERNAME.MIN_LENGTH=3
- All `apify*` variants (apify.com, apify-support, apify-team, apify-hq,
  apifyhq, apify-news, apify-blog, apify-events, apify-staff,
  apify-help, apify-giveaway, apify-official, apify-inc, apifyinc) are
  blocked by USERNAME.RESTRICTED_REGEX `/^(?!.*apify)[a-z0-9_.-]{3,30}$/i`

Drop the corresponding tests for `ai`, `apify.com`, `apify_com`, and
`apifyxcom` since the regex pattern they exercised was removed.

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg
Even though USERNAME.RESTRICTED_REGEX in @apify/consts already rejects
any username containing 'apify', keep the explicit `apify.com` regex
(plus its tests) here as a safety net in case the upstream check is
ever bypassed or removed.

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg
@mtrunkat mtrunkat marked this pull request as ready for review May 11, 2026 07:50
Copilot AI review requested due to automatic review settings May 11, 2026 07:50
@mtrunkat mtrunkat added the adhoc Ad-hoc unplanned task added during the sprint. label May 11, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the isForbiddenUsername() reserved-username set to include additional AI/agent-related terms, agentic payment/protocol keywords, and Apify-specific route/feature slugs, and updates the unit test suite accordingly.

Changes:

  • Extended FORBIDDEN_USERNAMES_REGEXPS with new reserved terms (AI/agent, agentic payments/protocols, trust/verification handles, and various platform/service slugs).
  • Added test assertions covering a subset of the newly reserved terms.
  • Adjusted brand-protection entries by removing apify-support / apify-team from the forbidden list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/utilities/src/utilities.ts Adds many new reserved username patterns; also removes some previously forbidden apify-* brand handles.
test/utilities.test.ts Adds test coverage for newly added reserved keywords in isForbiddenUsername().
Comments suppressed due to low confidence (1)

packages/utilities/src/utilities.ts:460

  • PR description mentions adding reserved keywords for major AI agent frameworks / IDE integrations (e.g. crewai, langchain, cursor, claude-code, zapier), but none of those strings appear in FORBIDDEN_USERNAMES_REGEXPS (or elsewhere in the repo). If those are intended to be blocked, they should be added here; otherwise, please update the PR description to match the actual change set.
    // AI / LLM related
    'agent',
    'agents',
    'agentic',
    'llms',
    'llm',
    'openai',
    'anthropic',
    'claude',
    'copilot',
    'mistral',

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/utilities/src/utilities.ts
Comment thread packages/utilities/src/utilities.ts Outdated
Comment thread test/utilities.test.ts
`sdk` was already present earlier in FORBIDDEN_USERNAMES_REGEXPS;
the entry added in the recent subdomain/services group was a
duplicate flagged by Copilot review.

https://claude.ai/code/session_014z55ZWS7ebA5nEWwyb6nCg
@mtrunkat mtrunkat merged commit 968257b into master May 11, 2026
9 checks passed
@mtrunkat mtrunkat deleted the claude/block-reserved-usernames-JFNq3 branch May 11, 2026 10:00
'brand',
'branding',
'verified',
'apify-support',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing the protection of apify-team and apify-team usernames?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least add those two to unit test if they are covered other way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-management Issues with this label belong to the CTO or engineering managers. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants