feat: sync open-source context and capsule removal

- remove legacy contexts surfaces from the app, MCP bridge, standalone server, and docs
- keep getContext and retrieveQueryContext while aligning the simplified graph-only contract
- harden dev startup migration behavior and disable the accidental chat surface in open source

Generated with Codex
This commit is contained in:
“BeeRad”
2026-04-17 12:34:51 +10:00
parent 97eeb0789f
commit 07754f5030
87 changed files with 2688 additions and 4861 deletions
+5 -2
View File
@@ -1,9 +1,12 @@
import { NextRequest, NextResponse } from 'next/server';
import { applyRequestSupabaseAuth } from '@/services/auth/internalAuth';
import { directNodeLookup } from '@/services/retrieval/directNodeLookup';
export const runtime = 'nodejs';
export async function POST(request: NextRequest) {
const cleanupAuth = applyRequestSupabaseAuth(request);
try {
const body = await request.json();
const query = typeof body.query === 'string' ? body.query : '';
@@ -18,8 +21,6 @@ export async function POST(request: NextRequest) {
const result = await directNodeLookup({
search: query,
limit: typeof body.limit === 'number' ? body.limit : undefined,
context_name: typeof body.context_name === 'string' ? body.context_name : undefined,
contextId: typeof body.contextId === 'number' ? body.contextId : undefined,
createdAfter: typeof body.createdAfter === 'string' ? body.createdAfter : undefined,
createdBefore: typeof body.createdBefore === 'string' ? body.createdBefore : undefined,
eventAfter: typeof body.eventAfter === 'string' ? body.eventAfter : undefined,
@@ -39,5 +40,7 @@ export async function POST(request: NextRequest) {
success: false,
error: error instanceof Error ? error.message : 'Failed to run direct node lookup',
}, { status: 500 });
} finally {
cleanupAuth();
}
}