feat(M6): Set up orchestrator service foundation
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add NestJS-based orchestrator service structure for M6-AgentOrchestration. Changes: - Migrate from Express to NestJS architecture - Add health check endpoint module - Add placeholder modules: coordinator, git, killswitch, monitor, queue, spawner, valkey - Update configuration for NestJS - Update lockfile for new dependencies This is foundational work for M6-AgentOrchestration milestone. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
20
apps/orchestrator/src/api/health/health.controller.ts
Normal file
20
apps/orchestrator/src/api/health/health.controller.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Controller, Get } from "@nestjs/common";
|
||||
|
||||
@Controller("health")
|
||||
export class HealthController {
|
||||
@Get()
|
||||
check() {
|
||||
return {
|
||||
status: "ok",
|
||||
service: "orchestrator",
|
||||
version: "0.0.6",
|
||||
timestamp: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
@Get("ready")
|
||||
ready() {
|
||||
// TODO: Check Valkey connection, Docker daemon
|
||||
return { ready: true };
|
||||
}
|
||||
}
|
||||
7
apps/orchestrator/src/api/health/health.module.ts
Normal file
7
apps/orchestrator/src/api/health/health.module.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Module } from "@nestjs/common";
|
||||
import { HealthController } from "./health.controller";
|
||||
|
||||
@Module({
|
||||
controllers: [HealthController],
|
||||
})
|
||||
export class HealthModule {}
|
||||
@@ -1,17 +0,0 @@
|
||||
import { FastifyPluginAsync } from 'fastify';
|
||||
|
||||
export const healthRoutes: FastifyPluginAsync = async (fastify) => {
|
||||
fastify.get('/health', async () => {
|
||||
return {
|
||||
status: 'ok',
|
||||
service: 'orchestrator',
|
||||
version: '0.0.6',
|
||||
timestamp: new Date().toISOString()
|
||||
};
|
||||
});
|
||||
|
||||
fastify.get('/health/ready', async () => {
|
||||
// TODO: Check Valkey connection, Docker daemon
|
||||
return { ready: true };
|
||||
});
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
import Fastify from 'fastify';
|
||||
import { healthRoutes } from './routes/health.routes.js';
|
||||
|
||||
export async function createServer() {
|
||||
const fastify = Fastify({
|
||||
logger: true,
|
||||
});
|
||||
|
||||
// Health check routes
|
||||
await fastify.register(healthRoutes);
|
||||
|
||||
return fastify;
|
||||
}
|
||||
Reference in New Issue
Block a user