Backend layer wiring the panel to the host agent's per-instance command
channel (the unblocker for the Server-page rework):
- NatsService.requestScoped(): request-reply with a LICENSE-SCOPED reply
subject (corrosion.{license}.reply.<id>) so per-license-scoped agents
(no _INBOX permission) can actually reply — the design from the NATS
auth work, now exercised.
- InstancesModule: POST /api/instances/:id/lifecycle {action} (start/
stop/restart/status/steam_update, server.manage) and POST :id/rcon
{command} (server.console). Tenant-guarded via game_instances.
- GET /api/servers/agent-credentials: derives the agent's NATS user/
password (HMAC) so a customer can configure their agent — closes the
post-auth setup gap.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14 lines
520 B
TypeScript
14 lines
520 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { InstancesController } from './instances.controller';
|
|
import { InstancesService } from './instances.service';
|
|
import { GameInstance } from '../../entities/game-instance.entity';
|
|
import { NatsService } from '../../services/nats.service';
|
|
|
|
@Module({
|
|
imports: [TypeOrmModule.forFeature([GameInstance])],
|
|
controllers: [InstancesController],
|
|
providers: [InstancesService, NatsService],
|
|
})
|
|
export class InstancesModule {}
|