respond.ts
This file
Path
apps/web/src/features/agents/respond.ts
21 lines · 568 bytes · TypeScript
Last changed by
Merge build/comments-web-features into mainoscabrielbefore adoption74bfc72
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–21why, one step back1import type { McpCard } from "./llms.ts";23const BRIEFLY = "public, max-age=60";45export const markdown = (text: string, status = 200) =>6 new Response(text, {7 headers: {8 "cache-control": status === 200 ? BRIEFLY : "no-store",9 "content-type": "text/markdown; charset=utf-8",10 },11 status,12 });1314export const cardResponse = (card: McpCard) =>15 Response.json(card, { headers: { "cache-control": BRIEFLY } });1617export const unavailable = () =>18 markdown(19 "# Unavailable\n\nThe platform did not answer. Try again in a minute.\n",20 50321 );