import { CHANNELS_DIR } from "@/lib/paths"; import { REPO_ROOT } from "@/lib/paths.mjs"; import { handleDigestContext, readReviewPlan } from "@/lib/digestContextReview.mjs"; export const dynamic = "force-dynamic"; // THE CHANNEL CONTEXT NOTES' REVIEW (lib/digestContextReview.mjs; the page is // /tools/digest-context): the ONE route that promotes or refuses a channel's // digest-context.suggested.md. Nothing calls it but the operator's press. // // GET every channel's note: pending, refused, promoted -- each with its evidence // POST { slug, decision: "yes", sha256 } digest-context.suggested.md -> digest-context.md (never over an active one) // POST { slug, decision: "no", sha256 } digest-context.suggested.refused.json beside it; the note stays // // `sha256` is the note's as the page showed it: a note changed since is a 409. // Any Authorization header is a 403 -- an agent never promotes or refuses one. const o = { channelsDir: CHANNELS_DIR, readPlan: () => readReviewPlan(REPO_ROOT) }; export async function GET(request: Request) { return handleDigestContext(request, o); } export async function POST(request: Request) { return handleDigestContext(request, o); }