mirror of
https://github.com/zoo-apps/zoolabs.io.git
synced 2026-10-30 14:56:27 +00:00
The chat had a function named generateIntelligentResponse: a keyword table that wrote replies in Blue's voice and streamed them a word at a time so they read as inference. Every path reached it — a failed fetch, a bad status, an empty stream — so the site always produced an answer and never had a way to say it could not. Around it a second table fabricated the evidence: hydrophone telemetry at "18.4 kHz - 120 kHz" from the "Cook Inlet Acoustic Array", a quiz with its own answer key, a field notebook, a code sample. None of it came from anywhere. The same shape ran through the rest of the app. login discarded the fetch result and wrote a session on a timer, so any password signed anyone in; signup and the social and wallet buttons invented identities outright. pricing collected a card number and CVC, discarded that fetch too, and showed a receipt for a person who does not exist. 3d, music, video and design posted to models that answer nothing and dressed the silence as generation. All of it is gone, with the auth pages: IAM issues tokens, and until zoolabs.io is registered with it there is nothing here to sign in to. What is left is what can be shown to be true. Blue talks to the model and reports, verbatim, whatever the endpoint says when it will not — today that is a browser CORS refusal, and behind it a 402 for anonymous use. The feeling Blue shows is the model's own choice, named in the reply and checked against the 24 clips that exist; a test asserts the vocabulary and the folder are the same list, which is the check the old code wanted, as it pointed Focused at a file that was never there. Research is the real corpus — 86 papers and 149 proposals, titles and abstracts read out of the sources by scripts/research.mjs, not the "130+" nobody counted. The look is zoo.industries: light, the mark's own five hues, hard black edges. It is built on @hanzo/gui and @hanzo/design, so the tokens come from the fleet. Tailwind is gone, and with it a styles/globals.css that had hand-written its own copy of Tailwind's utilities while importing Tailwind — two systems, one of them silently losing. Verified with Playwright at 390, 834, 1440 and 1920: no console errors, no sideways scroll, search narrowing 86 papers to 2 on "beluga", and the refusal notice appearing in place of an answer. Co-authored-by: Hanzo Dev <[email protected]>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
// The Zoo Labs corpus. public/research.json is generated from the papers and
|
|
// proposals themselves by scripts/research.mjs — re-run it when either moves.
|
|
|
|
export type Work = {
|
|
kind: 'paper' | 'zip'
|
|
id: string
|
|
title: string
|
|
summary: string
|
|
url: string
|
|
topic?: string
|
|
status?: string
|
|
}
|
|
|
|
export type Corpus = { papers: Work[]; zips: Work[] }
|
|
|
|
export const load = async (): Promise<Corpus> => {
|
|
const res = await fetch('/research.json')
|
|
if (!res.ok) throw new Error(`Could not load the corpus (${res.status})`)
|
|
return res.json()
|
|
}
|
|
|
|
/** Ranks title matches above summary matches; every term must appear. */
|
|
export function search(works: Work[], query: string): Work[] {
|
|
const terms = query.toLowerCase().split(/\s+/).filter(Boolean)
|
|
if (!terms.length) return works
|
|
|
|
return works
|
|
.flatMap((w) => {
|
|
const title = w.title.toLowerCase()
|
|
const body = `${title} ${w.summary.toLowerCase()} ${w.id.toLowerCase()}`
|
|
if (!terms.every((t) => body.includes(t))) return []
|
|
return [{ work: w, rank: terms.filter((t) => title.includes(t)).length }]
|
|
})
|
|
.sort((a, b) => b.rank - a.rank)
|
|
.map(({ work }) => work)
|
|
}
|