init
Release Please / release-please (push) Failing after 4m2s
Web CI / web typecheck + build (push) Successful in 3m39s
CodeQL Analysis / Analyze (javascript-typescript) (push) Failing after 1h1m49s
CodeQL Analysis / Analyze (go) (push) Failing after 1h1m49s

This commit is contained in:
redlineo committed 2026-07-13 10:14:00 +03:00
commit d295c7f139
1527 files changed
+270726

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { NextResponse } from "next/server";
import { readMemory, rememberFact } from "@/lib/career-ops";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export async function GET() {
return NextResponse.json({ memory: readMemory() });
}
// Append a durable fact the assistant learned about the user. Written to the
// CANONICAL modes/_profile.md (single source of truth) so the CLI/TUI see it too
// — never a web-only memory store.
export async function POST(req: Request) {
let b: { fact?: string };
try {
b = await req.json();
} catch {
return NextResponse.json({ error: "bad json" }, { status: 400 });
}
const fact = (b.fact ?? "").toString();
if (!fact.trim()) return NextResponse.json({ error: "fact required" }, { status: 400 });
const result = rememberFact(fact);
if (result === "error") return NextResponse.json({ error: "write failed" }, { status: 500 });
return NextResponse.json({ ok: true, deduped: result === "deduped" });
}