refactor(guild-discovery): drop serviceEndpoint (no longer needed)
Pairs with Dialectic.Backend@5cf4302 which removes the backend-driven
broadcast that was the only consumer of serviceEndpoint. With agent-
driven recruitment broadcasts via fabric-send-message, the
service-to-service URL distinction goes away (agents use the regular
guild endpoint).
Removed:
- GuildNode.serviceEndpoint column (TypeORM will drop on next sync)
- GET /api/auth/me/guilds + /api/nodes response fields
- NodeAdminService.setServiceEndpoint()
- cli 'node set-service-endpoint' subcommand
Kept:
- GuildNode.purpose (used by fabric-guild-list for intent-based
channel discovery — still wanted)
This commit is contained in:
@@ -56,29 +56,6 @@ export class NodeAdminService {
|
||||
};
|
||||
}
|
||||
|
||||
// Admin-only via cli: set the service-to-service endpoint for a guild
|
||||
// node. This is the URL that another *service in the same deployment*
|
||||
// (e.g. dialectic-backend on compose) uses to reach the guild — NOT
|
||||
// the public client-facing URL. Pass empty string to clear.
|
||||
async setServiceEndpoint(nodeId: string, serviceEndpoint: string) {
|
||||
const node = await this.nodeRepo.findOne({ where: { nodeId } });
|
||||
if (!node) throw new NotFoundException(`node ${nodeId} not found`);
|
||||
const trimmed = String(serviceEndpoint ?? '').trim();
|
||||
node.serviceEndpoint = trimmed === '' ? null : trimmed;
|
||||
const saved = await this.nodeRepo.save(node);
|
||||
await this.audit.write({
|
||||
action: 'node.set_service_endpoint',
|
||||
targetType: 'node',
|
||||
targetId: saved.nodeId,
|
||||
detail: JSON.stringify({ serviceEndpoint: saved.serviceEndpoint, via: 'cli' }),
|
||||
});
|
||||
return {
|
||||
nodeId: saved.nodeId,
|
||||
name: saved.name,
|
||||
serviceEndpoint: saved.serviceEndpoint,
|
||||
};
|
||||
}
|
||||
|
||||
// Admin-only via cli (never HTTP): set the free-form purpose string on
|
||||
// a guild node. Pass an empty string to clear it (null).
|
||||
async setPurpose(nodeId: string, purpose: string) {
|
||||
|
||||
Reference in New Issue
Block a user