Checkpoint: Phase 13: Seed data for agents and orchestrator

- server/seed.ts: 6 default system agents (Orchestrator, Browser, Tool Builder, Agent Compiler, Coder, Researcher)
- Idempotent: runs only when agents table is empty
- Integrated into server/_core/index.ts startup
- server/seed.test.ts: 18 vitest tests, all pass
- Total: 69 tests pass (7 test files)
This commit is contained in:
Manus
2026-03-20 20:39:08 -04:00
parent b1a3a994bc
commit 73a26d8a8a
4 changed files with 583 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import { registerOAuthRoutes } from "./oauth";
import { appRouter } from "../routers";
import { createContext } from "./context";
import { serveStatic, setupVite } from "./vite";
import { seedDefaults } from "../seed";
function isPortAvailable(port: number): Promise<boolean> {
return new Promise(resolve => {
@@ -57,6 +58,9 @@ async function startServer() {
console.log(`Port ${preferredPort} is busy, using port ${port} instead`);
}
// Run idempotent seed on every startup (no-op if data already exists)
await seedDefaults();
server.listen(port, () => {
console.log(`Server running on http://localhost:${port}/`);
});