Hybrid search, not just cosine
pgvector similarity, re-ranked with a boost for exact identifiers — ask about useAuthStore and you get useAuthStore — plus per-file diversity so one big file can't hog the answer.
score = cos + id_boost − test_penalty
Zenoryx snips a GitHub repository along its real seams — functions, classes, methods — files every piece in a vector index, then pastes the right ones back together as a streamed answer, with every claim cited to the exact line it came from.
1import { createHmac } from "node:crypto";2import { db } from "./db";34const TTL = 7 * 24 * 3600 * 1000;5const SECRET = process.env.COOKIE_SECRET;67export function sign(raw: string) {8 const mac = createHmac("sha256", SECRET);9 return raw + "." + mac.update(raw)10 .digest("hex");11}1213export async function verify(cookie: string) {14 const [raw] = cookie.split(".");15 if (sign(raw) !== cookie) return null;16 const s = await db.sessions.get(raw);17 if (!s || s.expiresAt < Date.now()) {18 return null;19 }20 return s.user;21}2223export class SessionStore {24 async create(userId: string) {25 const token = crypto.randomUUID();26 const expiresAt = Date.now() + TTL;27 await db.sessions.put(token, expiresAt);28 return sign(token);29 }30}
function_declaration
export async function verify(cookie: string) {const [raw] = cookie.split(".");
function_declaration
export function sign(raw: string) {const mac = createHmac("sha256", SECRET);
class_declaration
export class SessionStore {async create(userId: string) {
module scope
import { createHmac } from "node:crypto";import { db } from "./db";
Animated demo: Zenoryx cuts a TypeScript file into four chunks along its declarations, ranks them, and answers “How are session cookies verified?” with citations to the chunks verify, sign, SessionStore and the module scope.
01why cut along the seams?
Most RAG pipelines slice files every N characters, sawing functions in half and orphaning signatures from their bodies. Zenoryx walks the abstract syntax tree and keeps declarations whole — then sweeps up the top-level glue so nothing is silently dropped.
1export async function upload(req, res) {2 const file = req.files?.avatar;3 if (!file) return res.status(400).end();45 const ext = path.extname(file.name);6 if (!ALLOWED.has(ext)) {7 return res.status(415).end();8 }910 const key = `${req.user.id}/${ext}`;11 await storage.put(key, file.data);12 return res.json({ url: cdn(key) });13}1415function cdn(key) {16 return `${process.env.CDN}/${key}`;17}1819const ALLOWED = new Set([".png", ".jpg"]);
Retrieval hands the model half an if-statement and a function signature with no body. It fills the gaps by guessing.
1export async function upload(req, res) {2 const file = req.files?.avatar;3 if (!file) return res.status(400).end();45 const ext = path.extname(file.name);6 if (!ALLOWED.has(ext)) {7 return res.status(415).end();8 }910 const key = `${req.user.id}/${ext}`;11 await storage.put(key, file.data);12 return res.json({ url: cdn(key) });13}1415function cdn(key) {16 return `${process.env.CDN}/${key}`;17}1819const ALLOWED = new Set([".png", ".jpg"]);
Every chunk is a whole declaration with its name, signature and line range — so answers can cite exactly where they came from.
02how it works
Paste a public repository. A durable background job ranks the files that matter, cuts, annotates and embeds them, then reads the recent commit history — with a live progress page while you wait.
Fetching the repo & ranking files.
GitHub tree · raw CDN
Cutting files at the seams.
Tree-sitter AST
Annotating what each file does.
free model pool
Turning chunks into 3072-d vectors.
batched · pgvector
Reading the recent commits.
diff → plain English
03under the hood
One Node process serves the API and runs ingestion; Postgres holds vectors, sessions and the job queue. The browser only ever talks to its own origin, so session cookies stay first-party.
pgvector similarity, re-ranked with a boost for exact identifiers — ask about useAuthStore and you get useAuthStore — plus per-file diversity so one big file can't hog the answer.
score = cos + id_boost − test_penalty
Answers cite [n] sources. Each one resolves to a chunk with its symbol and line range, linked to GitHub at the exact commit that was indexed.
blob/<sha>/lib/index.js#L159-L190
Seven free-tier models (Gemini Flash-Lite + Groq gpt-oss/qwen) behind one gateway, each with its own token bucket. Calls wait for budget instead of eating 429s; streams only fail over before the first token.
rpm + tpm buckets · per-day quota parking
No Redis to babysit. Jobs are claimed atomically, retried with backoff, handed back on shutdown and recovered on boot — a redeploy mid-ingestion loses nothing.
UPDATE … WHERE status = 'PENDING'
Server-side sessions in HttpOnly cookies signed with HMAC-SHA256, checked in constant time and revocable instantly — served first-party through the /api proxy.
bcrypt(12) · timingSafeEqual
File contents come from GitHub's raw CDN (no API quota), embeddings are batched and paced, and health checks never wake the database.
Neon · Gemini · Groq · GitHub = $0
coupon · no. 0001 · valid forever
Point it at a repo. Ask it anything. No card, no trial timer — it runs entirely on free tiers.