Backend: - Add Tavily web search tool wrapper (tools/web_search.py) - Add PDF reader + ChromaDB vector store tool (tools/pdf_reader.py) - Bind tools to LLM calls via .bind_tools() in dynamic_graph_builder - Implement God Mode using LangGraph interrupt_before + MemorySaver - Add approve/reject/modify API endpoints for God Mode - Add PDF upload endpoint with ingestion pipeline - Add persistent run history (CouncilRun model + run_service + API) - Add Alembic migration for council_runs table - Enhance WebSocket to emit run_paused and run_resumed events - Add tests for tools, God Mode, and run history Frontend: - Add God Mode approval UI (GodModePanel component) - Add Auto-Pilot / God Mode toggle in Konferenzzimmer - Add functional PDF upload handler - Add Conditional Edge editor (EdgeSettingsPanel component) - Add edge click selection in ArchitectCanvas - Update Zustand store with edge selection and update actions - Update types for God Mode, execution modes, and WS events - Update API client with God Mode, PDF upload, and blueprint run endpoints - Update WebSocket hook for paused/resumed events - Add Vitest config and frontend tests (store, parser, types, API) https://claude.ai/code/session_017U6idFgaqnYTXzPxA7mxMv
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { wsUrl } from "@/app/utils/api-client";
|
|
|
|
describe("wsUrl", () => {
|
|
it("should convert http to ws", () => {
|
|
const url = wsUrl("test-run-id");
|
|
expect(url).toBe("ws://localhost:8000/ws/council/test-run-id");
|
|
});
|
|
});
|
|
|
|
describe("API client types", () => {
|
|
it("should export runApi with expected methods", async () => {
|
|
const { runApi } = await import("@/app/utils/api-client");
|
|
expect(runApi.start).toBeDefined();
|
|
expect(runApi.startFromBlueprint).toBeDefined();
|
|
expect(runApi.status).toBeDefined();
|
|
expect(runApi.approve).toBeDefined();
|
|
expect(runApi.getState).toBeDefined();
|
|
});
|
|
|
|
it("should export councilApi with expected methods", async () => {
|
|
const { councilApi } = await import("@/app/utils/api-client");
|
|
expect(councilApi.list).toBeDefined();
|
|
expect(councilApi.get).toBeDefined();
|
|
expect(councilApi.create).toBeDefined();
|
|
expect(councilApi.update).toBeDefined();
|
|
expect(councilApi.delete).toBeDefined();
|
|
});
|
|
|
|
it("should export pdfApi with upload method", async () => {
|
|
const { pdfApi } = await import("@/app/utils/api-client");
|
|
expect(pdfApi.upload).toBeDefined();
|
|
});
|
|
});
|