Files
Cursor Agentandz 5561f61683 site: glass at rest, and counts from this build's snapshots
The marketing bar is glass before the page scrolls. The chrome, palette, and homepage gates follow the new nav. The model and repository snapshots this build read are 561 and 825.

Co-authored-by: z <[email protected]>
2026-10-26 22:10:56 +00:00

63 lines
2.3 KiB
TypeScript

/**
* What the launch hides, in one place, so putting it back is one flag.
*
* `FOCUS` withholds these routes from the index (`policy()` in lib/publish.ts
* answers `noindex`). It does not delete a page and it does not redirect one:
* a Go import path still answers `?go-get=1`, and a product page under
* `/products/<id>` stays published. Flip `FOCUS` to false and the index is
* what it was.
*/
import { OWNED } from './go-modules.ts'
export const FOCUS = true
/** Career listings the launch does not offer. The pages still build. */
export const HIDDEN_CAREERS = ['quantum-computing-researcher', 'robotics-systems-engineer'] as const
const HIDDEN_EXACT = new Set<string>([
// Hanzo OS: the product index and the "start a company" page. Layer pages
// under /products/<id> stay indexable.
'/products',
'/start',
'/reviews',
'/calculator',
...OWNED.map((name) => `/${name}`),
...HIDDEN_CAREERS.map((id) => `/careers/${id}`),
])
/** A surface: the page and everything under it. */
const HIDDEN_SURFACES = ['/university'] as const
/**
* Model pages that are aliases, dated snapshots or a comparator's own card.
* A vendor date stamp on a current id (a lab other than OpenAI, or a month
* without a day) stays indexed.
*/
export function oddModel(route: string): boolean {
const path = route.split(/[?#]/)[0]
const match = /^\/models\/([^/]+)\/([^/]+)$/.exec(path)
if (!match) return false
const org = decodeURIComponent(match[1])
const slug = decodeURIComponent(match[2])
if (org.startsWith('~') || slug.startsWith('~')) return true
if (slug.endsWith(':batch')) return true
if (org === 'openai' && /-\d{4}$/.test(slug)) return true
if (/-\d{4}-\d{2}-\d{2}$/.test(slug)) return true
if (slug === 'claude-fable-5' || slug === 'claude-fable-5.1') return true
return false
}
/** True when the launch withholds this route. */
export function withheld(route: string): boolean {
if (!FOCUS) return false
const path = route.split(/[?#]/)[0]
if (HIDDEN_EXACT.has(path)) return true
if (HIDDEN_SURFACES.some((surface) => path === surface || path.startsWith(`${surface}/`))) return true
return oddModel(path)
}
/** A career the index lists. The two hidden listings stay out while FOCUS is on. */
export function shownCareer(id: string): boolean {
return !FOCUS || !(HIDDEN_CAREERS as readonly string[]).includes(id)
}