Skip to content
49 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Initial g1t: services, event bus, intents and attempts1// Namespaces follow GitHub's rules (no leading, trailing or doubled hyphens),
2// so "--" can never appear inside one.
3const NAMESPACE = /^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$/;
4const REPO_NAME = /^[a-z0-9._-]{1,100}$/;
5
6/** Routes and reserved words that may not be registered as usernames. */
7const RESERVED = new Set([
8 "api", "mcp", "login", "logout", "register", "new", "settings", "search",
Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036)9 "admin", "auth", "integrations", "pulls", "issues", "verify", "confirm-email", "forgot", "reset", "device", "workspaces", "u", "oauth", "assets", "avatars", "docs", "explore", "about", "pricing",
g1t is one name: its agent's work, commits and comments show as @g1t, and nobody can claim g1t or g1t-agent10 // g1t itself, and the name its agent once went by: everything g1t does is
Account deletion: from Settings and sudo, soft for 30 days, then purged to ghost (identity 0037)11 // shown as `g1t`, so nobody else may be called either. `ghost` wrote what
12 // a deleted account wrote (`GHOST_USERNAME`).
13 "g1t", "g1t-agent", "ghost",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look14 // Trust pages on g1t.sh, and names kept for them.
15 "policies", "security", "support", "status", "terms", "privacy", "help", "blog",
16 // Invite links, and the waitlist.
17 "invite", "invites", "waitlist",
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member18 // The container registry, at g1t.sh/v2/.
19 "v2",
Inbox: a bell in the top bar opens it beside the page, and /inbox holds it all20 // g1t.sh/inbox, and the name it might also go by.
21 "inbox", "notifications",
Initial g1t: services, event bus, intents and attempts22]);
23
g1t is one name: its agent's work, commits and comments show as @g1t, and nobody can claim g1t or g1t-agent24/** Whether `value`, whatever its case, is a name nobody can register: a route, or g1t's own. */
25export function isReservedName(value: string): boolean {
26 return RESERVED.has(value.trim().toLowerCase());
27}
28
Initial g1t: services, event bus, intents and attempts29export function isValidNamespace(value: string): boolean {
Merge branch 'worktree-agent-a8385d293d42c913a'30 return isNamespaceShaped(value) && !isReservedName(value);
31}
32
33/**
34 * Whether `value` has a namespace's shape, reserved or not: what a
35 * workspace's old name or an alias staff set (such as `g1t`) can be.
36 */
37export function isNamespaceShaped(value: string): boolean {
38 return NAMESPACE.test(value);
Initial g1t: services, event bus, intents and attempts39}
40
41export function isValidRepoName(value: string): boolean {
Agents as a team: lifecycle, merge queue, billing and a new shell42 return (
43 REPO_NAME.test(value) &&
44 !value.startsWith(".") &&
45 !value.endsWith(".git") &&
46 // `/<workspace>/-/…` holds the workspace's own pages.
47 value !== "-"
48 );
Initial g1t: services, event bus, intents and attempts49}

This file's history is long; its oldest lines are credited to the oldest commit read.