Files
ra-h-os/app/api/tool-results/[id]/route.ts
T
“BeeRad” 733d1c3407 Initial commit: RA-H Open Source Edition
Local-first knowledge management system with BYO API keys.

Features:
- 3-panel UI (Nodes | Focus | Helpers)
- SQLite + sqlite-vec for vector search
- Agent system (Easy/Hard mode orchestrators)
- Content extraction (YouTube, PDF, web)
- Integrate workflow for connection discovery
- Dimension system with auto-assignment

Tech stack:
- Next.js 15 + TypeScript + Tailwind CSS
- Anthropic (Claude) + OpenAI (GPT) via Vercel AI SDK

Setup:
  npm install && npm rebuild better-sqlite3
  scripts/dev/bootstrap-local.sh
  npm run dev

MIT License
2025-12-15 16:14:28 +11:00

29 lines
928 B
TypeScript

import { NextRequest } from 'next/server';
import { resultCache } from '@/services/tools/resultCache';
export async function GET(
request: NextRequest,
ctx: { params: Promise<{ id: string }> }
) {
try {
const { id } = await ctx.params; // Next.js 15: params is a Promise
const data = resultCache.get(id);
if (!data) {
return new Response(JSON.stringify({ success: false, error: 'Not found' }), {
status: 404,
headers: { 'Content-Type': 'application/json' }
});
}
return new Response(JSON.stringify({ success: true, data }), {
status: 200,
headers: { 'Content-Type': 'application/json' }
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) {
return new Response(JSON.stringify({ success: false, error: e?.message || 'Failed' }), {
status: 500,
headers: { 'Content-Type': 'application/json' }
});
}
}